| Index: content/browser/site_per_process_browsertest.cc
|
| diff --git a/content/browser/site_per_process_browsertest.cc b/content/browser/site_per_process_browsertest.cc
|
| index 55a2ab9ccfdf381c510fc51fe2d1ba762dbe1398..c383440dd572e418f0a3ba253aeaf0a3556d05af 100644
|
| --- a/content/browser/site_per_process_browsertest.cc
|
| +++ b/content/browser/site_per_process_browsertest.cc
|
| @@ -5242,9 +5242,24 @@ IN_PROC_BROWSER_TEST_F(SitePerProcessBrowserTest,
|
| gfx::Point child_center(150, 150);
|
| auto* rwhv = static_cast<RenderWidgetHostViewAura*>(
|
| contents->GetRenderWidgetHostView());
|
| +
|
| + // Wait until renderer's compositor thread is synced.
|
| + RenderWidgetHost* child_render_widget_host =
|
| + root->child_at(0)->current_frame_host()->GetRenderWidgetHost();
|
| + {
|
| + std::unique_ptr<MainThreadFrameObserver> observer(
|
| + new MainThreadFrameObserver(child_render_widget_host));
|
| + observer->Wait();
|
| + }
|
| +
|
| ui::TouchEvent touch_event(ui::ET_TOUCH_PRESSED, child_center, 0, 0,
|
| ui::EventTimeForNow(), 30.f, 30.f, 0.f, 0.f);
|
| rwhv->OnTouchEvent(&touch_event);
|
| + {
|
| + std::unique_ptr<MainThreadFrameObserver> observer(
|
| + new MainThreadFrameObserver(child_render_widget_host));
|
| + observer->Wait();
|
| + }
|
|
|
| // Verify touch handler in subframe was invoked
|
| std::string result;
|
| @@ -7901,8 +7916,12 @@ IN_PROC_BROWSER_TEST_F(SitePerProcessGestureBrowserTest,
|
| child_frame_monitor.events_received()[2]);
|
| EXPECT_EQ(blink::WebInputEvent::GestureScrollBegin,
|
| child_frame_monitor.events_received()[3]);
|
| - EXPECT_EQ(blink::WebInputEvent::GestureScrollEnd,
|
| + EXPECT_EQ(blink::WebInputEvent::GesturePinchBegin,
|
| child_frame_monitor.events_received()[4]);
|
| + EXPECT_EQ(blink::WebInputEvent::GesturePinchEnd,
|
| + child_frame_monitor.events_received()[5]);
|
| + EXPECT_EQ(blink::WebInputEvent::GestureScrollEnd,
|
| + child_frame_monitor.events_received()[6]);
|
| }
|
|
|
| IN_PROC_BROWSER_TEST_F(SitePerProcessGestureBrowserTest,
|
| @@ -7937,8 +7956,12 @@ IN_PROC_BROWSER_TEST_F(SitePerProcessGestureBrowserTest,
|
| EXPECT_EQ(blink::WebInputEvent::GestureScrollEnd,
|
| root_frame_monitor.events_received()[6]);
|
|
|
| - // Verify child-RWHI gets no events.
|
| - EXPECT_FALSE(child_frame_monitor.EventWasReceived());
|
| + // Verify child-RWHI also gets events.
|
| + EXPECT_TRUE(child_frame_monitor.EventWasReceived());
|
| + EXPECT_EQ(blink::WebInputEvent::GesturePinchBegin,
|
| + child_frame_monitor.events_received()[0]);
|
| + EXPECT_EQ(blink::WebInputEvent::GesturePinchEnd,
|
| + child_frame_monitor.events_received()[1]);
|
| }
|
| #endif
|
|
|
|
|