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

Unified Diff: content/browser/site_instance_impl_unittest.cc

Issue 356453003: Don't share renderers between unrelated tabs on Android. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address John(me)'s comments. Created 6 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
Index: content/browser/site_instance_impl_unittest.cc
diff --git a/content/browser/site_instance_impl_unittest.cc b/content/browser/site_instance_impl_unittest.cc
index 646f4d079577593e5fdc0be8d9a10c8dc1696a19..f76be5ee5b7da0760b09238f98165ff68df4bc13 100644
--- a/content/browser/site_instance_impl_unittest.cc
+++ b/content/browser/site_instance_impl_unittest.cc
@@ -562,6 +562,11 @@ TEST_F(SiteInstanceTest, ProcessSharingByType) {
if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kSitePerProcess))
return;
+ // On Android by default the number of renderer hosts is unlimited and process
+ // sharing doesn't happen. We set the override so that the test can run
+ // everywhere.
+ RenderProcessHost::SetMaxRendererProcessCount(kMaxRendererProcessCount);
+
ChildProcessSecurityPolicyImpl* policy =
ChildProcessSecurityPolicyImpl::GetInstance();
@@ -607,6 +612,9 @@ TEST_F(SiteInstanceTest, ProcessSharingByType) {
}
DrainMessageLoops();
+
+ // Disable the process limit override.
+ RenderProcessHost::SetMaxRendererProcessCount(0u);
}
// Test to ensure that HasWrongProcessForURL behaves properly for different

Powered by Google App Engine
This is Rietveld 408576698