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

Unified Diff: content/zygote/zygote_browsertest.cc

Issue 2827783003: Initialize RenderSandboxHostLinux in --no-zygote mode to not crash. (Closed)
Patch Set: Disable the test under TSan. Created 3 years, 8 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 | « content/browser/browser_main_loop.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « content/browser/browser_main_loop.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698