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

Unified Diff: third_party/WebKit/LayoutTests/fast/events/pointerevents/pointer-event-consumed-touchstart-in-slop-region.html

Issue 2701553002: Touchmoves should not be suppressed if the touchstart is consumed (Closed)
Patch Set: remove comments Created 3 years, 10 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
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();

Powered by Google App Engine
This is Rietveld 408576698