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 |