<!DOCTYPE html>
<head>
    <style type='text/css'>
        body {
            height: 5000px;
            direction: ltr;
        }
    </style>
    <script>
        if (window.internals)
            internals.settings.setUserInterfaceDirectionPolicy('Content');

        function startTest()
        {
            document.scrollingElement.scrollTop = 0;
            document.body.style.direction = 'rtl';
        }
    </script>
</head>
<body style='min-height: 5000px' onload='startTest();'></body>
