Index: content/public/test/browser_test_base.cc |
diff --git a/content/public/test/browser_test_base.cc b/content/public/test/browser_test_base.cc |
index c8f23e57629b520fe7ec30bd8efcc17425ae0d04..cbeedb1d3c57043676a248b3061b4d7a9b92a0b8 100644 |
--- a/content/public/test/browser_test_base.cc |
+++ b/content/public/test/browser_test_base.cc |
@@ -9,7 +9,9 @@ |
#include "base/debug/stack_trace.h" |
#include "base/i18n/icu_util.h" |
#include "base/message_loop/message_loop.h" |
+#include "base/strings/string_number_conversions.h" |
#include "base/sys_info.h" |
+#include "base/test/test_timeouts.h" |
#include "content/public/app/content_main.h" |
#include "content/browser/renderer_host/render_process_host_impl.h" |
#include "content/public/browser/browser_thread.h" |
@@ -157,6 +159,12 @@ BrowserTestBase::~BrowserTestBase() { |
void BrowserTestBase::SetUp() { |
CommandLine* command_line = CommandLine::ForCurrentProcess(); |
+ // Override the child process connection timeout since tests can exceed that |
+ // when sharded. |
+ command_line->AppendSwitchASCII( |
+ switches::kIPCConnectionTimeout, |
+ base::IntToString(TestTimeouts::action_max_timeout().InSeconds())); |
+ |
// The tests assume that file:// URIs can freely access other file:// URIs. |
command_line->AppendSwitch(switches::kAllowFileAccessFromFiles); |