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
3 # found in the LICENSE file.
5 from telemetry.core import exceptions
6 from telemetry.core.backends.chrome import inspector_backend_list
7 from telemetry.core.backends.chrome import oobe
10 class MiscWebContentsBackend(inspector_backend_list.InspectorBackendList):
11 """A dynamic sequence of web contents not related to tabs and extensions.
13 Provides acccess to chrome://oobe/login page.
16 def __init__(self, browser_backend):
17 super(MiscWebContentsBackend, self).__init__(
18 browser_backend, backend_wrapper=oobe.Oobe)
21 def oobe_exists(self):
22 """Lightweight property to determine if the oobe webui is visible."""
24 return bool(len(self))
25 except (exceptions.BrowserGoneException,
26 exceptions.BrowserConnectionGoneException,
27 exceptions.TabCrashException):
35 def ShouldIncludeContext(self, context):
36 return context.get('url').startswith('chrome://oobe')