| Index: third_party/WebKit/LayoutTests/media/video-currentTime-delay.html
|
| diff --git a/third_party/WebKit/LayoutTests/media/video-currentTime-delay.html b/third_party/WebKit/LayoutTests/media/video-currentTime-delay.html
|
| index 2307eec17d3095c06e5221f23cf8437c21b0a9a7..be0fff4f8dfd8a65ae176515da8c31452208a322 100644
|
| --- a/third_party/WebKit/LayoutTests/media/video-currentTime-delay.html
|
| +++ b/third_party/WebKit/LayoutTests/media/video-currentTime-delay.html
|
| @@ -1,32 +1,26 @@
|
| -<html>
|
| -<body>
|
| +<!DOCTYPE html>
|
| +<title>Test, a delay in playing the movie still results in an "ended" event.</title>
|
| +<script src="../resources/testharness.js"></script>
|
| +<script src="../resources/testharnessreport.js"></script>
|
| +<script src="media-file.js"></script>
|
| +<video></video>
|
| +<script>
|
| +async_test(function(t) {
|
| + var video = document.querySelector("video");
|
|
|
| - <video controls></video>
|
| -
|
| - <p>Test a delay in playing the movie results in a canPlay event.</p>
|
| -
|
| - <script src=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=video-test.js></script>
|
| - <script>
|
| - waitForEventOnce('canplaythrough',
|
| - function () {
|
| - waitForEventAndEnd('ended');
|
| -
|
| - testExpected("video.currentTime", 0);
|
| - run("video.currentTime = video.duration - 0.2");
|
| + video.oncanplaythrough = t.step_func(function() {
|
| + video.oncanplaythrough = null;
|
| + assert_equals(video.currentTime, 0);
|
| + video.currentTime = video.duration - 0.2;
|
| });
|
|
|
| - waitForEvent('seeked',
|
| - function () {
|
| + video.onseeked = t.step_func(function () {
|
| setTimeout(function() {
|
| - run("video.play()");
|
| + video.play();
|
| }, 400);
|
| });
|
|
|
| + video.onended = t.step_func_done();
|
| video.src = findMediaFile("video", "content/test");
|
| - </script>
|
| -
|
| -</body>
|
| -</html>
|
| +});
|
| +</script>
|
|
|