Skip to content

Commit

Permalink
Cleaned up stale, commented code from streaming_engine_unit.js.
Browse files Browse the repository at this point in the history
  • Loading branch information
JulianDomingo committed Aug 27, 2024
1 parent 486571e commit c3d43b7
Showing 1 changed file with 0 additions and 53 deletions.
53 changes: 0 additions & 53 deletions test/media/streaming_engine_unit.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit c3d43b7

Please sign in to comment.