Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(59)

Unified Diff: third_party/WebKit/LayoutTests/media/video-display-aspect-ratio.html

Issue 2096413003: Convert video-delay* and video-display* tests to testharness.js (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: modify as per suggestion Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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>

Powered by Google App Engine
This is Rietveld 408576698