summaryrefslogtreecommitdiffstats
path: root/chrome/test/automation
diff options
context:
space:
mode:
authorsky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-31 17:37:54 +0000
committersky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-31 17:37:54 +0000
commit49922313bd7d5deb2479001f9646e7fa23d7ec25 (patch)
tree2fc8de8aa732fd30e2e6a125dab292cd67c87d0e /chrome/test/automation
parentf3583ec80bcd9e3f561a2596924194a8e9c6d92e (diff)
downloadchromium_src-49922313bd7d5deb2479001f9646e7fa23d7ec25.zip
chromium_src-49922313bd7d5deb2479001f9646e7fa23d7ec25.tar.gz
chromium_src-49922313bd7d5deb2479001f9646e7fa23d7ec25.tar.bz2
Couple of changes in hopes of finally making ShareProcessesOnRestore
not flakey. Here's the set of changes: . Before getting the process count we wait for the PROCESS_LAUNCHER thread to go idle. On linux we push process shutdown to the PROCESS_LAUNCHER thread. So, it's important we wait for this thread to process all requests before getting the process count. . Makes TabRestore take a boolean indicating if it succeeded. . Change IDC_NEW_TAB from waiting for INITIAL_NEW_TAB_UI_LOAD to waiting until the tab loads. INITIAL_NEW_TAB_UI_LOAD isn't really a good indication that the new tab has finished loading. A key part of making this test not flakey is http://codereview.chromium.org/6398005/, but that'll be landed separately. BUG=52022 TEST=none Review URL: http://codereview.chromium.org/6263018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73156 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/automation')
-rw-r--r--chrome/test/automation/automation_proxy.cc4
-rw-r--r--chrome/test/automation/automation_proxy.h3
-rw-r--r--chrome/test/automation/tab_proxy.cc5
3 files changed, 11 insertions, 1 deletions
diff --git a/chrome/test/automation/automation_proxy.cc b/chrome/test/automation/automation_proxy.cc
index 989c91a..461b3e4 100644
--- a/chrome/test/automation/automation_proxy.cc
+++ b/chrome/test/automation/automation_proxy.cc
@@ -203,6 +203,10 @@ void AutomationProxy::SignalAppLaunch(const std::string& version_string) {
app_launched_.Signal();
}
+bool AutomationProxy::WaitForProcessLauncherThreadToGoIdle() {
+ return Send(new AutomationMsg_WaitForProcessLauncherThreadToGoIdle());
+}
+
bool AutomationProxy::WaitForInitialLoads() {
return initial_loads_complete_.TimedWait(command_execution_timeout_);
}
diff --git a/chrome/test/automation/automation_proxy.h b/chrome/test/automation/automation_proxy.h
index 323538c..cfc8c8b 100644
--- a/chrome/test/automation/automation_proxy.h
+++ b/chrome/test/automation/automation_proxy.h
@@ -87,6 +87,9 @@ class AutomationProxy : public IPC::Channel::Listener,
// set_perform_version_check() to set it.
AutomationLaunchResult WaitForAppLaunch();
+ // See description in AutomationMsg_WaitForProcessLauncherThreadToGoIdle.
+ bool WaitForProcessLauncherThreadToGoIdle() WARN_UNUSED_RESULT;
+
// Waits for any initial page loads to complete.
// NOTE: this only fires once for a run of the application.
// Returns true if the load is successful
diff --git a/chrome/test/automation/tab_proxy.cc b/chrome/test/automation/tab_proxy.cc
index f7908c4..5625c40 100644
--- a/chrome/test/automation/tab_proxy.cc
+++ b/chrome/test/automation/tab_proxy.cc
@@ -563,7 +563,10 @@ void TabProxy::HandleMessageFromExternalHost(const std::string& message,
bool TabProxy::WaitForTabToBeRestored(uint32 timeout_ms) {
if (!is_valid())
return false;
- return sender_->Send(new AutomationMsg_WaitForTabToBeRestored(handle_));
+ bool succeeded = false;
+ return sender_->Send(
+ new AutomationMsg_WaitForTabToBeRestored(handle_, &succeeded)) &&
+ succeeded;
}
bool TabProxy::GetSecurityState(SecurityStyle* security_style,