Use testRunner instead of layoutTestController in fast/doctypes, dom, dynamic, encodi...
[WebKit-https.git] / LayoutTests / fast / dom / left-overflow-in-ltr.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2 <html xmlns="http://www.w3.org/1999/xhtml" >
3     <head>
4         <title>Test left overflow in LTR page</title>
5         <script>
6             function log(str)
7             {
8                 var li = document.createElement("li");
9                 li.appendChild(document.createTextNode(str));
10                 var console = document.getElementById("console");
11                 console.appendChild(li);
12             }
13             
14             function assertEqual(message, actual, expected)
15             {
16                 if (actual != expected)
17                     log("\n" + message + ": Failure, actual: " + actual + "; expected: " + expected);
18                 else
19                     log("\n" + message + ": Success");
20             }
21     
22             onload = function()
23             {
24                 if (window.testRunner)
25                     testRunner.dumpAsText();
26                 var div = document.getElementById("div");
27                 var original = window.scrollX;
28                 window.scrollTo(-1, 0);
29                 assertEqual("scroll", window.scrollX, 0);
30     
31             }
32         </script>
33     </head>
34     <body>
35         <div id="div" style="position:relative; right:40px">test left overflow in LTR page.</div>
36         <ul id="console"></ul>
37     </body>
38 </html>