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

Unified Diff: content/browser/renderer_host/render_process_host_unittest.cc

Issue 600993002: Fix RenderProcessHostUnitTest.RendererProcessLimit to pass with --site-per-process (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add CONTENT_EXPORT to kEnableStrictSiteIsolation Created 6 years, 3 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 | « no previous file | content/browser/site_instance_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_process_host_unittest.cc
diff --git a/content/browser/renderer_host/render_process_host_unittest.cc b/content/browser/renderer_host/render_process_host_unittest.cc
index ca497a397e5b52edbf29ce562602a51fe4d66f08..e25c53c73072fba1154c06b5d0530fddf10f2275 100644
--- a/content/browser/renderer_host/render_process_host_unittest.cc
+++ b/content/browser/renderer_host/render_process_host_unittest.cc
@@ -4,7 +4,9 @@
#include <limits>
+#include "base/command_line.h"
#include "content/public/common/content_constants.h"
+#include "content/public/common/content_switches.h"
#include "content/public/test/mock_render_process_host.h"
#include "content/test/test_render_view_host.h"
@@ -31,6 +33,15 @@ TEST_F(RenderProcessHostUnitTest, GuestsAreNotSuitableHosts) {
#if !defined(OS_ANDROID)
TEST_F(RenderProcessHostUnitTest, RendererProcessLimit) {
+ // This test shouldn't run with --site-per-process or
+ // --enable-strict-site-isolation modes, since they don't allow renderer
+ // process reuse, which this test explicitly exercises.
+ const base::CommandLine& command_line =
+ *base::CommandLine::ForCurrentProcess();
+ if (command_line.HasSwitch(switches::kSitePerProcess) ||
+ command_line.HasSwitch(switches::kEnableStrictSiteIsolation))
+ return;
+
// Disable any overrides.
RenderProcessHostImpl::SetMaxRendererProcessCount(0);
« no previous file with comments | « no previous file | content/browser/site_instance_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698