summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
authorphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-22 21:33:18 +0000
committerphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-22 21:33:18 +0000
commit9fc6d0e41b709e593ec235c4c87ca4dff7e7ce35 (patch)
tree42f8c533534fd112502050a49b4e04a1ac6e1b25 /base
parentf09c44d73c2c3cced84570ee13678650ad52a3fa (diff)
downloadchromium_src-9fc6d0e41b709e593ec235c4c87ca4dff7e7ce35.zip
chromium_src-9fc6d0e41b709e593ec235c4c87ca4dff7e7ce35.tar.gz
chromium_src-9fc6d0e41b709e593ec235c4c87ca4dff7e7ce35.tar.bz2
GTTF: Reduce number of different timeouts.
This will help choosing the right timeouts and avoid many confusions. BUG=none Review URL: http://codereview.chromium.org/7712013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97741 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r--base/test/test_timeouts.cc16
-rw-r--r--base/test/test_timeouts.h6
2 files changed, 7 insertions, 15 deletions
diff --git a/base/test/test_timeouts.cc b/base/test/test_timeouts.cc
index ec56bcb..1ff151a 100644
--- a/base/test/test_timeouts.cc
+++ b/base/test/test_timeouts.cc
@@ -45,11 +45,7 @@ bool TestTimeouts::initialized_ = false;
int TestTimeouts::tiny_timeout_ms_ = 100;
int TestTimeouts::action_timeout_ms_ = 2000;
int TestTimeouts::action_max_timeout_ms_ = 45000;
-int TestTimeouts::large_test_timeout_ms_ = 3 * 60 * 1000;
-int TestTimeouts::huge_test_timeout_ms_ = 10 * 60 * 1000;
-
-// static
-int TestTimeouts::live_operation_timeout_ms_ = 45000;
+int TestTimeouts::large_test_timeout_ms_ = 10 * 60 * 1000;
// static
void TestTimeouts::Initialize() {
@@ -68,17 +64,15 @@ void TestTimeouts::Initialize() {
&action_max_timeout_ms_);
// TODO(phajdan.jr): Fix callers and remove kTestTerminateTimeout.
InitializeTimeout(switches::kTestTerminateTimeout, &action_max_timeout_ms_);
+ // TODO(phajdan.jr): Fix callers and remove kLiveOperationTimeout.
+ InitializeTimeout(switches::kLiveOperationTimeout, &action_max_timeout_ms_);
InitializeTimeout(switches::kTestLargeTimeout, action_max_timeout_ms_,
&large_test_timeout_ms_);
- InitializeTimeout(switches::kUiTestTimeout, large_test_timeout_ms_,
- &huge_test_timeout_ms_);
+ // TODO(phajdan.jr): Fix callers and remove kUITestTimeout.
+ InitializeTimeout(switches::kUiTestTimeout, &large_test_timeout_ms_);
// The timeout values should be increasing in the right order.
CHECK(tiny_timeout_ms_ <= action_timeout_ms_);
CHECK(action_timeout_ms_ <= action_max_timeout_ms_);
CHECK(action_max_timeout_ms_ <= large_test_timeout_ms_);
- CHECK(large_test_timeout_ms_ <= huge_test_timeout_ms_);
-
- InitializeTimeout(switches::kLiveOperationTimeout,
- &live_operation_timeout_ms_);
}
diff --git a/base/test/test_timeouts.h b/base/test/test_timeouts.h
index 9ae2b04..8a5db3f 100644
--- a/base/test/test_timeouts.h
+++ b/base/test/test_timeouts.h
@@ -48,14 +48,14 @@ class TestTimeouts {
// Do not use multiple times in a single test.
static int huge_test_timeout_ms() {
DCHECK(initialized_);
- return huge_test_timeout_ms_;
+ return large_test_timeout_ms_;
}
// Timeout to wait for a live operation to complete. Used by tests that access
// external services.
static int live_operation_timeout_ms() {
DCHECK(initialized_);
- return live_operation_timeout_ms_;
+ return action_max_timeout_ms_;
}
private:
@@ -65,8 +65,6 @@ class TestTimeouts {
static int action_timeout_ms_;
static int action_max_timeout_ms_;
static int large_test_timeout_ms_;
- static int huge_test_timeout_ms_;
- static int live_operation_timeout_ms_;
DISALLOW_IMPLICIT_CONSTRUCTORS(TestTimeouts);
};