summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorachuith@chromium.org <achuith@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-01-23 02:21:12 +0000
committerachuith@chromium.org <achuith@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-01-23 02:21:12 +0000
commitaaaad43478ab017193e73d46c1c5a0400f78bf4f (patch)
treeac70c00cd985de3694eb81aa0e26b4f9ba1a4f29
parent88d1adee5c8df1bda37f9bf212368ff2535f05ab (diff)
downloadchromium_src-aaaad43478ab017193e73d46c1c5a0400f78bf4f.zip
chromium_src-aaaad43478ab017193e73d46c1c5a0400f78bf4f.tar.gz
chromium_src-aaaad43478ab017193e73d46c1c5a0400f78bf4f.tar.bz2
Export oobe_exists to cros_browser_with_oobe.
Rename OobeExists/_OobeExists to property oobe_exists. BUG=336888 TEST=manual NOTRY=True Review URL: https://codereview.chromium.org/144183008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@246489 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--tools/telemetry/telemetry/core/backends/chrome/cros_browser_backend.py13
-rw-r--r--tools/telemetry/telemetry/core/backends/chrome/cros_browser_with_oobe.py7
-rw-r--r--tools/telemetry/telemetry/core/backends/chrome/misc_web_contents_backend.py4
3 files changed, 17 insertions, 7 deletions
diff --git a/tools/telemetry/telemetry/core/backends/chrome/cros_browser_backend.py b/tools/telemetry/telemetry/core/backends/chrome/cros_browser_backend.py
index 1bb2454..843ce6c 100644
--- a/tools/telemetry/telemetry/core/backends/chrome/cros_browser_backend.py
+++ b/tools/telemetry/telemetry/core/backends/chrome/cros_browser_backend.py
@@ -235,7 +235,7 @@ class CrOSBrowserBackend(chrome_browser_backend.ChromeBrowserBackend):
'Hardware id not set on device/VM. --skip-hwid-check not supported '
'with chrome branches 1500 or earlier.')
- util.WaitFor(self._OobeExists, 10)
+ util.WaitFor(lambda: self.oobe_exists, 10)
if self.browser_options.auto_login:
if self._is_guest:
@@ -295,8 +295,9 @@ class CrOSBrowserBackend(chrome_browser_backend.ChromeBrowserBackend):
def oobe(self):
return self.misc_web_contents_backend.GetOobe()
- def _OobeExists(self):
- return self.misc_web_contents_backend.OobeExists()
+ @property
+ def oobe_exists(self):
+ return self.misc_web_contents_backend.oobe_exists
def _SigninUIState(self):
"""Returns the signin ui state of the oobe. HIDDEN: 0, GAIA_SIGNIN: 1,
@@ -343,7 +344,7 @@ class CrOSBrowserBackend(chrome_browser_backend.ChromeBrowserBackend):
has been dismissed."""
if self.chrome_branch_number <= 1547:
self._HandleUserImageSelectionScreen()
- return self._IsCryptohomeMounted() and not self._OobeExists()
+ return self._IsCryptohomeMounted() and not self.oobe_exists
def _StartupWindow(self):
"""Closes the startup window, which is an extension on official builds,
@@ -388,7 +389,7 @@ class CrOSBrowserBackend(chrome_browser_backend.ChromeBrowserBackend):
def _NavigateGuestLogin(self):
"""Navigates through oobe login screen as guest"""
- assert self._OobeExists()
+ assert self.oobe_exists
self._WaitForSigninScreen()
self._ClickBrowseAsGuest()
self._WaitForGuestFsMounted()
@@ -397,7 +398,7 @@ class CrOSBrowserBackend(chrome_browser_backend.ChromeBrowserBackend):
"""Navigates through oobe login screen"""
if self._use_oobe_login_for_testing:
logging.info('Invoking Oobe.loginForTesting')
- assert self._OobeExists()
+ assert self.oobe_exists
oobe = self.oobe
util.WaitFor(lambda: oobe.EvaluateJavaScript(
'typeof Oobe !== \'undefined\''), 10)
diff --git a/tools/telemetry/telemetry/core/backends/chrome/cros_browser_with_oobe.py b/tools/telemetry/telemetry/core/backends/chrome/cros_browser_with_oobe.py
index 445e6c3b..430ac3f 100644
--- a/tools/telemetry/telemetry/core/backends/chrome/cros_browser_with_oobe.py
+++ b/tools/telemetry/telemetry/core/backends/chrome/cros_browser_with_oobe.py
@@ -17,3 +17,10 @@ class CrOSBrowserWithOOBE(browser.Browser):
out-of-box-experience).
"""
return self._browser_backend.oobe
+
+ @property
+ def oobe_exists(self):
+ """True if the login/oobe/screenlock webui exists. This is more lightweight
+ than accessing the oobe property.
+ """
+ return self._browser_backend.oobe_exists
diff --git a/tools/telemetry/telemetry/core/backends/chrome/misc_web_contents_backend.py b/tools/telemetry/telemetry/core/backends/chrome/misc_web_contents_backend.py
index b0f7b58..933010e 100644
--- a/tools/telemetry/telemetry/core/backends/chrome/misc_web_contents_backend.py
+++ b/tools/telemetry/telemetry/core/backends/chrome/misc_web_contents_backend.py
@@ -13,7 +13,9 @@ class MiscWebContentsBackend(object):
def __init__(self, browser_backend):
self._browser_backend = browser_backend
- def OobeExists(self):
+ @property
+ def oobe_exists(self):
+ """Lightweight property to determine if the oobe webui is visible."""
return bool(self._FindWebContentsInfo())
def GetOobe(self):