Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(40)

Side by Side Diff: content/browser/frame_host/render_frame_host_manager_unittest.cc

Issue 1410313006: Separate RenderViewHost from RenderWidgetHost, part 5: move calls to the RenderWidgetHostDelegate. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/command_line.h" 5 #include "base/command_line.h"
6 #include "base/files/file_path.h" 6 #include "base/files/file_path.h"
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "base/test/histogram_tester.h" 8 #include "base/test/histogram_tester.h"
9 #include "base/time/time.h" 9 #include "base/time/time.h"
10 #include "content/browser/compositor/test/no_transport_image_transport_factory.h " 10 #include "content/browser/compositor/test/no_transport_image_transport_factory.h "
(...skipping 1837 matching lines...) Expand 10 before | Expand all | Expand 10 after
1848 // Start a navigation to a new site. 1848 // Start a navigation to a new site.
1849 controller().LoadURL( 1849 controller().LoadURL(
1850 kUrl2, Referrer(), ui::PAGE_TRANSITION_LINK, std::string()); 1850 kUrl2, Referrer(), ui::PAGE_TRANSITION_LINK, std::string());
1851 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 1851 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
1852 switches::kEnableBrowserSideNavigation)) { 1852 switches::kEnableBrowserSideNavigation)) {
1853 rfh1->PrepareForCommit(); 1853 rfh1->PrepareForCommit();
1854 } 1854 }
1855 EXPECT_TRUE(contents()->CrossProcessNavigationPending()); 1855 EXPECT_TRUE(contents()->CrossProcessNavigationPending());
1856 1856
1857 // Simulate the unresponsiveness timer. The tab should close. 1857 // Simulate the unresponsiveness timer. The tab should close.
1858 contents()->RendererUnresponsive(rfh1->render_view_host()); 1858 contents()->RendererUnresponsive(rfh1->render_view_host()->GetWidget());
1859 EXPECT_TRUE(close_delegate.is_closed()); 1859 EXPECT_TRUE(close_delegate.is_closed());
1860 } 1860 }
1861 1861
1862 // Tests that the RenderFrameHost is properly deleted when the SwapOutACK is 1862 // Tests that the RenderFrameHost is properly deleted when the SwapOutACK is
1863 // received. (SwapOut and the corresponding ACK always occur after commit.) 1863 // received. (SwapOut and the corresponding ACK always occur after commit.)
1864 // Also tests that an early SwapOutACK is properly ignored. 1864 // Also tests that an early SwapOutACK is properly ignored.
1865 TEST_F(RenderFrameHostManagerTest, DeleteFrameAfterSwapOutACK) { 1865 TEST_F(RenderFrameHostManagerTest, DeleteFrameAfterSwapOutACK) {
1866 const GURL kUrl1("http://www.google.com/"); 1866 const GURL kUrl1("http://www.google.com/");
1867 const GURL kUrl2("http://www.chromium.org/"); 1867 const GURL kUrl2("http://www.chromium.org/");
1868 1868
(...skipping 720 matching lines...) Expand 10 before | Expand all | Expand 10 after
2589 host1->GetProcess()->sink().ClearMessages(); 2589 host1->GetProcess()->sink().ClearMessages();
2590 host3->GetProcess()->sink().ClearMessages(); 2590 host3->GetProcess()->sink().ClearMessages();
2591 main_test_rfh()->GetRenderWidgetHost()->Blur(); 2591 main_test_rfh()->GetRenderWidgetHost()->Blur();
2592 verify_focus_message(main_test_rfh()->GetProcess(), false, 2592 verify_focus_message(main_test_rfh()->GetProcess(), false,
2593 main_test_rfh()->GetRenderViewHost()->GetRoutingID()); 2593 main_test_rfh()->GetRenderViewHost()->GetRoutingID());
2594 verify_focus_message(host1->GetProcess(), false, proxyB->GetRoutingID()); 2594 verify_focus_message(host1->GetProcess(), false, proxyB->GetRoutingID());
2595 verify_focus_message(host3->GetProcess(), false, proxyC->GetRoutingID()); 2595 verify_focus_message(host3->GetProcess(), false, proxyC->GetRoutingID());
2596 } 2596 }
2597 2597
2598 } // namespace content 2598 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698