OLD | NEW |
---|---|
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 Loading... | |
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 | 68 |
69 | 69 def testSavedPasswordInTabsAndWindows(self): |
70 """Verify saved username/password displays in Regular/Incognito Window | |
71 and NTP""" | |
72 username = 'test' | |
73 password = 'test12345' | |
74 password_dict = { | |
75 u'action_target': u'https://www.google.com/accounts/ServiceLoginAuth', | |
76 u'blacklist': False, | |
77 u'origin_url': u'https://www.google.com/accounts/ServiceLogin', | |
78 u'password_element': u'Passwd', | |
79 u'password_value': u'test12345', | |
80 u'signon_realm': u'https://www.google.com/', | |
81 u'submit_element': u'', | |
82 u'time': 1280939865.0, | |
83 u'username_element': u'Email', | |
84 u'username_value': u'test'} | |
85 url = 'https://www.google.com/accounts/ServiceLogin' | |
86 self.AddSavedPassword(password_dict) | |
87 self.NavigateToURL(url) | |
88 test_utils.VerifyGoogleAccountCredsFilled(self, username, password) | |
89 self.AppendTab(pyauto.GURL(url)) | |
90 test_utils.VerifyGoogleAccountCredsFilled(self, username, password) | |
Nirnimesh
2010/12/10 22:50:08
this and line 93 still just checks in first tab/fi
ismail
2010/12/11 02:03:36
Done.
| |
91 self.RunCommand(pyauto.IDC_NEW_INCOGNITO_WINDOW) | |
92 self.NavigateToURL(url, 1, 0) | |
93 test_utils.VerifyGoogleAccountCredsFilled(self, username, password) | |
94 test_utils.ClearPasswords(self) | |
95 | |
96 | |
70 if __name__ == '__main__': | 97 if __name__ == '__main__': |
71 pyauto_functional.Main() | 98 pyauto_functional.Main() |
OLD | NEW |