Index: ui/aura/test/event_generator.cc |
diff --git a/ui/aura/test/event_generator.cc b/ui/aura/test/event_generator.cc |
index ce2848475a6ca2a2c2904d04339cc50d9a1c60eb..4115fb041b44c12e99a841cee1c411be96dbb0be 100644 |
--- a/ui/aura/test/event_generator.cc |
+++ b/ui/aura/test/event_generator.cc |
@@ -137,6 +137,13 @@ void EventGenerator::PressTouch() { |
Dispatch(touchev); |
} |
+void EventGenerator::MoveTouch(const gfx::Point& point) { |
+ TestTouchEvent touchev(ui::ET_TOUCH_MOVED, point, flags_); |
+ Dispatch(touchev); |
+ |
+ current_location_ = point; |
+} |
+ |
void EventGenerator::ReleaseTouch() { |
TestTouchEvent touchev(ui::ET_TOUCH_RELEASED, current_location_, flags_); |
Dispatch(touchev); |
@@ -144,12 +151,7 @@ void EventGenerator::ReleaseTouch() { |
void EventGenerator::PressMoveAndReleaseTouchTo(const gfx::Point& point) { |
PressTouch(); |
- |
- TestTouchEvent touchev(ui::ET_TOUCH_MOVED, point, flags_); |
- Dispatch(touchev); |
- |
- current_location_ = point; |
- |
+ MoveTouch(point); |
ReleaseTouch(); |
} |