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

Unified Diff: third_party/WebKit/LayoutTests/fast/dom/Element/dimension-properties-unrendered.html

Issue 2667393002: Stop using script-tests in fast/dom/. (Closed)
Patch Set: . Created 3 years, 11 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/dom/Element/dimension-properties-unrendered.html
diff --git a/third_party/WebKit/LayoutTests/fast/dom/Element/dimension-properties-unrendered.html b/third_party/WebKit/LayoutTests/fast/dom/Element/dimension-properties-unrendered.html
index 499e1bf8044eef32751756393ee929283678b7e5..1e85861caf5cf2451ea40ec1bca32d7cfcd11d45 100644
--- a/third_party/WebKit/LayoutTests/fast/dom/Element/dimension-properties-unrendered.html
+++ b/third_party/WebKit/LayoutTests/fast/dom/Element/dimension-properties-unrendered.html
@@ -4,6 +4,22 @@
<script src="../../../resources/js-test.js"></script>
</head>
<body>
-<script src="script-tests/dimension-properties-unrendered.js"></script>
+<script>
+description(
+'This test checks the scroll, client and offset dimension properties return "0" instead of undefined for an unrendered element. <div id="testDiv" style="display: none">x</div>'
+);
+
+var testDiv = document.getElementById("testDiv");
+shouldBe("testDiv.offsetLeft", "0");
+shouldBe("testDiv.offsetTop", "0");
+shouldBe("testDiv.offsetWidth", "0");
+shouldBe("testDiv.offsetHeight", "0");
+shouldBe("testDiv.clientWidth", "0");
+shouldBe("testDiv.clientHeight", "0");
+shouldBe("testDiv.scrollLeft", "0");
+shouldBe("testDiv.scrollTop", "0");
+shouldBe("testDiv.scrollWidth", "0");
+shouldBe("testDiv.scrollHeight", "0");
+</script>
</body>
</html>

Powered by Google App Engine
This is Rietveld 408576698