Index: content/zygote/zygote_browsertest.cc |
diff --git a/content/zygote/zygote_browsertest.cc b/content/zygote/zygote_browsertest.cc |
index 4122bb792bdb4d1e63163994c39722547f9a1036..5376445fba5dc1bb266f1e698269a3944ea75ea4 100644 |
--- a/content/zygote/zygote_browsertest.cc |
+++ b/content/zygote/zygote_browsertest.cc |
@@ -5,7 +5,9 @@ |
#include <string> |
#include <vector> |
+#include "base/command_line.h" |
#include "base/strings/string_split.h" |
+#include "content/public/common/content_switches.h" |
#include "content/public/test/browser_test_utils.h" |
#include "content/public/test/content_browser_test.h" |
#include "content/public/test/content_browser_test_utils.h" |
@@ -38,4 +40,29 @@ IN_PROC_BROWSER_TEST_F(LinuxZygoteBrowserTest, GetLocalTimeHasTimeZone) { |
EXPECT_TRUE(parts[2].empty()); |
} |
+class LinuxZygoteDisabledBrowserTest : public ContentBrowserTest { |
+ public: |
+ LinuxZygoteDisabledBrowserTest() {} |
+ ~LinuxZygoteDisabledBrowserTest() override {} |
+ |
+ protected: |
+ void SetUpCommandLine(base::CommandLine* command_line) override { |
+ ContentBrowserTest::SetUpCommandLine(command_line); |
+ command_line->AppendSwitch(switches::kNoZygote); |
+ command_line->AppendSwitch(switches::kNoSandbox); |
+ } |
+ |
+ private: |
+ DISALLOW_COPY_AND_ASSIGN(LinuxZygoteDisabledBrowserTest); |
+}; |
+ |
+// https://crbug.com/712779 |
+#if !defined(THREAD_SANITIZER) |
+// Test that the renderer doesn't crash during launch if zygote is disabled. |
+IN_PROC_BROWSER_TEST_F(LinuxZygoteDisabledBrowserTest, |
+ NoCrashWhenZygoteDisabled) { |
+ NavigateToURL(shell(), GURL("data:text/html,start page")); |
+} |
+#endif |
+ |
} // namespace content |