| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <script src="../../../resources/js-test.js"></script> | 2 <script src="../../../resources/js-test.js"></script> |
| 3 <style> | 3 <style> |
| 4 body { | 4 body { |
| 5 height: 2000px; | 5 height: 2000px; |
| 6 width: 2000px; | 6 width: 2000px; |
| 7 } | 7 } |
| 8 </style> | 8 </style> |
| 9 | 9 |
| 10 <script> | 10 <script> |
| 11 window.jsTestIsAsync = true; | 11 window.jsTestIsAsync = true; |
| 12 var defaultTimeoutForShouldBecome = 5000; | |
| 13 | 12 |
| 14 description("This test ensures that consecutive mouse wheel ticks scroll\ | 13 description("This test ensures that consecutive mouse wheel ticks scroll\ |
| 15 to the right offset. The main purpose of this test is to ensure that\ | 14 to the right offset. The main purpose of this test is to ensure that\ |
| 16 smooth scrolling on the compositor works as intended (tested via\ | 15 smooth scrolling on the compositor works as intended (tested via\ |
| 17 virtual suite virtual/threaded/)."); | 16 virtual suite virtual/threaded/)."); |
| 18 | 17 |
| 19 function testDiagonalScroll() { | 18 function testDiagonalScroll() { |
| 20 // Reset | 19 // Reset |
| 21 document.scrollingElement.scrollTop = 0; | 20 document.scrollingElement.scrollTop = 0; |
| 22 document.scrollingElement.scrollLeft = 0; | 21 document.scrollingElement.scrollLeft = 0; |
| (...skipping 28 matching lines...) Expand all Loading... |
| 51 eventSender.mouseScrollBy(0, 1); | 50 eventSender.mouseScrollBy(0, 1); |
| 52 eventSender.mouseScrollBy(1, 0); | 51 eventSender.mouseScrollBy(1, 0); |
| 53 | 52 |
| 54 // 40px per tick. | 53 // 40px per tick. |
| 55 shouldBecomeEqual("document.scrollingElement.scrollTop == 80 && " + | 54 shouldBecomeEqual("document.scrollingElement.scrollTop == 80 && " + |
| 56 "document.scrollingElement.scrollLeft == 80", "true", testDiagonalScro
ll); | 55 "document.scrollingElement.scrollLeft == 80", "true", testDiagonalScro
ll); |
| 57 } | 56 } |
| 58 </script> | 57 </script> |
| 59 | 58 |
| 60 <body onload="runTest()"></body> | 59 <body onload="runTest()"></body> |
| OLD | NEW |