summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/test/ui/ui_test.cc11
-rw-r--r--chrome/test/ui/ui_test.h3
-rw-r--r--tools/purify/chrome_tests.py3
3 files changed, 15 insertions, 2 deletions
diff --git a/chrome/test/ui/ui_test.cc b/chrome/test/ui/ui_test.cc
index 02bc890..b35305d 100644
--- a/chrome/test/ui/ui_test.cc
+++ b/chrome/test/ui/ui_test.cc
@@ -68,6 +68,7 @@ std::wstring UITest::js_flags_ = L"";
const wchar_t kUiTestTimeout[] = L"ui-test-timeout";
const wchar_t kUiTestActionTimeout[] = L"ui-test-action-timeout";
const wchar_t kUiTestActionMaxTimeout[] = L"ui-test-action-max-timeout";
+const wchar_t kUiTestSleepTimeout[] = L"ui-test-sleep-timeout";
const wchar_t kExtraChromeFlagsSwitch[] = L"extra-chrome-flags";
@@ -103,7 +104,8 @@ UITest::UITest()
use_existing_browser_(default_use_existing_browser_),
command_execution_timeout_ms_(kMaxTestExecutionTime),
action_timeout_ms_(kWaitForActionMsec),
- action_max_timeout_ms_(kWaitForActionMaxMsec) {
+ action_max_timeout_ms_(kWaitForActionMaxMsec),
+ sleep_timeout_ms_(kWaitForActionMsec) {
PathService::Get(chrome::DIR_APP, &browser_directory_);
PathService::Get(chrome::DIR_TEST_DATA, &test_data_directory_);
#if defined(OS_WIN)
@@ -193,6 +195,13 @@ void UITest::InitializeTimeouts() {
int max_timeout = StringToInt(action_max_str);
action_max_timeout_ms_ = std::max(kWaitForActionMaxMsec, max_timeout);
}
+
+ if (CommandLine().HasSwitch(kUiTestSleepTimeout)) {
+ std::wstring sleep_timeout_str =
+ CommandLine().GetSwitchValue(kUiTestSleepTimeout);
+ int sleep_timeout = StringToInt(sleep_timeout_str);
+ sleep_timeout_ms_ = std::max(kWaitForActionMsec, sleep_timeout);
+ }
}
void UITest::LaunchBrowserAndServer() {
diff --git a/chrome/test/ui/ui_test.h b/chrome/test/ui/ui_test.h
index 1d36d29..7baeb60 100644
--- a/chrome/test/ui/ui_test.h
+++ b/chrome/test/ui/ui_test.h
@@ -320,6 +320,8 @@ class UITest : public testing::Test {
int action_max_timeout_ms() const { return action_max_timeout_ms_; }
+ int sleep_timeout_ms() const { return sleep_timeout_ms_; }
+
std::wstring ui_test_name() const { return ui_test_name_; }
// Count the number of active browser processes. This function only counts
@@ -453,6 +455,7 @@ class UITest : public testing::Test {
int command_execution_timeout_ms_;
int action_timeout_ms_;
int action_max_timeout_ms_;
+ int sleep_timeout_ms_;
std::wstring ui_test_name_;
};
diff --git a/tools/purify/chrome_tests.py b/tools/purify/chrome_tests.py
index 04c44bb..78f675e 100644
--- a/tools/purify/chrome_tests.py
+++ b/tools/purify/chrome_tests.py
@@ -296,7 +296,8 @@ class ChromeTests:
"--single-process",
"--ui-test-timeout=180000",
"--ui-test-action-timeout=80000",
- "--ui-test-action-max-timeout=180000"],
+ "--ui-test-action-max-timeout=180000",
+ "--ui-test-sleep-timeout=40000"],
multi=True)