OLD | NEW |
1 <html> | 1 <html> |
2 <body> | 2 <body> |
| 3 <!-- TODO(philipj): Convert test to testharness.js. crbug.com/588956 |
| 4 (Please avoid writing new tests using video-test.js) --> |
3 <script src=video-test.js></script> | 5 <script src=video-test.js></script> |
4 | 6 |
5 <script> | 7 <script> |
6 mediaElement.addEventListener('loadedmetadata', function() { | 8 mediaElement.addEventListener('loadedmetadata', function() { |
7 failTest("'loadedmetadata' event fired" ); | 9 failTest("'loadedmetadata' event fired" ); |
8 }, true); | 10 }, true); |
9 | 11 |
10 waitForEvent('loadstart', function () { | 12 waitForEvent('loadstart', function () { |
11 findMediaElement(); | 13 findMediaElement(); |
12 testExpected("relativeURL(video.currentSrc)", "content/bogus.mpeg"); | 14 testExpected("relativeURL(video.currentSrc)", "content/bogus.mpeg"); |
13 consoleWrite(""); | 15 consoleWrite(""); |
14 }); | 16 }); |
15 | 17 |
16 waitForEvent('error', function () { | 18 waitForEvent('error', function () { |
17 findMediaElement(); | 19 findMediaElement(); |
18 testExpected("relativeURL(video.currentSrc)", "content/bogus.mpeg"); | 20 testExpected("relativeURL(video.currentSrc)", "content/bogus.mpeg"); |
19 testExpected("mediaElement.error.code", MediaError.MEDIA_ERR_SRC_NOT
_SUPPORTED); | 21 testExpected("mediaElement.error.code", MediaError.MEDIA_ERR_SRC_NOT
_SUPPORTED); |
20 setTimeout(endTest, 200) ; | 22 setTimeout(endTest, 200) ; |
21 consoleWrite(""); | 23 consoleWrite(""); |
22 }); | 24 }); |
23 </script> | 25 </script> |
24 | 26 |
25 <video src=content/bogus.mpeg controls> | 27 <video src=content/bogus.mpeg controls> |
26 <source src=content/test.mp4> | 28 <source src=content/test.mp4> |
27 </video> | 29 </video> |
28 | 30 |
29 <p>Test that a <source> element is not used when a bogus 'src' attribute i
s present | 31 <p>Test that a <source> element is not used when a bogus 'src' attribute i
s present |
30 </p> | 32 </p> |
31 | 33 |
32 </body> | 34 </body> |
33 </html> | 35 </html> |
OLD | NEW |