summaryrefslogtreecommitdiffstats
path: root/base/test
diff options
context:
space:
mode:
authorannacc@chromium.org <annacc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-16 18:49:52 +0000
committerannacc@chromium.org <annacc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-16 18:49:52 +0000
commit32ba25f8130e85dc5189b06490156c1df4f0cee8 (patch)
treee2427dbc87efb9289315dff1cb416c8f823aac7a /base/test
parent1cf1e69b1ea029d5d99a9b25d9e505cb56170630 (diff)
downloadchromium_src-32ba25f8130e85dc5189b06490156c1df4f0cee8.zip
chromium_src-32ba25f8130e85dc5189b06490156c1df4f0cee8.tar.gz
chromium_src-32ba25f8130e85dc5189b06490156c1df4f0cee8.tar.bz2
Separate BufferedDataSource and BufferedResourceLoader into two files.
It's time to finally separate the huge monster files buffered_data_source.[h/cc] into two. ericroman: There are some variables and short methods that both BufferedDataSource and BufferedResourceLoader rely on and that I have moved to src/net/http/http_util.h. Could you please verify that this is an ok place to put them? Also, appcache issues have been resolved (and approved by michaeln) so I've removed those comments. BUG=None. TEST=Compiles. Review URL: http://codereview.chromium.org/5756004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69429 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/test')
-rw-r--r--base/test/test_switches.cc1
-rw-r--r--base/test/test_switches.h1
-rw-r--r--base/test/test_timeouts.cc6
-rw-r--r--base/test/test_timeouts.h4
4 files changed, 11 insertions, 1 deletions
diff --git a/base/test/test_switches.cc b/base/test/test_switches.cc
index 1dfd63f..991f4f3 100644
--- a/base/test/test_switches.cc
+++ b/base/test/test_switches.cc
@@ -10,6 +10,7 @@ const char switches::kLiveOperationTimeout[] = "live-operation-timeout";
// Time (in milliseconds) that the tests should wait before timing out.
// TODO(phajdan.jr): Clean up the switch names.
const char switches::kTestLargeTimeout[] = "test-large-timeout";
+const char switches::kTestTinyTimeout[] = "test-tiny-timeout";
const char switches::kUiTestActionTimeout[] = "ui-test-action-timeout";
const char switches::kUiTestActionMaxTimeout[] = "ui-test-action-max-timeout";
const char switches::kUiTestCommandExecutionTimeout[] = "ui-test-timeout";
diff --git a/base/test/test_switches.h b/base/test/test_switches.h
index 2194596..44ebd23 100644
--- a/base/test/test_switches.h
+++ b/base/test/test_switches.h
@@ -11,6 +11,7 @@ namespace switches {
// alongside the definition of their values in the .cc file.
extern const char kLiveOperationTimeout[];
extern const char kTestLargeTimeout[];
+extern const char kTestTinyTimeout[];
extern const char kUiTestActionTimeout[];
extern const char kUiTestActionMaxTimeout[];
extern const char kUiTestCommandExecutionTimeout[];
diff --git a/base/test/test_timeouts.cc b/base/test/test_timeouts.cc
index 7ee1b70..046f320 100644
--- a/base/test/test_timeouts.cc
+++ b/base/test/test_timeouts.cc
@@ -42,6 +42,7 @@ bool TestTimeouts::initialized_ = false;
// The timeout values should increase in the order they appear in this block.
// static
+int TestTimeouts::tiny_timeout_ms_ = 100;
int TestTimeouts::action_timeout_ms_ = 2000;
int TestTimeouts::action_max_timeout_ms_ = 15000;
int TestTimeouts::large_test_timeout_ms_ = 3 * 60 * 1000;
@@ -66,7 +67,9 @@ void TestTimeouts::Initialize() {
// Note that these timeouts MUST be initialized in the correct order as
// per the CHECKS below.
- InitializeTimeout(switches::kUiTestActionTimeout, &action_timeout_ms_);
+ InitializeTimeout(switches::kTestTinyTimeout, &tiny_timeout_ms_);
+ InitializeTimeout(switches::kUiTestActionTimeout, tiny_timeout_ms_,
+ &action_timeout_ms_);
InitializeTimeout(switches::kUiTestActionMaxTimeout, action_timeout_ms_,
&action_max_timeout_ms_);
InitializeTimeout(switches::kTestLargeTimeout, action_max_timeout_ms_,
@@ -75,6 +78,7 @@ void TestTimeouts::Initialize() {
&huge_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_);
diff --git a/base/test/test_timeouts.h b/base/test/test_timeouts.h
index d49ca2c..f4cb1ff 100644
--- a/base/test/test_timeouts.h
+++ b/base/test/test_timeouts.h
@@ -15,6 +15,9 @@ class TestTimeouts {
// by the test suite.
static void Initialize();
+ // Timeout for actions that are expected to finish "almost instantly".
+ static int tiny_timeout_ms() { return tiny_timeout_ms_; }
+
// Timeout to wait for something to happen. If you are not sure
// which timeout to use, this is the one you want.
static int action_timeout_ms() { return action_timeout_ms_; }
@@ -52,6 +55,7 @@ class TestTimeouts {
private:
static bool initialized_;
+ static int tiny_timeout_ms_;
static int action_timeout_ms_;
static int action_max_timeout_ms_;
static int large_test_timeout_ms_;