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

Unified Diff: content/common/input/web_input_event_traits_unittest.cc

Issue 1218663006: Use new WebTouchPoint field names. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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 | « content/common/input/web_input_event_traits.cc ('k') | content/renderer/pepper/event_conversion.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/input/web_input_event_traits_unittest.cc
diff --git a/content/common/input/web_input_event_traits_unittest.cc b/content/common/input/web_input_event_traits_unittest.cc
index 62417dba063fe5bb787aa4a2206c67204d67b485..b022b9b072acdfcd6eedeb542dc89bdee56e5ae8 100644
--- a/content/common/input/web_input_event_traits_unittest.cc
+++ b/content/common/input/web_input_event_traits_unittest.cc
@@ -26,7 +26,7 @@ class WebInputEventTraitsTest : public testing::Test {
static WebTouchPoint CreateTouchPoint(WebTouchPoint::State state, int id) {
WebTouchPoint touch;
touch.state = state;
- touch.id = id;
+ touch.pointerId = id;
return touch;
}
@@ -80,12 +80,12 @@ TEST_F(WebInputEventTraitsTest, TouchEventCoalescing) {
// Touch moves with different touch ids should not coalesce.
touch0 = CreateTouch(WebInputEvent::TouchMove);
touch1 = CreateTouch(WebInputEvent::TouchMove);
- touch0.touches[0].id = 7;
+ touch0.touches[0].pointerId = 7;
EXPECT_FALSE(WebInputEventTraits::CanCoalesce(touch0, touch1));
touch0 = CreateTouch(WebInputEvent::TouchMove, 2);
touch1 = CreateTouch(WebInputEvent::TouchMove, 2);
- touch0.touches[0].id = 1;
- touch1.touches[0].id = 0;
+ touch0.touches[0].pointerId = 1;
+ touch1.touches[0].pointerId = 0;
EXPECT_FALSE(WebInputEventTraits::CanCoalesce(touch0, touch1));
// Touch moves with different touch lengths should not coalesce.
@@ -108,8 +108,8 @@ TEST_F(WebInputEventTraitsTest, TouchEventCoalescing) {
touch0.touches[0] = touch1.touches[1] =
CreateTouchPoint(WebTouchPoint::StateMoved, 1);
WebInputEventTraits::Coalesce(touch0, &touch1);
- ASSERT_EQ(1, touch1.touches[0].id);
- ASSERT_EQ(0, touch1.touches[1].id);
+ ASSERT_EQ(1, touch1.touches[0].pointerId);
+ ASSERT_EQ(0, touch1.touches[1].pointerId);
EXPECT_EQ(WebTouchPoint::StateUndefined, touch1.touches[1].state);
EXPECT_EQ(WebTouchPoint::StateMoved, touch1.touches[0].state);
@@ -120,8 +120,8 @@ TEST_F(WebInputEventTraitsTest, TouchEventCoalescing) {
touch0.touches[1] = CreateTouchPoint(WebTouchPoint::StateStationary, 0);
touch1.touches[0] = CreateTouchPoint(WebTouchPoint::StateMoved, 0);
WebInputEventTraits::Coalesce(touch0, &touch1);
- ASSERT_EQ(1, touch1.touches[0].id);
- ASSERT_EQ(0, touch1.touches[1].id);
+ ASSERT_EQ(1, touch1.touches[0].pointerId);
+ ASSERT_EQ(0, touch1.touches[1].pointerId);
EXPECT_EQ(WebTouchPoint::StateMoved, touch1.touches[0].state);
EXPECT_EQ(WebTouchPoint::StateMoved, touch1.touches[1].state);
}
« no previous file with comments | « content/common/input/web_input_event_traits.cc ('k') | content/renderer/pepper/event_conversion.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698