Chromium Code Reviews| 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> |