Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7324)

Unified Diff: chrome/test/functional/infobars.py

Issue 10555005: Address bug where the one-click sign-in bar would never show again once (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: fixed import error Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/pref_names.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/functional/infobars.py
===================================================================
--- chrome/test/functional/infobars.py (revision 142386)
+++ chrome/test/functional/infobars.py (working copy)
@@ -196,14 +196,15 @@
pyauto.PyUITest.setUp(self)
self._driver = self.NewWebDriver()
- def _LogIntoGoogleAccount(self, tab_index=0, windex=0):
+ def _LogIntoGoogleAccount(self, test_account='test_google_account',
+ tab_index=0, windex=0):
dyu1 2012/06/15 15:59:47 This is not indented far enough, the tab_index=0 s
mathp 2012/06/15 16:53:22 Done.
"""Log into Google account.
Args:
tab_index: The tab index, default is 0.
windex: The window index, default is 0.
"""
- creds = self.GetPrivateInfo()['test_google_account']
+ creds = self.GetPrivateInfo()[test_account]
username = creds['username']
password = creds['password']
test_utils.GoogleAccountsLogin(self, username, password, tab_index, windex)
@@ -251,8 +252,9 @@
"""
self._DisplayOneClickInfobar()
- def testNoOneClickInfobarAfterCancel(self):
- """Verify one-click infobar does not appear again after clicking cancel.
+ def testNoOneClickInfobarAfterCancelSameAccount(self):
+ """Verify one-click infobar does not appear again after clicking cancel
+ for a specific account.
dyu1 2012/06/15 15:59:47 Please follow the style guide when commenting in t
mathp 2012/06/15 16:53:22 Done.
The one-click infobar should not display again after logging into an
account and selecting to reject sync the first time. The test covers
@@ -272,7 +274,33 @@
self.NavigateToURL(self.URL_LOGOUT)
self._LogIntoGoogleAccount()
test_utils.AssertInfobarTypeDoesNotAppear(self, self.OC_INFOBAR_TYPE)
+ test_utils.WaitForInfobarTypeAndGetIndex(self, self.PW_INFOBAR_TYPE)
+ def testOneClickInfobarAppearsAfterCancelDifferentAccount(self):
+ """Verify one-click infobar appears again after clicking cancel for a
+ specific account but logging in with another account.
dyu1 2012/06/15 15:59:47 Same as above for commenting in the module.
mathp 2012/06/15 16:53:22 Done.
mathp 2012/06/15 16:53:22 Done.
+
+ The one-click infobar should display again after logging into an
+ account and selecting to reject sync, but logging again with another
+ account. The test covers restarting the browser with the same profile
+ but logging in with another account, and verifying the one-click infobar
+ does show after login.
+
+ This test also verifies that the password infobar displays.
+ """
+ self._DisplayOneClickInfobar()
+ self._PerformActionOnInfobar(action='cancel') # Click 'No thanks' button.
+ self.NavigateToURL(self.URL_LOGOUT)
+ self._LogIntoGoogleAccount()
+ test_utils.WaitForInfobarTypeAndGetIndex(self, self.PW_INFOBAR_TYPE)
+ test_utils.AssertInfobarTypeDoesNotAppear(self, self.OC_INFOBAR_TYPE)
+ # Restart browser with a different profile.
+ self.RestartBrowser(clear_profile=False)
+ self.NavigateToURL(self.URL_LOGOUT)
+ self._LogIntoGoogleAccount('test_google_account_2')
+ test_utils.WaitForInfobarTypeAndGetIndex(self, self.OC_INFOBAR_TYPE)
+ test_utils.AssertInfobarTypeDoesNotAppear(self, self.PW_INFOBAR_TYPE)
+
def testDisplayOneClickInfobarAfterDismiss(self):
"""Verify one-click infobar appears again after clicking dismiss button.
« no previous file with comments | « chrome/common/pref_names.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698