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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 """Verify that we don't save passwords and delete saved passwords | 104 """Verify that we don't save passwords and delete saved passwords |
105 for a domain when 'never for this site' is chosen.""" | 105 for a domain when 'never for this site' is chosen.""" |
106 creds1 = self.GetPrivateInfo()['test_google_account'] | 106 creds1 = self.GetPrivateInfo()['test_google_account'] |
107 test_utils.GoogleAccountsLogin( | 107 test_utils.GoogleAccountsLogin( |
108 self, creds1['username'], creds1['password']) | 108 self, creds1['username'], creds1['password']) |
109 self.assertTrue(self.WaitForInfobarCount(1)) | 109 self.assertTrue(self.WaitForInfobarCount(1)) |
110 self.PerformActionOnInfobar('accept', infobar_index=0) | 110 self.PerformActionOnInfobar('accept', infobar_index=0) |
111 self.assertEquals(1, len(self.GetSavedPasswords())) | 111 self.assertEquals(1, len(self.GetSavedPasswords())) |
112 self.AppendTab(pyauto.GURL(creds1['logout_url'])) | 112 self.AppendTab(pyauto.GURL(creds1['logout_url'])) |
113 | 113 |
114 creds2 = self.GetPrivateInfo()['etouchqa_google_account'] | 114 creds2 = self.GetPrivateInfo()['test_google_account_2'] |
115 test_utils.GoogleAccountsLogin( | 115 test_utils.GoogleAccountsLogin( |
116 self, creds2['username'], creds2['password'], tab_index=1) | 116 self, creds2['username'], creds2['password'], tab_index=1) |
117 self.assertTrue(self.WaitForInfobarCount(1, tab_index=1)) | 117 self.assertTrue(self.WaitForInfobarCount(1, tab_index=1)) |
118 # Selecting 'Never for this site' option on password infobar. | 118 # Selecting 'Never for this site' option on password infobar. |
119 self.PerformActionOnInfobar('cancel', infobar_index=0, tab_index=1) | 119 self.PerformActionOnInfobar('cancel', infobar_index=0, tab_index=1) |
120 | 120 |
121 # TODO: GetSavedPasswords() doesn't return anything when empty. | 121 # TODO: GetSavedPasswords() doesn't return anything when empty. |
122 # http://crbug.com/64603 | 122 # http://crbug.com/64603 |
123 # self.assertFalse(self.GetSavedPasswords()) | 123 # self.assertFalse(self.GetSavedPasswords()) |
124 # TODO: Check the exceptions list | 124 # TODO: Check the exceptions list |
(...skipping 24 matching lines...) Expand all Loading... |
149 tab_index=1, windex=0) | 149 tab_index=1, windex=0) |
150 self.RunCommand(pyauto.IDC_NEW_INCOGNITO_WINDOW) | 150 self.RunCommand(pyauto.IDC_NEW_INCOGNITO_WINDOW) |
151 self.NavigateToURL(url, 1, 0) | 151 self.NavigateToURL(url, 1, 0) |
152 test_utils.VerifyGoogleAccountCredsFilled(self, username, password, | 152 test_utils.VerifyGoogleAccountCredsFilled(self, username, password, |
153 tab_index=0, windex=1) | 153 tab_index=0, windex=1) |
154 test_utils.ClearPasswords(self) | 154 test_utils.ClearPasswords(self) |
155 | 155 |
156 | 156 |
157 if __name__ == '__main__': | 157 if __name__ == '__main__': |
158 pyauto_functional.Main() | 158 pyauto_functional.Main() |
OLD | NEW |