OLD | NEW |
1 <!doctype html> | 1 <!doctype html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <title>delay document 'load' event test</title> | 4 <title>delay document 'load' event test</title> |
5 <style> video { border: 3px solid red; } </style> | 5 <style> video { border: 3px solid red; } </style> |
| 6 <!-- TODO(philipj): Convert test to testharness.js. crbug.com/588956 |
| 7 (Please avoid writing new tests using video-test.js) --> |
6 <script src=video-test.js></script> | 8 <script src=video-test.js></script> |
7 <script src=media-file.js></script> | 9 <script src=media-file.js></script> |
8 <script> | 10 <script> |
9 var video; | 11 var video; |
10 | 12 |
11 function testMovieWithNoSource(elem) | 13 function testMovieWithNoSource(elem) |
12 { | 14 { |
13 video = elem; // Need it in a global for testExpected() to see
it. | 15 video = elem; // Need it in a global for testExpected() to see
it. |
14 consoleWrite("<em>no 'src'.</em>"); | 16 consoleWrite("<em>no 'src'.</em>"); |
15 testExpected("video.networkState", HTMLMediaElement.prototype.NE
TWORK_EMPTY, "=="); | 17 testExpected("video.networkState", HTMLMediaElement.prototype.NE
TWORK_EMPTY, "=="); |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 testMovieWithSource(video, false, "<br><em>with 'src' attribute.</em
>"); | 63 testMovieWithSource(video, false, "<br><em>with 'src' attribute.</em
>"); |
62 | 64 |
63 source = document.getElementById('source-1'); | 65 source = document.getElementById('source-1'); |
64 source.src = findMediaFile("video", "content/test"); | 66 source.src = findMediaFile("video", "content/test"); |
65 testMovieWithSource(document.getElementById('video-3'), false, "<br>
<em>with <source> element.</em>"); | 67 testMovieWithSource(document.getElementById('video-3'), false, "<br>
<em>with <source> element.</em>"); |
66 document.getElementById('video-3').load(); | 68 document.getElementById('video-3').load(); |
67 </script> | 69 </script> |
68 | 70 |
69 </body> | 71 </body> |
70 </html> | 72 </html> |
OLD | NEW |