| Index: third_party/WebKit/LayoutTests/media/video-dom-src.html
|
| diff --git a/third_party/WebKit/LayoutTests/media/video-dom-src.html b/third_party/WebKit/LayoutTests/media/video-dom-src.html
|
| index cd5d3647b9dee1dd11ff03448989dd29b7583d3e..e214ce69edffafac834f2121d5d795308de64c33 100644
|
| --- a/third_party/WebKit/LayoutTests/media/video-dom-src.html
|
| +++ b/third_party/WebKit/LayoutTests/media/video-dom-src.html
|
| @@ -1,18 +1,20 @@
|
| -<video controls></video>
|
| -<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 media "src" attribute set via DOM.</title>
|
| +<script src="../resources/testharness.js"></script>
|
| +<script src="../resources/testharnessreport.js"></script>
|
| +<script src="media-file.js"></script>
|
| +<video></video>
|
| <script>
|
| - testExpected("video.currentSrc", "");
|
| +async_test(function(t) {
|
| + var video = document.querySelector("video");
|
| + assert_equals(video.currentSrc, "");
|
| var mediaFile = findMediaFile("video", "content/test");
|
| video.src = mediaFile;
|
| - testExpected("video.currentSrc", "");
|
| + assert_equals(video.currentSrc, "");
|
|
|
| - waitForEvent('canplaythrough', function () {
|
| - testExpected("stripExtension(relativeURL(video.currentSrc))", stripExtension(mediaFile));
|
| - endTest();
|
| - } );
|
| -
|
| - video.load();
|
| -</script>
|
| + video.oncanplaythrough = t.step_func_done(function() {
|
| + var currentSrc = video.currentSrc;
|
| + assert_equals(currentSrc.substr(currentSrc.lastIndexOf("/media/")+7), mediaFile);
|
| + });
|
| +});
|
| +</script>
|
|
|