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

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: Move declaration of more services to a separate CL. Created 6 years, 6 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..fe76b484fc460c8b43a645026f77e40c876c37f3 100644
--- a/content/browser/site_instance_impl_unittest.cc
+++ b/content/browser/site_instance_impl_unittest.cc
@@ -562,6 +562,13 @@ 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.
+ size_t old_renderer_process_limit =
+ RenderProcessHost::GetMaxRendererProcessCount();
+ RenderProcessHost::SetMaxRendererProcessCount(kMaxRendererProcessCount);
+
ChildProcessSecurityPolicyImpl* policy =
ChildProcessSecurityPolicyImpl::GetInstance();
@@ -607,6 +614,9 @@ TEST_F(SiteInstanceTest, ProcessSharingByType) {
}
DrainMessageLoops();
+
+ // Disable the process limit override.
+ RenderProcessHost::SetMaxRendererProcessCount(0);
}
// Test to ensure that HasWrongProcessForURL behaves properly for different

Powered by Google App Engine
This is Rietveld 408576698