| 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 width: 2000px; | 5 width: 2000px; |
| 6 height: 2000px; | 6 height: 2000px; |
| 7 } | 7 } |
| 8 </style> | 8 </style> |
| 9 | 9 |
| 10 <script> | 10 <script> |
| 11 var jsTestIsAsync = true; | 11 var jsTestIsAsync = true; |
| 12 | 12 |
| 13 description("This test verifies that smooth scrolls initiated on the main " + | 13 description("This test verifies that smooth scrolls initiated on the main " + |
| 14 "thread add the appropriate main thread scrolling reason."); | 14 "thread add the appropriate main thread scrolling reason."); |
| 15 | 15 |
| 16 // From ScrollingCoordinator::mainThreadScrollingReasonsAsText. | 16 // From ScrollingCoordinator::mainThreadScrollingReasonsAsText. |
| 17 var ANIMATING_TEXT = "Animating scroll on main thread"; | 17 var ANIMATING_TEXT = "Handling scroll from main thread"; |
| 18 var RUNNING_ON_COMPOSITOR = "RunningOnCompositor"; | 18 var RUNNING_ON_COMPOSITOR = "RunningOnCompositor"; |
| 19 | 19 |
| 20 function finishTest() { | 20 function finishTest() { |
| 21 requestAnimationFrame(function() { | 21 requestAnimationFrame(function() { |
| 22 // Check that main thread scrolling reason is removed. | 22 // Check that main thread scrolling reason is removed. |
| 23 shouldBeTrue("internals.mainThreadScrollingReasons(document) == ''"); | 23 shouldBeTrue("internals.mainThreadScrollingReasons(document) == ''"); |
| 24 finishJSTest(); | 24 finishJSTest(); |
| 25 }); | 25 }); |
| 26 } | 26 } |
| 27 | 27 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 50 | 50 |
| 51 document.scrollingElement.scrollTop = 0; | 51 document.scrollingElement.scrollTop = 0; |
| 52 | 52 |
| 53 // Scroll 1 ticks down. | 53 // Scroll 1 ticks down. |
| 54 eventSender.mouseMoveTo(20, 20); | 54 eventSender.mouseMoveTo(20, 20); |
| 55 eventSender.mouseScrollBy(0, -1); | 55 eventSender.mouseScrollBy(0, -1); |
| 56 runTest(); | 56 runTest(); |
| 57 }; | 57 }; |
| 58 | 58 |
| 59 </script> | 59 </script> |
| OLD | NEW |