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 import platform
9 def CreateChromeBrowserOptions(br_options):
10 browser_type = br_options.browser_type
12 if (platform.GetHostPlatform().GetOSName() == 'chromeos' or
13 (browser_type and browser_type.startswith('cros'))):
14 return CrosBrowserOptions(br_options)
19 class ChromeBrowserOptions(browser_options.BrowserOptions):
20 """Chrome-specific browser options."""
22 def __init__(self, br_options):
23 super(ChromeBrowserOptions, self).__init__()
25 self.__dict__.update(br_options.__dict__)
28 class CrosBrowserOptions(ChromeBrowserOptions):
29 """ChromeOS-specific browser options."""
31 def __init__(self, br_options):
32 super(CrosBrowserOptions, self).__init__(br_options)
33 # Create a browser with oobe property.
34 self.create_browser_with_oobe = False
35 # Clear enterprise policy before logging in.
36 self.clear_enterprise_policy = True
37 # Disable GAIA/enterprise services.
38 self.disable_gaia_services = True
39 # Disable default apps.
40 self.disable_default_apps = True
42 self.auto_login = True
43 self.gaia_login = False
44 self.username = 'test@test.test'