diff options
author | nirnimesh@chromium.org <nirnimesh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-07 22:57:16 +0000 |
---|---|---|
committer | nirnimesh@chromium.org <nirnimesh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-07 22:57:16 +0000 |
commit | d160ec0e875e98829684f040d843e6a292dbb3ba (patch) | |
tree | 21af99f9243858b989c7369a1baac75a97d97986 | |
parent | cc61adf345e353947f4daf915a668338ede3d095 (diff) | |
download | chromium_src-d160ec0e875e98829684f040d843e6a292dbb3ba.zip chromium_src-d160ec0e875e98829684f040d843e6a292dbb3ba.tar.gz chromium_src-d160ec0e875e98829684f040d843e6a292dbb3ba.tar.bz2 |
Added Two tests to Passwords.py
Added back testDisplayAndSavePasswordInfobar.
BUG=NONE
TEST=NONE
Review URL: http://codereview.chromium.org/4669008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70798 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/test/functional/passwords.py | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/chrome/test/functional/passwords.py b/chrome/test/functional/passwords.py index 04a1bfd..e7df0692 100644 --- a/chrome/test/functional/passwords.py +++ b/chrome/test/functional/passwords.py @@ -153,6 +153,33 @@ class PasswordTest(pyauto.PyUITest): tab_index=0, windex=1) test_utils.ClearPasswords(self) + def testInfoBarDisappearByNavigatingPage(self): + """Test that Password infobar is dismissed by navigating to + different page.""" + creds = self.GetPrivateInfo()['test_google_account'] + # Login to Google a/c + test_utils.GoogleAccountsLogin(self, creds['username'], creds['password']) + # Wait for the infobar to appear + self.assertTrue(self.WaitForInfobarCount(1)) + self.assertTrue(self.GetBrowserInfo()['windows'][0]['tabs'][0]['infobars']) + self.NavigateToURL('chrome://history') + self.assertTrue(self.WaitForInfobarCount(0)) + # To make sure user is navigated to History page. + self.assertEqual('History', self.GetActiveTabTitle()) + self.assertFalse(self.GetBrowserInfo()['windows'][0]['tabs'][0]['infobars']) + + def testInfoBarDisappearByReload(self): + """Test that Password infobar disappears by the page reload.""" + creds = self.GetPrivateInfo()['test_google_account'] + # Login to Google a/c + test_utils.GoogleAccountsLogin(self, creds['username'], creds['password']) + # Wait for the infobar to appear + self.assertTrue(self.WaitForInfobarCount(1)) + self.assertTrue(self.GetBrowserInfo()['windows'][0]['tabs'][0]['infobars']) + self.GetBrowserWindow(0).GetTab(0).Reload() + self.assertTrue(self.WaitForInfobarCount(0)) + self.assertFalse(self.GetBrowserInfo()['windows'][0]['tabs'][0]['infobars']) + if __name__ == '__main__': pyauto_functional.Main() |