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

Unified Diff: LayoutTests/fast/events/pointerevents/touch-pointercancel.html

Issue 1316013007: Added a test for pointercancel from touchcancel. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 3 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/events/pointerevents/touch-pointercancel-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/events/pointerevents/touch-pointercancel.html
diff --git a/LayoutTests/fast/events/pointerevents/touch-pointercancel.html b/LayoutTests/fast/events/pointerevents/touch-pointercancel.html
index 418e1aa63ebdb406af68a1b452e9f3cd4db18256..9b104dd59bdf1b0ae52663b44a3e085e96a214ef 100644
--- a/LayoutTests/fast/events/pointerevents/touch-pointercancel.html
+++ b/LayoutTests/fast/events/pointerevents/touch-pointercancel.html
@@ -80,6 +80,7 @@ function testMultiDrag(uncanceledMoveCausesScroll) {
var x0 = rect.left + 30;
var x1 = rect.left + 50;
var x2 = rect.left + 70;
+ var x3 = rect.left + 55;
var y = rect.top + 50;
eventSender.addTouchPoint(x0, y);
@@ -102,14 +103,14 @@ function testMultiDrag(uncanceledMoveCausesScroll) {
else
eventSender.touchMove();
- eventSender.addTouchPoint(x1+10, y);
+ eventSender.addTouchPoint(x3, y);
eventSender.touchStart();
y += 50;
eventSender.updateTouchPoint(0, x0, y);
eventSender.updateTouchPoint(1, x1, y);
eventSender.updateTouchPoint(2, x2, y);
- eventSender.updateTouchPoint(3, x2+10, y);
+ eventSender.updateTouchPoint(3, x3, y);
eventSender.touchMove();
eventSender.releaseTouchPoint(0);
@@ -119,6 +120,33 @@ function testMultiDrag(uncanceledMoveCausesScroll) {
eventSender.touchEnd();
}
+function testMultiCancel() {
+ var rect;
+
+ rect = document.getElementById("target").getBoundingClientRect();
+ var x0 = rect.left + 30;
+ var x1 = rect.left + 50;
+ var x2 = rect.left + 70;
+ var y = rect.top + 50;
+
+ eventSender.addTouchPoint(x0, y);
+ eventSender.addTouchPoint(x1, y);
+ eventSender.addTouchPoint(x2, y);
+ eventSender.touchStart();
+
+ eventSender.cancelTouchPoint(2);
+ eventSender.touchCancel();
+
+ y += 50;
+ eventSender.updateTouchPoint(0, x0, y);
+ eventSender.updateTouchPoint(1, x2, y);
+ eventSender.touchMove();
+
+ eventSender.cancelTouchPoint(0);
+ eventSender.cancelTouchPoint(1);
+ eventSender.touchCancel();
+}
+
function runTests() {
debug("--- single drag tests ---");
debug("");
@@ -166,6 +194,10 @@ function runTests() {
testMultiDrag(true);
debug("");
+ debug("--- multi cancel tests ---");
+ debug("");
+ testMultiCancel();
+ debug("");
}
« no previous file with comments | « no previous file | LayoutTests/fast/events/pointerevents/touch-pointercancel-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698