| 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/navigation_request.h" | 10 #include "content/browser/frame_host/navigation_request.h" |
| (...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 542 TestRenderViewHost* swapped_out_rvh = CreateSwappedOutRenderViewHost(); | 542 TestRenderViewHost* swapped_out_rvh = CreateSwappedOutRenderViewHost(); |
| 543 TestRenderWidgetHostView* swapped_out_rwhv = | 543 TestRenderWidgetHostView* swapped_out_rwhv = |
| 544 static_cast<TestRenderWidgetHostView*>(swapped_out_rvh->GetView()); | 544 static_cast<TestRenderWidgetHostView*>(swapped_out_rvh->GetView()); |
| 545 EXPECT_FALSE(swapped_out_rwhv->did_swap_compositor_frame()); | 545 EXPECT_FALSE(swapped_out_rwhv->did_swap_compositor_frame()); |
| 546 | 546 |
| 547 MockRenderProcessHost* process_host = | 547 MockRenderProcessHost* process_host = |
| 548 static_cast<MockRenderProcessHost*>(swapped_out_rvh->GetProcess()); | 548 static_cast<MockRenderProcessHost*>(swapped_out_rvh->GetProcess()); |
| 549 process_host->sink().ClearMessages(); | 549 process_host->sink().ClearMessages(); |
| 550 | 550 |
| 551 cc::CompositorFrame frame; | 551 cc::CompositorFrame frame; |
| 552 ViewHostMsg_SwapCompositorFrame msg(rvh()->GetRoutingID(), 0, frame); | 552 ViewHostMsg_SwapCompositorFrame msg( |
| 553 rvh()->GetRoutingID(), 0, frame, std::vector<IPC::Message>()); |
| 553 | 554 |
| 554 EXPECT_TRUE(swapped_out_rvh->OnMessageReceived(msg)); | 555 EXPECT_TRUE(swapped_out_rvh->OnMessageReceived(msg)); |
| 555 EXPECT_TRUE(swapped_out_rwhv->did_swap_compositor_frame()); | 556 EXPECT_TRUE(swapped_out_rwhv->did_swap_compositor_frame()); |
| 556 } | 557 } |
| 557 | 558 |
| 558 // Test if RenderViewHost::GetRenderWidgetHosts() only returns active | 559 // Test if RenderViewHost::GetRenderWidgetHosts() only returns active |
| 559 // widgets. | 560 // widgets. |
| 560 TEST_F(RenderFrameHostManagerTest, GetRenderWidgetHostsReturnsActiveViews) { | 561 TEST_F(RenderFrameHostManagerTest, GetRenderWidgetHostsReturnsActiveViews) { |
| 561 TestRenderViewHost* swapped_out_rvh = CreateSwappedOutRenderViewHost(); | 562 TestRenderViewHost* swapped_out_rvh = CreateSwappedOutRenderViewHost(); |
| 562 EXPECT_TRUE(swapped_out_rvh->IsSwappedOut()); | 563 EXPECT_TRUE(swapped_out_rvh->IsSwappedOut()); |
| (...skipping 1322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1885 NavigationRequestForRenderFrameManager( | 1886 NavigationRequestForRenderFrameManager( |
| 1886 main_test_rfh()->frame_tree_node()->render_manager()); | 1887 main_test_rfh()->frame_tree_node()->render_manager()); |
| 1887 ASSERT_TRUE(main_request); | 1888 ASSERT_TRUE(main_request); |
| 1888 EXPECT_EQ(kUrl3, main_request->info_for_testing().navigation_params.url); | 1889 EXPECT_EQ(kUrl3, main_request->info_for_testing().navigation_params.url); |
| 1889 EXPECT_EQ(kUrl3, main_request->info_for_testing().first_party_for_cookies); | 1890 EXPECT_EQ(kUrl3, main_request->info_for_testing().first_party_for_cookies); |
| 1890 EXPECT_TRUE(main_request->info_for_testing().is_main_frame); | 1891 EXPECT_TRUE(main_request->info_for_testing().is_main_frame); |
| 1891 EXPECT_FALSE(main_request->info_for_testing().parent_is_main_frame); | 1892 EXPECT_FALSE(main_request->info_for_testing().parent_is_main_frame); |
| 1892 } | 1893 } |
| 1893 | 1894 |
| 1894 } // namespace content | 1895 } // namespace content |
| OLD | NEW |