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 browser_options
6 from telemetry.core.backends.chrome import cros_interface
9 def CreateChromeBrowserOptions(br_options):
10 browser_type = br_options.browser_type
16 if (cros_interface.IsRunningOnCrosDevice() or
17 browser_type.startswith('cros')):
18 return CrosBrowserOptions(br_options)
23 class ChromeBrowserOptions(browser_options.BrowserOptions):
24 """Chrome-specific browser options."""
26 def __init__(self, br_options):
27 super(ChromeBrowserOptions, self).__init__()
29 self.__dict__.update(br_options.__dict__)
32 class CrosBrowserOptions(ChromeBrowserOptions):
33 """ChromeOS-specific browser options."""
35 def __init__(self, br_options):
36 super(CrosBrowserOptions, self).__init__(br_options)
37 # Create a browser with oobe property.
38 self.create_browser_with_oobe = False
39 self.auto_login = True