OLD | NEW |
---|---|
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 from telemetry.core import exceptions | 5 from telemetry.core import exceptions |
6 from telemetry.core import util | 6 from telemetry.core import util |
7 | 7 |
8 def _SigninUIState(oobe): | 8 def _SigninUIState(oobe): |
9 """Returns the signin ui state of the oobe. HIDDEN: 0, GAIA_SIGNIN: 1, | 9 """Returns the signin ui state of the oobe. HIDDEN: 0, GAIA_SIGNIN: 1, |
10 ACCOUNT_PICKER: 2, WRONG_HWID_WARNING: 3, MANAGED_USER_CREATION_FLOW: 4. | 10 ACCOUNT_PICKER: 2, WRONG_HWID_WARNING: 3, MANAGED_USER_CREATION_FLOW: 4. |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
69 """Navigates through oobe login screen as guest""" | 69 """Navigates through oobe login screen as guest""" |
70 oobe = browser_backend.misc_web_contents_backend.GetOobe() | 70 oobe = browser_backend.misc_web_contents_backend.GetOobe() |
71 assert oobe | 71 assert oobe |
72 WaitForAccountPicker(oobe) | 72 WaitForAccountPicker(oobe) |
73 _ClickBrowseAsGuest(oobe) | 73 _ClickBrowseAsGuest(oobe) |
74 WaitForGuestFsMounted(cri) | 74 WaitForGuestFsMounted(cri) |
75 | 75 |
76 def NavigateLogin(browser_backend): | 76 def NavigateLogin(browser_backend): |
77 """Navigates through oobe login screen""" | 77 """Navigates through oobe login screen""" |
78 # Dismiss the user image selection screen. | 78 # Dismiss the user image selection screen. |
79 util.WaitFor(lambda: _WebContentsNotOobe(browser_backend), 15) | 79 try: |
80 util.WaitFor(lambda: _WebContentsNotOobe(browser_backend), 15) | |
81 except util.TimeoutException: | |
82 raise exceptions.LoginException( | |
83 'Timed out going through oobe screen. Make sure the custom auth ' | |
84 'extension passed through --auth-ext-path is valid and has belongs ' | |
achuithb
2013/05/23 22:36:55
remove 'has'
Tim Song
2013/05/23 23:02:33
Done.
| |
85 'to user "chronos".') | |
80 | 86 |
81 # Wait for the startup window, then close it. | 87 # Wait for the startup window, then close it. |
82 util.WaitFor(lambda: _StartupWindow(browser_backend) is not None, 20) | 88 util.WaitFor(lambda: _StartupWindow(browser_backend) is not None, 20) |
83 _StartupWindow(browser_backend).Close() | 89 _StartupWindow(browser_backend).Close() |
OLD | NEW |