b2b19c42 by David LaPalomento

Restore global HLS options after the test completes

One test case was modifying the page-level hls options but failing to restore the old values. This leaked environment issues into other tests.
1 parent 66a0f5ef
...@@ -1526,6 +1526,7 @@ test('reloads out-of-date live playlists when switching variants', function() { ...@@ -1526,6 +1526,7 @@ test('reloads out-of-date live playlists when switching variants', function() {
1526 }); 1526 });
1527 1527
1528 test('if withCredentials global option is used, withCredentials is set on the XHR object', function() { 1528 test('if withCredentials global option is used, withCredentials is set on the XHR object', function() {
1529 var hlsOptions = videojs.options.hls;
1529 player.dispose(); 1530 player.dispose();
1530 videojs.options.hls = { 1531 videojs.options.hls = {
1531 withCredentials: true 1532 withCredentials: true
...@@ -1538,6 +1539,7 @@ test('if withCredentials global option is used, withCredentials is set on the XH ...@@ -1538,6 +1539,7 @@ test('if withCredentials global option is used, withCredentials is set on the XH
1538 openMediaSource(player); 1539 openMediaSource(player);
1539 ok(requests[0].withCredentials, 1540 ok(requests[0].withCredentials,
1540 'with credentials should be set to true if that option is passed in'); 1541 'with credentials should be set to true if that option is passed in');
1542 videojs.options.hls = hlsOptions;
1541 }); 1543 });
1542 1544
1543 test('if withCredentials src option is used, withCredentials is set on the XHR object', function() { 1545 test('if withCredentials src option is used, withCredentials is set on the XHR object', function() {
......