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

Unified Diff: content/browser/web_contents/render_view_host_manager_unittest.cc

Issue 10008015: Fixing a problem, where a hung renderer process is not killed when navigating away (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixing an uninitialized variable and improving the test. Created 8 years, 8 months 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/web_contents/render_view_host_manager_unittest.cc
diff --git a/content/browser/web_contents/render_view_host_manager_unittest.cc b/content/browser/web_contents/render_view_host_manager_unittest.cc
index fc10594ca20d8990c227fb9097fc1a0bf25dcac4..b0482ad4ad09e82ac64803b67996213109250261 100644
--- a/content/browser/web_contents/render_view_host_manager_unittest.cc
+++ b/content/browser/web_contents/render_view_host_manager_unittest.cc
@@ -172,7 +172,7 @@ class RenderViewHostManagerTest
// Simulate the SwapOut_ACK that fires if you commit a cross-site navigation
// without making any network requests.
if (old_rvh != active_rvh())
- old_rvh->OnSwapOutACK();
+ old_rvh->OnSwapOutACK(false);
}
bool ShouldSwapProcesses(RenderViewHostManager* manager,
@@ -226,7 +226,7 @@ TEST_F(RenderViewHostManagerTest, NewTabPageProcesses) {
ASSERT_TRUE(dest_rvh2);
ntp_rvh2->SendShouldCloseACK(true);
dest_rvh2->SendNavigate(101, kDestUrl);
- ntp_rvh2->OnSwapOutACK();
+ ntp_rvh2->OnSwapOutACK(false);
// The two RVH's should be different in every way.
EXPECT_NE(active_rvh()->GetProcess(), dest_rvh2->GetProcess());
@@ -246,7 +246,7 @@ TEST_F(RenderViewHostManagerTest, NewTabPageProcesses) {
dest_rvh2->SendShouldCloseACK(true);
static_cast<TestRenderViewHost*>(contents2.GetRenderManagerForTesting()->
pending_render_view_host())->SendNavigate(102, kNtpUrl);
- dest_rvh2->OnSwapOutACK();
+ dest_rvh2->OnSwapOutACK(false);
EXPECT_EQ(active_rvh()->GetSiteInstance(),
contents2.GetRenderViewHost()->GetSiteInstance());
@@ -583,7 +583,7 @@ TEST_F(RenderViewHostManagerTest, NavigateWithEarlyReNavigation) {
host2->GetPendingRequestId());
EXPECT_TRUE(test_process_host->sink().GetUniqueMessageMatching(
ViewMsg_SwapOut::ID));
- test_host->OnSwapOutACK();
+ test_host->OnSwapOutACK(false);
EXPECT_EQ(host, manager.current_host());
EXPECT_FALSE(static_cast<RenderViewHostImpl*>(
@@ -631,7 +631,7 @@ TEST_F(RenderViewHostManagerTest, NavigateWithEarlyReNavigation) {
host3)->GetPendingRequestId());
EXPECT_TRUE(test_process_host->sink().GetUniqueMessageMatching(
ViewMsg_SwapOut::ID));
- test_host->OnSwapOutACK();
+ test_host->OnSwapOutACK(false);
// Commit.
manager.DidNavigateMainFrame(host3);
« no previous file with comments | « content/browser/web_contents/render_view_host_manager.cc ('k') | content/browser/web_contents/test_web_contents.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698