Index: third_party/WebKit/LayoutTests/fast/events/pointerevents/pointer-event-consumed-touchstart-in-slop-region.html |
diff --git a/third_party/WebKit/LayoutTests/fast/events/pointerevents/pointer-event-in-slop-region.html b/third_party/WebKit/LayoutTests/fast/events/pointerevents/pointer-event-consumed-touchstart-in-slop-region.html |
similarity index 79% |
copy from third_party/WebKit/LayoutTests/fast/events/pointerevents/pointer-event-in-slop-region.html |
copy to third_party/WebKit/LayoutTests/fast/events/pointerevents/pointer-event-consumed-touchstart-in-slop-region.html |
index 6306b2c1624fe36adbda277af01578749fffebf9..e4f8298d73d60663ea799b4a2416e8b98203f407 100644 |
--- a/third_party/WebKit/LayoutTests/fast/events/pointerevents/pointer-event-in-slop-region.html |
+++ b/third_party/WebKit/LayoutTests/fast/events/pointerevents/pointer-event-consumed-touchstart-in-slop-region.html |
@@ -20,6 +20,10 @@ var offset = 50; |
var x = targetRect.left + offset; |
var y = targetRect.top + offset; |
+function touchstartHandler(event) { |
+ event.preventDefault(); |
+} |
+ |
function validTouchMoveResult(event) { |
touchMoveCount++; |
testTouchMove.step(function () { |
@@ -38,7 +42,7 @@ function validPointerMoveResult(event) { |
function callbackValidMoveCount() { |
testTouchMove.step(function () { |
assert_equals(touchMoveCount, 3); |
- assert_equals(pointerMoveCount, 5); |
+ assert_equals(pointerMoveCount, 3); |
}); |
testTouchMove.done(); |
} |
@@ -49,18 +53,15 @@ function testTouchMoveSuppressionInSlopRegion() { |
[{source: "touch", |
actions: [ |
{ name: "pointerDown", x: x, y: y }, |
- { name: "pointerMove", x: x, y: y + 10 }, |
- { name: "pointerMove", x: x, y: y + 20 }, |
- { name: "pointerMove", x: x, y: y + 10 }, |
- { name: "pointerUp" }, |
- { name: "pointerDown", x: x, y: y }, |
+ { name: "pointerMove", x: x, y: y + 1 }, |
{ name: "pointerMove", x: x, y: y + 10 }, |
{ name: "pointerMove", x: x, y: y + 20 }]}]; |
chrome.gpuBenchmarking.pointerActionSequence(pointerActions, callbackValidMoveCount); |
} |
} |
-var testTouchMove = async_test('Tests that TouchMoves are suppressed if within the slop suppression region.'); |
+var testTouchMove = async_test('Tests that the TouchMoves are not suppressed if the touch start is consumed.'); |
+box.addEventListener('touchstart', touchstartHandler); |
box.addEventListener('touchmove', validTouchMoveResult); |
box.addEventListener('pointermove', validPointerMoveResult); |
testTouchMoveSuppressionInSlopRegion(); |