<!DOCTYPE html>
<html dir=rtl>
    <head>
        <script language="javascript">
            function log(str)
            {
                var li = document.createElement("li");
                li.appendChild(document.createTextNode(str));
                var console = document.getElementById("console");
                console.appendChild(li);
            }

            onload = function()
            {
                if (window.testRunner)
                    testRunner.dumpAsText();
            }

            document.onscroll=function(){log("FAIL - scroll event received!");}
        </script>
    </head>
    <body>
        <div dir=ltr>
        <p>This tests that when a page with an RTL overflow is initially loaded, no scroll event is sent.</p>
        <p>This test has passed if the text "FAIL - scroll event received!" does not appear below.</p>
        </div>
        <div id="div" style="whitespace:nowrap; width: 4000px; height: 1000px; border: 1px solid red;">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."</div>
        <ul id="console"></ul>
    </body>
</html>
