blob: f149a8a3c4c8ef7fc9df00047255c472f84cf80e [file] [log] [blame]
andersca7728078392007-04-03 21:39:531<html>
2<head>
3 <script>
4 function debug(str) {
5 pre = document.getElementById('console');
6 pre.appendChild(document.createTextNode(str + '\n'));
7 }
8
9 function runTests() {
[email protected]ebff986b2012-06-20 03:28:4210 if (window.testRunner)
11 testRunner.dumpAsText();
andersca7728078392007-04-03 21:39:5312
13 if (document.body.clientWidth != window.innerWidth ||
14 document.body.clientHeight != window.innerHeight) {
15 debug("FAILURE!")
16 return;
17 }
18
19 // Now force scroll bars. innerWidth and innerHeight should not take the scroll bar into account
20 // but clientWidth and clientHeight should.
21 document.body.style.overflow = 'scroll';
22 document.body.offsetTop;
23
24 if (document.body.clientWidth >= window.innerWidth ||
25 document.body.clientHeight >= window.innerHeight) {
26 debug("FAILURE!")
27 return;
28 }
29
30 debug("SUCCESS!");
31 }
32 </script>
33</head>
34<body onload="runTests()">
35 This tests that clientWidth/clientHeight on the body element in quirks mode returns the visible size of the frame.
36 <pre id="console"></pre>
37</body>
38</html>