Chromium Code Reviews| 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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 101 test.expectEvent(mediaSource, 'sourceopen', 'Source attached again '); | 101 test.expectEvent(mediaSource, 'sourceopen', 'Source attached again '); |
| 102 mediaElement.src = URL.createObjectURL(mediaSource); | 102 mediaElement.src = URL.createObjectURL(mediaSource); |
| 103 assert_equals(mediaSource.readyState, 'closed', 'Source closed'); | 103 assert_equals(mediaSource.readyState, 'closed', 'Source closed'); |
| 104 | 104 |
| 105 test.waitForExpectedEvents(function() | 105 test.waitForExpectedEvents(function() |
| 106 { | 106 { |
| 107 assert_equals(mediaSource.readyState, 'open', 'Source reopened '); | 107 assert_equals(mediaSource.readyState, 'open', 'Source reopened '); |
| 108 test.done(); | 108 test.done(); |
| 109 }); | 109 }); |
| 110 }, 'Test that MediaSource can reattach if closed first'); | 110 }, 'Test that MediaSource can reattach if closed first'); |
| 111 | |
| 112 mediasource_test(function(test, mediaElement, mediaSource) { | |
| 113 assert_equals(mediaSource.readyState, 'open', 'Source open'); | |
| 114 var url1 = URL.createObjectURL(mediaSource); | |
| 115 var url2 = URL.createObjectURL(mediaSource); | |
| 116 assert_not_equals(url1, url2, 'URLs not unique'); | |
| 117 test.done(); | |
| 118 }, 'Calling URL.createObjectURL multiple times should generate unique URLs each time'); | |
|
wolenetz
2016/07/11 18:03:17
I like this new test. Please also consider adding
servolk
2016/07/11 18:13:25
Done.
| |
| 111 </script> | 119 </script> |
| 112 </body> | 120 </body> |
| 113 </html> | 121 </html> |
| OLD | NEW |