Chromium Code Reviews| 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..52e206c6f296fe2577a1e78b246f29bc8337cbcc 100644 |
| --- a/third_party/WebKit/LayoutTests/compositing/video/video-reflection.html |
| +++ b/third_party/WebKit/LayoutTests/compositing/video/video-reflection.html |
| @@ -1,45 +1,28 @@ |
| <!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); |
| +<script src="../../resources/testharness.js"></script> |
| +<script src="../../resources/testharnessreport.js"></script> |
| +<script src="../../media/media-file.js"></script> |
| +<style> |
| +video { |
| + -webkit-box-reflect: below 0px; |
| + border: 3px solid red; |
| +} |
| +</style> |
| +<video></video> |
| +<script> |
| +async_test(function(t) { |
|
fs
2016/08/18 08:50:45
Not sure if testharness makes much sense here - th
Srirama
2016/08/18 10:04:03
Acknowledged.
|
| + testRunner.dumpAsTextWithPixelResults(); |
| + video = document.querySelector('video'); |
| + video.src = findMediaFile('video', '../../media/content/test'); |
| - if (window.testRunner) |
| - setTimeout(function() { testRunner.notifyDone(); }, 150); |
| + testRunner.waitUntilDone(); |
| + video.onseeked = t.step_func(function() { |
| + video.onseeked = null; |
| + assert_equals(video.currentTime, 1); |
| - 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> |
| + setTimeout(t.step_func(function() { testRunner.notifyDone(); }), 150); |
|
fs
2016/08/18 08:50:45
This timeout looks very gratuitous - could we perh
Srirama
2016/08/18 10:04:03
Done.
|
| + }); |
| + |
| + video.currentTime = 1; |
| +}); |
| +</script> |