| Index: third_party/WebKit/LayoutTests/http/tests/media/video-play-progress.html
|
| diff --git a/third_party/WebKit/LayoutTests/http/tests/media/video-play-progress.html b/third_party/WebKit/LayoutTests/http/tests/media/video-play-progress.html
|
| index 1aef38acf6ad4e7bfa1386c7ca529e1556e684e9..68cedea1dab7b7e0df30a16bc0773cd7330f1ced 100644
|
| --- a/third_party/WebKit/LayoutTests/http/tests/media/video-play-progress.html
|
| +++ b/third_party/WebKit/LayoutTests/http/tests/media/video-play-progress.html
|
| @@ -1,28 +1,18 @@
|
| -<html>
|
| - <head>
|
| - <script src=../../media-resources/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-resources/video-test.js></script>
|
| - <script>
|
| - function start() {
|
| - findMediaElement();
|
| +<!DOCTYPE html>
|
| +<title>Test that at least one progress event is fired after starting to load the video.</title>
|
| +<script src="../resources/testharness.js"></script>
|
| +<script src="../resources/testharnessreport.js"></script>
|
| +<script src="../../media-resources/media-file.js"></script>
|
| +<video></video>
|
| +<script>
|
| +async_test(function(t) {
|
| + var video = document.querySelector("video");
|
|
|
| - var progressCount = 0;
|
| + var watcher = new EventWatcher(t, video, ["loadstart", "progress"]);
|
| + watcher.wait_for(["loadstart", "progress"]).then(t.step_func_done());
|
|
|
| - // Make sure we've at least reached NETWORK_LOADING before waiting for progress.
|
| - waitForEvent('loadstart', function() {
|
| - waitForEventAndEnd('progress')
|
| - } );
|
| -
|
| - var mediaFile = findMediaFile("video", "resources/test");
|
| - video.src = "http://127.0.0.1:8000/" + mediaFile;
|
| - run("video.play()");
|
| - }
|
| - </script>
|
| - </head>
|
| - <body onload="start()">
|
| - <video></video>
|
| - <p>Test that at least one progress event is fired after starting to load the video.</p>
|
| - </body>
|
| -</html>
|
| + var mediaFile = findMediaFile("video", "resources/test");
|
| + video.src = "http://127.0.0.1:8000/" + mediaFile;
|
| + video.play();
|
| + });
|
| +</script>
|
|
|