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

Unified Diff: content/browser/renderer_host/input/touch_emulator_unittest.cc

Issue 1888163003: Articulate the cancel behavior in the WebTouchEvent. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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: content/browser/renderer_host/input/touch_emulator_unittest.cc
diff --git a/content/browser/renderer_host/input/touch_emulator_unittest.cc b/content/browser/renderer_host/input/touch_emulator_unittest.cc
index 5c6993c76370032e18ef4f66bb88b395beb4b407..7bb38e76e5aaca6a7c4ecacf0206576f5a3eabfe 100644
--- a/content/browser/renderer_host/input/touch_emulator_unittest.cc
+++ b/content/browser/renderer_host/input/touch_emulator_unittest.cc
@@ -63,8 +63,10 @@ class TouchEmulatorTest : public testing::Test,
EXPECT_EQ(1U, event.touchesLength);
EXPECT_EQ(last_mouse_x_, event.touches[0].position.x);
EXPECT_EQ(last_mouse_y_, event.touches[0].position.y);
- bool expected_cancelable = event.type != WebInputEvent::TouchCancel;
- EXPECT_EQ(expected_cancelable, !!event.cancelable);
+ WebInputEvent::DispatchType expected_cancelable =
tdresser 2016/04/18 15:12:02 Rename to expected_dispatch_type
dtapuska 2016/04/18 19:19:33 Done.
+ event.type == WebInputEvent::TouchCancel ? WebInputEvent::NonBlocking
+ : WebInputEvent::Blocking;
+ EXPECT_EQ(expected_cancelable, event.dispatchType);
if (ack_touches_synchronously_) {
emulator()->HandleTouchEventAck(
event, INPUT_EVENT_ACK_STATE_NO_CONSUMER_EXISTS);

Powered by Google App Engine
This is Rietveld 408576698