OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "base/files/file_path.h" | 5 #include "base/files/file_path.h" |
6 #include "base/strings/utf_string_conversions.h" | 6 #include "base/strings/utf_string_conversions.h" |
7 #include "content/browser/frame_host/cross_site_transferring_request.h" | 7 #include "content/browser/frame_host/cross_site_transferring_request.h" |
8 #include "content/browser/frame_host/navigation_controller_impl.h" | 8 #include "content/browser/frame_host/navigation_controller_impl.h" |
9 #include "content/browser/frame_host/navigation_entry_impl.h" | 9 #include "content/browser/frame_host/navigation_entry_impl.h" |
10 #include "content/browser/frame_host/navigator.h" | 10 #include "content/browser/frame_host/navigator.h" |
(...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
537 TestRenderViewHost* swapped_out_rvh = CreateSwappedOutRenderViewHost(); | 537 TestRenderViewHost* swapped_out_rvh = CreateSwappedOutRenderViewHost(); |
538 TestRenderWidgetHostView* swapped_out_rwhv = | 538 TestRenderWidgetHostView* swapped_out_rwhv = |
539 static_cast<TestRenderWidgetHostView*>(swapped_out_rvh->GetView()); | 539 static_cast<TestRenderWidgetHostView*>(swapped_out_rvh->GetView()); |
540 EXPECT_FALSE(swapped_out_rwhv->did_swap_compositor_frame()); | 540 EXPECT_FALSE(swapped_out_rwhv->did_swap_compositor_frame()); |
541 | 541 |
542 MockRenderProcessHost* process_host = | 542 MockRenderProcessHost* process_host = |
543 static_cast<MockRenderProcessHost*>(swapped_out_rvh->GetProcess()); | 543 static_cast<MockRenderProcessHost*>(swapped_out_rvh->GetProcess()); |
544 process_host->sink().ClearMessages(); | 544 process_host->sink().ClearMessages(); |
545 | 545 |
546 cc::CompositorFrame frame; | 546 cc::CompositorFrame frame; |
547 ViewHostMsg_SwapCompositorFrame msg(rvh()->GetRoutingID(), 0, frame); | 547 ViewHostMsg_SwapCompositorFrame msg( |
| 548 rvh()->GetRoutingID(), 0, frame, std::vector<IPC::Message>()); |
548 | 549 |
549 EXPECT_TRUE(swapped_out_rvh->OnMessageReceived(msg)); | 550 EXPECT_TRUE(swapped_out_rvh->OnMessageReceived(msg)); |
550 EXPECT_TRUE(swapped_out_rwhv->did_swap_compositor_frame()); | 551 EXPECT_TRUE(swapped_out_rwhv->did_swap_compositor_frame()); |
551 } | 552 } |
552 | 553 |
553 // Test if RenderViewHost::GetRenderWidgetHosts() only returns active | 554 // Test if RenderViewHost::GetRenderWidgetHosts() only returns active |
554 // widgets. | 555 // widgets. |
555 TEST_F(RenderFrameHostManagerTest, GetRenderWidgetHostsReturnsActiveViews) { | 556 TEST_F(RenderFrameHostManagerTest, GetRenderWidgetHostsReturnsActiveViews) { |
556 TestRenderViewHost* swapped_out_rvh = CreateSwappedOutRenderViewHost(); | 557 TestRenderViewHost* swapped_out_rvh = CreateSwappedOutRenderViewHost(); |
557 EXPECT_TRUE(swapped_out_rvh->IsSwappedOut()); | 558 EXPECT_TRUE(swapped_out_rvh->IsSwappedOut()); |
(...skipping 1280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1838 pending_rfh->GetSiteInstance())->increment_active_view_count(); | 1839 pending_rfh->GetSiteInstance())->increment_active_view_count(); |
1839 | 1840 |
1840 main_test_rfh()->OnMessageReceived( | 1841 main_test_rfh()->OnMessageReceived( |
1841 FrameHostMsg_BeforeUnload_ACK(0, false, now, now)); | 1842 FrameHostMsg_BeforeUnload_ACK(0, false, now, now)); |
1842 EXPECT_FALSE(contents()->cross_navigation_pending()); | 1843 EXPECT_FALSE(contents()->cross_navigation_pending()); |
1843 EXPECT_FALSE(rvh_deleted_observer.deleted()); | 1844 EXPECT_FALSE(rvh_deleted_observer.deleted()); |
1844 } | 1845 } |
1845 } | 1846 } |
1846 | 1847 |
1847 } // namespace content | 1848 } // namespace content |
OLD | NEW |