Index: ui/aura/window_unittest.cc |
=================================================================== |
--- ui/aura/window_unittest.cc (revision 148788) |
+++ ui/aura/window_unittest.cc (working copy) |
@@ -754,7 +754,7 @@ |
delegate.ResetCounts(); |
TouchEvent touchev(ui::ET_TOUCH_PRESSED, gfx::Point(50, 50), 0, getTime()); |
- root_window()->DispatchTouchEvent(&touchev); |
+ root_window()->AsRootWindowHostDelegate()->OnHostTouchEvent(&touchev); |
EXPECT_EQ(1, delegate.touch_event_count()); |
delegate.ResetCounts(); |
@@ -769,7 +769,7 @@ |
EXPECT_EQ(1, delegate.mouse_event_count()); |
TouchEvent touchev2(ui::ET_TOUCH_PRESSED, gfx::Point(250, 250), 1, getTime()); |
- root_window()->DispatchTouchEvent(&touchev2); |
+ root_window()->AsRootWindowHostDelegate()->OnHostTouchEvent(&touchev2); |
EXPECT_EQ(1, delegate.touch_event_count()); |
// Removing the capture window from parent should reset the capture window |
@@ -792,7 +792,7 @@ |
// Press on w1. |
TouchEvent press(ui::ET_TOUCH_PRESSED, |
gfx::Point(10, 10), 0, getTime()); |
- root_window()->DispatchTouchEvent(&press); |
+ root_window()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press); |
// We will get both GESTURE_BEGIN and GESTURE_TAP_DOWN. |
EXPECT_EQ(2, delegate1.gesture_event_count()); |
delegate1.ResetCounts(); |
@@ -808,7 +808,7 @@ |
TouchEvent move(ui::ET_TOUCH_MOVED, |
gfx::Point(10, 10), 0, getTime()); |
- root_window()->DispatchTouchEvent(&move); |
+ root_window()->AsRootWindowHostDelegate()->OnHostTouchEvent(&move); |
// This touch id is now ignored, no scroll fired. |
EXPECT_EQ(0, delegate1.gesture_event_count()); |
@@ -816,7 +816,7 @@ |
TouchEvent release(ui::ET_TOUCH_RELEASED, |
gfx::Point(10, 10), 0, getTime()); |
- root_window()->DispatchTouchEvent(&release); |
+ root_window()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release); |
EXPECT_EQ(0, delegate1.gesture_event_count()); |
EXPECT_EQ(0, delegate2.gesture_event_count()); |
@@ -824,7 +824,7 @@ |
TouchEvent press2(ui::ET_TOUCH_PRESSED, |
gfx::Point(10, 10), 0, getTime()); |
- root_window()->DispatchTouchEvent(&press2); |
+ root_window()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press2); |
EXPECT_EQ(0, delegate1.gesture_event_count()); |
// We will get both GESTURE_BEGIN and GESTURE_TAP_DOWN. |
EXPECT_EQ(2, delegate2.gesture_event_count()); |
@@ -837,7 +837,7 @@ |
TouchEvent press(ui::ET_TOUCH_PRESSED, |
gfx::Point(10, 10), 0, getTime()); |
- root_window()->DispatchTouchEvent(&press); |
+ root_window()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press); |
// We will get both GESTURE_BEGIN and GESTURE_TAP_DOWN. |
EXPECT_EQ(2, delegate.gesture_event_count()); |
@@ -852,7 +852,7 @@ |
TouchEvent release(ui::ET_TOUCH_RELEASED, |
gfx::Point(10, 10), 0, getTime() + |
base::TimeDelta::FromMilliseconds(50)); |
- root_window()->DispatchTouchEvent(&release); |
+ root_window()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release); |
EXPECT_EQ(2, delegate.gesture_event_count()); |
} |
@@ -863,7 +863,7 @@ |
scoped_ptr<Window> w1(CreateTestWindowWithDelegate( |
&d1, 0, gfx::Rect(0, 0, 20, 20), NULL)); |
TouchEvent p1(ui::ET_TOUCH_PRESSED, gfx::Point(10, 10), 0, getTime()); |
- root_window()->DispatchTouchEvent(&p1); |
+ root_window()->AsRootWindowHostDelegate()->OnHostTouchEvent(&p1); |
// We will get both GESTURE_BEGIN and GESTURE_TAP_DOWN. |
EXPECT_EQ(2, d1.gesture_event_count()); |
d1.ResetCounts(); |
@@ -873,7 +873,7 @@ |
scoped_ptr<Window> w2(CreateTestWindowWithDelegate( |
&d2, 0, gfx::Rect(40, 0, 40, 20), NULL)); |
TouchEvent p2(ui::ET_TOUCH_PRESSED, gfx::Point(41, 10), 1, getTime()); |
- root_window()->DispatchTouchEvent(&p2); |
+ root_window()->AsRootWindowHostDelegate()->OnHostTouchEvent(&p2); |
EXPECT_EQ(0, d1.gesture_event_count()); |
// We will get both GESTURE_BEGIN and GESTURE_TAP_DOWN for new target window. |
EXPECT_EQ(2, d2.gesture_event_count()); |
@@ -899,7 +899,7 @@ |
// Move touch id originally associated with |w2|. Since capture was transfered |
// from 2 to 3 only |w3| should get the event. |
TouchEvent m3(ui::ET_TOUCH_MOVED, gfx::Point(110, 105), 1, getTime()); |
- root_window()->DispatchTouchEvent(&m3); |
+ root_window()->AsRootWindowHostDelegate()->OnHostTouchEvent(&m3); |
EXPECT_EQ(0, d1.gesture_event_count()); |
EXPECT_EQ(0, d2.gesture_event_count()); |
// |w3| gets two events, both scroll related. |
@@ -1312,7 +1312,7 @@ |
TouchEvent press(ui::ET_TOUCH_PRESSED, |
gfx::Point(size.height() - 10, 10), 0, getTime()); |
- root_window()->DispatchTouchEvent(&press); |
+ root_window()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press); |
EXPECT_EQ(gfx::Point(10, 10).ToString(), delegate->position().ToString()); |
} |