3 <script src='resources/autoresize-util.js'
></script>
7 if (window
.testRunner
) {
8 testRunner
.useUnfortunateSynchronousResizeMode();
9 testRunner
.enableAutoResizeMode(10, 10, 1000, 1000);
10 testRunner
.dumpAsText();
12 shouldBe('document.body.clientWidth', 'window.innerWidth');
13 shouldBe('document.body.clientHeight', 'window.innerHeight');
14 shouldBe('document.scrollingElement.scrollWidth', 'window.innerWidth');
15 shouldBe('document.scrollingElement.scrollHeight', 'window.innerHeight');
16 shouldBe('window.innerWidth', 'window.outerWidth');
17 shouldBe('window.innerHeight', 'window.outerHeight');
18 if (window
.testRunner
)
19 testRunner
.disableAutoResizeMode(200, 200);
21 shouldBe('window.outerWidth', 200);
22 shouldBe('window.outerHeight', 200);
23 document
.body
.style
.width
= '100px';
24 shouldBe('window.outerWidth', 200);
29 <body onload=
"runTest()" style=
"margin:0; width:900px">
30 This test verifies that turning off auto resize functions correctly. It only works when run in dumprendertree as it relies on having auto-resize function available.
33 When it succeeds, there should be a series of PASS messages followed by a DONE message.