Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / content / browser / renderer_host / render_process_host_unittest.cc
index ca497a3..e25c53c 100644 (file)
@@ -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);