| Index: ui/events/test/event_generator.cc
|
| diff --git a/ui/events/test/event_generator.cc b/ui/events/test/event_generator.cc
|
| index 4a85eaa65e0577e611bcc34e952957eac5e4df10..297d8b0f1c99a7fa3f65916e7590d56378153c22 100644
|
| --- a/ui/events/test/event_generator.cc
|
| +++ b/ui/events/test/event_generator.cc
|
| @@ -274,6 +274,11 @@ void EventGenerator::ExitPenPointerMode() {
|
| pen_pointer_mode_ = false;
|
| }
|
|
|
| +void EventGenerator::SetTouchRadius(float x, float y) {
|
| + touch_pointer_details_.radius_x = x;
|
| + touch_pointer_details_.radius_y = y;
|
| +}
|
| +
|
| void EventGenerator::PressTouch() {
|
| PressTouchId(0);
|
| }
|
| @@ -585,6 +590,9 @@ void EventGenerator::Init(gfx::NativeWindow root_window,
|
| if (window_context)
|
| current_location_ = delegate()->CenterOfWindow(window_context);
|
| current_target_ = delegate()->GetTargetAt(current_location_);
|
| + touch_pointer_details_ =
|
| + PointerDetails(ui::EventPointerType::POINTER_TYPE_TOUCH, 1.0, 1.0,
|
| + std::numeric_limits<float>::quiet_NaN(), 0.0, 0.0);
|
| }
|
|
|
| void EventGenerator::DispatchKeyEvent(bool is_press,
|
| @@ -663,6 +671,11 @@ void EventGenerator::DoDispatchEvent(ui::Event* event, bool async) {
|
| if (pen_pointer_mode_ && event->IsMouseEvent())
|
| ConvertToPenPointerEvent(static_cast<ui::MouseEvent*>(event));
|
|
|
| + if (event->IsTouchEvent()) {
|
| + static_cast<ui::TouchEvent*>(event)->set_pointer_details(
|
| + touch_pointer_details_);
|
| + }
|
| +
|
| if (async) {
|
| std::unique_ptr<ui::Event> pending_event = ui::Event::Clone(*event);
|
| if (pending_events_.empty()) {
|
|
|