| Index: third_party/WebKit/LayoutTests/media/video-src-set.html
|
| diff --git a/third_party/WebKit/LayoutTests/media/video-src-set.html b/third_party/WebKit/LayoutTests/media/video-src-set.html
|
| index 3b095f947d415a86ccea53725e900229276b324e..5bf8e00ce3afb0bb800f2be4e976037bc41d4de9 100644
|
| --- a/third_party/WebKit/LayoutTests/media/video-src-set.html
|
| +++ b/third_party/WebKit/LayoutTests/media/video-src-set.html
|
| @@ -1,17 +1,19 @@
|
| -<video controls></video>
|
| -<div>Test that setting src attribute triggers load</div>
|
| -<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>
|
| +<!DOCTYPE html>
|
| +<title>Test that setting "src" attribute triggers load.</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");
|
| var mediaFile = findMediaFile("video", "content/test");
|
| - video.setAttribute('src', mediaFile);
|
|
|
| - waitForEvent('loadstart', function () {
|
| - testExpected("stripExtension(relativeURL(video.currentSrc))", stripExtension(mediaFile));
|
| - endTest();
|
| - } );
|
| + video.onloadstart = t.step_func_done(function() {
|
| + var url = video.currentSrc;
|
| + assert_equals(url.substr(url.lastIndexOf("/media/")+7), mediaFile);
|
| + });
|
|
|
| - video.setAttribute('src', mediaFile);
|
| -</script>
|
| + video.src = mediaFile;
|
| +});
|
| +</script>
|
|
|