Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(150)

Unified Diff: third_party/WebKit/LayoutTests/fast/scroll-behavior/smooth-scroll/mousewheel-scroll.html

Issue 1534813004: Run smooth scroll animations on the compositor when possible (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nit Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/fast/scroll-behavior/smooth-scroll/mousewheel-scroll.html
diff --git a/third_party/WebKit/LayoutTests/fast/scroll-behavior/smooth-scroll/mousewheel-scroll.html b/third_party/WebKit/LayoutTests/fast/scroll-behavior/smooth-scroll/mousewheel-scroll.html
new file mode 100644
index 0000000000000000000000000000000000000000..702dbf148ac7116b0dac2896aac2bf5a3e1bed4f
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/scroll-behavior/smooth-scroll/mousewheel-scroll.html
@@ -0,0 +1,46 @@
+<!DOCTYPE html>
+<script src="../../../resources/js-test.js"></script>
+<style>
+ body {
+ height: 2000px;
+ width: 2000px;
+ }
+</style>
+
+<script>
+ window.jsTestIsAsync = true;
+
+ description("This test ensures that consecutive mouse wheel ticks scroll\
+ to the right offset. The main purpose of this test is to ensure that\
+ smooth scrolling on the compositor works as intended (tested via\
+ virtual suite virtual/threaded/).");
+
+ function runTest() {
+ if (!window.eventSender || !window.internals) {
+ finishJSTest();
+ return;
+ }
+
+ // Turn on smooth scrolling.
+ internals.settings.setScrollAnimatorEnabled(true);
+
+ eventSender.mouseMoveTo(20, 20);
+ // Scroll down 3 ticks.
+ eventSender.mouseScrollBy(0, -1);
+ eventSender.mouseScrollBy(0, -1);
+ eventSender.mouseScrollBy(0, -1);
+ // Scroll right 3 ticks.
+ eventSender.mouseScrollBy(-1, 0);
+ eventSender.mouseScrollBy(-1, 0);
+ eventSender.mouseScrollBy(-1, 0);
+ // Undo 1 tick in each direction.
+ eventSender.mouseScrollBy(0, 1);
+ eventSender.mouseScrollBy(1, 0);
+
+ // 40px per tick.
+ shouldBecomeEqual("document.scrollingElement.scrollTop == 80 && " +
+ "document.scrollingElement.scrollLeft == 80", "true", finishJSTest);
+ }
+</script>
+
+<body onload="runTest()"></body>

Powered by Google App Engine
This is Rietveld 408576698