OLD | NEW |
1 <!doctype html> | 1 <!doctype html> |
2 <html> | 2 <html> |
3 <script src='resources/autoresize-util.js'></script> | 3 <script src='resources/autoresize-util.js'></script> |
4 <script> | 4 <script> |
5 function runTest() | 5 function runTest() |
6 { | 6 { |
7 if (window.testRunner) { | 7 if (window.testRunner) { |
8 testRunner.useUnfortunateSynchronousResizeMode(); | 8 testRunner.useUnfortunateSynchronousResizeMode(); |
9 testRunner.enableAutoResizeMode(10, 10, 1000, 1000); | 9 testRunner.enableAutoResizeMode(10, 10, 1000, 1000); |
10 testRunner.dumpAsText(); | 10 testRunner.dumpAsText(); |
11 } | 11 } |
12 shouldBe('document.body.clientWidth', 'window.innerWidth'); | 12 shouldBe('document.body.clientWidth', 'window.innerWidth'); |
13 shouldBe('document.body.clientHeight', 'window.innerHeight'); | 13 shouldBe('document.body.clientHeight', 'window.innerHeight'); |
14 shouldBe('document.body.scrollWidth', 'window.innerWidth'); | 14 shouldBe('document.scrollingElement.scrollWidth', 'window.innerWidth'); |
15 shouldBe('document.body.scrollHeight', 'window.innerHeight'); | 15 shouldBe('document.scrollingElement.scrollHeight', 'window.innerHeight'); |
16 shouldBe('window.innerWidth', 'window.outerWidth'); | 16 shouldBe('window.innerWidth', 'window.outerWidth'); |
17 shouldBe('window.innerHeight', 'window.outerHeight'); | 17 shouldBe('window.innerHeight', 'window.outerHeight'); |
18 log('DONE'); | 18 log('DONE'); |
19 } | 19 } |
20 </script> | 20 </script> |
21 <body onload="runTest()" style="margin:0; width:900px"> | 21 <body onload="runTest()" style="margin:0; width:900px"> |
22 This test only works in when run in dumprendertree as it relies on having auto-r
esize enabled its window. | 22 This test only works in when run in dumprendertree as it relies on having auto-r
esize enabled its window. |
23 <br> | 23 <br> |
24 <br> | 24 <br> |
25 When it succeeds, there should be a series of PASS messages followed by a DONE m
essage. | 25 When it succeeds, there should be a series of PASS messages followed by a DONE m
essage. |
26 <br> | 26 <br> |
27 <br> | 27 <br> |
28 <div id='result'> | 28 <div id='result'> |
29 </div> | 29 </div> |
30 </body> | 30 </body> |
31 </html> | 31 </html> |
OLD | NEW |