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

Side by Side Diff: content/public/test/browser_test_base.cc

Issue 343543002: Increase the child process connection timeout for browser tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/public/common/content_switches.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/public/test/browser_test_base.h" 5 #include "content/public/test/browser_test_base.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/debug/stack_trace.h" 9 #include "base/debug/stack_trace.h"
10 #include "base/i18n/icu_util.h" 10 #include "base/i18n/icu_util.h"
11 #include "base/message_loop/message_loop.h" 11 #include "base/message_loop/message_loop.h"
12 #include "base/strings/string_number_conversions.h"
12 #include "base/sys_info.h" 13 #include "base/sys_info.h"
14 #include "base/test/test_timeouts.h"
13 #include "content/public/app/content_main.h" 15 #include "content/public/app/content_main.h"
14 #include "content/browser/renderer_host/render_process_host_impl.h" 16 #include "content/browser/renderer_host/render_process_host_impl.h"
15 #include "content/public/browser/browser_thread.h" 17 #include "content/public/browser/browser_thread.h"
16 #include "content/public/common/content_switches.h" 18 #include "content/public/common/content_switches.h"
17 #include "content/public/common/main_function_params.h" 19 #include "content/public/common/main_function_params.h"
18 #include "content/public/test/test_launcher.h" 20 #include "content/public/test/test_launcher.h"
19 #include "content/public/test/test_utils.h" 21 #include "content/public/test/test_utils.h"
20 #include "net/base/net_errors.h" 22 #include "net/base/net_errors.h"
21 #include "net/dns/mock_host_resolver.h" 23 #include "net/dns/mock_host_resolver.h"
22 #include "net/test/embedded_test_server/embedded_test_server.h" 24 #include "net/test/embedded_test_server/embedded_test_server.h"
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 #if defined(OS_ANDROID) 152 #if defined(OS_ANDROID)
151 // RemoteTestServer can cause wait on the UI thread. 153 // RemoteTestServer can cause wait on the UI thread.
152 base::ThreadRestrictions::ScopedAllowWait allow_wait; 154 base::ThreadRestrictions::ScopedAllowWait allow_wait;
153 test_server_.reset(NULL); 155 test_server_.reset(NULL);
154 #endif 156 #endif
155 } 157 }
156 158
157 void BrowserTestBase::SetUp() { 159 void BrowserTestBase::SetUp() {
158 CommandLine* command_line = CommandLine::ForCurrentProcess(); 160 CommandLine* command_line = CommandLine::ForCurrentProcess();
159 161
162 // Override the child process connection timeout since tests can exceed that
163 // when sharded.
164 command_line->AppendSwitchASCII(
165 switches::kIPCConnectionTimeout,
166 base::IntToString(TestTimeouts::action_max_timeout().InSeconds()));
167
160 // The tests assume that file:// URIs can freely access other file:// URIs. 168 // The tests assume that file:// URIs can freely access other file:// URIs.
161 command_line->AppendSwitch(switches::kAllowFileAccessFromFiles); 169 command_line->AppendSwitch(switches::kAllowFileAccessFromFiles);
162 170
163 command_line->AppendSwitch(switches::kDomAutomationController); 171 command_line->AppendSwitch(switches::kDomAutomationController);
164 172
165 // It is sometimes useful when looking at browser test failures to know which 173 // It is sometimes useful when looking at browser test failures to know which
166 // GPU blacklisting decisions were made. 174 // GPU blacklisting decisions were made.
167 command_line->AppendSwitch(switches::kLogGpuControlListDecisions); 175 command_line->AppendSwitch(switches::kLogGpuControlListDecisions);
168 176
169 if (use_software_compositing_) { 177 if (use_software_compositing_) {
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 use_software_compositing_ = true; 302 use_software_compositing_ = true;
295 } 303 }
296 304
297 bool BrowserTestBase::UsingOSMesa() const { 305 bool BrowserTestBase::UsingOSMesa() const {
298 CommandLine* cmd = CommandLine::ForCurrentProcess(); 306 CommandLine* cmd = CommandLine::ForCurrentProcess();
299 return cmd->GetSwitchValueASCII(switches::kUseGL) == 307 return cmd->GetSwitchValueASCII(switches::kUseGL) ==
300 gfx::kGLImplementationOSMesaName; 308 gfx::kGLImplementationOSMesaName;
301 } 309 }
302 310
303 } // namespace content 311 } // namespace content
OLDNEW
« no previous file with comments | « content/public/common/content_switches.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698