Chromium Code Reviews| Index: functional/passwords.py |
| =================================================================== |
| --- functional/passwords.py (revision 68696) |
| +++ functional/passwords.py (working copy) |
| @@ -65,6 +65,38 @@ |
| self.ExecuteJavascript('document.getElementById("gaia_loginform").submit();' |
| 'window.domAutomationController.send("done")') |
| test_utils.ClearPasswords(self) |
| + |
| + def testSavedPasswordInTabsAndWindows(self): |
| + """Verify saved username/password displays in Regular/Incognito Window |
| + and NTP""" |
| + password = { |
| + u'action_target': u'https://www.google.com/accounts/ServiceLoginAuth', |
| + u'blacklist': False, |
| + u'origin_url': u'https://www.google.com/accounts/ServiceLogin', |
| + u'password_element': u'Passwd', |
| + u'password_value': u'test12345', |
| + u'signon_realm': u'https://www.google.com/', |
| + u'submit_element': u'', |
| + u'time': 1280939865.0, |
| + u'username_element': u'Email', |
| + u'username_value': u'test'} |
| + url = 'https://www.google.com/accounts/ServiceLogin' |
| + self.AddSavedPassword(password) |
| + 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.
|
| + email = self.GetDOMValue('document.getElementById("Email").value', |
| + 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.
|
| + passwd = self.GetDOMValue('document.getElementById("Passwd").value', |
| + win_index, tab_index) |
| + self.assertEqual(email, 'test') |
| + self.assertEqual(passwd, 'test12345') |
| + self.NavigateToURL(url) |
| + testFormValues(win_index=0, tab_index=0) |
| + self.AppendTab(pyauto.GURL(url)) |
| + testFormValues(win_index=0, tab_index=1) |
| + self.RunCommand(pyauto.IDC_NEW_INCOGNITO_WINDOW) |
| + self.NavigateToURL(url, 1, 0) |
| + testFormValues(win_index=1, tab_index=0) |
| + test_utils.ClearPasswords(self) |
| if __name__ == '__main__': |