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

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: rebase 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 1852 matching lines...) Expand 10 before | Expand all | Expand 10 after
1863 // Start a navigation to a new site. 1863 // Start a navigation to a new site.
1864 controller().LoadURL( 1864 controller().LoadURL(
1865 kUrl2, Referrer(), ui::PAGE_TRANSITION_LINK, std::string()); 1865 kUrl2, Referrer(), ui::PAGE_TRANSITION_LINK, std::string());
1866 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 1866 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
1867 switches::kEnableBrowserSideNavigation)) { 1867 switches::kEnableBrowserSideNavigation)) {
1868 rfh1->PrepareForCommit(); 1868 rfh1->PrepareForCommit();
1869 } 1869 }
1870 EXPECT_TRUE(contents()->CrossProcessNavigationPending()); 1870 EXPECT_TRUE(contents()->CrossProcessNavigationPending());
1871 1871
1872 // Simulate the unresponsiveness timer. The tab should close. 1872 // Simulate the unresponsiveness timer. The tab should close.
1873 contents()->RendererUnresponsive(rfh1->render_view_host()); 1873 contents()->RendererUnresponsive(rfh1->render_view_host()->GetWidget());
1874 EXPECT_TRUE(close_delegate.is_closed()); 1874 EXPECT_TRUE(close_delegate.is_closed());
1875 } 1875 }
1876 1876
1877 // Tests that the RenderFrameHost is properly deleted when the SwapOutACK is 1877 // Tests that the RenderFrameHost is properly deleted when the SwapOutACK is
1878 // received. (SwapOut and the corresponding ACK always occur after commit.) 1878 // received. (SwapOut and the corresponding ACK always occur after commit.)
1879 // Also tests that an early SwapOutACK is properly ignored. 1879 // Also tests that an early SwapOutACK is properly ignored.
1880 TEST_F(RenderFrameHostManagerTest, DeleteFrameAfterSwapOutACK) { 1880 TEST_F(RenderFrameHostManagerTest, DeleteFrameAfterSwapOutACK) {
1881 const GURL kUrl1("http://www.google.com/"); 1881 const GURL kUrl1("http://www.google.com/");
1882 const GURL kUrl2("http://www.chromium.org/"); 1882 const GURL kUrl2("http://www.chromium.org/");
1883 1883
(...skipping 772 matching lines...) Expand 10 before | Expand all | Expand 10 after
2656 root->render_manager()->GetRenderFrameProxyHost(hostC->GetSiteInstance()); 2656 root->render_manager()->GetRenderFrameProxyHost(hostC->GetSiteInstance());
2657 EXPECT_TRUE(proxy); 2657 EXPECT_TRUE(proxy);
2658 2658
2659 // Since the B->C navigation happened while the current page was focused, 2659 // Since the B->C navigation happened while the current page was focused,
2660 // page focus should propagate to the new subframe process. Check that 2660 // page focus should propagate to the new subframe process. Check that
2661 // process C received the proper focus message. 2661 // process C received the proper focus message.
2662 VerifyPageFocusMessage(hostC->GetProcess(), true, proxy->GetRoutingID()); 2662 VerifyPageFocusMessage(hostC->GetProcess(), true, proxy->GetRoutingID());
2663 } 2663 }
2664 2664
2665 } // namespace content 2665 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/render_frame_host_impl.cc ('k') | content/browser/renderer_host/render_view_host_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698