summaryrefslogtreecommitdiffstats
path: root/chrome/browser/automation/automation_provider.cc
diff options
context:
space:
mode:
authorestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-25 20:04:25 +0000
committerestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-25 20:04:25 +0000
commit5fa7acd439a4de7afa3d16b34cd95751639c20d1 (patch)
tree635183ef627a07ec49002aaee1ec4c7068b6fbb8 /chrome/browser/automation/automation_provider.cc
parente5497e9a893a780d13b93ed1ea4aeed6addd6e6e (diff)
downloadchromium_src-5fa7acd439a4de7afa3d16b34cd95751639c20d1.zip
chromium_src-5fa7acd439a4de7afa3d16b34cd95751639c20d1.tar.gz
chromium_src-5fa7acd439a4de7afa3d16b34cd95751639c20d1.tar.bz2
Cut down on flakiness of automated ui tests by changing message sending/waiting logic.
BUG=none TEST=a lot less flaky on linux Review URL: http://codereview.chromium.org/235019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27232 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/automation/automation_provider.cc')
-rw-r--r--chrome/browser/automation/automation_provider.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/chrome/browser/automation/automation_provider.cc b/chrome/browser/automation/automation_provider.cc
index 65dae1d..7f0998e 100644
--- a/chrome/browser/automation/automation_provider.cc
+++ b/chrome/browser/automation/automation_provider.cc
@@ -1761,11 +1761,9 @@ void AutomationProvider::GetLastNavigationTime(int handle,
void AutomationProvider::WaitForNavigation(int handle,
int64 last_navigation_time,
IPC::Message* reply_message) {
- NavigationController* controller = NULL;
- if (tab_tracker_->ContainsHandle(handle))
- controller = tab_tracker_->GetResource(handle);
-
+ NavigationController* controller = tab_tracker_->GetResource(handle);
Time time = tab_tracker_->GetLastNavigationTime(handle);
+
if (time.ToInternalValue() > last_navigation_time || !controller) {
AutomationMsg_WaitForNavigation::WriteReplyParams(reply_message,
controller == NULL ? AUTOMATION_MSG_NAVIGATION_ERROR :