Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / tools / telemetry / telemetry / core / backends / chrome / chrome_browser_options.py
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
5 from telemetry.core import browser_options
6 from telemetry.core import platform
7
8
9 def 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
19 class 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
28 class 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     # Disable default apps.
40     self.disable_default_apps = True
41
42     self.auto_login = True
43     self.gaia_login = False
44     self.username = 'test@test.test'
45     self.password = ''