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

Unified Diff: third_party/WebKit/LayoutTests/fast/images/img-dimensions-styled.html

Issue 2255433002: Use testharness.js instead of js-test.js in fast/images. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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/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..5e1f783683064881a227e8cf0f72399722546472 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 used styled image dimensions if available.</title>
Srirama 2016/08/16 14:22:20 s/used/use
sivag 2016/08/16 14:53:12 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">
-
<script>
- description("Should used styled image dimensions if available.");
+test(function() {
var image = document.getElementById("image");
Srirama 2016/08/16 14:22:20 remove id attribute and use document.querySelector
sivag 2016/08/16 14:53:12 Done.
- shouldBe("image.width", "200");
- shouldBe("image.height", "200");
+ 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>

Powered by Google App Engine
This is Rietveld 408576698