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
9 class MiscWebContentsBackend(inspector_backend_list.InspectorBackendList):
10 """A dynamic sequence of web contents not related to tabs and extensions.
12 Provides acccess to chrome://oobe/login page.
15 def __init__(self, browser_backend):
16 super(MiscWebContentsBackend, self).__init__(
17 browser_backend, backend_wrapper=oobe.Oobe)
20 def oobe_exists(self):
21 """Lightweight property to determine if the oobe webui is visible."""
23 return bool(len(self))
24 except (exceptions.BrowserGoneException,
25 exceptions.BrowserConnectionGoneException,
26 exceptions.TabCrashException):
34 def ShouldIncludeContext(self, context):
35 return context.get('url').startswith('chrome://oobe')