From 521649d3351d39127bfd62ad311c5b650fa6c32d Mon Sep 17 00:00:00 2001 From: "sunandt@chromium.org" Date: Mon, 28 Mar 2011 18:57:27 +0000 Subject: 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 --- chrome/test/functional/popups.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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)) -- cgit v1.1