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

Unified Diff: LayoutTests/fast/dom/Element/scrollTop-scrollLeft-strict-quirks-modes.html

Issue 25039006: document.documentElement.scrollTop/Left is zero (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: document.documentElement.scrollTop/Left is zero Created 7 years, 2 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: LayoutTests/fast/dom/Element/scrollTop-scrollLeft-strict-quirks-modes.html
diff --git a/LayoutTests/fast/dom/Element/scrollTop-scrollLeft-strict-quirks-modes.html b/LayoutTests/fast/dom/Element/scrollTop-scrollLeft-strict-quirks-modes.html
new file mode 100644
index 0000000000000000000000000000000000000000..318e9f3ef47b1bc98e96c4b1fa8bf1c857920878
--- /dev/null
+++ b/LayoutTests/fast/dom/Element/scrollTop-scrollLeft-strict-quirks-modes.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+ <head>
+ <script src="../../js/resources/js-test-pre.js"></script>
+ <script>
+ var count = 0;
+ var iframeStrict;
+ var iframeQuirks;
+ function verifyTest() {
+ // Need to wait on both inner frames to load.
+ if (count++ < 1)
+ return;
+
+ description('Test for scrollTop/Left values of document.body and document.documentElement in documents in quirks and strict modes');
+
+ iframeStrict = document.getElementById("strict");
+ iframeQuirks = document.getElementById("quirks");
+
+ shouldBe("iframeStrict.contentDocument.documentElement.scrollTop", "5000");
+ shouldBe("iframeStrict.contentDocument.documentElement.scrollLeft", "4000");
+ shouldBe("iframeStrict.contentDocument.body.scrollTop", "0");
+ shouldBe("iframeStrict.contentDocument.body.scrollLeft", "0");
+
+ shouldBe("iframeQuirks.contentDocument.documentElement.scrollTop", "0");
+ shouldBe("iframeQuirks.contentDocument.documentElement.scrollLeft", "0");
+ shouldBe("iframeQuirks.contentDocument.body.scrollTop", "5000");
+ shouldBe("iframeQuirks.contentDocument.body.scrollLeft", "4000");
+ finishJSTest();
+ }
+ var jsTestIsAsync = true;
+ </script>
+ </head>
+ <body>
+ <iframe id="strict" src="resources/scrollable-iframe-strict.html"></iframe><br>
+ <iframe id="quirks" src="resources/scrollable-iframe-quirks.html"></iframe><br>
+ <script src="../../js/resources/js-test-post.js"></script>
+ </body>
+</html>
+

Powered by Google App Engine
This is Rietveld 408576698