Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(648)

Side by Side Diff: LayoutTests/http/tests/media/media-source/mediasource-util.js

Issue 273153002: MSE: Add basic sequence AppendMode layout tests (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix nits Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « LayoutTests/http/tests/media/media-source/mediasource-sequencemode-append-buffer-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 (function(window) { 1 (function(window) {
2 // Set the testharness.js timeout to 120 seconds so that it is higher than 2 // Set the testharness.js timeout to 120 seconds so that it is higher than
3 // the LayoutTest timeout. This prevents testharness.js from prematurely 3 // the LayoutTest timeout. This prevents testharness.js from prematurely
4 // terminating tests and allows the LayoutTest runner to control when to 4 // terminating tests and allows the LayoutTest runner to control when to
5 // timeout the test. 5 // timeout the test.
6 setup({ explicit_timeout: 120000 }); 6 setup({ explicit_timeout: 120000 });
7 7
8 var SEGMENT_INFO_LIST = [ 8 var SEGMENT_INFO_LIST = [
9 { 9 {
10 url: '/media/resources/media-source/webm/test.webm', 10 url: '/media/resources/media-source/webm/test.webm',
11 type: 'video/webm; codecs="vp8, vorbis"', 11 type: 'video/webm; codecs="vp8, vorbis"',
12 // FIXME: Get the init segment duration fixed to match duration afte r append. 12 // FIXME: Get the init segment duration fixed to match duration afte r append.
13 // See http://crbug.com/354284. 13 // See http://crbug.com/354284.
14 durationInInitSegment: 6.042, 14 durationInInitSegment: 6.042,
15 duration: 6.051, 15 duration: 6.051,
16 // Supports jagged-ended stream end timestamps with some less than d uration: 16 // Supports jagged-ended stream end timestamps with some less than d uration:
17 bufferedRangeEndBeforeEndOfStream: 6.040, 17 bufferedRangeEndBeforeEndOfStream: 6.040,
18 init: { offset: 0, size: 4357 }, 18 init: { offset: 0, size: 4357 },
19 media: [ 19 media: [
20 { offset: 4357, size: 11830, timecode: 0 }, 20 { offset: 4357, size: 11830, timecode: 0, highest_end_time: 0.3 98 },
21 { offset: 16187, size: 12588, timecode: 0.385 }, 21 { offset: 16187, size: 12588, timecode: 0.385, highest_end_time : 0.797 },
22 { offset: 28775, size: 14588, timecode: 0.779 }, 22 { offset: 28775, size: 14588, timecode: 0.779, highest_end_time : 1.195 },
23 { offset: 43363, size: 13023, timecode: 1.174 }, 23 { offset: 43363, size: 13023, timecode: 1.174, highest_end_time : 1.593 },
24 { offset: 56386, size: 13127, timecode: 1.592 }, 24 { offset: 56386, size: 13127, timecode: 1.592, highest_end_time : 1.992 },
25 { offset: 69513, size: 14456, timecode: 1.987 }, 25 { offset: 69513, size: 14456, timecode: 1.987, highest_end_time : 2.39 },
26 { offset: 83969, size: 13458, timecode: 2.381 }, 26 { offset: 83969, size: 13458, timecode: 2.381, highest_end_time : 2.789 },
27 { offset: 97427, size: 14566, timecode: 2.776 }, 27 { offset: 97427, size: 14566, timecode: 2.776, highest_end_time : 3.187 },
28 { offset: 111993, size: 13201, timecode: 3.171 }, 28 { offset: 111993, size: 13201, timecode: 3.171, highest_end_tim e: 3.585 },
29 { offset: 125194, size: 14061, timecode: 3.566 }, 29 { offset: 125194, size: 14061, timecode: 3.566, highest_end_tim e: 3.984 },
30 { offset: 139255, size: 15353, timecode: 3.96 }, 30 { offset: 139255, size: 15353, timecode: 3.96, highest_end_time : 4.382 },
31 { offset: 154608, size: 13618, timecode: 4.378 }, 31 { offset: 154608, size: 13618, timecode: 4.378, highest_end_tim e: 4.781 },
32 { offset: 168226, size: 15094, timecode: 4.773 }, 32 { offset: 168226, size: 15094, timecode: 4.773, highest_end_tim e: 5.179 },
33 { offset: 183320, size: 13069, timecode: 5.168 }, 33 { offset: 183320, size: 13069, timecode: 5.168, highest_end_tim e: 5.577 },
34 { offset: 196389, size: 13788, timecode: 5.563 }, 34 { offset: 196389, size: 13788, timecode: 5.563, highest_end_tim e: 5.976 },
35 { offset: 210177, size: 9009, timecode: 5.957 }, 35 { offset: 210177, size: 9009, timecode: 5.957, highest_end_time : 6.042 },
36 ], 36 ],
37 }, 37 },
38 { 38 {
39 url: '/media/resources/media-source/mp4/test.mp4', 39 url: '/media/resources/media-source/mp4/test.mp4',
40 type: 'video/mp4; codecs="mp4a.40.2, avc1.4D401E"', 40 type: 'video/mp4; codecs="mp4a.40.2, avc1.4D401E"',
41 durationInInitSegment: 6.0368, 41 durationInInitSegment: 6.0368,
42 duration: 6.0424, 42 duration: 6.0424,
43 bufferedRangeEndBeforeEndOfStream: 6.0368, 43 bufferedRangeEndBeforeEndOfStream: 6.0368,
44 init: { offset: 0, size: 1178 }, 44 init: { offset: 0, size: 1178 },
45 media: [ 45 media: [
46 { offset: 1246, size: 23828, timecode: 0 }, 46 // FIXME: Fix these timecodes to be PTS, not DTS, and highest_en d_times to correspond
47 { offset: 25142, size: 25394, timecode: 0.797 }, 47 // to highest PTS+duration, not highest DTS+duration. See http:/ /crbug.com/373039.
48 { offset: 50604, size: 24761, timecode: 1.594 }, 48 // FIXME: Some segments are parsed to start with keyframe but DT S < PTS. See
49 { offset: 75433, size: 25138, timecode: 2.390 }, 49 // http://crbug.com/371947 and http://crbug.com/367786.
50 { offset: 100639, size: 22935, timecode: 3.187 }, 50 { offset: 1246, size: 23828, timecode: 0, highest_end_time: 0.8 35917 },
51 { offset: 123642, size: 24995, timecode: 3.984}, 51 { offset: 25142, size: 25394, timecode: 0.797, highest_end_time : 1.625395 },
52 { offset: 148637, size: 24968, timecode: 4.781 }, 52 { offset: 50604, size: 24761, timecode: 1.594, highest_end_time : 2.414874 },
53 { offset: 173689, size: 19068, timecode: 5.578 }, 53 { offset: 75433, size: 25138, timecode: 2.390, highest_end_time : 3.227572 },
54 { offset: 192757, size: 200, timecode: 5.619 }, 54 { offset: 100639, size: 22935, timecode: 3.187, highest_end_tim e: 4.017051 },
55 { offset: 123642, size: 24995, timecode: 3.984, highest_end_tim e: 4.806529 },
56 { offset: 148637, size: 24968, timecode: 4.781, highest_end_tim e: 5.619228 },
57 { offset: 173689, size: 19068, timecode: 5.578, highest_end_tim e: 6.0424 },
58 { offset: 192757, size: 200, timecode: 5.619, highest_end_time: 6.0424 },
55 ], 59 ],
56 } 60 }
57 ]; 61 ];
58 EventExpectationsManager = function(test) 62 EventExpectationsManager = function(test)
59 { 63 {
60 this.test_ = test; 64 this.test_ = test;
61 this.eventTargetList_ = []; 65 this.eventTargetList_ = [];
62 this.waitCallbacks_ = []; 66 this.waitCallbacks_ = [];
63 }; 67 };
64 68
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 return s + " }"; 390 return s + " }";
387 } 391 }
388 392
389 window['assertBufferedEquals'] = function(obj, expected, description) 393 window['assertBufferedEquals'] = function(obj, expected, description)
390 { 394 {
391 var actual = timeRangesToString(obj.buffered); 395 var actual = timeRangesToString(obj.buffered);
392 assert_equals(actual, expected, description); 396 assert_equals(actual, expected, description);
393 }; 397 };
394 398
395 })(window); 399 })(window);
OLDNEW
« no previous file with comments | « LayoutTests/http/tests/media/media-source/mediasource-sequencemode-append-buffer-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698