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 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
481 TestRenderViewHost* swapped_out_rvh = CreateSwappedOutRenderViewHost(); | 481 TestRenderViewHost* swapped_out_rvh = CreateSwappedOutRenderViewHost(); |
482 TestRenderWidgetHostView* swapped_out_rwhv = | 482 TestRenderWidgetHostView* swapped_out_rwhv = |
483 static_cast<TestRenderWidgetHostView*>(swapped_out_rvh->GetView()); | 483 static_cast<TestRenderWidgetHostView*>(swapped_out_rvh->GetView()); |
484 EXPECT_FALSE(swapped_out_rwhv->did_swap_compositor_frame()); | 484 EXPECT_FALSE(swapped_out_rwhv->did_swap_compositor_frame()); |
485 | 485 |
486 MockRenderProcessHost* process_host = | 486 MockRenderProcessHost* process_host = |
487 static_cast<MockRenderProcessHost*>(swapped_out_rvh->GetProcess()); | 487 static_cast<MockRenderProcessHost*>(swapped_out_rvh->GetProcess()); |
488 process_host->sink().ClearMessages(); | 488 process_host->sink().ClearMessages(); |
489 | 489 |
490 cc::CompositorFrame frame; | 490 cc::CompositorFrame frame; |
491 ViewHostMsg_SwapCompositorFrame msg(rvh()->GetRoutingID(), 0, frame); | 491 ViewHostMsg_SwapCompositorFrame msg( |
| 492 rvh()->GetRoutingID(), 0, frame, std::vector<IPC::Message>()); |
492 | 493 |
493 EXPECT_TRUE(swapped_out_rvh->OnMessageReceived(msg)); | 494 EXPECT_TRUE(swapped_out_rvh->OnMessageReceived(msg)); |
494 EXPECT_TRUE(swapped_out_rwhv->did_swap_compositor_frame()); | 495 EXPECT_TRUE(swapped_out_rwhv->did_swap_compositor_frame()); |
495 } | 496 } |
496 | 497 |
497 // Test if RenderViewHost::GetRenderWidgetHosts() only returns active | 498 // Test if RenderViewHost::GetRenderWidgetHosts() only returns active |
498 // widgets. | 499 // widgets. |
499 TEST_F(RenderFrameHostManagerTest, GetRenderWidgetHostsReturnsActiveViews) { | 500 TEST_F(RenderFrameHostManagerTest, GetRenderWidgetHostsReturnsActiveViews) { |
500 TestRenderViewHost* swapped_out_rvh = CreateSwappedOutRenderViewHost(); | 501 TestRenderViewHost* swapped_out_rvh = CreateSwappedOutRenderViewHost(); |
501 EXPECT_TRUE(swapped_out_rvh->IsSwappedOut()); | 502 EXPECT_TRUE(swapped_out_rvh->IsSwappedOut()); |
(...skipping 1280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1782 pending_rfh->GetSiteInstance())->increment_active_view_count(); | 1783 pending_rfh->GetSiteInstance())->increment_active_view_count(); |
1783 | 1784 |
1784 main_test_rfh()->OnMessageReceived( | 1785 main_test_rfh()->OnMessageReceived( |
1785 FrameHostMsg_BeforeUnload_ACK(0, false, now, now)); | 1786 FrameHostMsg_BeforeUnload_ACK(0, false, now, now)); |
1786 EXPECT_FALSE(contents()->cross_navigation_pending()); | 1787 EXPECT_FALSE(contents()->cross_navigation_pending()); |
1787 EXPECT_FALSE(rvh_deleted_observer.deleted()); | 1788 EXPECT_FALSE(rvh_deleted_observer.deleted()); |
1788 } | 1789 } |
1789 } | 1790 } |
1790 | 1791 |
1791 } // namespace content | 1792 } // namespace content |
OLD | NEW |