2 <script src=
"../../../resources/js-test.js"></script>
3 <iframe id=
"quirks" src=
"resources/frameset-quirks.html"></iframe><br>
7 shouldBe("document.scrollingElement", "document.documentElement");
11 function verifyTest() {
12 description('Test for scrollTop/Left values of document.body and document.documentElement in documents where the body is a frameset element');
14 iframeQuirks
= document
.getElementById("quirks");
16 shouldBe("iframeQuirks.contentDocument.body", "iframeQuirks.contentDocument.querySelector('frameset')");
17 shouldBeNull("iframeQuirks.contentDocument.scrollingElement");
18 shouldBe("iframeQuirks.contentDocument.documentElement.scrollTop", "0");
19 shouldBe("iframeQuirks.contentDocument.documentElement.scrollLeft", "0");
20 shouldBe("iframeQuirks.contentDocument.body.scrollTop", "0");
21 shouldBe("iframeQuirks.contentDocument.body.scrollLeft", "0");
22 shouldBe("iframeQuirks.contentWindow.pageYOffset", "500");
23 shouldBe("iframeQuirks.contentWindow.pageXOffset", "200");
26 debug('Add extra body element');
27 bodyElement
= iframeQuirks
.contentDocument
.createElement("BODY");
28 iframeQuirks
.contentDocument
.documentElement
.appendChild(bodyElement
);
29 shouldBe("iframeQuirks.contentDocument.body", "iframeQuirks.contentDocument.querySelector('frameset')");
30 shouldBe("iframeQuirks.contentDocument.scrollingElement", "bodyElement");
31 shouldBe("iframeQuirks.contentDocument.documentElement.scrollTop", "0");
32 shouldBe("iframeQuirks.contentDocument.documentElement.scrollLeft", "0");
33 shouldBe("iframeQuirks.contentDocument.body.scrollTop", "0");
34 shouldBe("iframeQuirks.contentDocument.body.scrollLeft", "0");
35 shouldBe("iframeQuirks.contentWindow.pageYOffset", "500");
36 shouldBe("iframeQuirks.contentWindow.pageXOffset", "200");
37 shouldBe("iframeQuirks.contentDocument.scrollingElement.scrollTop", "500");
38 shouldBe("iframeQuirks.contentDocument.scrollingElement.scrollLeft", "200");
42 var jsTestIsAsync
= true;