Index: functional/popups.py |
=================================================================== |
--- functional/popups.py (revision 79452) |
+++ functional/popups.py (working copy) |
@@ -65,7 +65,9 @@ |
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.WaitUntil(lambda: |
+ len(self.GetBlockedPopupsInfo(tab_index=0, windex=1)), expect_retval=1) |
anantha
2011/03/28 18:41:30
Please do self.assertEqual check again after self.
sunandt
2011/03/28 18:56:47
Since WaitUntil returns either True or False, I'm
|
self.UnblockAndLaunchBlockedPopup(0, tab_index=0, windex=1) |
# Verify that no more popups are blocked |
self.assertFalse(self.GetBlockedPopupsInfo(tab_index=0, windex=1)) |