Index: third_party/WebKit/LayoutTests/media/video-display-aspect-ratio.html |
diff --git a/third_party/WebKit/LayoutTests/media/video-display-aspect-ratio.html b/third_party/WebKit/LayoutTests/media/video-display-aspect-ratio.html |
index feabaa87245802bcc3c85e8c4647f9710eeb699e..0d1fe0c6a536d432a4687bcfaa0340f21932a85f 100644 |
--- a/third_party/WebKit/LayoutTests/media/video-display-aspect-ratio.html |
+++ b/third_party/WebKit/LayoutTests/media/video-display-aspect-ratio.html |
@@ -1,17 +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 video dimension aspect ratio.</title> |
+<script src="../resources/testharness.js"></script> |
+<script src="../resources/testharnessreport.js"></script> |
+<script src="media-file.js"></script> |
+<video></video> |
<script> |
- testExpected("video.videoWidth", 0, "=="); |
- testExpected("video.videoHeight", 0, "=="); |
+async_test(function(t) { |
+ var video = document.querySelector("video"); |
+ assert_equals(video.videoWidth, 0); |
+ assert_equals(video.videoHeight, 0); |
- waitForEvent('loadedmetadata', function () { |
- testExpected("video.videoWidth", 427, "=="); |
- testExpected("video.videoHeight", 240, "=="); |
- endTest(); |
- } ); |
+ video.onloadedmetadata = t.step_func_done(function() { |
+ assert_equals(video.videoWidth, 427); |
+ assert_equals(video.videoHeight, 240); |
+ }); |
video.src = findMediaFile("video", "content/test-par-16-9"); |
-</script> |
+}); |
+</script> |