| Index: content/browser/renderer_host/render_widget_host_view_aura_unittest.cc
|
| diff --git a/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc b/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc
|
| index 7652b2e168ea8cc4f859cf00e84e8ed8ac7429d7..22bf032db242fc7d2eb7036ca187c4833302123c 100644
|
| --- a/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc
|
| +++ b/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc
|
| @@ -430,10 +430,6 @@ class FakeRenderWidgetHostViewAura : public RenderWidgetHostViewAura {
|
| return event_handler()->pointer_state();
|
| }
|
|
|
| - // In this unit test, |window_| is directly added to the root and is
|
| - // toplevel.
|
| - aura::Window* GetToplevelWindow() override { return window(); }
|
| -
|
| gfx::Size last_frame_size_;
|
| std::unique_ptr<cc::CopyOutputRequest> last_copy_request_;
|
| FakeWindowEventDispatcher* dispatcher_;
|
| @@ -521,20 +517,6 @@ const WebInputEvent* GetInputEventFromMessage(const IPC::Message& message) {
|
| return reinterpret_cast<const WebInputEvent*>(data);
|
| }
|
|
|
| -class MockRenderWidgetHostViewAura : public RenderWidgetHostViewAura {
|
| - public:
|
| - MockRenderWidgetHostViewAura(RenderWidgetHost* host, bool is_guest_view_hack)
|
| - : RenderWidgetHostViewAura(host, is_guest_view_hack) {}
|
| -
|
| - ~MockRenderWidgetHostViewAura() override {}
|
| -
|
| - protected:
|
| - aura::Window* GetToplevelWindow() override { return window(); }
|
| -
|
| - private:
|
| - DISALLOW_COPY_AND_ASSIGN(MockRenderWidgetHostViewAura);
|
| -};
|
| -
|
| } // namespace
|
|
|
| class RenderWidgetHostViewAuraTest : public testing::Test {
|
| @@ -560,8 +542,6 @@ class RenderWidgetHostViewAuraTest : public testing::Test {
|
| ImageTransportFactory::GetInstance()->GetContextFactory(),
|
| ImageTransportFactory::GetInstance()->GetContextFactoryPrivate());
|
| new wm::DefaultActivationClient(aura_test_helper_->root_window());
|
| - aura::client::SetScreenPositionClient(aura_test_helper_->root_window(),
|
| - &screen_position_client_);
|
|
|
| browser_context_.reset(new TestBrowserContext);
|
| process_host_ = new MockRenderProcessHost(browser_context_.get());
|
| @@ -575,7 +555,7 @@ class RenderWidgetHostViewAuraTest : public testing::Test {
|
| process_host_, routing_id, false);
|
| delegates_.back()->set_widget_host(parent_host_);
|
| parent_view_ =
|
| - new MockRenderWidgetHostViewAura(parent_host_, is_guest_view_hack_);
|
| + new RenderWidgetHostViewAura(parent_host_, is_guest_view_hack_);
|
| parent_view_->InitAsChild(nullptr);
|
| aura::client::ParentWindowWithContext(parent_view_->GetNativeView(),
|
| aura_test_helper_->root_window(),
|
| @@ -733,7 +713,6 @@ class RenderWidgetHostViewAuraTest : public testing::Test {
|
| std::unique_ptr<aura::test::AuraTestHelper> aura_test_helper_;
|
| std::unique_ptr<BrowserContext> browser_context_;
|
| std::vector<std::unique_ptr<MockRenderWidgetHostDelegate>> delegates_;
|
| - wm::DefaultScreenPositionClient screen_position_client_;
|
| MockRenderProcessHost* process_host_;
|
|
|
| // Tests should set these to nullptr if they've already triggered their
|
| @@ -1023,9 +1002,11 @@ TEST_F(RenderWidgetHostViewAuraTest, FocusFullscreen) {
|
| // Checks that a popup is positioned correctly relative to its parent using
|
| // screen coordinates.
|
| TEST_F(RenderWidgetHostViewAuraTest, PositionChildPopup) {
|
| + wm::DefaultScreenPositionClient screen_position_client;
|
|
|
| aura::Window* window = parent_view_->GetNativeView();
|
| aura::Window* root = window->GetRootWindow();
|
| + aura::client::SetScreenPositionClient(root, &screen_position_client);
|
|
|
| parent_view_->SetBounds(gfx::Rect(10, 10, 800, 600));
|
| gfx::Rect bounds_in_screen = parent_view_->GetViewBounds();
|
| @@ -4219,7 +4200,7 @@ class RenderWidgetHostViewAuraWithViewHarnessTest
|
| // the RWHVA as the view.
|
| delete contents()->GetRenderViewHost()->GetWidget()->GetView();
|
| // This instance is destroyed in the TearDown method below.
|
| - view_ = new MockRenderWidgetHostViewAura(
|
| + view_ = new RenderWidgetHostViewAura(
|
| contents()->GetRenderViewHost()->GetWidget(), false);
|
| }
|
|
|
|
|