| OLD | NEW |
| (Empty) |
| 1 <html dir=rtl style="-webkit-writing-mode:vertical-lr"> | |
| 2 | |
| 3 <script src="../../resources/js-test.js"></script> | |
| 4 <script> | |
| 5 var testScrolls = [ | |
| 6 {x: -10, y: 0, expectedX: 110, expectedY: -100}, | |
| 7 {x: 30, y: 0, expectedX: 80, expectedY: -100}, | |
| 8 {x: 0, y: -10, expectedX: 80, expectedY: -90}, | |
| 9 {x: 0, y: 30, expectedX: 80, expectedY: -120}, | |
| 10 ]; | |
| 11 var currentTest = -1; | |
| 12 window.jsTestIsAsync = true; | |
| 13 | |
| 14 function startNextTestCase() { | |
| 15 currentTest++; | |
| 16 if (currentTest >= testScrolls.length) { | |
| 17 finishJSTest(); | |
| 18 return; | |
| 19 } | |
| 20 var testCase = testScrolls[currentTest]; | |
| 21 eventSender.mouseMoveTo(100, 100); | |
| 22 eventSender.continuousMouseScrollBy(testCase.x, testCase.y); | |
| 23 shouldBecomeEqual("window.scrollX == " + testCase.expectedX + " && " + | |
| 24 "window.scrollY == " + testCase.expectedY, "true", startNextTestCase
); | |
| 25 } | |
| 26 | |
| 27 window.onload = function() { | |
| 28 if (!window.testRunner) | |
| 29 return; | |
| 30 window.addEventListener("mousewheel", function (e){}, false); | |
| 31 window.scrollTo(100, -100); | |
| 32 startNextTestCase(); | |
| 33 } | |
| 34 </script> | |
| 35 | |
| 36 <body style="margin:0"> | |
| 37 | |
| 38 <div id="div" style="whitespace:nowrap; width: 4000px; height: 1000px; borde
r: 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 cillu
m dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proiden
t, sunt in culpa qui officia deserunt mollit anim id est laborum."</div> | |
| 39 <div id="console"></div> | |
| 40 </body> | |
| 41 </html> | |
| OLD | NEW |