Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / window-scroll-scaling.html
blob0f138f900cdd566ac2b6f881b298230826da4fe1
1 <html>
2 <body>
3 <script src="../../resources/js-test.js"></script>
4 <script>
5 description("This test ensures that document content width (height) as reported by scrollWidth (scrollHeight) is invariant to changes in page scale factor.");
7 if (window.internals)
8 window.internals.settings.setMockScrollbarsEnabled(true);
10 var body = document.body;
12 // According to CSSOM (http://dev.w3.org/csswg/cssom-view/#dom-element-scrollwidth)
13 // the scrollWidth of the body element (in Quirks mode) is defined as
14 // max(document content width, value of innerWidth).
15 // In this test, we want to measure the document content width (height),
16 // rather than innerWidth (innerHeight), so we make the body element
17 // larger than the innerWidth (innerHeight).
19 body.style["width"] = window.innerWidth + 100 + "px";
20 body.style["height"] = window.innerHeight + 100 + "px";
22 var originalScrollWidth = body.scrollWidth;
23 var originalScrollHeight = body.scrollHeight;
25 var scale = 1.1;
26 if (window.eventSender)
27 window.internals.setPageScaleFactor(scale);
29 // As we have increased the scale factor, the innerWidth will be less
30 // as fewer CSS pixels will be rendered in the same viewport, so
31 // body.scrollWidth (scrollHeight) will still be measuring the document
32 // content width (height).
34 shouldBe("body.scrollWidth", "originalScrollWidth");
35 shouldBe("body.scrollHeight", "originalScrollHeight");
36 </script>
37 </body>
38 </html>