Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / Element / scrollTop-scrollLeft-body.html
blobb3767202c2fad7930f406a141a65eb08404b6d7a
1 <!DOCTYPE html>
2 <script src="../../../resources/js-test.js"></script>
3 <iframe id="strict1" src="resources/overflow-scroll-scrollable-body-strict.html"></iframe>
4 <iframe id="quirks1" src="resources/overflow-scroll-scrollable-body-quirks.html"></iframe>
5 <iframe id="strict2" src="resources/overflow-scroll-non-scrollable-body-strict.html"></iframe>
6 <iframe id="quirks2" src="resources/overflow-scroll-non-scrollable-body-quirks.html"></iframe>
7 <iframe id="strict3" src="resources/overflow-hidden-scrollable-body-strict.html"></iframe>
8 <iframe id="quirks3" src="resources/overflow-hidden-scrollable-body-quirks.html"></iframe>
9 <iframe id="strict4" src="resources/display-none-body-strict.html"></iframe>
10 <iframe id="quirks4" src="resources/display-none-body-quirks.html"></iframe>
12 <script>
13 var count = 0;
14 var iframeStrict1, iframeStrict2, iframeStrict3, iframeStrict4;
15 var iframeQuirks1, iframeQuirks2, iframeQuirks3, iframeQuriks4;
16 function verifyTest() {
17 // Need to wait on all inner frames to load.
18 if (count++ < 7)
19 return;
21 description('Test for scrollTop/Left and scrollingElement values of scrollable document.body in quirks and strict modes');
23 iframeStrict1 = document.getElementById("strict1");
24 iframeStrict2 = document.getElementById("strict2");
25 iframeStrict3 = document.getElementById("strict3");
26 iframeStrict4 = document.getElementById("strict4");
27 iframeQuirks1 = document.getElementById("quirks1");
28 iframeQuirks2 = document.getElementById("quirks2");
29 iframeQuirks3 = document.getElementById("quirks3");
30 iframeQuirks4 = document.getElementById("quirks4");
32 shouldBe("iframeStrict1.contentDocument.scrollingElement", "iframeStrict1.contentDocument.documentElement");
33 shouldBe("iframeStrict1.contentDocument.documentElement.scrollTop", "0");
34 shouldBe("iframeStrict1.contentDocument.documentElement.scrollLeft", "100");
35 shouldBe("iframeStrict1.contentDocument.body.scrollTop", "200");
36 shouldBe("iframeStrict1.contentDocument.body.scrollLeft", "0");
37 shouldBe("iframeStrict1.contentWindow.pageYOffset", "0");
38 shouldBe("iframeStrict1.contentWindow.pageXOffset", "100");
40 shouldBeNull("iframeQuirks1.contentDocument.scrollingElement");
41 shouldBe("iframeQuirks1.contentDocument.documentElement.scrollTop", "0");
42 shouldBe("iframeQuirks1.contentDocument.documentElement.scrollLeft", "0");
43 shouldBe("iframeQuirks1.contentDocument.body.scrollTop", "200");
44 shouldBe("iframeQuirks1.contentDocument.body.scrollLeft", "0");
45 shouldBe("iframeQuirks1.contentWindow.pageYOffset", "0");
46 shouldBe("iframeQuirks1.contentWindow.pageXOffset", "0");
48 shouldBe("iframeStrict2.contentDocument.scrollingElement", "iframeStrict2.contentDocument.documentElement");
49 shouldBe("iframeStrict2.contentDocument.documentElement.scrollTop", "0");
50 shouldBe("iframeStrict2.contentDocument.documentElement.scrollLeft", "100");
51 shouldBe("iframeStrict2.contentDocument.body.scrollTop", "0");
52 shouldBe("iframeStrict2.contentDocument.body.scrollLeft", "0");
53 shouldBe("iframeStrict2.contentWindow.pageYOffset", "0");
54 shouldBe("iframeStrict2.contentWindow.pageXOffset", "100");
56 shouldBeNull("iframeQuirks2.contentDocument.scrollingElement");
57 shouldBe("iframeQuirks2.contentDocument.documentElement.scrollTop", "0");
58 shouldBe("iframeQuirks2.contentDocument.documentElement.scrollLeft", "0");
59 shouldBe("iframeQuirks2.contentDocument.body.scrollTop", "0");
60 shouldBe("iframeQuirks2.contentDocument.body.scrollLeft", "0");
61 shouldBe("iframeQuirks2.contentWindow.pageYOffset", "0");
62 shouldBe("iframeQuirks2.contentWindow.pageXOffset", "0");
64 shouldBe("iframeStrict3.contentDocument.scrollingElement", "iframeStrict3.contentDocument.documentElement");
65 shouldBe("iframeStrict3.contentDocument.documentElement.scrollTop", "0");
66 shouldBe("iframeStrict3.contentDocument.documentElement.scrollLeft", "100");
67 shouldBe("iframeStrict3.contentDocument.body.scrollTop", "200");
68 shouldBe("iframeStrict3.contentDocument.body.scrollLeft", "0");
69 shouldBe("iframeStrict3.contentWindow.pageYOffset", "0");
70 shouldBe("iframeStrict3.contentWindow.pageXOffset", "100");
72 shouldBeNull("iframeQuirks3.contentDocument.scrollingElement");
73 shouldBe("iframeQuirks3.contentDocument.documentElement.scrollTop", "0");
74 shouldBe("iframeQuirks3.contentDocument.documentElement.scrollLeft", "0");
75 shouldBe("iframeQuirks3.contentDocument.body.scrollTop", "200");
76 shouldBe("iframeQuirks3.contentDocument.body.scrollLeft", "0");
77 shouldBe("iframeQuirks3.contentWindow.pageYOffset", "0");
78 shouldBe("iframeQuirks3.contentWindow.pageXOffset", "0");
80 shouldBe("iframeStrict4.contentDocument.scrollingElement", "iframeStrict4.contentDocument.documentElement");
81 shouldBe("iframeStrict4.contentDocument.body.scrollTop", "0");
82 shouldBe("iframeStrict4.contentDocument.body.scrollLeft", "0");
84 shouldBe("iframeQuirks4.contentDocument.scrollingElement", "iframeQuirks4.contentDocument.body");
85 shouldBe("iframeQuirks4.contentDocument.body.scrollTop", "4000");
86 shouldBe("iframeQuirks4.contentDocument.body.scrollLeft", "3000");
88 finishJSTest();
90 var jsTestIsAsync = true;
91 </script>