2008-11-04 Anders Carlsson <andersca@apple.com>
[webkit/qt.git] / LayoutTests / fast / dom / inner-width-height.html
blob570372e646e3dffa1f72bea05d6dd7af6d852e4a
1 <html>
2 <head>
3 <script>
4 function debug(str) {
5 pre = document.getElementById('console');
6 pre.appendChild(document.createTextNode(str + '\n'));
9 function runTests() {
10 if (window.layoutTestController)
11 layoutTestController.dumpAsText();
13 var width = window.innerWidth;
14 var height = window.innerHeight;
16 // Now force scroll bars. innerWidth and innerHeight should not take the scroll bar into account
17 document.body.style.overflow = 'scroll';
18 document.body.offsetTop;
20 if (width != window.innerWidth || height != window.innerHeight) {
21 debug("FAILURE!")
22 return;
25 debug("SUCCESS!");
27 </script>
28 </head>
29 <body onload="runTests()">
30 This tests that window.innerWidth/innerHeight does not include the size of the scrollbars.
31 <pre id="console"></pre>
32 </body>
33 </html>