summaryrefslogtreecommitdiffstats
path: root/chrome/test/functional
diff options
context:
space:
mode:
authornirnimesh@chromium.org <nirnimesh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-26 20:28:46 +0000
committernirnimesh@chromium.org <nirnimesh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-26 20:28:46 +0000
commit80f1a2aa3b3c0623da2513c714a20ef586f99bb2 (patch)
tree98c6db7a9ccf6da031d62ed5aa0d91ab492a5a72 /chrome/test/functional
parent90f98589b02c277aa51aace11d8d0af5dba7e0db (diff)
downloadchromium_src-80f1a2aa3b3c0623da2513c714a20ef586f99bb2.zip
chromium_src-80f1a2aa3b3c0623da2513c714a20ef586f99bb2.tar.gz
chromium_src-80f1a2aa3b3c0623da2513c714a20ef586f99bb2.tar.bz2
Fix infobar test by actually waiting for infobar before checking for it.
Review URL: http://codereview.chromium.org/3055010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53669 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/functional')
-rw-r--r--chrome/test/functional/infobars.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/chrome/test/functional/infobars.py b/chrome/test/functional/infobars.py
index b4f080b..a689dcc 100644
--- a/chrome/test/functional/infobars.py
+++ b/chrome/test/functional/infobars.py
@@ -82,6 +82,7 @@ class InfobarTest(pyauto.PyUITest):
url = 'http://m.flickr.com/#/nearby/' # automatically triggers geolocation
match_text='m.flickr.com wants to track your physical location'
self.NavigateToURL(url)
+ self.WaitForInfobarCount(1)
self._VerifyGeolocationInfobar(windex=0, tab_index=0, match_text=match_text)
# Accept, and verify that the infobar went away
self.PerformActionOnInfobar('accept', infobar_index=0)
@@ -93,15 +94,18 @@ class InfobarTest(pyauto.PyUITest):
match_text='m.flickr.com wants to track your physical location'
for tab_index in range(1, 2):
self.AppendTab(pyauto.GURL(url))
+ self.WaitForInfobarCount(1, windex=0, tab_index=tab_index)
self._VerifyGeolocationInfobar(windex=0, tab_index=tab_index,
match_text=match_text)
# Try in a new window
self.OpenNewBrowserWindow(True)
self.NavigateToURL(url, 1, 0)
+ self.WaitForInfobarCount(1, windex=1, tab_index=0)
self._VerifyGeolocationInfobar(windex=1, tab_index=0, match_text=match_text)
# Incognito window
self.RunCommand(pyauto.IDC_NEW_INCOGNITO_WINDOW)
self.NavigateToURL(url, 2, 0)
+ self.WaitForInfobarCount(1, windex=2, tab_index=0)
self._VerifyGeolocationInfobar(windex=2, tab_index=0, match_text=match_text)