| OLD | NEW |
| 1 # Copyright 2013 The Chromium Authors. All rights reserved. | 1 # Copyright 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 import logging | 5 import logging |
| 6 import os | 6 import os |
| 7 | 7 |
| 8 from telemetry import decorators | 8 from telemetry import decorators |
| 9 | 9 |
| 10 from telemetry.core import exceptions | 10 from telemetry.core import exceptions |
| (...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 373 if (guest) { | 373 if (guest) { |
| 374 guest.click(); | 374 guest.click(); |
| 375 } | 375 } |
| 376 """) | 376 """) |
| 377 except (exceptions.TabCrashException, | 377 except (exceptions.TabCrashException, |
| 378 exceptions.BrowserConnectionGoneException): | 378 exceptions.BrowserConnectionGoneException): |
| 379 pass | 379 pass |
| 380 | 380 |
| 381 def _WaitForGuestFsMounted(self): | 381 def _WaitForGuestFsMounted(self): |
| 382 """Waits for the guest user to be mounted as guestfs""" | 382 """Waits for the guest user to be mounted as guestfs""" |
| 383 guest_path = self._CryptohomePath('$guest') | 383 guest_path = self._cri.CryptohomePath('$guest') |
| 384 util.WaitFor(lambda: (self._cri.FilesystemMountedAt(guest_path) == | 384 util.WaitFor(lambda: (self._cri.FilesystemMountedAt(guest_path) == |
| 385 'guestfs'), 20) | 385 'guestfs'), 20) |
| 386 | 386 |
| 387 def _NavigateGuestLogin(self): | 387 def _NavigateGuestLogin(self): |
| 388 """Navigates through oobe login screen as guest""" | 388 """Navigates through oobe login screen as guest""" |
| 389 if not self.oobe_exists: | 389 if not self.oobe_exists: |
| 390 raise exceptions.LoginException('Oobe missing') | 390 raise exceptions.LoginException('Oobe missing') |
| 391 self._WaitForSigninScreen() | 391 self._WaitForSigninScreen() |
| 392 self._ClickBrowseAsGuest() | 392 self._ClickBrowseAsGuest() |
| 393 self._WaitForGuestFsMounted() | 393 self._WaitForGuestFsMounted() |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 437 tab = self.tab_list_backend.New(timeout=30) | 437 tab = self.tab_list_backend.New(timeout=30) |
| 438 tab.Navigate('about:blank', timeout=10) | 438 tab.Navigate('about:blank', timeout=10) |
| 439 except (exceptions.TabCrashException, util.TimeoutException, | 439 except (exceptions.TabCrashException, util.TimeoutException, |
| 440 IndexError): | 440 IndexError): |
| 441 retries -= 1 | 441 retries -= 1 |
| 442 logging.warn('TabCrashException/TimeoutException in ' | 442 logging.warn('TabCrashException/TimeoutException in ' |
| 443 'new tab creation/navigation, ' | 443 'new tab creation/navigation, ' |
| 444 'remaining retries %d' % retries) | 444 'remaining retries %d' % retries) |
| 445 if not retries: | 445 if not retries: |
| 446 raise | 446 raise |
| OLD | NEW |