#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"
#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);