Index: third_party/WebKit/LayoutTests/fast/events/touch/gesture/gesture-scroll-by-pixel.html |
diff --git a/third_party/WebKit/LayoutTests/fast/events/touch/gesture/gesture-scroll-by-pixel.html b/third_party/WebKit/LayoutTests/fast/events/touch/gesture/gesture-scroll-by-pixel.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..7338eceaa92000dba2c0fb2e68338bc3d4a3c7d9 |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/fast/events/touch/gesture/gesture-scroll-by-pixel.html |
@@ -0,0 +1,58 @@ |
+<!DOCTYPE html> |
+<html> |
+<head> |
+<script src="../../../../resources/js-test.js"></script> |
+<style type="text/css"> |
+::-webkit-scrollbar { |
+ width: 0px; |
+ height: 0px; |
+} |
+ |
+#greenbox { |
+ width: 100px; |
+ height: 2000px; |
+ background: green; |
+} |
+#redbox { |
+ width: 100px; |
+ height: 2000px; |
+ background: red; |
+} |
+ |
+</style> |
+</head> |
+<body style="margin:0" onload="runTest();"> |
+ |
+<div id="greenbox"></div> |
+<div id="redbox"></div> |
+ |
+<p id="description"></p> |
+<div id="console"></div> |
+<script type="text/javascript"> |
+ |
+function gestureScroll() |
+{ |
+ eventSender.gestureScrollBegin("touchpad", 10, 20); |
+ eventSender.gestureScrollUpdate("touchpad", 0, -100, false, "Pixels"); |
+ eventSender.gestureScrollUpdate("touchpad", 0, -215, false, "Pixels"); |
+ eventSender.gestureScrollUpdate("touchpad", 0, 20, false, "Pixels"); |
+ eventSender.gestureScrollEnd("touchpad", 0, 0); |
+ |
+ shouldBecomeEqual("document.scrollingElement.scrollTop", "295", finishJSTest, 1000); |
+} |
+ |
+jsTestIsAsync = true; |
+ |
+function runTest() |
+{ |
+ if (window.eventSender) { |
+ description('This tests gesture scrolling by non-precise pixels.'); |
+ gestureScroll(); |
+ } else { |
+ debug("This test requires DumpRenderTree. Gesture-scroll the page to validate the implementation."); |
+ } |
+} |
+</script> |
+ |
+</body> |
+</html> |