From c3d43b766f48390024cc2834f7d704700d5b6252 Mon Sep 17 00:00:00 2001 From: Julian Domingo Date: Tue, 27 Aug 2024 01:06:14 -0700 Subject: [PATCH] Cleaned up stale, commented code from streaming_engine_unit.js. --- test/media/streaming_engine_unit.js | 53 ----------------------------- 1 file changed, 53 deletions(-) diff --git a/test/media/streaming_engine_unit.js b/test/media/streaming_engine_unit.js index 6609bf7da9..eaa0e98672 100644 --- a/test/media/streaming_engine_unit.js +++ b/test/media/streaming_engine_unit.js @@ -1126,59 +1126,6 @@ describe('StreamingEngine', () => { }); it('defers old stream cleanup on switchVariant during update', async () => { - //setupVod(); - - //// Delay the appendBuffer call until later so we are waiting for this to - //// finish when we switch. - //let p = new shaka.util.PublicPromise(); - //const old = mediaSourceEngine.appendBuffer; - //// Replace the whole spy since we want to call the original. - //mediaSourceEngine.appendBuffer = - //jasmine.createSpy('appendBuffer') - //.and.callFake(async (type, data, reference) => { - //await p; - //return Util.invokeSpy(old, type, data, reference); - //}); - - //streamingEngine.switchVariant(variant, [> clearBuffer= <] true); - //await streamingEngine.start(); - //playing = true; - - //expect(variant.video.createSegmentIndex).not.toHaveBeenCalled(); - //await Util.fakeEventLoop(1); - //expect(variant.video.createSegmentIndex).toHaveBeenCalledTimes(1); - - //streamingEngine.switchVariant(alternateVariant, [> clearBuffer= <] true); - - //// Since a switch occurred in the middle of a fetch for a 'initialVariant' - //// segment, the closing of the segment index for 'initialVariant' was - //// deferred. - //expect(variant.video.closeSegmentIndex).not.toHaveBeenCalled(); - //expect(variant.video.segmentIndex).not.toBe(null); - - //// Finish the update for 'variant'. - //p.resolve(); - - //// p = new shaka.util.PublicPromise(); - //await runTest(); - //// p.resolve(); - //// await Util.fakeEventLoop(5); - //expect(variant.video.closeSegmentIndex).toHaveBeenCalledTimes(1); - //expect(variant.video.segmentIndex).toBe(null); - // Create a new promise to delay the appendBuffer for 'alternateVariant'. - // p = new shaka.util.PublicPromise(); - // await Util.fakeEventLoop(1); - - - // Finish the update for 'alternateVariant'. At this point, the - // segmentIndex for 'variant' has been closed. - - // await runTest(); - // await Util.fakeEventLoop(5); - //expect(variant.video.closeSegmentIndex).toHaveBeenCalledTimes(1); - //expect(variant.video.segmentIndex).toBe(null); - - // Delay the appendBuffer call until later so we are waiting for this to // finish when we switch. let p = new shaka.util.PublicPromise();