Index: third_party/WebKit/LayoutTests/media/video-replaces-poster.html |
diff --git a/third_party/WebKit/LayoutTests/media/video-replaces-poster.html b/third_party/WebKit/LayoutTests/media/video-replaces-poster.html |
index 3c15e9672551f3392aa1e9d5c4dd276371f9c4f3..069724df47def2a01ab9640fb44a603f46021c7d 100644 |
--- a/third_party/WebKit/LayoutTests/media/video-replaces-poster.html |
+++ b/third_party/WebKit/LayoutTests/media/video-replaces-poster.html |
@@ -1,31 +1,24 @@ |
<!DOCTYPE html> |
-<html> |
-<head> |
- <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 type="text/javascript" charset="utf-8"> |
- function doSetup() |
- { |
- findMediaElement(); |
- video.src = findMediaFile('video', 'content/test'); |
- video.addEventListener("canplaythrough", function () { |
- video.currentTime = 1; // so the snapshot always has the same frame. |
- }); |
- video.addEventListener("seeked", function() { |
- testExpected(video.currentTime, 1); |
- if (window.testRunner) |
- testRunner.notifyDone(); |
- }); |
- } |
- window.addEventListener('load', doSetup, false); |
- </script> |
-</head> |
+<title>Test that video frame replaces poster on seeking.</title> |
+<script src="media-file.js"></script> |
+<script> |
+function doSetup() { |
+ // TODO(srirama.m): convert this test to reference test. |
+ var video = document.querySelector("video"); |
+ video.src = findMediaFile("video", "content/test"); |
+ video.addEventListener("canplaythrough", function () { |
+ video.currentTime = 1; // so the snapshot always has the same frame. |
+ }); |
+ testRunner.waitUntilDone(); |
+ video.addEventListener("seeked", function() { |
+ testRunner.notifyDone(); |
+ }); |
+} |
+window.addEventListener("load", doSetup, false); |
+</script> |
<body> |
<p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=34966">https://bugs.webkit.org/show_bug.cgi?id=34966</a>. <br> |
You should see the video below.</p> |
<video width="480" height="270" poster="content/abe.png"></video> |
-</body> |
-</html> |
+</body> |