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

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

Issue 25741004: set and get scrollTop/Left through documentElement and body should be symmetric, according to the d… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: set and get scrollTop/Left through documentElement and body should be symmetric, according to the d… 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 unified diff | Download patch
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <head> 2 <head>
3 <script src="../../js/resources/js-test-pre.js"></script> 3 <script src="../../js/resources/js-test-pre.js"></script>
4 <script> 4 <script>
5 var count = 0; 5 var count = 0;
6 var iframeStrict; 6 var iframeStrict;
7 var iframeQuirks; 7 var iframeQuirks;
8 function verifyTest() { 8 function verifyTest() {
9 // Need to wait on both inner frames to load. 9 // Need to wait on both inner frames to load.
10 if (count++ < 1) 10 if (count++ < 1)
11 return; 11 return;
12 12
13 description('Test for scrollTop/Left values of document.body and documen t.documentElement in documents in quirks and strict modes'); 13 description('Test for scrollTop/Left values of document.body and documen t.documentElement in documents in quirks and strict modes');
14 14
15 iframeStrict = document.getElementById("strict"); 15 iframeStrict = document.getElementById("strict");
16 iframeQuirks = document.getElementById("quirks"); 16 iframeQuirks = document.getElementById("quirks");
17 17
18 shouldBe("iframeStrict.contentDocument.documentElement.scrollTop", "5000 "); 18 shouldBe("iframeStrict.contentDocument.documentElement.scrollTop", "5000 ");
19 shouldBe("iframeStrict.contentDocument.documentElement.scrollLeft", "400 0"); 19 shouldBe("iframeStrict.contentDocument.documentElement.scrollLeft", "400 0");
20 shouldBe("iframeStrict.contentDocument.body.scrollTop", "0"); 20 shouldBe("iframeStrict.contentDocument.body.scrollTop", "0");
21 shouldBe("iframeStrict.contentDocument.body.scrollLeft", "0"); 21 shouldBe("iframeStrict.contentDocument.body.scrollLeft", "0");
22 shouldBe("iframeStrict.contentWindow.pageYOffset", "5000");
23 shouldBe("iframeStrict.contentWindow.pageXOffset", "4000");
22 24
23 shouldBe("iframeQuirks.contentDocument.documentElement.scrollTop", "0"); 25 shouldBe("iframeQuirks.contentDocument.documentElement.scrollTop", "0");
24 shouldBe("iframeQuirks.contentDocument.documentElement.scrollLeft", "0") ; 26 shouldBe("iframeQuirks.contentDocument.documentElement.scrollLeft", "0") ;
25 shouldBe("iframeQuirks.contentDocument.body.scrollTop", "5000"); 27 shouldBe("iframeQuirks.contentDocument.body.scrollTop", "5000");
26 shouldBe("iframeQuirks.contentDocument.body.scrollLeft", "4000"); 28 shouldBe("iframeQuirks.contentDocument.body.scrollLeft", "4000");
29 shouldBe("iframeQuirks.contentWindow.pageYOffset", "5000");
30 shouldBe("iframeQuirks.contentWindow.pageXOffset", "4000");
27 finishJSTest(); 31 finishJSTest();
28 } 32 }
29 var jsTestIsAsync = true; 33 var jsTestIsAsync = true;
30 </script> 34 </script>
31 </head> 35 </head>
32 <body> 36 <body>
33 <iframe id="strict" src="resources/scrollable-iframe-strict.html"></iframe>< br> 37 <iframe id="strict" src="resources/scrollable-iframe-strict.html"></iframe>< br>
34 <iframe id="quirks" src="resources/scrollable-iframe-quirks.html"></iframe>< br> 38 <iframe id="quirks" src="resources/scrollable-iframe-quirks.html"></iframe>< br>
35 <script src="../../js/resources/js-test-post.js"></script> 39 <script src="../../js/resources/js-test-post.js"></script>
36 </body> 40 </body>
37 </html> 41 </html>
38 42
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698