Skip to content

Commit

Permalink
Remove useless test for impossible content
Browse files Browse the repository at this point in the history
What happens in this case is a "do not care" in our truth table for
fitting segments.
  • Loading branch information
joeyparrish committed Jan 26, 2023
1 parent 9d8b380 commit 29f270f
Showing 1 changed file with 0 additions and 36 deletions.
36 changes: 0 additions & 36 deletions test/dash/dash_parser_manifest_unit.js
Original file line number Diff line number Diff line change
Expand Up @@ -287,42 +287,6 @@ describe('DashParser Manifest', () => {
}));
});

it('rejects periods after one without duration', async () => {
const periodContents = [
' <AdaptationSet mimeType="video/mp4" lang="en" group="1">',
' <Representation bandwidth="100">',
' <SegmentTemplate startNumber="1" media="l-$Number$.mp4">',
' <SegmentTimeline>',
' <S t="0" d="10" />',
' </SegmentTimeline>',
' </SegmentTemplate>',
' </Representation>',
' </AdaptationSet>',
].join('\n');
const template = [
'<MPD mediaPresentationDuration="PT75S">',
' <Period id="1">',
'%(periodContents)s',
' </Period>',
' <Period id="2">',
'%(periodContents)s',
' </Period>',
'</MPD>',
].join('\n');
const source = sprintf(template, {periodContents: periodContents});

fakeNetEngine.setResponseText('dummy://foo', source);
/** @type {shaka.extern.Manifest} */
const manifest = await parser.start('dummy://foo', playerInterface);
const video = manifest.variants[0].video;
await video.createSegmentIndex();

// The first period has a segment from 0-10.
// With the second period skipping, we should fail to find a segment at 10.
expect(video.segmentIndex.find(0)).not.toBe(null);
expect(video.segmentIndex.find(10)).toBe(null);
});

it('calculates Period times when missing', async () => {
const periodContents = [
' <AdaptationSet mimeType="video/mp4" lang="en" group="1">',
Expand Down

0 comments on commit 29f270f

Please sign in to comment.