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

Unified Diff: chrome/test/in_process_browser_test.cc

Issue 155360: Fixing InProcBrowserTestTimeout for P13N (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 5 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 | « chrome/test/in_process_browser_test.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/in_process_browser_test.cc
===================================================================
--- chrome/test/in_process_browser_test.cc (revision 20370)
+++ chrome/test/in_process_browser_test.cc (working copy)
@@ -33,8 +33,8 @@
const wchar_t kUnitTestShowWindows[] = L"show-windows";
-// Delay for the time-out at which we stop the inner-message loop the first
-// time.
+// Default delay for the time-out at which we stop the
+// inner-message loop the first time.
const int kInitialTimeoutInMS = 30000;
// Delay for sub-sequent time-outs once the initial time-out happened.
@@ -62,7 +62,8 @@
show_window_(false),
dom_automation_enabled_(false),
single_process_(false),
- original_single_process_(false) {
+ original_single_process_(false),
+ initial_timeout_(kInitialTimeoutInMS) {
}
void InProcessBrowserTest::SetUp() {
@@ -223,7 +224,7 @@
// Start the timeout timer to prevent hangs.
MessageLoopForUI::current()->PostDelayedTask(FROM_HERE,
NewRunnableMethod(this, &InProcessBrowserTest::TimedOut),
- kInitialTimeoutInMS);
+ initial_timeout_);
RunTestOnMainThread();
CleanUpOnMainThread();
@@ -258,3 +259,8 @@
MessageLoopForUI::current()->Quit();
}
+
+void InProcessBrowserTest::SetInitialTimeoutInMS(int timeout_value) {
+ DCHECK_GT(timeout_value, 0);
+ initial_timeout_ = timeout_value;
+}
« no previous file with comments | « chrome/test/in_process_browser_test.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698