Index: third_party/WebKit/LayoutTests/fast/images/img-dimensions-styled.html |
diff --git a/third_party/WebKit/LayoutTests/fast/images/img-dimensions-styled.html b/third_party/WebKit/LayoutTests/fast/images/img-dimensions-styled.html |
index be82e1987405e8aef57b5265d14d8fb64d52c5a3..ffa0dc426c993fe18a850288a33dfa8a64e4d123 100644 |
--- a/third_party/WebKit/LayoutTests/fast/images/img-dimensions-styled.html |
+++ b/third_party/WebKit/LayoutTests/fast/images/img-dimensions-styled.html |
@@ -1,22 +1,21 @@ |
<!DOCTYPE html> |
- |
-<script src="../../resources/js-test.js"></script> |
- |
+<title>Should use styled image dimensions if available.</title> |
fs
2016/08/16 15:17:07
Maybe make this "more to the point" now that we're
sivag
2016/08/16 16:42:59
Done.
|
+<script src="../../resources/testharness.js"></script> |
+<script src="../../resources/testharnessreport.js"></script> |
<style> |
img { |
width: 200px; |
height: 200px; |
} |
</style> |
- |
-<img id="image" src="resources/test-load.jpg" width="100" height="100"> |
- |
+<img src="resources/test-load.jpg" width="100" height="100"> |
<script> |
- description("Should used styled image dimensions if available."); |
- var image = document.getElementById("image"); |
- shouldBe("image.width", "200"); |
- shouldBe("image.height", "200"); |
+test(function() { |
+ var image = document.querySelector("img"); |
+ assert_equals(image.width, 200); |
+ assert_equals(image.height, 200); |
var rect = image.getBoundingClientRect(); |
- shouldBe("rect.width", "200"); |
- shouldBe("rect.height", "200"); |
+ assert_equals(rect.width, 200); |
+ assert_equals(rect.height, 200); |
+}); |
</script> |