414389a8 by Gary Katsevman

PR comment updates

1 parent 358ec163
...@@ -741,13 +741,14 @@ test('when outstanding XHRs are cancelled, they get aborted properly', function( ...@@ -741,13 +741,14 @@ test('when outstanding XHRs are cancelled, they get aborted properly', function(
741 741
742 ok(requests[1].aborted, 'XHR aborted'); 742 ok(requests[1].aborted, 'XHR aborted');
743 strictEqual(requests.length, 3, 'opened new XHR'); 743 strictEqual(requests.length, 3, 'opened new XHR');
744 notEqual(player.hls.segmentXhr_.url, requests[1].url, 'the segment xhr is nulled out'); 744 notEqual(player.hls.segmentXhr_.url, requests[1].url, 'a new segment is request that is not the aborted one');
745 strictEqual(readystatechanges, 0, 'onreadystatechange was not called'); 745 strictEqual(readystatechanges, 0, 'onreadystatechange was not called');
746 }); 746 });
747 747
748 test('segmentXhr is properly nulled out when dispose is called', function() { 748 test('segmentXhr is properly nulled out when dispose is called', function() {
749 var readystatechanges = 0, 749 var
750 oldDispose = videojs.Flash.prototype.dispose; 750 readystatechanges = 0,
751 oldDispose = videojs.Flash.prototype.dispose;
751 videojs.Flash.prototype.dispose = function() {}; 752 videojs.Flash.prototype.dispose = function() {};
752 753
753 player.src({ 754 player.src({
...@@ -756,15 +757,6 @@ test('segmentXhr is properly nulled out when dispose is called', function() { ...@@ -756,15 +757,6 @@ test('segmentXhr is properly nulled out when dispose is called', function() {
756 }); 757 });
757 openMediaSource(player); 758 openMediaSource(player);
758 standardXHRResponse(requests[0]); 759 standardXHRResponse(requests[0]);
759 player.hls.media = {
760 segments: [{
761 uri: '0.ts',
762 duration: 10
763 }, {
764 uri: '1.ts',
765 duration: 10
766 }]
767 };
768 760
769 // trigger a segment download request 761 // trigger a segment download request
770 player.trigger('timeupdate'); 762 player.trigger('timeupdate');
...@@ -1200,14 +1192,15 @@ test('disposes the playlist loader', function() { ...@@ -1200,14 +1192,15 @@ test('disposes the playlist loader', function() {
1200 }); 1192 });
1201 1193
1202 test('remove event handlers on dispose', function() { 1194 test('remove event handlers on dispose', function() {
1203 var player, 1195 var
1204 handlers = [], 1196 player,
1205 timeupdateOff = 0, 1197 handlers = [],
1206 waitingOff = 0, 1198 timeupdateOff = 0,
1207 oldOff, 1199 waitingOff = 0,
1208 type, 1200 oldOff,
1209 handler, 1201 type,
1210 i; 1202 handler,
1203 i;
1211 1204
1212 player = createPlayer(); 1205 player = createPlayer();
1213 player.src({ 1206 player.src({
......