diff options
author | paulg@google.com <paulg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-18 18:21:53 +0000 |
---|---|---|
committer | paulg@google.com <paulg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-18 18:21:53 +0000 |
commit | b6e5839905d9e47c9c3469df8e8c3bdb64dc5259 (patch) | |
tree | 148d256bcfcddf3f7ba41d58606bb9fc1e0b861e /chrome/test/automation/automation_proxy.cc | |
parent | 800eb42f44b36dde113525e8f72fa29e8ed0000a (diff) | |
download | chromium_src-b6e5839905d9e47c9c3469df8e8c3bdb64dc5259.zip chromium_src-b6e5839905d9e47c9c3469df8e8c3bdb64dc5259.tar.gz chromium_src-b6e5839905d9e47c9c3469df8e8c3bdb64dc5259.tar.bz2 |
Initial support for running the ui_tests under Purify on the
buildbots.
With these changes, I've been able to get 106 of about 185
ui_tests running under Purify on my machine (I haven't gotten
to the remaining tests yet) with minimal changes.
The changes here are timeout related, allowing us to specify
longer timeouts in chrome_tests.py rather than hard coding them
in the tests themselves. We'll likely have to experiment on the
buildbots with different timeout values, depending on how fast
the bots are.
Review URL: http://codereview.chromium.org/14184
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7226 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/automation/automation_proxy.cc')
-rw-r--r-- | chrome/test/automation/automation_proxy.cc | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/chrome/test/automation/automation_proxy.cc b/chrome/test/automation/automation_proxy.cc index 60806b5..87ed3680 100644 --- a/chrome/test/automation/automation_proxy.cc +++ b/chrome/test/automation/automation_proxy.cc @@ -141,9 +141,9 @@ class AutomationMessageFilter : public IPC::ChannelProxy::MessageFilter { } // anonymous namespace -const int AutomationProxy::kMaxCommandExecutionTime = 30000; - -AutomationProxy::AutomationProxy() : current_request_(NULL) { +AutomationProxy::AutomationProxy(int command_execution_timeout_ms) + : current_request_(NULL), + command_execution_timeout_ms_(command_execution_timeout_ms) { InitializeEvents(); InitializeChannelID(); InitializeThread(); @@ -210,7 +210,7 @@ void AutomationProxy::InitializeHandleTracker() { bool AutomationProxy::WaitForAppLaunch() { return ::WaitForSingleObject(app_launched_, - kMaxCommandExecutionTime) == WAIT_OBJECT_0; + command_execution_timeout_ms_) == WAIT_OBJECT_0; } void AutomationProxy::SignalAppLaunch() { @@ -219,12 +219,12 @@ void AutomationProxy::SignalAppLaunch() { bool AutomationProxy::WaitForInitialLoads() { return ::WaitForSingleObject(initial_loads_complete_, - kMaxCommandExecutionTime) == WAIT_OBJECT_0; + command_execution_timeout_ms_) == WAIT_OBJECT_0; } bool AutomationProxy::WaitForInitialNewTabUILoad(int* load_time) { if (::WaitForSingleObject(new_tab_ui_load_complete_, - kMaxCommandExecutionTime) == WAIT_OBJECT_0) { + command_execution_timeout_ms_) == WAIT_OBJECT_0) { *load_time = new_tab_ui_load_time_; ::ResetEvent(new_tab_ui_load_complete_); return true; @@ -252,7 +252,7 @@ bool AutomationProxy::GetBrowserWindowCount(int* num_windows) { bool succeeded = SendAndWaitForResponseWithTimeout( new AutomationMsg_BrowserWindowCountRequest(0), &response, AutomationMsg_BrowserWindowCountResponse::ID, - kMaxCommandExecutionTime, &is_timeout); + command_execution_timeout_ms_, &is_timeout); if (!succeeded) return false; @@ -316,7 +316,7 @@ bool AutomationProxy::GetShowingAppModalDialog( if (!SendAndWaitForResponseWithTimeout( new AutomationMsg_ShowingAppModalDialogRequest(0), &response, AutomationMsg_ShowingAppModalDialogResponse::ID, - kMaxCommandExecutionTime, &is_timeout)) { + command_execution_timeout_ms_, &is_timeout)) { return false; } @@ -344,7 +344,7 @@ bool AutomationProxy::ClickAppModalDialogButton( new AutomationMsg_ClickAppModalDialogButtonRequest(0, button), &response, AutomationMsg_ClickAppModalDialogButtonResponse::ID, - kMaxCommandExecutionTime, &is_timeout)) { + command_execution_timeout_ms_, &is_timeout)) { return false; } @@ -400,7 +400,7 @@ WindowProxy* AutomationProxy::GetActiveWindow() { bool succeeded = SendAndWaitForResponseWithTimeout( new AutomationMsg_ActiveWindowRequest(0), &response, AutomationMsg_ActiveWindowResponse::ID, - kMaxCommandExecutionTime, &is_timeout); + command_execution_timeout_ms_, &is_timeout); if (!succeeded) return NULL; @@ -425,7 +425,7 @@ BrowserProxy* AutomationProxy::GetBrowserWindow(int window_index) { bool succeeded = SendAndWaitForResponseWithTimeout( new AutomationMsg_BrowserWindowRequest(0, window_index), &response, AutomationMsg_BrowserWindowResponse::ID, - kMaxCommandExecutionTime, &is_timeout); + command_execution_timeout_ms_, &is_timeout); if (!succeeded) return NULL; @@ -450,7 +450,7 @@ BrowserProxy* AutomationProxy::GetLastActiveBrowserWindow() { bool succeeded = SendAndWaitForResponseWithTimeout( new AutomationMsg_LastActiveBrowserWindowRequest(0), &response, AutomationMsg_LastActiveBrowserWindowResponse::ID, - kMaxCommandExecutionTime, &is_timeout); + command_execution_timeout_ms_, &is_timeout); if (!succeeded) return NULL; |