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

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

Issue 552943002: MSE: Start letting SourceBuffer begin to do initialization segment received algorithm (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Updated to be part 1 of a 3-sided blink->chromium->blink set of changes Created 6 years, 3 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 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 }, 'Test zero byte SourceBuffer.appendBuffer() call triggering an "end ed" to "open" transition.'); 146 }, 'Test zero byte SourceBuffer.appendBuffer() call triggering an "end ed" to "open" transition.');
147 147
148 mediasource_testafterdataloaded(function(test, mediaElement, mediaSour ce, segmentInfo, sourceBuffer, mediaData) 148 mediasource_testafterdataloaded(function(test, mediaElement, mediaSour ce, segmentInfo, sourceBuffer, mediaData)
149 { 149 {
150 test.expectEvent(sourceBuffer, 'updatestart', 'Append started.'); 150 test.expectEvent(sourceBuffer, 'updatestart', 'Append started.');
151 test.expectEvent(sourceBuffer, 'abort', 'Append aborted.'); 151 test.expectEvent(sourceBuffer, 'abort', 'Append aborted.');
152 test.expectEvent(sourceBuffer, 'updateend', 'Append ended.'); 152 test.expectEvent(sourceBuffer, 'updateend', 'Append ended.');
153 sourceBuffer.appendBuffer(mediaData); 153 sourceBuffer.appendBuffer(mediaData);
154 154
155 assert_true(sourceBuffer.updating, 'updating attribute is true'); 155 assert_true(sourceBuffer.updating, 'updating attribute is true');
156 assert_equals(mediaSource.activeSourceBuffers.length, 0, 'activeSo urceBuffers.length');
156 157
157 test.expectEvent(mediaSource.activeSourceBuffers, 'removesourcebuf fer', 'activeSourceBuffers');
158 test.expectEvent(mediaSource.sourceBuffers, 'removesourcebuffer', 'sourceBuffers'); 158 test.expectEvent(mediaSource.sourceBuffers, 'removesourcebuffer', 'sourceBuffers');
159 mediaSource.removeSourceBuffer(sourceBuffer); 159 mediaSource.removeSourceBuffer(sourceBuffer);
160 160
161 assert_false(sourceBuffer.updating, 'updating attribute is false') ; 161 assert_false(sourceBuffer.updating, 'updating attribute is false') ;
162 162
163 assert_throws('InvalidStateError', 163 assert_throws('InvalidStateError',
164 function() { sourceBuffer.appendBuffer(mediaData); }, 164 function() { sourceBuffer.appendBuffer(mediaData); },
165 'appendBuffer() throws an exception because it isn\'t attached to the mediaSource anymore.'); 165 'appendBuffer() throws an exception because it isn\'t attached to the mediaSource anymore.');
166 166
167 test.waitForExpectedEvents(function() 167 test.waitForExpectedEvents(function()
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after
555 mediaSource.removeSourceBuffer(sourceBuffer); 555 mediaSource.removeSourceBuffer(sourceBuffer);
556 556
557 assert_throws( { name: 'InvalidStateError'} , 557 assert_throws( { name: 'InvalidStateError'} ,
558 function() { sourceBuffer.appendBuffer(mediaData); }, 558 function() { sourceBuffer.appendBuffer(mediaData); },
559 'appendBuffer() throws an exception when called after removeSo urceBuffer().'); 559 'appendBuffer() throws an exception when called after removeSo urceBuffer().');
560 test.done(); 560 test.done();
561 }, 'Test appending after removeSourceBuffer().'); 561 }, 'Test appending after removeSourceBuffer().');
562 </script> 562 </script>
563 </body> 563 </body>
564 </html> 564 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698