OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <style> | 3 <style> |
4 video { | 4 video { |
5 width: 400px; | 5 width: 400px; |
6 height: 300px; | 6 height: 300px; |
7 } | 7 } |
8 </style> | 8 </style> |
9 <script type="text/javascript" charset="utf-8"> | 9 <script type="text/javascript" charset="utf-8"> |
10 if (window.testRunner) { | 10 if (window.testRunner) { |
11 testRunner.dumpAsText(true); | 11 testRunner.dumpAsTextWithPixelResults(); |
12 testRunner.waitUntilDone(); | 12 testRunner.waitUntilDone(); |
13 } | 13 } |
14 </script> | 14 </script> |
15 </head> | 15 </head> |
16 <body> | 16 <body> |
17 <video></video> | 17 <video></video> |
18 <script> | 18 <script> |
19 var video = document.getElementsByTagName('video')[0]; | 19 var video = document.getElementsByTagName('video')[0]; |
20 video.src = 'resources/video.' + (video.canPlayType('video/ogg') ? 'ogv' : '
mp4'); | 20 video.src = 'resources/video.' + (video.canPlayType('video/ogg') ? 'ogv' : '
mp4'); |
21 video.addEventListener('canplaythrough', function() { | 21 video.addEventListener('canplaythrough', function() { |
22 if (window.testRunner) { | 22 if (window.testRunner) { |
23 testRunner.display(); | 23 testRunner.display(); |
24 testRunner.setPageVisibility("hidden"); | 24 testRunner.setPageVisibility("hidden"); |
25 testRunner.display(); | 25 testRunner.display(); |
26 testRunner.notifyDone(); | 26 testRunner.notifyDone(); |
27 } | 27 } |
28 }, false); | 28 }, false); |
29 </script> | 29 </script> |
30 </body> | 30 </body> |
31 </html> | 31 </html> |
OLD | NEW |