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

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

Issue 319213002: Fix MediaSource.duration setter behavior to match the current spec. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 6 years, 6 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
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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 sourceBuffer.abort(); 122 sourceBuffer.abort();
123 123
124 assert_false(sourceBuffer.updating, "updating"); 124 assert_false(sourceBuffer.updating, "updating");
125 125
126 test.waitForExpectedEvents(function() 126 test.waitForExpectedEvents(function()
127 { 127 {
128 test.done(); 128 test.done();
129 }); 129 });
130 }, "Test aborting a remove operation."); 130 }, "Test aborting a remove operation.");
131 131
132 mediasource_testafterdataloaded(function(test, mediaElement, mediaSour ce, segmentInfo, sourceBuffer, mediaData)
133 {
134 sourceBuffer.appendBuffer(mediaData);
135
136 test.expectEvent(sourceBuffer, "updatestart");
137 test.expectEvent(sourceBuffer, "update");
138 test.expectEvent(sourceBuffer, "updateend");
139
140 test.waitForExpectedEvents(function()
141 {
142 mediaSource.duration = 10;
philipj_slow 2014/06/16 13:26:19 Can you assert_less_than(mediaSource.duration, 10)
acolwell GONE FROM CHROMIUM 2014/06/17 01:24:02 Done.
143
144 assert_false(sourceBuffer.updating, "updating");
philipj_slow 2014/06/16 13:26:18 nit: misindented from here
acolwell GONE FROM CHROMIUM 2014/06/17 01:24:02 Done.
145
146 sourceBuffer.remove(mediaSource.duration, mediaSource.duration + 2 );
147
148 assert_true(sourceBuffer.updating, "updating");
149 test.expectEvent(sourceBuffer, "updatestart");
150 test.expectEvent(sourceBuffer, "update");
151 test.expectEvent(sourceBuffer, "updateend");
152 });
153
154 test.waitForExpectedEvents(function()
155 {
156 test.done();
157 });
158
159 }, "Test remove with a start at the duration.");
132 160
133 mediasource_testafterdataloaded(function(test, mediaElement, mediaSour ce, segmentInfo, sourceBuffer, mediaData) 161 mediasource_testafterdataloaded(function(test, mediaElement, mediaSour ce, segmentInfo, sourceBuffer, mediaData)
134 { 162 {
135 test.expectEvent(sourceBuffer, "updatestart"); 163 test.expectEvent(sourceBuffer, "updatestart");
136 test.expectEvent(sourceBuffer, "update"); 164 test.expectEvent(sourceBuffer, "update");
137 test.expectEvent(sourceBuffer, "updateend"); 165 test.expectEvent(sourceBuffer, "updateend");
138 sourceBuffer.appendBuffer(mediaData); 166 sourceBuffer.appendBuffer(mediaData);
139 167
140 test.waitForExpectedEvents(function() 168 test.waitForExpectedEvents(function()
141 { 169 {
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 mp4: "{ [0.000, 1.022) }", 260 mp4: "{ [0.000, 1.022) }",
233 }; 261 };
234 262
235 // Using MAX_VALUE rather than POSITIVE_INFINITY here due to lack 263 // Using MAX_VALUE rather than POSITIVE_INFINITY here due to lack
236 // of 'unrestricted' on end parameter. (See comment in SourceBuffe r.idl) 264 // of 'unrestricted' on end parameter. (See comment in SourceBuffe r.idl)
237 removeAndCheckBufferedRanges(test, sourceBuffer, 1, Number.MAX_VAL UE, expectations[subType]); 265 removeAndCheckBufferedRanges(test, sourceBuffer, 1, Number.MAX_VAL UE, expectations[subType]);
238 }, "Test removing the end of appended data."); 266 }, "Test removing the end of appended data.");
239 </script> 267 </script>
240 </body> 268 </body>
241 </html> 269 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698