diff options
4 files changed, 1 insertions, 74 deletions
diff --git a/content/browser/renderer_host/test_render_view_host.cc b/content/browser/renderer_host/test_render_view_host.cc index 9f12960d..cd2fbec 100644 --- a/content/browser/renderer_host/test_render_view_host.cc +++ b/content/browser/renderer_host/test_render_view_host.cc @@ -63,8 +63,7 @@ void InitNavigateParams(ViewHostMsg_FrameNavigate_Params* params, TestRenderWidgetHostView::TestRenderWidgetHostView(RenderWidgetHost* rwh) : rwh_(RenderWidgetHostImpl::From(rwh)), - is_showing_(false), - did_swap_compositor_frame_(false) { + is_showing_(false) { rwh_->SetView(this); } @@ -209,12 +208,6 @@ gfx::NativeView TestRenderWidgetHostView::BuildInputMethodsGtkMenu() { } #endif // defined(TOOLKIT_GTK) -void TestRenderWidgetHostView::OnSwapCompositorFrame( - scoped_ptr<cc::CompositorFrame> frame) { - did_swap_compositor_frame_ = true; -} - - gfx::GLSurfaceHandle TestRenderWidgetHostView::GetCompositingSurface() { return gfx::GLSurfaceHandle(); } diff --git a/content/browser/renderer_host/test_render_view_host.h b/content/browser/renderer_host/test_render_view_host.h index 6a1e558..fdaaafd 100644 --- a/content/browser/renderer_host/test_render_view_host.h +++ b/content/browser/renderer_host/test_render_view_host.h @@ -80,8 +80,6 @@ class TestRenderWidgetHostView : public RenderWidgetHostViewBase { virtual GdkEventButton* GetLastMouseDown() OVERRIDE; virtual gfx::NativeView BuildInputMethodsGtkMenu() OVERRIDE; #endif // defined(TOOLKIT_GTK) - virtual void OnSwapCompositorFrame( - scoped_ptr<cc::CompositorFrame> frame) OVERRIDE; // RenderWidgetHostViewPort implementation. virtual void InitAsPopup(RenderWidgetHostView* parent_host_view, @@ -173,14 +171,12 @@ class TestRenderWidgetHostView : public RenderWidgetHostViewBase { #endif bool is_showing() const { return is_showing_; } - bool did_swap_compositor_frame() const { return did_swap_compositor_frame_; } protected: RenderWidgetHostImpl* rwh_; private: bool is_showing_; - bool did_swap_compositor_frame_; }; #if defined(COMPILER_MSVC) diff --git a/content/browser/web_contents/render_view_host_manager_unittest.cc b/content/browser/web_contents/render_view_host_manager_unittest.cc index 05be4fc..6890117 100644 --- a/content/browser/web_contents/render_view_host_manager_unittest.cc +++ b/content/browser/web_contents/render_view_host_manager_unittest.cc @@ -118,36 +118,6 @@ class RenderViewHostManagerTest return manager->ShouldSwapProcessesForNavigation(cur_entry, new_entry); } - // Creates a test RenderViewHost that's swapped out. - TestRenderViewHost* CreateSwappedOutRenderViewHost() { - const GURL kChromeURL("chrome://foo"); - const GURL kDestUrl("http://www.google.com/"); - - // Navigate our first tab to a chrome url and then to the destination. - NavigateActiveAndCommit(kChromeURL); - TestRenderViewHost* ntp_rvh = static_cast<TestRenderViewHost*>( - contents()->GetRenderManagerForTesting()->current_host()); - - // Navigate to a cross-site URL. - contents()->GetController().LoadURL( - kDestUrl, Referrer(), PAGE_TRANSITION_LINK, std::string()); - EXPECT_TRUE(contents()->cross_navigation_pending()); - - TestRenderViewHost* dest_rvh = static_cast<TestRenderViewHost*>( - contents()->GetRenderManagerForTesting()->pending_render_view_host()); - CHECK(dest_rvh); - EXPECT_NE(ntp_rvh, dest_rvh); - - // BeforeUnload finishes. - ntp_rvh->SendShouldCloseACK(true); - - // Assume SwapOutACK times out, so the dest_rvh proceeds and commits. - dest_rvh->SendNavigate(101, kDestUrl); - - EXPECT_TRUE(ntp_rvh->is_swapped_out()); - return ntp_rvh; - } - private: RenderViewHostManagerTestWebUIControllerFactory factory_; }; @@ -293,35 +263,6 @@ TEST_F(RenderViewHostManagerTest, FilterMessagesWhileSwappedOut) { EXPECT_TRUE(ntp_process_host->sink().GetUniqueMessageMatching(IPC_REPLY_ID)); } -TEST_F(RenderViewHostManagerTest, WhiteListSwapCompositorFrame) { - TestRenderViewHost* swapped_out_rvh = CreateSwappedOutRenderViewHost(); - TestRenderWidgetHostView* swapped_out_rwhv = - static_cast<TestRenderWidgetHostView*>(swapped_out_rvh->GetView()); - EXPECT_FALSE(swapped_out_rwhv->did_swap_compositor_frame()); - - MockRenderProcessHost* process_host = - static_cast<MockRenderProcessHost*>(swapped_out_rvh->GetProcess()); - process_host->sink().ClearMessages(); - - cc::CompositorFrame frame; - ViewHostMsg_SwapCompositorFrame msg(rvh()->GetRoutingID(), frame); - - EXPECT_TRUE(swapped_out_rvh->OnMessageReceived(msg)); - EXPECT_TRUE(swapped_out_rwhv->did_swap_compositor_frame()); -} - -TEST_F(RenderViewHostManagerTest, WhiteListDidActivateAcceleratedCompositing) { - TestRenderViewHost* swapped_out_rvh = CreateSwappedOutRenderViewHost(); - - MockRenderProcessHost* process_host = - static_cast<MockRenderProcessHost*>(swapped_out_rvh->GetProcess()); - process_host->sink().ClearMessages(); - ViewHostMsg_DidActivateAcceleratedCompositing msg( - rvh()->GetRoutingID(), true); - EXPECT_TRUE(swapped_out_rvh->OnMessageReceived(msg)); - EXPECT_TRUE(swapped_out_rvh->is_accelerated_compositing_active()); -} - // When there is an error with the specified page, renderer exits view-source // mode. See WebFrameImpl::DidFail(). We check by this test that // EnableViewSourceMode message is sent on every navigation regardless diff --git a/content/common/swapped_out_messages.cc b/content/common/swapped_out_messages.cc index 0a3e065..5fe91cb 100644 --- a/content/common/swapped_out_messages.cc +++ b/content/common/swapped_out_messages.cc @@ -29,9 +29,6 @@ bool SwappedOutMessages::CanSendWhileSwappedOut(const IPC::Message* msg) { case ViewHostMsg_SwapOut_ACK::ID: case ViewHostMsg_ClosePage_ACK::ID: case ViewHostMsg_DomOperationResponse::ID: - case ViewHostMsg_SwapCompositorFrame::ID: - case ViewHostMsg_UpdateIsDelayed::ID: - case ViewHostMsg_DidActivateAcceleratedCompositing::ID: // Allow cross-process JavaScript calls. case ViewHostMsg_RouteCloseEvent::ID: case ViewHostMsg_RouteMessageEvent::ID: |