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

Unified Diff: LayoutTests/fast/scroll-behavior/precise-delta-no-animate.html

Issue 831393003: Plumb hasPreciseScrollingDeltas into ScrollGranularity for overflow scrolls. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add a test. Created 5 years, 11 months 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
« no previous file with comments | « no previous file | LayoutTests/fast/scroll-behavior/precise-delta-no-animate-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/scroll-behavior/precise-delta-no-animate.html
diff --git a/LayoutTests/fast/scroll-behavior/precise-delta-no-animate.html b/LayoutTests/fast/scroll-behavior/precise-delta-no-animate.html
new file mode 100644
index 0000000000000000000000000000000000000000..599c2c4109e5ad76b540851e0b001c0110f681dd
--- /dev/null
+++ b/LayoutTests/fast/scroll-behavior/precise-delta-no-animate.html
@@ -0,0 +1,54 @@
+<!DOCTYPE html>
+<html>
+<head>
Rick Byers 2015/01/07 21:58:12 Nit: html, head and body tags are normally omitted
skobes 2015/01/07 22:05:11 Done.
+<style>
+
+#container {
+ width: 200px;
+ height: 200px;
+ overflow: scroll;
+}
+
+#content {
+ width: 7500px;
+ height: 7500px;
+ background-color: blue;
+}
+
+</style>
+<script src="../../resources/js-test.js"></script>
+</head>
+<body>
+<div id="container">
+ <div id="content"></div>
+</div>
+<div id="console"></div>
+<script>
+
+var element = document.getElementById("container");
+
+function runTest() {
+ testRunner.dumpAsText();
+ testRunner.waitUntilDone();
Rick Byers 2015/01/07 21:58:12 nit: you can simplify these two lines by just sett
skobes 2015/01/07 22:05:11 Done.
+
+ element.addEventListener("scroll", function() {
+ shouldBe("element.scrollTop", "80");
+ testRunner.notifyDone();
+ });
+
+ eventSender.mouseMoveTo(100, 100);
+ eventSender.mouseScrollBy(0, -2, /* paged */ false,
+ /* has_precise_scrolling_deltas */ true);
+}
+
+description("Tests that a WebMouseWheelEvent with hasPreciseScrollingDeltas " +
+ "does not produce an animated scroll");
+
+if (window.eventSender)
+ runTest();
+else
+ debug("FAIL: This test requires window.eventSender.");
+
+</script>
+</body>
+</html>
« no previous file with comments | « no previous file | LayoutTests/fast/scroll-behavior/precise-delta-no-animate-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698