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

Side by Side Diff: functional/passwords.py

Issue 5675001: Verify that previously saved username/password shows up in Regular Window, NT... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/chrome/test/
Patch Set: Created 10 years 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/python 1 #!/usr/bin/python
2 # Copyright (c) 2010 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2010 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 pyauto_functional # Must be imported before pyauto 6 import pyauto_functional # Must be imported before pyauto
7 import pyauto 7 import pyauto
8 import test_utils 8 import test_utils
9 9
10 10
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 'Did not get save password infobar') 58 'Did not get save password infobar')
59 infobar = self.GetBrowserInfo()['windows'][0]['tabs'][0]['infobars'] 59 infobar = self.GetBrowserInfo()['windows'][0]['tabs'][0]['infobars']
60 self.assertEqual(infobar[0]['type'], 'confirm_infobar') 60 self.assertEqual(infobar[0]['type'], 'confirm_infobar')
61 self.PerformActionOnInfobar('accept', infobar_index=0) 61 self.PerformActionOnInfobar('accept', infobar_index=0)
62 self.NavigateToURL(url_logout) 62 self.NavigateToURL(url_logout)
63 self.NavigateToURL(url_https) 63 self.NavigateToURL(url_https)
64 test_utils.VerifyGoogleAccountCredsFilled(self, username, password) 64 test_utils.VerifyGoogleAccountCredsFilled(self, username, password)
65 self.ExecuteJavascript('document.getElementById("gaia_loginform").submit();' 65 self.ExecuteJavascript('document.getElementById("gaia_loginform").submit();'
66 'window.domAutomationController.send("done")') 66 'window.domAutomationController.send("done")')
67 test_utils.ClearPasswords(self) 67 test_utils.ClearPasswords(self)
68
69 def testSavedPasswordInTabsAndWindows(self):
70 """Verify saved username/password displays in Regular/Incognito Window
71 and NTP"""
72 password = {
73 u'action_target': u'https://www.google.com/accounts/ServiceLoginAuth',
74 u'blacklist': False,
75 u'origin_url': u'https://www.google.com/accounts/ServiceLogin',
76 u'password_element': u'Passwd',
77 u'password_value': u'test12345',
78 u'signon_realm': u'https://www.google.com/',
79 u'submit_element': u'',
80 u'time': 1280939865.0,
81 u'username_element': u'Email',
82 u'username_value': u'test'}
83 url = 'https://www.google.com/accounts/ServiceLogin'
84 self.AddSavedPassword(password)
85 def testFormValues(win_index, tab_index):
Nirnimesh 2010/12/10 09:20:01 Do not prefix with 'test' How about: VerifyFormVal
ismail 2010/12/10 22:44:27 Done.
86 email = self.GetDOMValue('document.getElementById("Email").value',
87 win_index, tab_index)
Nirnimesh 2010/12/10 09:20:01 indent by 4 spaces
Nirnimesh 2010/12/10 09:20:01 pass named args for windex, tab_index
ismail 2010/12/10 22:44:27 On 2010/12/10 09:20:01, Nirnimesh wrote: > indent
ismail 2010/12/10 22:44:27 Done.
ismail 2010/12/10 22:44:27 Done.
88 passwd = self.GetDOMValue('document.getElementById("Passwd").value',
89 win_index, tab_index)
90 self.assertEqual(email, 'test')
91 self.assertEqual(passwd, 'test12345')
92 self.NavigateToURL(url)
93 testFormValues(win_index=0, tab_index=0)
94 self.AppendTab(pyauto.GURL(url))
95 testFormValues(win_index=0, tab_index=1)
96 self.RunCommand(pyauto.IDC_NEW_INCOGNITO_WINDOW)
97 self.NavigateToURL(url, 1, 0)
98 testFormValues(win_index=1, tab_index=0)
99 test_utils.ClearPasswords(self)
68 100
69 101
70 if __name__ == '__main__': 102 if __name__ == '__main__':
71 pyauto_functional.Main() 103 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