blob: 570372e646e3dffa1f72bea05d6dd7af6d852e4a [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();
var width = window.innerWidth;
var height = window.innerHeight;
// Now force scroll bars. innerWidth and innerHeight should not take the scroll bar into account
document.body.style.overflow = 'scroll';
document.body.offsetTop;
if (width != window.innerWidth || height != window.innerHeight) {
debug("FAILURE!")
return;
}
debug("SUCCESS!");
}
</script>
</head>
<body onload="runTests()">
This tests that window.innerWidth/innerHeight does not include the size of the scrollbars.
<pre id="console"></pre>
</body>
</html>