| 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 532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 543 test.expectEvent(sourceBuffer, 'updatestart', 'Append started.'); | 543 test.expectEvent(sourceBuffer, 'updatestart', 'Append started.'); |
| 544 test.expectEvent(sourceBuffer, 'update', 'Append success.'); | 544 test.expectEvent(sourceBuffer, 'update', 'Append success.'); |
| 545 test.expectEvent(sourceBuffer, 'updateend', 'Append ended.'); | 545 test.expectEvent(sourceBuffer, 'updateend', 'Append ended.'); |
| 546 | 546 |
| 547 assert_throws( { name: 'TypeError'} , | 547 assert_throws( { name: 'TypeError'} , |
| 548 function() { sourceBuffer.appendBuffer(null); }, | 548 function() { sourceBuffer.appendBuffer(null); }, |
| 549 'appendBuffer(null) throws an exception.'); | 549 'appendBuffer(null) throws an exception.'); |
| 550 test.done(); | 550 test.done(); |
| 551 }, 'Test appending null.'); | 551 }, 'Test appending null.'); |
| 552 | 552 |
| 553 if (window.SharedArrayBuffer) { |
| 554 mediasource_test(function(test, mediaElement, mediaSource) |
| 555 { |
| 556 var sourceBuffer = mediaSource.addSourceBuffer(MediaSourceUtil
.VIDEO_ONLY_TYPE); |
| 557 |
| 558 test.expectEvent(sourceBuffer, 'updatestart', 'Append started.
'); |
| 559 test.expectEvent(sourceBuffer, 'update', 'Append success.'); |
| 560 test.expectEvent(sourceBuffer, 'updateend', 'Append ended.'); |
| 561 |
| 562 assert_throws( { name: 'TypeError'} , |
| 563 function() { sourceBuffer.appendBuffer(new Uint8Array(new
SharedArrayBuffer(16))); }, |
| 564 'appendBuffer() of SharedArrayBuffer view throws an except
ion.'); |
| 565 test.done(); |
| 566 }, 'Test appending SharedArrayBuffer view.'); |
| 567 } |
| 568 |
| 553 mediasource_testafterdataloaded(function(test, mediaElement, mediaSour
ce, segmentInfo, sourceBuffer, mediaData) | 569 mediasource_testafterdataloaded(function(test, mediaElement, mediaSour
ce, segmentInfo, sourceBuffer, mediaData) |
| 554 { | 570 { |
| 555 mediaSource.removeSourceBuffer(sourceBuffer); | 571 mediaSource.removeSourceBuffer(sourceBuffer); |
| 556 | 572 |
| 557 assert_throws( { name: 'InvalidStateError'} , | 573 assert_throws( { name: 'InvalidStateError'} , |
| 558 function() { sourceBuffer.appendBuffer(mediaData); }, | 574 function() { sourceBuffer.appendBuffer(mediaData); }, |
| 559 'appendBuffer() throws an exception when called after removeSo
urceBuffer().'); | 575 'appendBuffer() throws an exception when called after removeSo
urceBuffer().'); |
| 560 test.done(); | 576 test.done(); |
| 561 }, 'Test appending after removeSourceBuffer().'); | 577 }, 'Test appending after removeSourceBuffer().'); |
| 562 </script> | 578 </script> |
| 563 </body> | 579 </body> |
| 564 </html> | 580 </html> |
| OLD | NEW |