Chromium Code Reviews| 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 re | 8 import re |
| 9 | 9 |
| 10 import pyauto_functional # Must be imported before pyauto | 10 import pyauto_functional # Must be imported before pyauto |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 201 """Log into Google account. | 201 """Log into Google account. |
| 202 | 202 |
| 203 Args: | 203 Args: |
| 204 tab_index: The tab index, default is 0. | 204 tab_index: The tab index, default is 0. |
| 205 windex: The window index, default is 0. | 205 windex: The window index, default is 0. |
| 206 """ | 206 """ |
| 207 creds = self.GetPrivateInfo()['test_google_account'] | 207 creds = self.GetPrivateInfo()['test_google_account'] |
| 208 username = creds['username'] | 208 username = creds['username'] |
| 209 password = creds['password'] | 209 password = creds['password'] |
| 210 test_utils.GoogleAccountsLogin(self, username, password, tab_index, windex) | 210 test_utils.GoogleAccountsLogin(self, username, password, tab_index, windex) |
| 211 self.WaitUntilNavigationCompletes(tab_index=tab_index, windex=windex) | 211 # TODO(dyu): Use WaitUntilNavigationCompletes after investigating |
| 212 # crbug.com/124877 | |
| 213 #self.WaitUntilNavigationCompletes(tab_index=tab_index, windex=windex) | |
|
Nirnimesh
2012/04/24 20:13:09
remove commented out code. the TODO is fine.
| |
| 214 self.WaitUntil( | |
| 215 lambda: self.GetDOMValue('document.readyState'), | |
| 216 expect_retval='complete') | |
| 212 | 217 |
| 213 def _PerformActionOnInfobar(self, action): | 218 def _PerformActionOnInfobar(self, action): |
| 214 """Perform an action on the infobar: accept, cancel, or dismiss. | 219 """Perform an action on the infobar: accept, cancel, or dismiss. |
| 215 | 220 |
| 216 The one-click sign in infobar must show in the first tab of the first | 221 The one-click sign in infobar must show in the first tab of the first |
| 217 window. If action is 'accept' then the account is synced. If the action is | 222 window. If action is 'accept' then the account is synced. If the action is |
| 218 'cancel' then the infobar should be dismissed and never shown again. The | 223 'cancel' then the infobar should be dismissed and never shown again. The |
| 219 account will not be synced. If the action is 'dismiss' then the infobar will | 224 account will not be synced. If the action is 'dismiss' then the infobar will |
| 220 shown again after the next login. | 225 shown again after the next login. |
| 221 | 226 |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 353 def testNoOneClickInfobarInIncognito(self): | 358 def testNoOneClickInfobarInIncognito(self): |
| 354 """Verify that one-click infobar does not show up in incognito mode.""" | 359 """Verify that one-click infobar does not show up in incognito mode.""" |
| 355 self.RunCommand(pyauto.IDC_NEW_INCOGNITO_WINDOW) | 360 self.RunCommand(pyauto.IDC_NEW_INCOGNITO_WINDOW) |
| 356 self._LogIntoGoogleAccount(windex=1) | 361 self._LogIntoGoogleAccount(windex=1) |
| 357 test_utils.AssertInfobarTypeDoesNotAppear( | 362 test_utils.AssertInfobarTypeDoesNotAppear( |
| 358 self, self.OC_INFOBAR_TYPE, windex=1) | 363 self, self.OC_INFOBAR_TYPE, windex=1) |
| 359 | 364 |
| 360 | 365 |
| 361 if __name__ == '__main__': | 366 if __name__ == '__main__': |
| 362 pyauto_functional.Main() | 367 pyauto_functional.Main() |
| OLD | NEW |