Index: ui/aura/gestures/gesture_recognizer_unittest.cc |
diff --git a/ui/aura/gestures/gesture_recognizer_unittest.cc b/ui/aura/gestures/gesture_recognizer_unittest.cc |
index 4391fe7af5a1879f15e99b16ce9cfa3b78f813f0..e3403e04f7a1f7dfb03e974241fbf69fd75c4790 100644 |
--- a/ui/aura/gestures/gesture_recognizer_unittest.cc |
+++ b/ui/aura/gestures/gesture_recognizer_unittest.cc |
@@ -216,7 +216,7 @@ class QueueTouchEventDelegate : public GestureEventConsumeDelegate { |
} |
virtual ~QueueTouchEventDelegate() {} |
- virtual ui::TouchStatus OnTouchEvent(ui::TouchEventImpl* event) OVERRIDE { |
+ virtual ui::TouchStatus OnTouchEvent(ui::TouchEvent* event) OVERRIDE { |
return event->type() == ui::ET_TOUCH_RELEASED ? |
ui::TOUCH_STATUS_QUEUED_END : ui::TOUCH_STATUS_QUEUED; |
} |
@@ -378,7 +378,7 @@ void SendScrollEvents(RootWindow* root_window, |
x += dx; |
y += dy; |
time = time + base::TimeDelta::FromMilliseconds(time_step); |
- ui::TouchEventImpl move(ui::ET_TOUCH_MOVED, gfx::Point(x, y), |
+ ui::TouchEvent move(ui::ET_TOUCH_MOVED, gfx::Point(x, y), |
touch_id, time); |
root_window->AsRootWindowHostDelegate()->OnHostTouchEvent(&move); |
} |
@@ -390,7 +390,7 @@ void SendScrollEvent(RootWindow* root_window, |
int touch_id, |
GestureEventConsumeDelegate* delegate) { |
delegate->Reset(); |
- ui::TouchEventImpl move(ui::ET_TOUCH_MOVED, gfx::Point(x, y), |
+ ui::TouchEvent move(ui::ET_TOUCH_MOVED, gfx::Point(x, y), |
touch_id, GetTime()); |
root_window->AsRootWindowHostDelegate()->OnHostTouchEvent(&move); |
} |
@@ -411,7 +411,7 @@ TEST_F(GestureRecognizerTest, GestureEventTap) { |
delegate.get(), -1234, bounds, NULL)); |
delegate->Reset(); |
- ui::TouchEventImpl press(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201), |
+ ui::TouchEvent press(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201), |
kTouchId, GetTime()); |
root_window()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press); |
EXPECT_FALSE(delegate->tap()); |
@@ -426,7 +426,7 @@ TEST_F(GestureRecognizerTest, GestureEventTap) { |
// Make sure there is enough delay before the touch is released so that it is |
// recognized as a tap. |
delegate->Reset(); |
- ui::TouchEventImpl release(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201), |
+ ui::TouchEvent release(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201), |
kTouchId, press.time_stamp() + |
base::TimeDelta::FromMilliseconds(50)); |
@@ -458,7 +458,7 @@ TEST_F(GestureRecognizerTest, GestureEventTapRegion) { |
// Test with no ET_TOUCH_MOVED events. |
{ |
delegate->Reset(); |
- ui::TouchEventImpl press(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201), |
+ ui::TouchEvent press(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201), |
kTouchId, GetTime()); |
press.set_radius_x(5); |
press.set_radius_y(12); |
@@ -475,7 +475,7 @@ TEST_F(GestureRecognizerTest, GestureEventTapRegion) { |
// Make sure there is enough delay before the touch is released so that it |
// is recognized as a tap. |
delegate->Reset(); |
- ui::TouchEventImpl release(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201), |
+ ui::TouchEvent release(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201), |
kTouchId, press.time_stamp() + |
base::TimeDelta::FromMilliseconds(50)); |
release.set_radius_x(5); |
@@ -502,7 +502,7 @@ TEST_F(GestureRecognizerTest, GestureEventTapRegion) { |
// Test with no ET_TOUCH_MOVED events but different touch points and radii. |
{ |
delegate->Reset(); |
- ui::TouchEventImpl press(ui::ET_TOUCH_PRESSED, gfx::Point(365, 290), |
+ ui::TouchEvent press(ui::ET_TOUCH_PRESSED, gfx::Point(365, 290), |
kTouchId, GetTime()); |
press.set_radius_x(8); |
press.set_radius_y(14); |
@@ -517,7 +517,7 @@ TEST_F(GestureRecognizerTest, GestureEventTapRegion) { |
EXPECT_FALSE(delegate->long_press()); |
delegate->Reset(); |
- ui::TouchEventImpl release(ui::ET_TOUCH_RELEASED, gfx::Point(377, 291), |
+ ui::TouchEvent release(ui::ET_TOUCH_RELEASED, gfx::Point(377, 291), |
kTouchId, press.time_stamp() + |
base::TimeDelta::FromMilliseconds(50)); |
release.set_radius_x(20); |
@@ -544,7 +544,7 @@ TEST_F(GestureRecognizerTest, GestureEventTapRegion) { |
// Test with a single ET_TOUCH_MOVED event. |
{ |
delegate->Reset(); |
- ui::TouchEventImpl press(ui::ET_TOUCH_PRESSED, gfx::Point(46, 205), |
+ ui::TouchEvent press(ui::ET_TOUCH_PRESSED, gfx::Point(46, 205), |
kTouchId, GetTime()); |
press.set_radius_x(6); |
press.set_radius_y(10); |
@@ -559,7 +559,7 @@ TEST_F(GestureRecognizerTest, GestureEventTapRegion) { |
EXPECT_FALSE(delegate->long_press()); |
delegate->Reset(); |
- ui::TouchEventImpl move(ui::ET_TOUCH_MOVED, gfx::Point(52, 200), |
+ ui::TouchEvent move(ui::ET_TOUCH_MOVED, gfx::Point(52, 200), |
kTouchId, press.time_stamp() + |
base::TimeDelta::FromMilliseconds(50)); |
move.set_radius_x(8); |
@@ -575,7 +575,7 @@ TEST_F(GestureRecognizerTest, GestureEventTapRegion) { |
EXPECT_FALSE(delegate->long_press()); |
delegate->Reset(); |
- ui::TouchEventImpl release(ui::ET_TOUCH_RELEASED, gfx::Point(50, 195), |
+ ui::TouchEvent release(ui::ET_TOUCH_RELEASED, gfx::Point(50, 195), |
kTouchId, press.time_stamp() + |
base::TimeDelta::FromMilliseconds(50)); |
release.set_radius_x(4); |
@@ -602,7 +602,7 @@ TEST_F(GestureRecognizerTest, GestureEventTapRegion) { |
// Test with a few ET_TOUCH_MOVED events. |
{ |
delegate->Reset(); |
- ui::TouchEventImpl press(ui::ET_TOUCH_PRESSED, gfx::Point(400, 150), |
+ ui::TouchEvent press(ui::ET_TOUCH_PRESSED, gfx::Point(400, 150), |
kTouchId, GetTime()); |
press.set_radius_x(7); |
press.set_radius_y(10); |
@@ -617,7 +617,7 @@ TEST_F(GestureRecognizerTest, GestureEventTapRegion) { |
EXPECT_FALSE(delegate->long_press()); |
delegate->Reset(); |
- ui::TouchEventImpl move(ui::ET_TOUCH_MOVED, gfx::Point(397, 155), |
+ ui::TouchEvent move(ui::ET_TOUCH_MOVED, gfx::Point(397, 155), |
kTouchId, press.time_stamp() + |
base::TimeDelta::FromMilliseconds(50)); |
move.set_radius_x(13); |
@@ -633,7 +633,7 @@ TEST_F(GestureRecognizerTest, GestureEventTapRegion) { |
EXPECT_FALSE(delegate->long_press()); |
delegate->Reset(); |
- ui::TouchEventImpl move1(ui::ET_TOUCH_MOVED, gfx::Point(395, 148), |
+ ui::TouchEvent move1(ui::ET_TOUCH_MOVED, gfx::Point(395, 148), |
kTouchId, move.time_stamp() + |
base::TimeDelta::FromMilliseconds(50)); |
move1.set_radius_x(16); |
@@ -649,7 +649,7 @@ TEST_F(GestureRecognizerTest, GestureEventTapRegion) { |
EXPECT_FALSE(delegate->long_press()); |
delegate->Reset(); |
- ui::TouchEventImpl move2(ui::ET_TOUCH_MOVED, gfx::Point(400, 150), |
+ ui::TouchEvent move2(ui::ET_TOUCH_MOVED, gfx::Point(400, 150), |
kTouchId, move1.time_stamp() + |
base::TimeDelta::FromMilliseconds(50)); |
move2.set_radius_x(14); |
@@ -665,7 +665,7 @@ TEST_F(GestureRecognizerTest, GestureEventTapRegion) { |
EXPECT_FALSE(delegate->long_press()); |
delegate->Reset(); |
- ui::TouchEventImpl release(ui::ET_TOUCH_RELEASED, gfx::Point(401, 149), |
+ ui::TouchEvent release(ui::ET_TOUCH_RELEASED, gfx::Point(401, 149), |
kTouchId, press.time_stamp() + |
base::TimeDelta::FromMilliseconds(50)); |
release.set_radius_x(8); |
@@ -702,7 +702,7 @@ TEST_F(GestureRecognizerTest, GestureEventScroll) { |
delegate.get(), -1234, bounds, NULL)); |
delegate->Reset(); |
- ui::TouchEventImpl press(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201), |
+ ui::TouchEvent press(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201), |
kTouchId, GetTime()); |
root_window()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press); |
EXPECT_FALSE(delegate->tap()); |
@@ -761,7 +761,7 @@ TEST_F(GestureRecognizerTest, GestureEventScroll) { |
// Release the touch. This should end the scroll. |
delegate->Reset(); |
- ui::TouchEventImpl release(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201), |
+ ui::TouchEvent release(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201), |
kTouchId, press.time_stamp() + |
base::TimeDelta::FromMilliseconds(50)); |
root_window()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release); |
@@ -792,7 +792,7 @@ TEST_F(GestureRecognizerTest, GestureEventScrollBoundingBox) { |
const int kPositionX = 101; |
const int kPositionY = 201; |
delegate->Reset(); |
- ui::TouchEventImpl press(ui::ET_TOUCH_PRESSED, |
+ ui::TouchEvent press(ui::ET_TOUCH_PRESSED, |
gfx::Point(kPositionX, kPositionY), |
kTouchId, |
GetTime()); |
@@ -816,7 +816,7 @@ TEST_F(GestureRecognizerTest, GestureEventScrollBoundingBox) { |
// Release the touch. This should end the scroll. |
delegate->Reset(); |
- ui::TouchEventImpl release(ui::ET_TOUCH_RELEASED, |
+ ui::TouchEvent release(ui::ET_TOUCH_RELEASED, |
gfx::Point(kPositionX, kPositionY), |
kTouchId, press.time_stamp() + |
base::TimeDelta::FromMilliseconds(50)); |
@@ -840,7 +840,7 @@ TEST_F(GestureRecognizerTest, GestureEventHorizontalRailFling) { |
scoped_ptr<aura::Window> window(CreateTestWindowWithDelegate( |
delegate.get(), -1234, bounds, NULL)); |
- ui::TouchEventImpl press(ui::ET_TOUCH_PRESSED, gfx::Point(0, 0), |
+ ui::TouchEvent press(ui::ET_TOUCH_PRESSED, gfx::Point(0, 0), |
kTouchId, GetTime()); |
root_window()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press); |
@@ -857,7 +857,7 @@ TEST_F(GestureRecognizerTest, GestureEventHorizontalRailFling) { |
delegate.get()); |
delegate->Reset(); |
- ui::TouchEventImpl release(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201), |
+ ui::TouchEvent release(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201), |
kTouchId, GetTime()); |
root_window()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release); |
@@ -877,7 +877,7 @@ TEST_F(GestureRecognizerTest, GestureEventVerticalRailFling) { |
scoped_ptr<aura::Window> window(CreateTestWindowWithDelegate( |
delegate.get(), -1234, bounds, NULL)); |
- ui::TouchEventImpl press(ui::ET_TOUCH_PRESSED, gfx::Point(0, 0), |
+ ui::TouchEvent press(ui::ET_TOUCH_PRESSED, gfx::Point(0, 0), |
kTouchId, GetTime()); |
root_window()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press); |
@@ -894,7 +894,7 @@ TEST_F(GestureRecognizerTest, GestureEventVerticalRailFling) { |
delegate.get()); |
delegate->Reset(); |
- ui::TouchEventImpl release(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201), |
+ ui::TouchEvent release(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201), |
kTouchId, GetTime()); |
root_window()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release); |
@@ -914,7 +914,7 @@ TEST_F(GestureRecognizerTest, GestureEventNonRailFling) { |
scoped_ptr<aura::Window> window(CreateTestWindowWithDelegate( |
delegate.get(), -1234, bounds, NULL)); |
- ui::TouchEventImpl press(ui::ET_TOUCH_PRESSED, gfx::Point(0, 0), |
+ ui::TouchEvent press(ui::ET_TOUCH_PRESSED, gfx::Point(0, 0), |
kTouchId, GetTime()); |
root_window()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press); |
@@ -929,7 +929,7 @@ TEST_F(GestureRecognizerTest, GestureEventNonRailFling) { |
delegate.get()); |
delegate->Reset(); |
- ui::TouchEventImpl release(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201), |
+ ui::TouchEvent release(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201), |
kTouchId, GetTime()); |
root_window()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release); |
@@ -960,7 +960,7 @@ TEST_F(GestureRecognizerTest, GestureEventLongPress) { |
root_window()->SetGestureRecognizerForTesting(gesture_recognizer); |
- ui::TouchEventImpl press1(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201), |
+ ui::TouchEvent press1(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201), |
kTouchId, GetTime()); |
root_window()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press1); |
EXPECT_TRUE(delegate->tap_down()); |
@@ -975,7 +975,7 @@ TEST_F(GestureRecognizerTest, GestureEventLongPress) { |
EXPECT_EQ(0, delegate->touch_id()); |
delegate->Reset(); |
- ui::TouchEventImpl release1(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201), |
+ ui::TouchEvent release1(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201), |
kTouchId, GetTime()); |
root_window()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release1); |
EXPECT_FALSE(delegate->long_press()); |
@@ -1002,7 +1002,7 @@ TEST_F(GestureRecognizerTest, GestureEventLongPressCancelledByScroll) { |
root_window()->SetGestureRecognizerForTesting(gesture_recognizer); |
- ui::TouchEventImpl press1(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201), |
+ ui::TouchEvent press1(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201), |
kTouchId, GetTime()); |
root_window()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press1); |
EXPECT_TRUE(delegate->tap_down()); |
@@ -1017,7 +1017,7 @@ TEST_F(GestureRecognizerTest, GestureEventLongPressCancelledByScroll) { |
EXPECT_FALSE(delegate->long_press()); |
delegate->Reset(); |
- ui::TouchEventImpl release1(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201), |
+ ui::TouchEvent release1(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201), |
kTouchId, GetTime()); |
root_window()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release1); |
EXPECT_FALSE(delegate->long_press()); |
@@ -1044,7 +1044,7 @@ TEST_F(GestureRecognizerTest, GestureEventLongPressCancelledBySecondTap) { |
root_window()->SetGestureRecognizerForTesting(gesture_recognizer); |
delegate->Reset(); |
- ui::TouchEventImpl press(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201), |
+ ui::TouchEvent press(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201), |
kTouchId1, GetTime()); |
root_window()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press); |
EXPECT_TRUE(delegate->tap_down()); |
@@ -1055,7 +1055,7 @@ TEST_F(GestureRecognizerTest, GestureEventLongPressCancelledBySecondTap) { |
// Second tap, to cancel the long press |
delegate->Reset(); |
- ui::TouchEventImpl press2(ui::ET_TOUCH_PRESSED, gfx::Point(10, 10), |
+ ui::TouchEvent press2(ui::ET_TOUCH_PRESSED, gfx::Point(10, 10), |
kTouchId2, GetTime()); |
root_window()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press2); |
EXPECT_FALSE(delegate->tap_down()); // no touch down for second tap. |
@@ -1068,7 +1068,7 @@ TEST_F(GestureRecognizerTest, GestureEventLongPressCancelledBySecondTap) { |
EXPECT_FALSE(delegate->long_press()); |
delegate->Reset(); |
- ui::TouchEventImpl release1(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201), |
+ ui::TouchEvent release1(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201), |
kTouchId1, GetTime()); |
root_window()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release1); |
EXPECT_FALSE(delegate->long_press()); |
@@ -1085,7 +1085,7 @@ TEST_F(GestureRecognizerTest, GestureEventHorizontalRailScroll) { |
scoped_ptr<aura::Window> window(CreateTestWindowWithDelegate( |
delegate.get(), -1234, bounds, NULL)); |
- ui::TouchEventImpl press(ui::ET_TOUCH_PRESSED, gfx::Point(0, 0), |
+ ui::TouchEvent press(ui::ET_TOUCH_PRESSED, gfx::Point(0, 0), |
kTouchId, GetTime()); |
root_window()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press); |
@@ -1127,7 +1127,7 @@ TEST_F(GestureRecognizerTest, GestureEventVerticalRailScroll) { |
scoped_ptr<aura::Window> window(CreateTestWindowWithDelegate( |
delegate.get(), -1234, bounds, NULL)); |
- ui::TouchEventImpl press(ui::ET_TOUCH_PRESSED, gfx::Point(0, 0), |
+ ui::TouchEvent press(ui::ET_TOUCH_PRESSED, gfx::Point(0, 0), |
kTouchId, GetTime()); |
root_window()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press); |
@@ -1171,7 +1171,7 @@ TEST_F(GestureRecognizerTest, GestureTapFollowedByScroll) { |
delegate.get(), -1234, bounds, NULL)); |
delegate->Reset(); |
- ui::TouchEventImpl press(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201), |
+ ui::TouchEvent press(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201), |
kTouchId, GetTime()); |
root_window()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press); |
EXPECT_FALSE(delegate->tap()); |
@@ -1184,7 +1184,7 @@ TEST_F(GestureRecognizerTest, GestureTapFollowedByScroll) { |
// Make sure there is enough delay before the touch is released so that it is |
// recognized as a tap. |
delegate->Reset(); |
- ui::TouchEventImpl release(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201), |
+ ui::TouchEvent release(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201), |
kTouchId, press.time_stamp() + |
base::TimeDelta::FromMilliseconds(50)); |
root_window()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release); |
@@ -1198,7 +1198,7 @@ TEST_F(GestureRecognizerTest, GestureTapFollowedByScroll) { |
// Now, do a scroll gesture. Delay it sufficiently so that it doesn't trigger |
// a double-tap. |
delegate->Reset(); |
- ui::TouchEventImpl press1(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201), |
+ ui::TouchEvent press1(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201), |
kTouchId, release.time_stamp() + |
base::TimeDelta::FromMilliseconds(1000)); |
root_window()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press1); |
@@ -1214,7 +1214,7 @@ TEST_F(GestureRecognizerTest, GestureTapFollowedByScroll) { |
// The first movement is diagonal, to ensure that we have a free scroll, |
// and not a rail scroll. |
delegate->Reset(); |
- ui::TouchEventImpl move(ui::ET_TOUCH_MOVED, gfx::Point(130, 230), |
+ ui::TouchEvent move(ui::ET_TOUCH_MOVED, gfx::Point(130, 230), |
kTouchId, GetTime()); |
root_window()->AsRootWindowHostDelegate()->OnHostTouchEvent(&move); |
EXPECT_FALSE(delegate->tap()); |
@@ -1228,7 +1228,7 @@ TEST_F(GestureRecognizerTest, GestureTapFollowedByScroll) { |
// Move some more to generate a few more scroll updates. |
delegate->Reset(); |
- ui::TouchEventImpl move1(ui::ET_TOUCH_MOVED, gfx::Point(110, 211), |
+ ui::TouchEvent move1(ui::ET_TOUCH_MOVED, gfx::Point(110, 211), |
kTouchId, GetTime()); |
root_window()->AsRootWindowHostDelegate()->OnHostTouchEvent(&move1); |
EXPECT_FALSE(delegate->tap()); |
@@ -1241,7 +1241,7 @@ TEST_F(GestureRecognizerTest, GestureTapFollowedByScroll) { |
EXPECT_EQ(-19, delegate->scroll_y()); |
delegate->Reset(); |
- ui::TouchEventImpl move2(ui::ET_TOUCH_MOVED, gfx::Point(140, 215), |
+ ui::TouchEvent move2(ui::ET_TOUCH_MOVED, gfx::Point(140, 215), |
kTouchId, GetTime()); |
root_window()->AsRootWindowHostDelegate()->OnHostTouchEvent(&move2); |
EXPECT_FALSE(delegate->tap()); |
@@ -1255,7 +1255,7 @@ TEST_F(GestureRecognizerTest, GestureTapFollowedByScroll) { |
// Release the touch. This should end the scroll. |
delegate->Reset(); |
- ui::TouchEventImpl release1(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201), |
+ ui::TouchEvent release1(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201), |
kTouchId, GetTime()); |
root_window()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release1); |
EXPECT_FALSE(delegate->tap()); |
@@ -1281,7 +1281,7 @@ TEST_F(GestureRecognizerTest, AsynchronousGestureRecognition) { |
// Touch down on the window. This should not generate any gesture event. |
queued_delegate->Reset(); |
- ui::TouchEventImpl press(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201), |
+ ui::TouchEvent press(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201), |
kTouchId1, GetTime()); |
root_window()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press); |
EXPECT_FALSE(queued_delegate->tap()); |
@@ -1295,7 +1295,7 @@ TEST_F(GestureRecognizerTest, AsynchronousGestureRecognition) { |
// Introduce some delay before the touch is released so that it is recognized |
// as a tap. However, this still should not create any gesture events. |
queued_delegate->Reset(); |
- ui::TouchEventImpl release(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201), |
+ ui::TouchEvent release(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201), |
kTouchId1, press.time_stamp() + |
base::TimeDelta::FromMilliseconds(50)); |
root_window()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release); |
@@ -1315,7 +1315,7 @@ TEST_F(GestureRecognizerTest, AsynchronousGestureRecognition) { |
scoped_ptr<aura::Window> window(CreateTestWindowWithDelegate( |
delegate.get(), -2345, gfx::Rect(0, 0, 50, 50), NULL)); |
delegate->Reset(); |
- ui::TouchEventImpl press2(ui::ET_TOUCH_PRESSED, gfx::Point(10, 20), |
+ ui::TouchEvent press2(ui::ET_TOUCH_PRESSED, gfx::Point(10, 20), |
kTouchId2, GetTime()); |
root_window()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press2); |
EXPECT_FALSE(delegate->tap()); |
@@ -1327,7 +1327,7 @@ TEST_F(GestureRecognizerTest, AsynchronousGestureRecognition) { |
EXPECT_FALSE(delegate->scroll_update()); |
EXPECT_FALSE(delegate->scroll_end()); |
- ui::TouchEventImpl release2(ui::ET_TOUCH_RELEASED, gfx::Point(10, 20), |
+ ui::TouchEvent release2(ui::ET_TOUCH_RELEASED, gfx::Point(10, 20), |
kTouchId2, GetTime()); |
root_window()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release2); |
@@ -1358,7 +1358,7 @@ TEST_F(GestureRecognizerTest, AsynchronousGestureRecognition) { |
// Start all over. Press on the first window, then press again on the second |
// window. The second press should still go to the first window. |
queued_delegate->Reset(); |
- ui::TouchEventImpl press3(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201), |
+ ui::TouchEvent press3(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201), |
kTouchId1, GetTime()); |
root_window()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press3); |
EXPECT_FALSE(queued_delegate->tap()); |
@@ -1374,7 +1374,7 @@ TEST_F(GestureRecognizerTest, AsynchronousGestureRecognition) { |
queued_delegate->Reset(); |
delegate->Reset(); |
- ui::TouchEventImpl press4(ui::ET_TOUCH_PRESSED, gfx::Point(103, 203), |
+ ui::TouchEvent press4(ui::ET_TOUCH_PRESSED, gfx::Point(103, 203), |
kTouchId2, GetTime()); |
root_window()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press4); |
EXPECT_FALSE(delegate->tap()); |
@@ -1399,7 +1399,7 @@ TEST_F(GestureRecognizerTest, AsynchronousGestureRecognition) { |
queued_delegate->Reset(); |
delegate->Reset(); |
int x_move = ui::GestureConfiguration::max_touch_move_in_pixels_for_click(); |
- ui::TouchEventImpl move(ui::ET_TOUCH_MOVED, gfx::Point(103 + x_move, 203), |
+ ui::TouchEvent move(ui::ET_TOUCH_MOVED, gfx::Point(103 + x_move, 203), |
kTouchId2, GetTime()); |
root_window()->AsRootWindowHostDelegate()->OnHostTouchEvent(&move); |
EXPECT_FALSE(delegate->tap()); |
@@ -1472,7 +1472,7 @@ TEST_F(GestureRecognizerTest, GestureEventPinchFromScroll) { |
aura::RootWindow* root = root_window(); |
delegate->Reset(); |
- ui::TouchEventImpl press(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201), |
+ ui::TouchEvent press(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201), |
kTouchId1, GetTime()); |
root->AsRootWindowHostDelegate()->OnHostTouchEvent(&press); |
EXPECT_FALSE(delegate->tap()); |
@@ -1485,7 +1485,7 @@ TEST_F(GestureRecognizerTest, GestureEventPinchFromScroll) { |
// Move the touch-point enough so that it is considered as a scroll. This |
// should generate both SCROLL_BEGIN and SCROLL_UPDATE gestures. |
delegate->Reset(); |
- ui::TouchEventImpl move(ui::ET_TOUCH_MOVED, gfx::Point(130, 301), |
+ ui::TouchEvent move(ui::ET_TOUCH_MOVED, gfx::Point(130, 301), |
kTouchId1, GetTime()); |
root->AsRootWindowHostDelegate()->OnHostTouchEvent(&move); |
EXPECT_FALSE(delegate->tap()); |
@@ -1498,7 +1498,7 @@ TEST_F(GestureRecognizerTest, GestureEventPinchFromScroll) { |
// Press the second finger. It should cause pinch-begin. Note that we will not |
// transition to two finger tap here because the touch points are far enough. |
delegate->Reset(); |
- ui::TouchEventImpl press2(ui::ET_TOUCH_PRESSED, gfx::Point(10, 10), |
+ ui::TouchEvent press2(ui::ET_TOUCH_PRESSED, gfx::Point(10, 10), |
kTouchId2, GetTime()); |
root->AsRootWindowHostDelegate()->OnHostTouchEvent(&press2); |
EXPECT_FALSE(delegate->tap()); |
@@ -1513,7 +1513,7 @@ TEST_F(GestureRecognizerTest, GestureEventPinchFromScroll) { |
// Move the first finger. |
delegate->Reset(); |
- ui::TouchEventImpl move3(ui::ET_TOUCH_MOVED, gfx::Point(95, 201), |
+ ui::TouchEvent move3(ui::ET_TOUCH_MOVED, gfx::Point(95, 201), |
kTouchId1, GetTime()); |
root->AsRootWindowHostDelegate()->OnHostTouchEvent(&move3); |
EXPECT_FALSE(delegate->tap()); |
@@ -1529,7 +1529,7 @@ TEST_F(GestureRecognizerTest, GestureEventPinchFromScroll) { |
// Now move the second finger. |
delegate->Reset(); |
- ui::TouchEventImpl move4(ui::ET_TOUCH_MOVED, gfx::Point(55, 15), |
+ ui::TouchEvent move4(ui::ET_TOUCH_MOVED, gfx::Point(55, 15), |
kTouchId2, GetTime()); |
root->AsRootWindowHostDelegate()->OnHostTouchEvent(&move4); |
EXPECT_FALSE(delegate->tap()); |
@@ -1545,7 +1545,7 @@ TEST_F(GestureRecognizerTest, GestureEventPinchFromScroll) { |
// Release the first finger. This should end pinch. |
delegate->Reset(); |
- ui::TouchEventImpl release(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201), |
+ ui::TouchEvent release(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201), |
kTouchId1, press.time_stamp() + |
base::TimeDelta::FromMilliseconds(50)); |
root->AsRootWindowHostDelegate()->OnHostTouchEvent(&release); |
@@ -1561,7 +1561,7 @@ TEST_F(GestureRecognizerTest, GestureEventPinchFromScroll) { |
// Move the second finger. This should still generate a scroll. |
delegate->Reset(); |
- ui::TouchEventImpl move5(ui::ET_TOUCH_MOVED, gfx::Point(25, 10), |
+ ui::TouchEvent move5(ui::ET_TOUCH_MOVED, gfx::Point(25, 10), |
kTouchId2, GetTime()); |
root->AsRootWindowHostDelegate()->OnHostTouchEvent(&move5); |
EXPECT_FALSE(delegate->tap()); |
@@ -1586,11 +1586,11 @@ scoped_ptr<GestureEventConsumeDelegate> delegate( |
scoped_ptr<aura::Window> window(CreateTestWindowWithDelegate( |
delegate.get(), -1234, bounds, NULL)); |
- ui::TouchEventImpl press(ui::ET_TOUCH_PRESSED, gfx::Point(101, 301), |
+ ui::TouchEvent press(ui::ET_TOUCH_PRESSED, gfx::Point(101, 301), |
kTouchId1, GetTime()); |
root_window()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press); |
delegate->Reset(); |
- ui::TouchEventImpl press2(ui::ET_TOUCH_PRESSED, gfx::Point(10, 10), |
+ ui::TouchEvent press2(ui::ET_TOUCH_PRESSED, gfx::Point(10, 10), |
kTouchId2, GetTime()); |
root_window()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press2); |
// Since the touch points are far enough we will go to pinch rather than two |
@@ -1602,7 +1602,7 @@ scoped_ptr<GestureEventConsumeDelegate> delegate( |
// Pinch has started, now release the second finger |
delegate->Reset(); |
- ui::TouchEventImpl release(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201), |
+ ui::TouchEvent release(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201), |
kTouchId1, GetTime()); |
root_window()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release); |
EXPECT_TRUE(delegate->pinch_end()); |
@@ -1612,12 +1612,12 @@ scoped_ptr<GestureEventConsumeDelegate> delegate( |
// Pinch again |
delegate->Reset(); |
- ui::TouchEventImpl press3(ui::ET_TOUCH_PRESSED, gfx::Point(10, 10), |
+ ui::TouchEvent press3(ui::ET_TOUCH_PRESSED, gfx::Point(10, 10), |
kTouchId1, GetTime()); |
root_window()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press3); |
// Now the touch points are close. So we will go into two finger tap. |
// Move the touch-point enough to break two-finger-tap and enter pinch. |
- ui::TouchEventImpl move2(ui::ET_TOUCH_MOVED, gfx::Point(101, 202), |
+ ui::TouchEvent move2(ui::ET_TOUCH_MOVED, gfx::Point(101, 202), |
kTouchId1, GetTime()); |
root_window()->AsRootWindowHostDelegate()->OnHostTouchEvent(&move2); |
EXPECT_TRUE(delegate->pinch_begin()); |
@@ -1640,7 +1640,7 @@ TEST_F(GestureRecognizerTest, GestureEventPinchFromTap) { |
aura::RootWindow* root = root_window(); |
delegate->Reset(); |
- ui::TouchEventImpl press(ui::ET_TOUCH_PRESSED, gfx::Point(101, 301), |
+ ui::TouchEvent press(ui::ET_TOUCH_PRESSED, gfx::Point(101, 301), |
kTouchId1, GetTime()); |
root->AsRootWindowHostDelegate()->OnHostTouchEvent(&press); |
EXPECT_FALSE(delegate->tap()); |
@@ -1654,7 +1654,7 @@ TEST_F(GestureRecognizerTest, GestureEventPinchFromTap) { |
// Press the second finger far enough to break two finger tap. It should |
// instead cause a scroll-begin and pinch-begin. |
delegate->Reset(); |
- ui::TouchEventImpl press2(ui::ET_TOUCH_PRESSED, gfx::Point(10, 10), |
+ ui::TouchEvent press2(ui::ET_TOUCH_PRESSED, gfx::Point(10, 10), |
kTouchId2, GetTime()); |
root->AsRootWindowHostDelegate()->OnHostTouchEvent(&press2); |
EXPECT_FALSE(delegate->tap()); |
@@ -1669,7 +1669,7 @@ TEST_F(GestureRecognizerTest, GestureEventPinchFromTap) { |
// Move the first finger. |
delegate->Reset(); |
- ui::TouchEventImpl move3(ui::ET_TOUCH_MOVED, gfx::Point(65, 201), |
+ ui::TouchEvent move3(ui::ET_TOUCH_MOVED, gfx::Point(65, 201), |
kTouchId1, GetTime()); |
root->AsRootWindowHostDelegate()->OnHostTouchEvent(&move3); |
EXPECT_FALSE(delegate->tap()); |
@@ -1685,7 +1685,7 @@ TEST_F(GestureRecognizerTest, GestureEventPinchFromTap) { |
// Now move the second finger. |
delegate->Reset(); |
- ui::TouchEventImpl move4(ui::ET_TOUCH_MOVED, gfx::Point(55, 15), |
+ ui::TouchEvent move4(ui::ET_TOUCH_MOVED, gfx::Point(55, 15), |
kTouchId2, GetTime()); |
root->AsRootWindowHostDelegate()->OnHostTouchEvent(&move4); |
EXPECT_FALSE(delegate->tap()); |
@@ -1701,7 +1701,7 @@ TEST_F(GestureRecognizerTest, GestureEventPinchFromTap) { |
// Release the first finger. This should end pinch. |
delegate->Reset(); |
- ui::TouchEventImpl release(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201), |
+ ui::TouchEvent release(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201), |
kTouchId1, press.time_stamp() + |
base::TimeDelta::FromMilliseconds(50)); |
root->AsRootWindowHostDelegate()->OnHostTouchEvent(&release); |
@@ -1717,7 +1717,7 @@ TEST_F(GestureRecognizerTest, GestureEventPinchFromTap) { |
// Move the second finger. This should still generate a scroll. |
delegate->Reset(); |
- ui::TouchEventImpl move5(ui::ET_TOUCH_MOVED, gfx::Point(25, 10), |
+ ui::TouchEvent move5(ui::ET_TOUCH_MOVED, gfx::Point(25, 10), |
kTouchId2, GetTime()); |
root->AsRootWindowHostDelegate()->OnHostTouchEvent(&move5); |
EXPECT_FALSE(delegate->tap()); |
@@ -1735,7 +1735,7 @@ TEST_F(GestureRecognizerTest, GestureEventIgnoresDisconnectedEvents) { |
scoped_ptr<GestureEventConsumeDelegate> delegate( |
new GestureEventConsumeDelegate()); |
- ui::TouchEventImpl release1(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201), |
+ ui::TouchEvent release1(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201), |
6, GetTime()); |
root_window()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release1); |
EXPECT_FALSE(delegate->tap()); |
@@ -1773,7 +1773,7 @@ TEST_F(GestureRecognizerTest, GestureEventTouchLockSelectsCorrectWindow) { |
windows[i] = CreateTestWindowWithDelegate( |
delegates[i], i, *window_bounds[i], NULL); |
windows[i]->set_id(i); |
- ui::TouchEventImpl press(ui::ET_TOUCH_PRESSED, window_bounds[i]->origin(), |
+ ui::TouchEvent press(ui::ET_TOUCH_PRESSED, window_bounds[i]->origin(), |
i, GetTime()); |
root_window()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press); |
} |
@@ -1790,10 +1790,10 @@ TEST_F(GestureRecognizerTest, GestureEventTouchLockSelectsCorrectWindow) { |
EXPECT_EQ("3", WindowIDAsString(target)); |
// Add a touch in the middle associated with windows[2] |
- ui::TouchEventImpl press(ui::ET_TOUCH_PRESSED, gfx::Point(0, 500), |
+ ui::TouchEvent press(ui::ET_TOUCH_PRESSED, gfx::Point(0, 500), |
kNumWindows, GetTime()); |
root_window()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press); |
- ui::TouchEventImpl move(ui::ET_TOUCH_MOVED, gfx::Point(250, 250), |
+ ui::TouchEvent move(ui::ET_TOUCH_MOVED, gfx::Point(250, 250), |
kNumWindows, GetTime()); |
root_window()->AsRootWindowHostDelegate()->OnHostTouchEvent(&move); |
@@ -1814,7 +1814,7 @@ TEST_F(GestureRecognizerTest, GestureEventTouchLockSelectsCorrectWindow) { |
EXPECT_TRUE(target == NULL); |
// Move a touch associated with windows[2] to 1000, 1000 |
- ui::TouchEventImpl move2(ui::ET_TOUCH_MOVED, gfx::Point(1000, 1000), |
+ ui::TouchEvent move2(ui::ET_TOUCH_MOVED, gfx::Point(1000, 1000), |
kNumWindows, GetTime()); |
root_window()->AsRootWindowHostDelegate()->OnHostTouchEvent(&move2); |
@@ -1839,11 +1839,11 @@ TEST_F(GestureRecognizerTest, GestureEventOutsideRootWindowTap) { |
gesture_recognizer->GetGestureSequenceForTesting(root_window()); |
gfx::Point pos1(-10, -10); |
- ui::TouchEventImpl press1(ui::ET_TOUCH_PRESSED, pos1, 0, GetTime()); |
+ ui::TouchEvent press1(ui::ET_TOUCH_PRESSED, pos1, 0, GetTime()); |
root_window()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press1); |
gfx::Point pos2(1000, 1000); |
- ui::TouchEventImpl press2(ui::ET_TOUCH_PRESSED, pos2, 1, GetTime()); |
+ ui::TouchEvent press2(ui::ET_TOUCH_PRESSED, pos2, 1, GetTime()); |
root_window()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press2); |
// As these presses were outside the root window, they should be |
@@ -1862,10 +1862,10 @@ TEST_F(GestureRecognizerTest, NoTapWithPreventDefaultedRelease) { |
delegate->set_window(window.get()); |
delegate->Reset(); |
- ui::TouchEventImpl press(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201), |
+ ui::TouchEvent press(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201), |
kTouchId, GetTime()); |
root_window()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press); |
- ui::TouchEventImpl release(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201), |
+ ui::TouchEvent release(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201), |
kTouchId, press.time_stamp() + |
base::TimeDelta::FromMilliseconds(50)); |
root_window()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release); |
@@ -1915,7 +1915,7 @@ TEST_F(GestureRecognizerTest, TwoFingerTap) { |
delegate.get(), -1234, bounds, NULL)); |
delegate->Reset(); |
- ui::TouchEventImpl press1(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201), |
+ ui::TouchEvent press1(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201), |
kTouchId1, GetTime()); |
root_window()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press1); |
EXPECT_FALSE(delegate->tap()); |
@@ -1928,7 +1928,7 @@ TEST_F(GestureRecognizerTest, TwoFingerTap) { |
EXPECT_FALSE(delegate->two_finger_tap()); |
delegate->Reset(); |
- ui::TouchEventImpl press2(ui::ET_TOUCH_PRESSED, gfx::Point(130, 201), |
+ ui::TouchEvent press2(ui::ET_TOUCH_PRESSED, gfx::Point(130, 201), |
kTouchId2, GetTime()); |
root_window()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press2); |
EXPECT_FALSE(delegate->tap()); |
@@ -1942,10 +1942,10 @@ TEST_F(GestureRecognizerTest, TwoFingerTap) { |
// Little bit of touch move should not affect our state. |
delegate->Reset(); |
- ui::TouchEventImpl move1(ui::ET_TOUCH_MOVED, gfx::Point(102, 202), |
+ ui::TouchEvent move1(ui::ET_TOUCH_MOVED, gfx::Point(102, 202), |
kTouchId1, GetTime()); |
root_window()->AsRootWindowHostDelegate()->OnHostTouchEvent(&move1); |
- ui::TouchEventImpl move2(ui::ET_TOUCH_MOVED, gfx::Point(131, 202), |
+ ui::TouchEvent move2(ui::ET_TOUCH_MOVED, gfx::Point(131, 202), |
kTouchId2, GetTime()); |
root_window()->AsRootWindowHostDelegate()->OnHostTouchEvent(&move2); |
EXPECT_FALSE(delegate->tap()); |
@@ -1960,7 +1960,7 @@ TEST_F(GestureRecognizerTest, TwoFingerTap) { |
// Make sure there is enough delay before the touch is released so that it is |
// recognized as a tap. |
delegate->Reset(); |
- ui::TouchEventImpl release1(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201), |
+ ui::TouchEvent release1(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201), |
kTouchId1, press1.time_stamp() + |
base::TimeDelta::FromMilliseconds(50)); |
@@ -1977,7 +1977,7 @@ TEST_F(GestureRecognizerTest, TwoFingerTap) { |
// Make sure there is enough delay before the touch is released so that it is |
// recognized as a tap. |
delegate->Reset(); |
- ui::TouchEventImpl release2(ui::ET_TOUCH_RELEASED, gfx::Point(130, 201), |
+ ui::TouchEvent release2(ui::ET_TOUCH_RELEASED, gfx::Point(130, 201), |
kTouchId2, press2.time_stamp() + |
base::TimeDelta::FromMilliseconds(50)); |
@@ -2003,18 +2003,18 @@ TEST_F(GestureRecognizerTest, TwoFingerTapExpired) { |
delegate.get(), -1234, bounds, NULL)); |
delegate->Reset(); |
- ui::TouchEventImpl press1(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201), |
+ ui::TouchEvent press1(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201), |
kTouchId1, GetTime()); |
root_window()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press1); |
delegate->Reset(); |
- ui::TouchEventImpl press2(ui::ET_TOUCH_PRESSED, gfx::Point(130, 201), |
+ ui::TouchEvent press2(ui::ET_TOUCH_PRESSED, gfx::Point(130, 201), |
kTouchId2, GetTime()); |
root_window()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press2); |
// Send release event after sufficient delay so that two finger time expires. |
delegate->Reset(); |
- ui::TouchEventImpl release1(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201), |
+ ui::TouchEvent release1(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201), |
kTouchId1, press1.time_stamp() + |
base::TimeDelta::FromMilliseconds(1000)); |
@@ -2025,7 +2025,7 @@ TEST_F(GestureRecognizerTest, TwoFingerTapExpired) { |
// Make sure there is enough delay before the touch is released so that it is |
// recognized as a tap. |
delegate->Reset(); |
- ui::TouchEventImpl release2(ui::ET_TOUCH_RELEASED, gfx::Point(130, 201), |
+ ui::TouchEvent release2(ui::ET_TOUCH_RELEASED, gfx::Point(130, 201), |
kTouchId2, press2.time_stamp() + |
base::TimeDelta::FromMilliseconds(50)); |
@@ -2048,12 +2048,12 @@ TEST_F(GestureRecognizerTest, TwoFingerTapChangesToPinch) { |
delegate.get(), -1234, bounds, NULL)); |
delegate->Reset(); |
- ui::TouchEventImpl press1(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201), |
+ ui::TouchEvent press1(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201), |
kTouchId1, GetTime()); |
root_window()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press1); |
delegate->Reset(); |
- ui::TouchEventImpl press2(ui::ET_TOUCH_PRESSED, gfx::Point(130, 201), |
+ ui::TouchEvent press2(ui::ET_TOUCH_PRESSED, gfx::Point(130, 201), |
kTouchId2, GetTime()); |
root_window()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press2); |
@@ -2064,7 +2064,7 @@ TEST_F(GestureRecognizerTest, TwoFingerTapChangesToPinch) { |
// Make sure there is enough delay before the touch is released so that it |
// is recognized as a tap. |
delegate->Reset(); |
- ui::TouchEventImpl release(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201), |
+ ui::TouchEvent release(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201), |
kTouchId2, press1.time_stamp() + |
base::TimeDelta::FromMilliseconds(50)); |
@@ -2080,12 +2080,12 @@ TEST_F(GestureRecognizerTest, TwoFingerTapChangesToPinch) { |
delegate.get(), -1234, bounds, NULL)); |
delegate->Reset(); |
- ui::TouchEventImpl press1(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201), |
+ ui::TouchEvent press1(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201), |
kTouchId1, GetTime()); |
root_window()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press1); |
delegate->Reset(); |
- ui::TouchEventImpl press2(ui::ET_TOUCH_PRESSED, gfx::Point(130, 201), |
+ ui::TouchEvent press2(ui::ET_TOUCH_PRESSED, gfx::Point(130, 201), |
kTouchId2, GetTime()); |
root_window()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press2); |
@@ -2096,7 +2096,7 @@ TEST_F(GestureRecognizerTest, TwoFingerTapChangesToPinch) { |
// Make sure there is enough delay before the touch is released so that it |
// is recognized as a tap. |
delegate->Reset(); |
- ui::TouchEventImpl release(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201), |
+ ui::TouchEvent release(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201), |
kTouchId1, press1.time_stamp() + |
base::TimeDelta::FromMilliseconds(50)); |
@@ -2121,17 +2121,17 @@ TEST_F(GestureRecognizerTest, TwoFingerTapCancelled) { |
delegate.get(), -1234, bounds, NULL)); |
delegate->Reset(); |
- ui::TouchEventImpl press1(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201), |
+ ui::TouchEvent press1(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201), |
kTouchId1, GetTime()); |
root_window()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press1); |
delegate->Reset(); |
- ui::TouchEventImpl press2(ui::ET_TOUCH_PRESSED, gfx::Point(130, 201), |
+ ui::TouchEvent press2(ui::ET_TOUCH_PRESSED, gfx::Point(130, 201), |
kTouchId2, GetTime()); |
root_window()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press2); |
delegate->Reset(); |
- ui::TouchEventImpl cancel(ui::ET_TOUCH_CANCELLED, gfx::Point(130, 201), |
+ ui::TouchEvent cancel(ui::ET_TOUCH_CANCELLED, gfx::Point(130, 201), |
kTouchId1, GetTime()); |
root_window()->AsRootWindowHostDelegate()->OnHostTouchEvent(&cancel); |
EXPECT_FALSE(delegate->two_finger_tap()); |
@@ -2139,7 +2139,7 @@ TEST_F(GestureRecognizerTest, TwoFingerTapCancelled) { |
// Make sure there is enough delay before the touch is released so that it |
// is recognized as a tap. |
delegate->Reset(); |
- ui::TouchEventImpl release(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201), |
+ ui::TouchEvent release(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201), |
kTouchId2, press1.time_stamp() + |
base::TimeDelta::FromMilliseconds(50)); |
@@ -2154,17 +2154,17 @@ TEST_F(GestureRecognizerTest, TwoFingerTapCancelled) { |
delegate.get(), -1234, bounds, NULL)); |
delegate->Reset(); |
- ui::TouchEventImpl press1(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201), |
+ ui::TouchEvent press1(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201), |
kTouchId1, GetTime()); |
root_window()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press1); |
delegate->Reset(); |
- ui::TouchEventImpl press2(ui::ET_TOUCH_PRESSED, gfx::Point(130, 201), |
+ ui::TouchEvent press2(ui::ET_TOUCH_PRESSED, gfx::Point(130, 201), |
kTouchId2, GetTime()); |
root_window()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press2); |
delegate->Reset(); |
- ui::TouchEventImpl cancel(ui::ET_TOUCH_CANCELLED, gfx::Point(130, 201), |
+ ui::TouchEvent cancel(ui::ET_TOUCH_CANCELLED, gfx::Point(130, 201), |
kTouchId2, GetTime()); |
root_window()->AsRootWindowHostDelegate()->OnHostTouchEvent(&cancel); |
EXPECT_FALSE(delegate->two_finger_tap()); |
@@ -2172,7 +2172,7 @@ TEST_F(GestureRecognizerTest, TwoFingerTapCancelled) { |
// Make sure there is enough delay before the touch is released so that it |
// is recognized as a tap. |
delegate->Reset(); |
- ui::TouchEventImpl release(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201), |
+ ui::TouchEvent release(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201), |
kTouchId1, press1.time_stamp() + |
base::TimeDelta::FromMilliseconds(50)); |
@@ -2193,7 +2193,7 @@ TEST_F(GestureRecognizerTest, VeryWideTwoFingerTouchDownShouldBeAPinch) { |
delegate.get(), -1234, bounds, NULL)); |
delegate->Reset(); |
- ui::TouchEventImpl press1(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201), |
+ ui::TouchEvent press1(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201), |
kTouchId1, GetTime()); |
root_window()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press1); |
EXPECT_FALSE(delegate->tap()); |
@@ -2206,7 +2206,7 @@ TEST_F(GestureRecognizerTest, VeryWideTwoFingerTouchDownShouldBeAPinch) { |
EXPECT_FALSE(delegate->two_finger_tap()); |
delegate->Reset(); |
- ui::TouchEventImpl press2(ui::ET_TOUCH_PRESSED, gfx::Point(430, 201), |
+ ui::TouchEvent press2(ui::ET_TOUCH_PRESSED, gfx::Point(430, 201), |
kTouchId2, GetTime()); |
root_window()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press2); |
EXPECT_FALSE(delegate->tap()); |
@@ -2230,10 +2230,10 @@ TEST_F(GestureRecognizerTest, FlushAllOnHide) { |
CreateTestWindowWithDelegate(delegate.get(), 0, bounds, NULL)); |
const int kTouchId1 = 8; |
const int kTouchId2 = 2; |
- ui::TouchEventImpl press1(ui::ET_TOUCH_PRESSED, gfx::Point(10, 10), |
+ ui::TouchEvent press1(ui::ET_TOUCH_PRESSED, gfx::Point(10, 10), |
kTouchId1, GetTime()); |
root_window()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press1); |
- ui::TouchEventImpl press2(ui::ET_TOUCH_PRESSED, gfx::Point(20, 20), |
+ ui::TouchEvent press2(ui::ET_TOUCH_PRESSED, gfx::Point(20, 20), |
kTouchId2, GetTime()); |
root_window()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press2); |
window->Hide(); |
@@ -2261,7 +2261,7 @@ TEST_F(GestureRecognizerTest, LongPressTimerStopsOnPreventDefaultedTouchMoves) { |
root_window()->SetGestureRecognizerForTesting(gesture_recognizer); |
delegate->Reset(); |
- ui::TouchEventImpl press(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201), |
+ ui::TouchEvent press(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201), |
kTouchId, GetTime()); |
root_window()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press); |
// Scroll around, to cancel the long press |
@@ -2288,7 +2288,7 @@ class ConsumesTouchMovesDelegate : public GestureEventConsumeDelegate { |
void set_consume_touch_move(bool consume) { consume_touch_move_ = consume; } |
private: |
- virtual ui::TouchStatus OnTouchEvent(ui::TouchEventImpl* touch) OVERRIDE { |
+ virtual ui::TouchStatus OnTouchEvent(ui::TouchEvent* touch) OVERRIDE { |
if (consume_touch_move_ && touch->type() == ui::ET_TOUCH_MOVED) |
return ui::TOUCH_STATUS_CONTINUE; |
return GestureEventConsumeDelegate::OnTouchEvent(touch); |
@@ -2312,7 +2312,7 @@ TEST_F(GestureRecognizerTest, GestureEventScrollTouchMoveConsumed) { |
delegate.get(), -1234, bounds, NULL)); |
delegate->Reset(); |
- ui::TouchEventImpl press(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201), |
+ ui::TouchEvent press(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201), |
kTouchId, GetTime()); |
root_window()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press); |
EXPECT_FALSE(delegate->tap()); |
@@ -2380,7 +2380,7 @@ TEST_F(GestureRecognizerTest, GestureEventScrollTouchMoveConsumed) { |
// Release the touch. This should end the scroll. |
delegate->Reset(); |
- ui::TouchEventImpl release(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201), |
+ ui::TouchEvent release(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201), |
kTouchId, press.time_stamp() + |
base::TimeDelta::FromMilliseconds(50)); |
root_window()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release); |
@@ -2406,21 +2406,21 @@ TEST_F(GestureRecognizerTest, GestureEventDoubleTap) { |
delegate.get(), -1234, bounds, NULL)); |
// First tap (tested in GestureEventTap) |
- ui::TouchEventImpl press1(ui::ET_TOUCH_PRESSED, gfx::Point(104, 201), |
+ ui::TouchEvent press1(ui::ET_TOUCH_PRESSED, gfx::Point(104, 201), |
kTouchId, GetTime()); |
root_window()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press1); |
- ui::TouchEventImpl release1(ui::ET_TOUCH_RELEASED, gfx::Point(104, 201), |
+ ui::TouchEvent release1(ui::ET_TOUCH_RELEASED, gfx::Point(104, 201), |
kTouchId, press1.time_stamp() + |
base::TimeDelta::FromMilliseconds(50)); |
root_window()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release1); |
delegate->Reset(); |
// Second tap |
- ui::TouchEventImpl press2(ui::ET_TOUCH_PRESSED, gfx::Point(101, 203), |
+ ui::TouchEvent press2(ui::ET_TOUCH_PRESSED, gfx::Point(101, 203), |
kTouchId, release1.time_stamp() + |
base::TimeDelta::FromMilliseconds(200)); |
root_window()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press2); |
- ui::TouchEventImpl release2(ui::ET_TOUCH_RELEASED, gfx::Point(102, 206), |
+ ui::TouchEvent release2(ui::ET_TOUCH_RELEASED, gfx::Point(102, 206), |
kTouchId, press2.time_stamp() + |
base::TimeDelta::FromMilliseconds(50)); |
root_window()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release2); |
@@ -2449,21 +2449,21 @@ TEST_F(GestureRecognizerTest, TwoTapsFarApart) { |
delegate.get(), -1234, bounds, NULL)); |
// First tap (tested in GestureEventTap) |
- ui::TouchEventImpl press1(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201), |
+ ui::TouchEvent press1(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201), |
kTouchId, GetTime()); |
root_window()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press1); |
- ui::TouchEventImpl release1(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201), |
+ ui::TouchEvent release1(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201), |
kTouchId, press1.time_stamp() + |
base::TimeDelta::FromMilliseconds(50)); |
root_window()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release1); |
delegate->Reset(); |
// Second tap, close in time but far in distance |
- ui::TouchEventImpl press2(ui::ET_TOUCH_PRESSED, gfx::Point(201, 201), |
+ ui::TouchEvent press2(ui::ET_TOUCH_PRESSED, gfx::Point(201, 201), |
kTouchId, release1.time_stamp() + |
base::TimeDelta::FromMilliseconds(200)); |
root_window()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press2); |
- ui::TouchEventImpl release2(ui::ET_TOUCH_RELEASED, gfx::Point(201, 201), |
+ ui::TouchEvent release2(ui::ET_TOUCH_RELEASED, gfx::Point(201, 201), |
kTouchId, press2.time_stamp() + |
base::TimeDelta::FromMilliseconds(50)); |
root_window()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release2); |
@@ -2493,21 +2493,21 @@ TEST_F(GestureRecognizerTest, TwoTapsWithDelayBetween) { |
delegate.get(), -1234, bounds, NULL)); |
// First tap (tested in GestureEventTap) |
- ui::TouchEventImpl press1(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201), |
+ ui::TouchEvent press1(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201), |
kTouchId, GetTime()); |
root_window()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press1); |
- ui::TouchEventImpl release1(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201), |
+ ui::TouchEvent release1(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201), |
kTouchId, press1.time_stamp() + |
base::TimeDelta::FromMilliseconds(50)); |
root_window()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release1); |
delegate->Reset(); |
// Second tap, close in distance but after some delay |
- ui::TouchEventImpl press2(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201), |
+ ui::TouchEvent press2(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201), |
kTouchId, release1.time_stamp() + |
base::TimeDelta::FromMilliseconds(2000)); |
root_window()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press2); |
- ui::TouchEventImpl release2(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201), |
+ ui::TouchEvent release2(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201), |
kTouchId, press2.time_stamp() + |
base::TimeDelta::FromMilliseconds(50)); |
root_window()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release2); |
@@ -2537,14 +2537,14 @@ TEST_F(GestureRecognizerTest, BoundingBoxRadiusChange) { |
scoped_ptr<aura::Window> window(CreateTestWindowWithDelegate( |
delegate.get(), -1234, bounds, NULL)); |
- ui::TouchEventImpl press1( |
+ ui::TouchEvent press1( |
ui::ET_TOUCH_PRESSED, gfx::Point(101, 201), kTouchId, GetTime()); |
root_window()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press1); |
EXPECT_TRUE(delegate->bounding_box().IsEmpty()); |
delegate->Reset(); |
- ui::TouchEventImpl press2( |
+ ui::TouchEvent press2( |
ui::ET_TOUCH_PRESSED, gfx::Point(201, 201), kTouchId2, |
press1.time_stamp() + base::TimeDelta::FromMilliseconds(400)); |
press2.set_radius_x(5); |
@@ -2553,7 +2553,7 @@ TEST_F(GestureRecognizerTest, BoundingBoxRadiusChange) { |
delegate->Reset(); |
- ui::TouchEventImpl move1(ui::ET_TOUCH_MOVED, gfx::Point(141, 201), kTouchId, |
+ ui::TouchEvent move1(ui::ET_TOUCH_MOVED, gfx::Point(141, 201), kTouchId, |
press1.time_stamp() + base::TimeDelta::FromMilliseconds(40)); |
root_window()->AsRootWindowHostDelegate()->OnHostTouchEvent(&move1); |
EXPECT_TRUE(delegate->pinch_begin()); |
@@ -2563,7 +2563,7 @@ TEST_F(GestureRecognizerTest, BoundingBoxRadiusChange) { |
delegate->Reset(); |
// The position doesn't move, but the radius changes. |
- ui::TouchEventImpl move2(ui::ET_TOUCH_MOVED, gfx::Point(101, 201), kTouchId, |
+ ui::TouchEvent move2(ui::ET_TOUCH_MOVED, gfx::Point(101, 201), kTouchId, |
press2.time_stamp() + base::TimeDelta::FromMilliseconds(40)); |
move2.set_radius_x(50); |
move2.set_radius_y(60); |