Index: third_party/WebKit/LayoutTests/compositing/video/video-reflection.html |
diff --git a/third_party/WebKit/LayoutTests/compositing/video/video-reflection.html b/third_party/WebKit/LayoutTests/compositing/video/video-reflection.html |
index 2e07e350771a483c5d4cbf05056d1b4f7d157eb5..aecdaa8bb7ad1284caa864c47c17960402f581f5 100644 |
--- a/third_party/WebKit/LayoutTests/compositing/video/video-reflection.html |
+++ b/third_party/WebKit/LayoutTests/compositing/video/video-reflection.html |
@@ -1,45 +1,25 @@ |
<!DOCTYPE html> |
-<html> |
- <head> |
- <script src="../../media/media-file.js"></script> |
- <!-- TODO(foolip): Convert test to testharness.js. crbug.com/588956 |
- (Please avoid writing new tests using video-test.js) --> |
- <script src="../../media/video-test.js"></script> |
- <script type="text/javascript"> |
- var testedOnce = false; |
- if (window.testRunner) { |
- window.testRunner.dumpAsTextWithPixelResults(); |
- window.testRunner.waitUntilDone(); |
- } |
- function runTest() { |
- video = document.getElementById('video'); |
- video.addEventListener('canplaythrough', canplaythrough, true); |
- video.src = findMediaFile('video', '../../media/content/test'); |
- } |
- function canplaythrough(e) { |
- var video = e.target; |
- video.addEventListener('seeked', seeked, true); |
- video.currentTime = 1; |
- } |
- function seeked(e) { |
- if (!testedOnce) { |
- testExpected('video.currentTime', 1); |
+<title>Test "-webkit-box-reflect" property on a video element.</title> |
+<script src="../../resources/run-after-layout-and-paint.js"></script> |
+<script src="../../media/media-file.js"></script> |
+<style> |
+video { |
+ -webkit-box-reflect: below 0px; |
+ border: 3px solid red; |
+} |
+</style> |
+<video></video> |
+<script> |
+testRunner.dumpAsTextWithPixelResults(); |
+var video = document.querySelector('video'); |
- if (window.testRunner) |
- setTimeout(function() { testRunner.notifyDone(); }, 150); |
+testRunner.waitUntilDone(); |
fs
2016/08/18 10:39:06
I'd suggest to keep these "grouped" like before (s
Srirama
2016/08/18 11:47:41
Done.
|
+video.addEventListener('seeked', function seeked() { |
fs
2016/08/18 10:39:06
Any reason in particular to use addEventListener a
Srirama
2016/08/18 11:47:41
No specific reason, so removed it.
|
+ video.removeEventListener('seeked', seeked); |
+ if (video.currentTime == 1) |
fs
2016/08/18 10:39:06
IIUC, previously only the first 'seeked' was actua
Srirama
2016/08/18 11:47:41
Done.
|
+ runAfterLayoutAndPaint(function() { testRunner.notifyDone(); }); |
fs
2016/08/18 10:39:06
If you pass true as the second argument, the funct
Srirama
2016/08/18 11:47:41
Done.
|
+}, true); |
- testedOnce = true; |
- } |
- } |
- </script> |
- <style> |
- video { |
- -webkit-box-reflect: below 0px; |
- border: 3px solid red; |
- } |
- </style> |
- </head> |
- <body onload="runTest()"> |
- <video id="video"></video> |
- </body> |
-</html> |
+video.src = findMediaFile('video', '../../media/content/test'); |
+video.currentTime = 1; |
+</script> |