OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/test/content_browser_test.h" | 5 #include "content/test/content_browser_test.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/debug/stack_trace.h" | 8 #include "base/debug/stack_trace.h" |
9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 ContentBrowserTest::~ContentBrowserTest() { | 42 ContentBrowserTest::~ContentBrowserTest() { |
43 } | 43 } |
44 | 44 |
45 void ContentBrowserTest::SetUp() { | 45 void ContentBrowserTest::SetUp() { |
46 shell_main_delegate_.reset(new ShellMainDelegate); | 46 shell_main_delegate_.reset(new ShellMainDelegate); |
47 shell_main_delegate_->PreSandboxStartup(); | 47 shell_main_delegate_->PreSandboxStartup(); |
48 | 48 |
49 CommandLine* command_line = CommandLine::ForCurrentProcess(); | 49 CommandLine* command_line = CommandLine::ForCurrentProcess(); |
50 command_line->AppendSwitch(switches::kContentBrowserTest); | 50 command_line->AppendSwitch(switches::kContentBrowserTest); |
51 | 51 |
| 52 #if defined(OS_LINUX) |
| 53 // http://crbug.com/139209 |
| 54 command_line->AppendSwitch(switches::kDisableGpuProcessPrelaunch); |
| 55 #endif |
| 56 |
52 SetUpCommandLine(command_line); | 57 SetUpCommandLine(command_line); |
53 | 58 |
54 #if defined(OS_MACOSX) | 59 #if defined(OS_MACOSX) |
55 // See InProcessBrowserTest::PrepareTestCommandLine(). | 60 // See InProcessBrowserTest::PrepareTestCommandLine(). |
56 FilePath subprocess_path; | 61 FilePath subprocess_path; |
57 PathService::Get(base::FILE_EXE, &subprocess_path); | 62 PathService::Get(base::FILE_EXE, &subprocess_path); |
58 subprocess_path = subprocess_path.DirName().DirName(); | 63 subprocess_path = subprocess_path.DirName().DirName(); |
59 DCHECK_EQ(subprocess_path.BaseName().value(), "Contents"); | 64 DCHECK_EQ(subprocess_path.BaseName().value(), "Contents"); |
60 subprocess_path = subprocess_path.Append( | 65 subprocess_path = subprocess_path.Append( |
61 "Frameworks/Content Shell Helper.app/Contents/MacOS/Content Shell Helper")
; | 66 "Frameworks/Content Shell Helper.app/Contents/MacOS/Content Shell Helper")
; |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 static_cast<ShellContentBrowserClient*>(GetContentClient()->browser()); | 139 static_cast<ShellContentBrowserClient*>(GetContentClient()->browser()); |
135 return Shell::CreateNewWindow( | 140 return Shell::CreateNewWindow( |
136 browser_client->off_the_record_browser_context(), | 141 browser_client->off_the_record_browser_context(), |
137 GURL(chrome::kAboutBlankURL), | 142 GURL(chrome::kAboutBlankURL), |
138 NULL, | 143 NULL, |
139 MSG_ROUTING_NONE, | 144 MSG_ROUTING_NONE, |
140 NULL); | 145 NULL); |
141 } | 146 } |
142 | 147 |
143 } // namespace content | 148 } // namespace content |
OLD | NEW |