blob: ed44855ccc40decfd4ba679af53c7321fda445a8 [file] [log] [blame]
<html>
<head>
<script>
function debug(str) {
pre = document.getElementById('console');
pre.appendChild(document.createTextNode(str + '\n'));
}
function runTests() {
if (window.layoutTestController)
layoutTestController.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>