diff options
author | tejasshah@google.com <tejasshah@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-10 18:29:39 +0000 |
---|---|---|
committer | tejasshah@google.com <tejasshah@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-10 18:29:39 +0000 |
commit | 4ff446fabe4688ee1845f9c8cd711a047dbf3fe3 (patch) | |
tree | bd0d4367dac78fc4a2d3db3cacb15e343191f716 /chrome/test/in_process_browser_test.cc | |
parent | d85e612ff8a3b0059b9b0af2fb55eb678d73dd96 (diff) | |
download | chromium_src-4ff446fabe4688ee1845f9c8cd711a047dbf3fe3.zip chromium_src-4ff446fabe4688ee1845f9c8cd711a047dbf3fe3.tar.gz chromium_src-4ff446fabe4688ee1845f9c8cd711a047dbf3fe3.tar.bz2 |
Review URL: http://codereview.chromium.org/155360
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20391 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/in_process_browser_test.cc')
-rw-r--r-- | chrome/test/in_process_browser_test.cc | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/chrome/test/in_process_browser_test.cc b/chrome/test/in_process_browser_test.cc index 8aaf586..863c26e 100644 --- a/chrome/test/in_process_browser_test.cc +++ b/chrome/test/in_process_browser_test.cc @@ -33,8 +33,8 @@ extern int BrowserMain(const MainFunctionParams&); 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 @@ InProcessBrowserTest::InProcessBrowserTest() 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 @@ void InProcessBrowserTest::RunTestOnMainThreadLoop() { // 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 @@ void InProcessBrowserTest::TimedOut() { MessageLoopForUI::current()->Quit(); } + +void InProcessBrowserTest::SetInitialTimeoutInMS(int timeout_value) { + DCHECK_GT(timeout_value, 0); + initial_timeout_ = timeout_value; +} |