OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 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 logging | 6 import logging |
7 import os | 7 import os |
8 import time | 8 import time |
9 | 9 |
10 import pyauto_functional | 10 import pyauto_functional |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 msg=error_msg) | 135 msg=error_msg) |
136 | 136 |
137 | 137 |
138 class NetflixTest(pyauto.PyUITest, NetflixTestHelper): | 138 class NetflixTest(pyauto.PyUITest, NetflixTestHelper): |
139 """Test case for Netflix player.""" | 139 """Test case for Netflix player.""" |
140 | 140 |
141 def __init__(self, methodName='runTest', **kwargs): | 141 def __init__(self, methodName='runTest', **kwargs): |
142 pyauto.PyUITest.__init__(self, methodName, **kwargs) | 142 pyauto.PyUITest.__init__(self, methodName, **kwargs) |
143 NetflixTestHelper.__init__(self, self) | 143 NetflixTestHelper.__init__(self, self) |
144 | 144 |
| 145 def ShouldAutoLogin(self): |
| 146 return False |
| 147 |
145 def _Login(self): | 148 def _Login(self): |
146 """Perform login""" | 149 """Perform login""" |
147 credentials = self.GetPrivateInfo()['test_google_account'] | 150 credentials = self.GetPrivateInfo()['test_google_account'] |
148 self.Login(credentials['username'], credentials['password']) | 151 self.Login(credentials['username'], credentials['password']) |
149 logging.info('Logged in as %s' % credentials['username']) | 152 logging.info('Logged in as %s' % credentials['username']) |
150 login_info = self.GetLoginInfo() | 153 login_info = self.GetLoginInfo() |
151 self.assertTrue(login_info['is_logged_in'], msg='Login failed.') | 154 self.assertTrue(login_info['is_logged_in'], msg='Login failed.') |
152 self.assertFalse(login_info['is_guest'], | 155 self.assertFalse(login_info['is_guest'], |
153 msg='Should not be logged in as guest.') | 156 msg='Should not be logged in as guest.') |
154 | 157 |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 self.LoginAndStartPlaying() | 231 self.LoginAndStartPlaying() |
229 self.CheckNetflixPlaying( | 232 self.CheckNetflixPlaying( |
230 self.IS_GUEST_MODE_ERROR, | 233 self.IS_GUEST_MODE_ERROR, |
231 'Netflix player did not return a Guest mode error.') | 234 'Netflix player did not return a Guest mode error.') |
232 self.assertTrue('Guest Mode Unsupported' in self.GetTabContents(), | 235 self.assertTrue('Guest Mode Unsupported' in self.GetTabContents(), |
233 msg='Guest Mode error is not found on the page.') | 236 msg='Guest Mode error is not found on the page.') |
234 | 237 |
235 | 238 |
236 if __name__ == '__main__': | 239 if __name__ == '__main__': |
237 pyauto_functional.Main() | 240 pyauto_functional.Main() |
OLD | NEW |