| 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 | 7 |
| 8 <link rel='stylesheet' href='/w3c/resources/testharness.css'> | 8 <link rel='stylesheet' href='/w3c/resources/testharness.css'> |
| 9 </head> | 9 </head> |
| 10 <body> | 10 <body> |
| 11 <div id="log"></div> | 11 <div id="log"></div> |
| 12 <script> | 12 <script> |
| 13 // TODO(wolenetz): Remove this hacky console warning once desktop and |
| 14 // android expectations match. It allows a passing platform-specific |
| 15 // expectation to override a failing non-platform-specific expectation
. |
| 16 console.warn('Ignore this warning. See https://crbug.com/568704#c2'); |
| 17 |
| 13 mediasource_test(function(test, mediaElement, mediaSource) | 18 mediasource_test(function(test, mediaElement, mediaSource) |
| 14 { | 19 { |
| 15 mediaSource.endOfStream(); | 20 mediaSource.endOfStream(); |
| 16 assert_throws("InvalidStateError", | 21 assert_throws("InvalidStateError", |
| 17 function() { mediaSource.addSourceBuffer(MediaSourceUt
il.AUDIO_VIDEO_TYPE); }, | 22 function() { mediaSource.addSourceBuffer(MediaSourceUt
il.AUDIO_VIDEO_TYPE); }, |
| 18 "addSourceBuffer() threw an exception when in 'ended'
state."); | 23 "addSourceBuffer() threw an exception when in 'ended'
state."); |
| 19 test.done(); | 24 test.done(); |
| 20 }, "Test addSourceBuffer() in 'ended' state."); | 25 }, "Test addSourceBuffer() in 'ended' state."); |
| 21 | 26 |
| 22 mediasource_test(function(test, mediaElement, mediaSource) | 27 mediasource_test(function(test, mediaElement, mediaSource) |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 reachedLimit = true; | 148 reachedLimit = true; |
| 144 break; | 149 break; |
| 145 } | 150 } |
| 146 } | 151 } |
| 147 assert_true(reachedLimit, "Reached SourceBuffer limit."); | 152 assert_true(reachedLimit, "Reached SourceBuffer limit."); |
| 148 test.done(); | 153 test.done(); |
| 149 }, "Test addSourceBuffer() QuotaExceededError."); | 154 }, "Test addSourceBuffer() QuotaExceededError."); |
| 150 </script> | 155 </script> |
| 151 </body> | 156 </body> |
| 152 </html> | 157 </html> |
| OLD | NEW |