Index: third_party/WebKit/LayoutTests/media/video-width-height.html |
diff --git a/third_party/WebKit/LayoutTests/media/video-width-height.html b/third_party/WebKit/LayoutTests/media/video-width-height.html |
index 56d63350e02e4d562fe072988cd56126de5335a2..c7200f9c37a041b22b327f2df3bc92abd9767560 100644 |
--- a/third_party/WebKit/LayoutTests/media/video-width-height.html |
+++ b/third_party/WebKit/LayoutTests/media/video-width-height.html |
@@ -1,23 +1,28 @@ |
-<video width=100 height=50 controls></video> |
-<!-- 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 dimensions.</title> |
+<script src="../resources/testharness.js"></script> |
+<script src="../resources/testharnessreport.js"></script> |
+<video width="100" height="50"></video> |
<script> |
- testExpected("video.width", 100); |
- testExpected("video.height", 50); |
- testExpected("video.offsetWidth", 100); |
- testExpected("video.offsetHeight", 50); |
- video.setAttribute('width', '200'); |
- video.setAttribute('height', '100'); |
- testExpected("video.width", 200); |
- testExpected("video.height", 100); |
- testExpected("video.offsetWidth", 200); |
- testExpected("video.offsetHeight", 100); |
+test(function() { |
+ var video = document.querySelector("video"); |
+ assert_equals(video.width, 100); |
+ assert_equals(video.height, 50); |
+ assert_equals(video.offsetWidth, 100); |
+ assert_equals(video.offsetHeight, 50); |
+ |
+ video.setAttribute("width", "200"); |
+ video.setAttribute("height", "100"); |
+ assert_equals(video.width, 200); |
+ assert_equals(video.height, 100); |
+ assert_equals(video.offsetWidth, 200); |
+ assert_equals(video.offsetHeight, 100); |
+ |
video.width = 400; |
video.height = 200; |
- testExpected("video.getAttribute('width')", 400); |
- testExpected("video.getAttribute('height')", 200); |
- testExpected("video.offsetWidth", 400); |
- testExpected("video.offsetHeight", 200); |
- endTest(); |
-</script> |
+ assert_equals(video.getAttribute("width"), "400"); |
+ assert_equals(video.getAttribute("height"), "200"); |
+ assert_equals(video.offsetWidth, 400); |
+ assert_equals(video.offsetHeight, 200); |
+}); |
+</script> |