| OLD | NEW |
| 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 import json | 4 import json |
| 5 import logging | 5 import logging |
| 6 import os | 6 import os |
| 7 import unittest | 7 import unittest |
| 8 | 8 |
| 9 from telemetry.core import browser_finder | 9 from telemetry.core import browser_finder |
| 10 from telemetry.core import exceptions | 10 from telemetry.core import exceptions |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 self._load_extension = extension_to_load.ExtensionToLoad( | 40 self._load_extension = extension_to_load.ExtensionToLoad( |
| 41 path=extension_path, | 41 path=extension_path, |
| 42 browser_type=options.browser_type, | 42 browser_type=options.browser_type, |
| 43 is_component=True) | 43 is_component=True) |
| 44 options.extensions_to_load = [self._load_extension] | 44 options.extensions_to_load = [self._load_extension] |
| 45 | 45 |
| 46 browser_to_create = browser_finder.FindBrowser(options) | 46 browser_to_create = browser_finder.FindBrowser(options) |
| 47 self.assertTrue(browser_to_create) | 47 self.assertTrue(browser_to_create) |
| 48 options.browser_options.create_browser_with_oobe = True | 48 options.browser_options.create_browser_with_oobe = True |
| 49 options.browser_options.auto_login = auto_login | 49 options.browser_options.auto_login = auto_login |
| 50 b = browser_to_create.Create() | 50 b = browser_to_create.Create(options) |
| 51 b.Start() | 51 b.Start() |
| 52 return b | 52 return b |
| 53 | 53 |
| 54 def _GetAutotestExtension(self, browser): | 54 def _GetAutotestExtension(self, browser): |
| 55 """Returns the autotest extension instance""" | 55 """Returns the autotest extension instance""" |
| 56 extension = browser.extensions[self._load_extension] | 56 extension = browser.extensions[self._load_extension] |
| 57 self.assertTrue(extension) | 57 self.assertTrue(extension) |
| 58 return extension | 58 return extension |
| 59 | 59 |
| 60 def _GetLoginStatus(self, browser): | 60 def _GetLoginStatus(self, browser): |
| (...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 315 'countries.')), | 315 'countries.')), |
| 316 Region('se', 'xkb:se::swe', 'Europe/Stockholm', 'sv', _KML.ISO, 'Sweden', | 316 Region('se', 'xkb:se::swe', 'Europe/Stockholm', 'sv', _KML.ISO, 'Sweden', |
| 317 ("Use this if there separate SKUs for Nordic countries (Sweden, " | 317 ("Use this if there separate SKUs for Nordic countries (Sweden, " |
| 318 "Norway, and Denmark), or the device is only shipping to Sweden. " | 318 "Norway, and Denmark), or the device is only shipping to Sweden. " |
| 319 "If there is a single unified SKU, use 'nordic' instead.")), | 319 "If there is a single unified SKU, use 'nordic' instead.")), |
| 320 Region('sg', 'xkb:us::eng', 'Asia/Singapore', 'en-GB', _KML.ANSI, | 320 Region('sg', 'xkb:us::eng', 'Asia/Singapore', 'en-GB', _KML.ANSI, |
| 321 'Singapore'), | 321 'Singapore'), |
| 322 Region('us', 'xkb:us::eng', 'America/Los_Angeles', 'en-US', _KML.ANSI, | 322 Region('us', 'xkb:us::eng', 'America/Los_Angeles', 'en-US', _KML.ANSI, |
| 323 'United States'), | 323 'United States'), |
| 324 ] | 324 ] |
| OLD | NEW |