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. 4 5from telemetry.core import browser_options 6from telemetry.core import platform 7 8 9def CreateChromeBrowserOptions(br_options): 10 browser_type = br_options.browser_type 11 12 if (platform.GetHostPlatform().GetOSName() == 'chromeos' or 13 (browser_type and browser_type.startswith('cros'))): 14 return CrosBrowserOptions(br_options) 15 16 return br_options 17 18 19class ChromeBrowserOptions(browser_options.BrowserOptions): 20 """Chrome-specific browser options.""" 21 22 def __init__(self, br_options): 23 super(ChromeBrowserOptions, self).__init__() 24 # Copy to self. 25 self.__dict__.update(br_options.__dict__) 26 27 28class CrosBrowserOptions(ChromeBrowserOptions): 29 """ChromeOS-specific browser options.""" 30 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 40 self.auto_login = True 41 self.gaia_login = False 42 self.username = 'test@test.test' 43 self.password = '' 44