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

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

Issue 10830193: Remove SWIGged use of BrowserProxy and TabProxy from PyAuto tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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
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 from urlparse import urlparse 7 from urlparse import urlparse
8 8
9 import pyauto_functional # Must be imported before pyauto 9 import pyauto_functional # Must be imported before pyauto
10 import pyauto 10 import pyauto
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 def testInfoBarDisappearByReload(self): 260 def testInfoBarDisappearByReload(self):
261 """Test that Password infobar disappears by the page reload.""" 261 """Test that Password infobar disappears by the page reload."""
262 creds = self.GetPrivateInfo()['test_google_account'] 262 creds = self.GetPrivateInfo()['test_google_account']
263 # Disable one-click login infobar for sync. 263 # Disable one-click login infobar for sync.
264 self.SetPrefs(pyauto.kReverseAutologinEnabled, False) 264 self.SetPrefs(pyauto.kReverseAutologinEnabled, False)
265 # Login to Google a/c 265 # Login to Google a/c
266 test_utils.GoogleAccountsLogin(self, creds['username'], creds['password']) 266 test_utils.GoogleAccountsLogin(self, creds['username'], creds['password'])
267 self.PerformActionOnInfobar( 267 self.PerformActionOnInfobar(
268 'accept', infobar_index=test_utils.WaitForInfobarTypeAndGetIndex( 268 'accept', infobar_index=test_utils.WaitForInfobarTypeAndGetIndex(
269 self, self.INFOBAR_TYPE)) 269 self, self.INFOBAR_TYPE))
270 self.GetBrowserWindow(0).GetTab(0).Reload() 270 self.ReloadTab()
271 test_utils.AssertInfobarTypeDoesNotAppear(self, self.INFOBAR_TYPE) 271 test_utils.AssertInfobarTypeDoesNotAppear(self, self.INFOBAR_TYPE)
272 272
273 def testPasswdInfoNotStoredWhenAutocompleteOff(self): 273 def testPasswdInfoNotStoredWhenAutocompleteOff(self):
274 """Verify that password infobar does not appear when autocomplete is off. 274 """Verify that password infobar does not appear when autocomplete is off.
275 275
276 If the password field has autocomplete turned off, then the password infobar 276 If the password field has autocomplete turned off, then the password infobar
277 should not offer to save the password info. 277 should not offer to save the password info.
278 """ 278 """
279 password_info = {'Email': self.USERNAME, 279 password_info = {'Email': self.USERNAME,
280 'Passwd': self.PASSWORD} 280 'Passwd': self.PASSWORD}
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 password = creds['password'] 353 password = creds['password']
354 # Block cookies for Google accounts domain. 354 # Block cookies for Google accounts domain.
355 self.SetPrefs(pyauto.kContentSettingsPatternPairs, 355 self.SetPrefs(pyauto.kContentSettingsPatternPairs,
356 {'https://accounts.google.com/': {'cookies': 2}}) 356 {'https://accounts.google.com/': {'cookies': 2}})
357 test_utils.GoogleAccountsLogin(self, username, password) 357 test_utils.GoogleAccountsLogin(self, username, password)
358 test_utils.WaitForInfobarTypeAndGetIndex(self, self.INFOBAR_TYPE) 358 test_utils.WaitForInfobarTypeAndGetIndex(self, self.INFOBAR_TYPE)
359 359
360 360
361 if __name__ == '__main__': 361 if __name__ == '__main__':
362 pyauto_functional.Main() 362 pyauto_functional.Main()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698