<!DOCTYPE html>
<html>
<head>
    <title>Check that document.scrollingElement.scrollTop is equal to '0' for newly loaded pages</title>
    <link rel="author" title="Mikhail Pozdnyakov" href="mailto:mikhail.pozdnyakov@intel.com" />
    <style type="text/css">
        div { min-height: 3000px; }
    </style>
    <script type="text/javascript">
        if (window.testRunner) {
            testRunner.dumpAsText();
            testRunner.waitUntilDone();
        }

        function update() {
            var result = document.getElementById("result");
            window.location = "resources/check-scroll-position-onload.html";
        }

        function load() {
            window.scrollBy(0, 1000);
            setTimeout(update, 0);
        }
    </script>
</head>
<body onload="load()">
    <div id="result">
        <p></p>
    </div>
<body>
</html>
