diff --git a/test/playlist-controller.test.js b/test/playlist-controller.test.js index e2580e3dd..af6f75029 100644 --- a/test/playlist-controller.test.js +++ b/test/playlist-controller.test.js @@ -6365,6 +6365,14 @@ QUnit.module('PlaylistController contentSteering', { ] }; + this.setupSteeringPlaylists = (pc, mainPlaylist) => { + pc.main = () => mainPlaylist; + pc.media = () => mainPlaylist.playlists[0]; + pc.mainPlaylistLoader_.main = mainPlaylist; + pc.mainPlaylistLoader_.media = () => mainPlaylist.playlists[0]; + pc.selectPlaylist = () => pc.main().playlists[0]; + }; + }, afterEach(assert) { sharedHooks.afterEach.call(this, assert); @@ -6892,6 +6900,10 @@ QUnit.test('Pathway cloning - add a new pathway when the clone has not existed', const pc = new PlaylistController(options); + // Set up steering playlists + this.setupSteeringPlaylists(pc, this.csMainPlaylist); + pc.attachContentSteeringListeners_(); + this.csMainPlaylist.playlists.forEach(p => { p.attributes['PATHWAY-ID'] = p.attributes.serviceLocation; p.attributes.serviceLocation = undefined; @@ -6949,6 +6961,9 @@ QUnit.test('Pathway cloning - update the pathway when the BASE-ID does not match const pc = new PlaylistController(options); + this.setupSteeringPlaylists(pc, this.csMainPlaylist); + pc.attachContentSteeringListeners_(); + this.csMainPlaylist.playlists.forEach(p => { p.attributes['PATHWAY-ID'] = p.attributes.serviceLocation; p.attributes.serviceLocation = undefined; @@ -7020,6 +7035,9 @@ QUnit.test('Pathway cloning - update the pathway when there is a new param', fun const pc = new PlaylistController(options); + this.setupSteeringPlaylists(pc, this.csMainPlaylist); + pc.attachContentSteeringListeners_(); + this.csMainPlaylist.playlists.forEach(p => { p.attributes['PATHWAY-ID'] = p.attributes.serviceLocation; p.attributes.serviceLocation = undefined; @@ -7093,6 +7111,9 @@ QUnit.test('Pathway cloning - update the pathway when a param is missing', funct const pc = new PlaylistController(options); + this.setupSteeringPlaylists(pc, this.csMainPlaylist); + pc.attachContentSteeringListeners_(); + this.csMainPlaylist.playlists.forEach(p => { p.attributes['PATHWAY-ID'] = p.attributes.serviceLocation; p.attributes.serviceLocation = undefined; @@ -7163,6 +7184,9 @@ QUnit.test('Pathway cloning - delete the pathway when it is no longer in the ste const pc = new PlaylistController(options); + this.setupSteeringPlaylists(pc, this.csMainPlaylist); + pc.attachContentSteeringListeners_(); + this.csMainPlaylist.playlists.forEach(p => { p.attributes['PATHWAY-ID'] = p.attributes.serviceLocation; p.attributes.serviceLocation = undefined; @@ -7221,6 +7245,9 @@ QUnit.test('Pathway cloning - do nothing when next and past clones are the same' const pc = new PlaylistController(options); + this.setupSteeringPlaylists(pc, this.csMainPlaylist); + pc.attachContentSteeringListeners_(); + this.csMainPlaylist.playlists.forEach(p => { p.attributes['PATHWAY-ID'] = p.attributes.serviceLocation; p.attributes.serviceLocation = undefined; diff --git a/test/videojs-http-streaming.test.js b/test/videojs-http-streaming.test.js index 1c5ae92f1..d69434601 100644 --- a/test/videojs-http-streaming.test.js +++ b/test/videojs-http-streaming.test.js @@ -257,7 +257,7 @@ QUnit.test('VhsHandler is referenced by player.tech().vhs', function(assert) { ); }); -QUnit.test.only('options are updated when setOptions is called', function(assert) { +QUnit.test('options are updated when setOptions is called', function(assert) { this.player.src({ src: 'manifest/playlist.m3u8', type: 'application/vnd.apple.mpegurl'