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

Side by Side Diff: LayoutTests/http/tests/media/media-source/mediasource-timestamp-offset.html

Issue 245893002: Improve unprefixed MediaSource test coverage. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 8 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
OLDNEW
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 23 matching lines...) Expand all
34 simpleTimestampOffsetTest(0, 0, 'zero'); 34 simpleTimestampOffsetTest(0, 0, 'zero');
35 simpleTimestampOffsetTest(Number.POSITIVE_INFINITY, 'TypeError', 'posi tive infinity'); 35 simpleTimestampOffsetTest(Number.POSITIVE_INFINITY, 'TypeError', 'posi tive infinity');
36 simpleTimestampOffsetTest(Number.NEGATIVE_INFINITY, 'TypeError', 'nega tive infinity'); 36 simpleTimestampOffsetTest(Number.NEGATIVE_INFINITY, 'TypeError', 'nega tive infinity');
37 simpleTimestampOffsetTest(Number.NaN, 'TypeError', 'NaN'); 37 simpleTimestampOffsetTest(Number.NaN, 'TypeError', 'NaN');
38 simpleTimestampOffsetTest(undefined, 'TypeError', 'undefined'); 38 simpleTimestampOffsetTest(undefined, 'TypeError', 'undefined');
39 simpleTimestampOffsetTest(null, 0, 'null'); 39 simpleTimestampOffsetTest(null, 0, 'null');
40 simpleTimestampOffsetTest(false, 0, 'false'); 40 simpleTimestampOffsetTest(false, 0, 'false');
41 simpleTimestampOffsetTest(true, 1, 'true'); 41 simpleTimestampOffsetTest(true, 1, 'true');
42 simpleTimestampOffsetTest('10.5', 10.5, 'a number string'); 42 simpleTimestampOffsetTest('10.5', 10.5, 'a number string');
43 simpleTimestampOffsetTest('', 0, 'an empty string'); 43 simpleTimestampOffsetTest('', 0, 'an empty string');
44
45 mediasource_testafterdataloaded(function(test, mediaElement, mediaSour ce, segmentInfo, sourceBuffer, mediaData)
46 {
47 var initSegment = MediaSourceUtil.extractSegmentData(mediaData, se gmentInfo.init);
48 var mediaSegment = MediaSourceUtil.extractSegmentData(mediaData, s egmentInfo.media[0]);
49
50 test.expectEvent(sourceBuffer, "updateend", "initSegment append en ded.");
51 sourceBuffer.appendBuffer(initSegment);
52
53 test.waitForExpectedEvents(function()
54 {
55 test.expectEvent(sourceBuffer, "updateend", "mediaSegment appe nd ended.");
56 sourceBuffer.appendBuffer(mediaSegment);
57 });
58
59 test.waitForExpectedEvents(function()
60 {
61 mediaSource.endOfStream();
62
63 assert_equals(mediaSource.readyState, "ended");
64
65 mediaSource.sourceBuffers[0].timestampOffset = 2;
66
67 assert_equals(mediaSource.readyState, "open");
68
69 test.expectEvent(mediaSource, "sourceopen", "mediaSource fired 'sourceopen' event.");
70 });
71
72 test.waitForExpectedEvents(function()
73 {
74 test.done();
75 });
76 }, "Test setting timestampOffset in 'ended' state causes a transition to 'open'.");
77
44 </script> 78 </script>
45 </body> 79 </body>
46 </html> 80 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698