OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <title>Test "-webkit-box-reflect" property on a video element.</title> |
3 <head> | 3 <script src="../../resources/run-after-layout-and-paint.js"></script> |
4 <script src="../../media/media-file.js"></script> | 4 <script src="../../media/media-file.js"></script> |
5 <!-- TODO(foolip): Convert test to testharness.js. crbug.com/588956 | 5 <style> |
6 (Please avoid writing new tests using video-test.js) --> | 6 video { |
7 <script src="../../media/video-test.js"></script> | 7 -webkit-box-reflect: below 0px; |
8 <script type="text/javascript"> | 8 border: 3px solid red; |
9 var testedOnce = false; | 9 } |
10 if (window.testRunner) { | 10 </style> |
11 window.testRunner.dumpAsTextWithPixelResults(); | 11 <video></video> |
12 window.testRunner.waitUntilDone(); | 12 <script> |
13 } | 13 testRunner.dumpAsTextWithPixelResults(); |
14 function runTest() { | 14 testRunner.waitUntilDone(); |
15 video = document.getElementById('video'); | |
16 video.addEventListener('canplaythrough', canplaythrough, true); | |
17 video.src = findMediaFile('video', '../../media/content/test'); | |
18 } | |
19 function canplaythrough(e) { | |
20 var video = e.target; | |
21 video.addEventListener('seeked', seeked, true); | |
22 video.currentTime = 1; | |
23 } | |
24 function seeked(e) { | |
25 if (!testedOnce) { | |
26 testExpected('video.currentTime', 1); | |
27 | 15 |
28 if (window.testRunner) | 16 var video = document.querySelector('video'); |
29 setTimeout(function() { testRunner.notifyDone(); }, 150)
; | 17 video.onseeked = function() { |
| 18 video.onseeked = null; |
| 19 runAfterLayoutAndPaint(function() {}, true); |
| 20 }; |
30 | 21 |
31 testedOnce = true; | 22 video.src = findMediaFile('video', '../../media/content/test'); |
32 } | 23 video.currentTime = 1; |
33 } | 24 </script> |
34 </script> | |
35 <style> | |
36 video { | |
37 -webkit-box-reflect: below 0px; | |
38 border: 3px solid red; | |
39 } | |
40 </style> | |
41 </head> | |
42 <body onload="runTest()"> | |
43 <video id="video"></video> | |
44 </body> | |
45 </html> | |
OLD | NEW |