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

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

Issue 19021004: Prevent creating a swapped out RVH in the same SiteInstance as the current one. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix decisions for hosted apps Created 7 years, 5 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
« no previous file with comments | « content/browser/web_contents/render_view_host_manager.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 7bfcd2f2ade17a232d5dbe8e5ec3923f1a722643..5c8383d5b96d0ab8666cf72de5b007ebb098d39c 100644
--- a/content/browser/web_contents/render_view_host_manager_unittest.cc
+++ b/content/browser/web_contents/render_view_host_manager_unittest.cc
@@ -945,6 +945,7 @@ TEST_F(RenderViewHostManagerTest, CreateSwappedOutOpenerRVHs) {
// those associated RenderViews crashes. http://crbug.com/258993
TEST_F(RenderViewHostManagerTest, CleanUpSwappedOutRVHOnProcessCrash) {
const GURL kUrl1("http://www.google.com/");
+ const GURL kUrl2("http://www.chromium.org/");
// Navigate to an initial URL.
contents()->NavigateAndCommit(kUrl1);
@@ -957,9 +958,12 @@ TEST_F(RenderViewHostManagerTest, CleanUpSwappedOutRVHOnProcessCrash) {
opener1->GetRenderManagerForTesting();
contents()->SetOpener(opener1.get());
+ // Make sure the new opener RVH is considered live.
+ opener1_manager->current_host()->CreateRenderView(string16(), -1, -1);
+
EXPECT_FALSE(opener1_manager->GetSwappedOutRenderViewHost(
rvh1->GetSiteInstance()));
- opener1->CreateSwappedOutRenderView(rvh1->GetSiteInstance());
+ opener1->NavigateAndCommit(kUrl2);
EXPECT_TRUE(opener1_manager->GetSwappedOutRenderViewHost(
rvh1->GetSiteInstance()));
« no previous file with comments | « content/browser/web_contents/render_view_host_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698