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

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

Issue 10835007: Fix testInfoBarDisappearByNavigatingPage (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
« no previous file with comments | « no previous file | 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 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 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 # Disable one-click login infobar for sync. 246 # Disable one-click login infobar for sync.
247 self.SetPrefs(pyauto.kReverseAutologinEnabled, False) 247 self.SetPrefs(pyauto.kReverseAutologinEnabled, False)
248 # Login to Google account. 248 # Login to Google account.
249 test_utils.GoogleAccountsLogin(self, creds['username'], creds['password']) 249 test_utils.GoogleAccountsLogin(self, creds['username'], creds['password'])
250 self.PerformActionOnInfobar( 250 self.PerformActionOnInfobar(
251 'accept', infobar_index=test_utils.WaitForInfobarTypeAndGetIndex( 251 'accept', infobar_index=test_utils.WaitForInfobarTypeAndGetIndex(
252 self, self.INFOBAR_TYPE)) 252 self, self.INFOBAR_TYPE))
253 self.NavigateToURL('chrome://version') 253 self.NavigateToURL('chrome://version')
254 self.assertTrue(self.WaitForInfobarCount(0)) 254 self.assertTrue(self.WaitForInfobarCount(0))
255 # To make sure user is navigated to Version page. 255 # To make sure user is navigated to Version page.
256 self.assertEqual('About Version', self.GetActiveTabTitle()) 256 self.assertTrue(self.WaitUntil(self.GetActiveTabTitle,
257 expect_retval='About Version'))
257 test_utils.AssertInfobarTypeDoesNotAppear(self, self.INFOBAR_TYPE) 258 test_utils.AssertInfobarTypeDoesNotAppear(self, self.INFOBAR_TYPE)
258 259
259 def testInfoBarDisappearByReload(self): 260 def testInfoBarDisappearByReload(self):
260 """Test that Password infobar disappears by the page reload.""" 261 """Test that Password infobar disappears by the page reload."""
261 creds = self.GetPrivateInfo()['test_google_account'] 262 creds = self.GetPrivateInfo()['test_google_account']
262 # Disable one-click login infobar for sync. 263 # Disable one-click login infobar for sync.
263 self.SetPrefs(pyauto.kReverseAutologinEnabled, False) 264 self.SetPrefs(pyauto.kReverseAutologinEnabled, False)
264 # Login to Google a/c 265 # Login to Google a/c
265 test_utils.GoogleAccountsLogin(self, creds['username'], creds['password']) 266 test_utils.GoogleAccountsLogin(self, creds['username'], creds['password'])
266 self.PerformActionOnInfobar( 267 self.PerformActionOnInfobar(
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 password = creds['password'] 353 password = creds['password']
353 # Block cookies for Google accounts domain. 354 # Block cookies for Google accounts domain.
354 self.SetPrefs(pyauto.kContentSettingsPatternPairs, 355 self.SetPrefs(pyauto.kContentSettingsPatternPairs,
355 {'https://accounts.google.com/': {'cookies': 2}}) 356 {'https://accounts.google.com/': {'cookies': 2}})
356 test_utils.GoogleAccountsLogin(self, username, password) 357 test_utils.GoogleAccountsLogin(self, username, password)
357 test_utils.WaitForInfobarTypeAndGetIndex(self, self.INFOBAR_TYPE) 358 test_utils.WaitForInfobarTypeAndGetIndex(self, self.INFOBAR_TYPE)
358 359
359 360
360 if __name__ == '__main__': 361 if __name__ == '__main__':
361 pyauto_functional.Main() 362 pyauto_functional.Main()
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698