blob: f149a8a3c4c8ef7fc9df00047255c472f84cf80e [file] [log] [blame]
<html>
<head>
<script>
function debug(str) {
pre = document.getElementById('console');
pre.appendChild(document.createTextNode(str + '\n'));
}
function runTests() {
if (window.testRunner)
testRunner.dumpAsText();
if (document.body.clientWidth != window.innerWidth ||
document.body.clientHeight != window.innerHeight) {
debug("FAILURE!")
return;
}
// Now force scroll bars. innerWidth and innerHeight should not take the scroll bar into account
// but clientWidth and clientHeight should.
document.body.style.overflow = 'scroll';
document.body.offsetTop;
if (document.body.clientWidth >= window.innerWidth ||
document.body.clientHeight >= window.innerHeight) {
debug("FAILURE!")
return;
}
debug("SUCCESS!");
}
</script>
</head>
<body onload="runTests()">
This tests that clientWidth/clientHeight on the body element in quirks mode returns the visible size of the frame.
<pre id="console"></pre>
</body>
</html>