Index: ui/aura/test/event_generator.cc |
diff --git a/ui/aura/test/event_generator.cc b/ui/aura/test/event_generator.cc |
index 42614f57474a1c1b22b56239ed02209bf6f8c8ac..de4318e84d609afc93ce818ee0209acea40c264d 100644 |
--- a/ui/aura/test/event_generator.cc |
+++ b/ui/aura/test/event_generator.cc |
@@ -11,7 +11,9 @@ |
#include "ui/aura/window_event_dispatcher.h" |
#include "ui/aura/window_tree_host.h" |
#include "ui/events/event.h" |
+#include "ui/events/event_source.h" |
#include "ui/events/event_utils.h" |
+#include "ui/events/test/events_test_utils.h" |
#include "ui/gfx/vector2d_conversions.h" |
#if defined(USE_X11) |
@@ -228,6 +230,16 @@ void EventGenerator::MoveTouchId(const gfx::Point& point, int touch_id) { |
UpdateCurrentDispatcher(point); |
} |
+void EventGenerator::StationaryTouch() { |
+ StationaryTouchId(0); |
+} |
+ |
+void EventGenerator::StationaryTouchId(int touch_id) { |
+ TestTouchEvent touchev( |
+ ui::ET_TOUCH_STATIONARY, GetLocationInCurrentRoot(), touch_id, flags_); |
+ Dispatch(&touchev); |
+} |
+ |
void EventGenerator::ReleaseTouch() { |
ReleaseTouchId(0); |
} |
@@ -607,8 +619,10 @@ void EventGenerator::DoDispatchEvent(ui::Event* event, bool async) { |
} |
pending_events_.push_back(pending_event); |
} else { |
+ ui::EventSource* event_source = current_host_->GetEventSource(); |
+ ui::EventSourceTestApi event_source_test(event_source); |
ui::EventDispatchDetails details = |
- current_host_->event_processor()->OnEventFromSource(event); |
+ event_source_test.SendEventToProcessor(event); |
CHECK(!details.dispatcher_destroyed); |
} |
} |