OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script src="/w3c/resources/testharness.js"></script> | 4 <script src="/w3c/resources/testharness.js"></script> |
5 <script src="/w3c/resources/testharnessreport.js"></script> | 5 <script src="/w3c/resources/testharnessreport.js"></script> |
6 <script src="mediasource-util.js"></script> | 6 <script src="mediasource-util.js"></script> |
7 <link rel="stylesheet" href="/w3c/resources/testharness.css"> | 7 <link rel="stylesheet" href="/w3c/resources/testharness.css"> |
8 </head> | 8 </head> |
9 <body> | 9 <body> |
10 <div id="log"></div> | 10 <div id="log"></div> |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 | 49 |
50 // Append a segment from the middle of the stream to mak
e sure that seekable does not use buffered.start(0) or duration as first or last
value | 50 // Append a segment from the middle of the stream to mak
e sure that seekable does not use buffered.start(0) or duration as first or last
value |
51 var midSegment = MediaSourceUtil.extractSegmentData(medi
aData, segmentInfo.media[2]); | 51 var midSegment = MediaSourceUtil.extractSegmentData(medi
aData, segmentInfo.media[2]); |
52 test.expectEvent(sourceBuffer, 'update'); | 52 test.expectEvent(sourceBuffer, 'update'); |
53 test.expectEvent(sourceBuffer, 'updateend'); | 53 test.expectEvent(sourceBuffer, 'updateend'); |
54 sourceBuffer.appendBuffer(midSegment); | 54 sourceBuffer.appendBuffer(midSegment); |
55 test.waitForExpectedEvents(function() | 55 test.waitForExpectedEvents(function() |
56 { | 56 { |
57 assert_equals(mediaElement.seekable.length, 1, 'medi
aElement.seekable.length'); | 57 assert_equals(mediaElement.seekable.length, 1, 'medi
aElement.seekable.length'); |
58 assert_equals(mediaElement.buffered.length, 1, 'medi
aElement.buffered.length'); | 58 assert_equals(mediaElement.buffered.length, 1, 'medi
aElement.buffered.length'); |
| 59 assert_not_equals(mediaElement.seekable.start(0), me
diaElement.buffered.start(0)); |
59 assert_equals(mediaElement.seekable.start(0), 0); | 60 assert_equals(mediaElement.seekable.start(0), 0); |
60 assert_not_equals(mediaElement.seekable.end(0), medi
aElement.duration); | 61 assert_not_equals(mediaElement.seekable.end(0), medi
aElement.duration); |
61 assert_not_equals(0, mediaElement.buffered.start(0))
; | 62 assert_not_equals(mediaElement.seekable.end(0), medi
aElement.buffered.start(0)); |
62 assert_equals(mediaElement.seekable.end(0), mediaEle
ment.buffered.end(0)); | 63 assert_equals(mediaElement.seekable.end(0), mediaEle
ment.buffered.end(0)); |
63 test.done(); | 64 test.done(); |
64 }); | 65 }); |
65 }); | 66 }); |
66 }); | 67 }); |
67 }, 'Get seekable time ranges on an infinite stream.'); | 68 }, 'Get seekable time ranges on an infinite stream.'); |
68 </script> | 69 </script> |
69 </body> | 70 </body> |
70 </html> | 71 </html> |
OLD | NEW |