| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2011 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 import subprocess | 7 import subprocess |
| 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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 | 105 |
| 106 ChromeOS only allows GA+ accounts to login, there are also known as | 106 ChromeOS only allows GA+ accounts to login, there are also known as |
| 107 transitioned accounts. | 107 transitioned accounts. |
| 108 | 108 |
| 109 """ | 109 """ |
| 110 credentials = self._ValidCredentials(account_type='test_domain_account') | 110 credentials = self._ValidCredentials(account_type='test_domain_account') |
| 111 self.Login(credentials['username'], credentials['password']) | 111 self.Login(credentials['username'], credentials['password']) |
| 112 login_info = self.GetLoginInfo() | 112 login_info = self.GetLoginInfo() |
| 113 self.assertTrue(login_info['is_logged_in'], msg='Login failed.') | 113 self.assertTrue(login_info['is_logged_in'], msg='Login failed.') |
| 114 | 114 |
| 115 def testNoLoginForNonTransitionedDomainAccount(self): | |
| 116 """Test that login is successful with valid credentials for a domain.""" | |
| 117 credentials = \ | |
| 118 self._ValidCredentials(account_type='test_domain_account_non_transistion') | |
| 119 self.Login(credentials['username'], credentials['password']) | |
| 120 login_info = self.GetLoginInfo() | |
| 121 self.assertFalse(login_info['is_logged_in'], msg='Login succeeded for a ' | |
| 122 'non-transistioned account, this account should have not ' | |
| 123 'been able to login.') | |
| 124 | |
| 125 def testCachedCredentials(self): | 115 def testCachedCredentials(self): |
| 126 """Test that we can login without connectivity if we have so before.""" | 116 """Test that we can login without connectivity if we have so before.""" |
| 127 self.testGoodLogin() | 117 self.testGoodLogin() |
| 128 self.Logout() | 118 self.Logout() |
| 129 self.SetProxySettingsOnChromeOS('singlehttp', '10.10.10.10') | 119 self.SetProxySettingsOnChromeOS('singlehttp', '10.10.10.10') |
| 130 self.testGoodLogin() | 120 self.testGoodLogin() |
| 131 # Reset back to direct proxy | 121 # Reset back to direct proxy |
| 132 self.SetProxySettingsOnChromeOS('type', self.PROXY_TYPE_DIRECT) | 122 self.SetProxySettingsOnChromeOS('type', self.PROXY_TYPE_DIRECT) |
| 133 | 123 |
| 134 def testNavigateAfterLogin(self): | 124 def testNavigateAfterLogin(self): |
| (...skipping 19 matching lines...) Expand all Loading... |
| 154 self.testGoodLogin() | 144 self.testGoodLogin() |
| 155 self.Logout() | 145 self.Logout() |
| 156 self.testBadPassword() | 146 self.testBadPassword() |
| 157 self.testLoginAsGuest() | 147 self.testLoginAsGuest() |
| 158 self.Logout() | 148 self.Logout() |
| 159 self.testLoginToCreateNewAccount() | 149 self.testLoginToCreateNewAccount() |
| 160 | 150 |
| 161 | 151 |
| 162 if __name__ == '__main__': | 152 if __name__ == '__main__': |
| 163 pyauto_functional.Main() | 153 pyauto_functional.Main() |
| OLD | NEW |