<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<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.documentElement.clientWidth != window.innerWidth ||
                document.documentElement.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.documentElement.style.overflow = 'scroll';
            document.body.offsetTop;
            
            if (document.documentElement.clientWidth >= window.innerWidth ||
                document.documentElement.clientHeight >= window.innerHeight) {
                debug("FAILURE!")
                return;
            }
                
            debug("SUCCESS!");
        }
    </script>
</head>
<body onload="runTests()">
    This tests that clientWidth/clientHeight on the document element in strict mode returns the visible size of the frame.
    <pre id="console"></pre>
</body>
</html>
