2 <script src=
"../../../resources/js-test.js"></script>
3 <iframe id=
"strict" src=
"resources/scrollable-iframe-strict.html"></iframe><br>
4 <iframe id=
"quirks" src=
"resources/scrollable-iframe-quirks.html"></iframe><br>
10 shouldBe("document.scrollingElement", "document.documentElement");
12 function verifyTest() {
13 // Need to wait on both inner frames to load.
17 description('Test for scrollTop/Left values of document.body and document.documentElement in documents in quirks and strict modes');
19 iframeStrict
= document
.getElementById("strict");
20 iframeQuirks
= document
.getElementById("quirks");
22 shouldBe("iframeStrict.contentDocument.scrollingElement", "iframeStrict.contentDocument.documentElement");
23 shouldBe("iframeStrict.contentDocument.documentElement.scrollTop", "5000");
24 shouldBe("iframeStrict.contentDocument.documentElement.scrollLeft", "4000");
25 shouldBe("iframeStrict.contentDocument.documentElement.scrollHeight", "10020");
26 shouldBe("iframeStrict.contentDocument.documentElement.scrollWidth", "10010");
27 shouldBe("iframeStrict.contentDocument.body.scrollTop", "0");
28 shouldBe("iframeStrict.contentDocument.body.scrollLeft", "0");
29 shouldBe("iframeStrict.contentDocument.body.scrollHeight", "10010");
30 shouldBe("iframeStrict.contentDocument.body.scrollWidth", "10005");
31 shouldBe("iframeStrict.contentWindow.pageYOffset", "5000");
32 shouldBe("iframeStrict.contentWindow.pageXOffset", "4000");
34 shouldBe("iframeQuirks.contentDocument.scrollingElement", "iframeQuirks.contentDocument.body");
35 shouldBe("iframeQuirks.contentDocument.documentElement.scrollTop", "0");
36 shouldBe("iframeQuirks.contentDocument.documentElement.scrollLeft", "0");
37 shouldBe("iframeQuirks.contentDocument.documentElement.scrollHeight", "10020");
38 shouldBe("iframeQuirks.contentDocument.documentElement.scrollWidth", "10010");
39 shouldBe("iframeQuirks.contentDocument.body.scrollTop", "5000");
40 shouldBe("iframeQuirks.contentDocument.body.scrollLeft", "4000");
41 shouldBe("iframeQuirks.contentDocument.body.scrollHeight", "10020");
42 shouldBe("iframeQuirks.contentDocument.body.scrollWidth", "10010");
43 shouldBe("iframeQuirks.contentWindow.pageYOffset", "5000");
44 shouldBe("iframeQuirks.contentWindow.pageXOffset", "4000");
47 var jsTestIsAsync
= true;