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

Side by Side Diff: chrome/test/functional/passwords.py

Issue 10207002: Fix testNeverSavePasswords (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/test/functional/PYAUTO_TESTS ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 import os 6 import os
7 7
8 import pyauto_functional # Must be imported before pyauto 8 import pyauto_functional # Must be imported before pyauto
9 import pyauto 9 import pyauto
10 import test_utils 10 import test_utils
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 'accept', infobar_index=test_utils.WaitForInfobarTypeAndGetIndex( 149 'accept', infobar_index=test_utils.WaitForInfobarTypeAndGetIndex(
150 self, self.INFOBAR_TYPE)) 150 self, self.INFOBAR_TYPE))
151 self.assertEquals(1, len(self.GetSavedPasswords())) 151 self.assertEquals(1, len(self.GetSavedPasswords()))
152 self.AppendTab(pyauto.GURL(creds1['logout_url'])) 152 self.AppendTab(pyauto.GURL(creds1['logout_url']))
153 creds2 = self.GetPrivateInfo()['test_google_account_2'] 153 creds2 = self.GetPrivateInfo()['test_google_account_2']
154 test_utils.GoogleAccountsLogin( 154 test_utils.GoogleAccountsLogin(
155 self, creds2['username'], creds2['password'], tab_index=1) 155 self, creds2['username'], creds2['password'], tab_index=1)
156 # Selecting 'Never for this site' option on password infobar. 156 # Selecting 'Never for this site' option on password infobar.
157 self.PerformActionOnInfobar( 157 self.PerformActionOnInfobar(
158 'cancel', infobar_index=test_utils.WaitForInfobarTypeAndGetIndex( 158 'cancel', infobar_index=test_utils.WaitForInfobarTypeAndGetIndex(
159 self, self.INFOBAR_TYPE, tab_index=1)) 159 self, self.INFOBAR_TYPE, tab_index=1), tab_index=1)
160 160
161 # TODO: GetSavedPasswords() doesn't return anything when empty. 161 # TODO: GetSavedPasswords() doesn't return anything when empty.
162 # http://crbug.com/64603 162 # http://crbug.com/64603
163 # self.assertFalse(self.GetSavedPasswords()) 163 # self.assertFalse(self.GetSavedPasswords())
164 # TODO: Check the exceptions list 164 # TODO: Check the exceptions list
165 165
166 def testSavedPasswordInTabsAndWindows(self): 166 def testSavedPasswordInTabsAndWindows(self):
167 """Verify saved username/password shows in window and tab.""" 167 """Verify saved username/password shows in window and tab."""
168 creds = self.GetPrivateInfo()['test_google_account'] 168 creds = self.GetPrivateInfo()['test_google_account']
169 username = creds['username'] 169 username = creds['username']
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 password = creds['password'] 321 password = creds['password']
322 # Block cookies for Google accounts domain. 322 # Block cookies for Google accounts domain.
323 self.SetPrefs(pyauto.kContentSettingsPatternPairs, 323 self.SetPrefs(pyauto.kContentSettingsPatternPairs,
324 {'https://accounts.google.com/': {'cookies': 2}}) 324 {'https://accounts.google.com/': {'cookies': 2}})
325 test_utils.GoogleAccountsLogin(self, username, password) 325 test_utils.GoogleAccountsLogin(self, username, password)
326 test_utils.WaitForInfobarTypeAndGetIndex(self, self.INFOBAR_TYPE) 326 test_utils.WaitForInfobarTypeAndGetIndex(self, self.INFOBAR_TYPE)
327 327
328 328
329 if __name__ == '__main__': 329 if __name__ == '__main__':
330 pyauto_functional.Main() 330 pyauto_functional.Main()
OLDNEW
« no previous file with comments | « chrome/test/functional/PYAUTO_TESTS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698