summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsunandt@chromium.org <sunandt@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-28 18:57:27 +0000
committersunandt@chromium.org <sunandt@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-28 18:57:27 +0000
commit521649d3351d39127bfd62ad311c5b650fa6c32d (patch)
treecdd550a4c93d9f93bc5716cebddef9211e850ee8
parent3a1275d5f449608b95f131d693c2e9b2f9d10a2a (diff)
downloadchromium_src-521649d3351d39127bfd62ad311c5b650fa6c32d.zip
chromium_src-521649d3351d39127bfd62ad311c5b650fa6c32d.tar.gz
chromium_src-521649d3351d39127bfd62ad311c5b650fa6c32d.tar.bz2
Modifying the test, popups.PopupsTest.testLaunchBlockedPopupInIncognito, to wait until popup is blocked.
BUG=70659 TEST=Test should pass on pyauto bots. Review URL: http://codereview.chromium.org/6748013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79596 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/test/functional/popups.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/chrome/test/functional/popups.py b/chrome/test/functional/popups.py
index 7982fc9..ca1ed6b 100644
--- a/chrome/test/functional/popups.py
+++ b/chrome/test/functional/popups.py
@@ -65,7 +65,10 @@ class PopupsTest(pyauto.PyUITest):
file_url = self.GetFileURLForPath(os.path.join(
self.DataDir(), 'popup_blocker', 'popup-window-open.html'))
self.NavigateToURL(file_url, 1, 0)
- self.assertEqual(1, len(self.GetBlockedPopupsInfo(tab_index=0, windex=1)))
+ # Wait until the popup is blocked
+ self.assertTrue(self.WaitUntil(lambda:
+ len(self.GetBlockedPopupsInfo(tab_index=0, windex=1)) is 1),
+ msg='Popup not blocked')
self.UnblockAndLaunchBlockedPopup(0, tab_index=0, windex=1)
# Verify that no more popups are blocked
self.assertFalse(self.GetBlockedPopupsInfo(tab_index=0, windex=1))