| Index: content/public/test/browser_test_utils.cc
|
| diff --git a/content/public/test/browser_test_utils.cc b/content/public/test/browser_test_utils.cc
|
| index 05d09db6b3678bdf959132e2ffa93e6cf9d7e755..001ceeaab81a8e46bfd863aba448a2d735da27fb 100644
|
| --- a/content/public/test/browser_test_utils.cc
|
| +++ b/content/public/test/browser_test_utils.cc
|
| @@ -47,6 +47,7 @@
|
| #include "ui/events/gesture_detection/gesture_configuration.h"
|
| #include "ui/events/keycodes/dom/dom_code.h"
|
| #include "ui/events/keycodes/dom/keycode_converter.h"
|
| +#include "ui/events/latency_info.h"
|
| #include "ui/resources/grit/webui_resources.h"
|
|
|
| #if defined(USE_AURA)
|
| @@ -431,6 +432,14 @@ void SimulateTapWithModifiersAt(WebContents* web_contents,
|
| widget_host->ForwardGestureEvent(tap);
|
| }
|
|
|
| +void SimulateTouchPressAt(WebContents* web_contents, const gfx::Point& point) {
|
| + SyntheticWebTouchEvent touch;
|
| + touch.PressPoint(point.x(), point.y());
|
| + RenderWidgetHostImpl* widget_host =
|
| + RenderWidgetHostImpl::From(web_contents->GetRenderViewHost());
|
| + widget_host->ForwardTouchEventWithLatencyInfo(touch, ui::LatencyInfo());
|
| +}
|
| +
|
| void SimulateKeyPress(WebContents* web_contents,
|
| ui::KeyboardCode key_code,
|
| bool control,
|
| @@ -961,6 +970,12 @@ bool WebContentsAddedObserver::RenderViewCreatedCalled() {
|
| return false;
|
| }
|
|
|
| +bool RequestFrame(WebContents* web_contents) {
|
| + DCHECK(web_contents);
|
| + return RenderWidgetHostImpl::From(web_contents->GetRenderViewHost())
|
| + ->ScheduleComposite();
|
| +}
|
| +
|
| FrameWatcher::FrameWatcher()
|
| : BrowserMessageFilter(ViewMsgStart), frames_to_wait_(0) {
|
| }
|
| @@ -982,6 +997,13 @@ bool FrameWatcher::OnMessageReceived(const IPC::Message& message) {
|
| return false;
|
| }
|
|
|
| +void FrameWatcher::AttachTo(WebContents* web_contents) {
|
| + DCHECK(web_contents);
|
| + RenderWidgetHostImpl* widget_host =
|
| + RenderWidgetHostImpl::From(web_contents->GetRenderViewHost());
|
| + widget_host->GetProcess()->AddFilter(this);
|
| +}
|
| +
|
| void FrameWatcher::WaitFrames(int frames_to_wait) {
|
| if (frames_to_wait <= 0)
|
| return;
|
|
|