Chromium Code Reviews| Index: tools/testing/run_selenium.py |
| diff --git a/tools/testing/run_selenium.py b/tools/testing/run_selenium.py |
| index 8cb0a2f9c7608b4008fed123f4c3e34cc2512c40..9f33a6a2f37545fb7bd603e6fe5c859c7728f360 100755 |
| --- a/tools/testing/run_selenium.py |
| +++ b/tools/testing/run_selenium.py |
| @@ -150,28 +150,29 @@ def print_server_error(): |
| sys.exit(1) |
| def start_browser(browser, executable_path, html_out): |
| - if browser == 'chrome': |
| + if browser == 'chrome' or browser == 'dartium': |
| # Note: you need ChromeDriver *in your path* to run Chrome, in addition to |
| # installing Chrome. Also note that the build bot runs have a different path |
| # from a normal user -- check the build logs. |
| - return selenium.webdriver.Chrome() |
| - elif browser == 'dartium': |
| - script_dir = os.path.dirname(os.path.abspath(__file__)) |
| - dartium_dir = os.path.join(script_dir, '..', '..', 'client', 'tests', |
| - 'dartium') |
| options = selenium.webdriver.chrome.options.Options() |
| - # enable ShadowDOM and style scoped for Dartium |
| - options.add_argument('--enable-shadow-dom') |
| - options.add_argument('--enable-style-scoped') |
| - if executable_path is not None: |
| - options.binary_location = executable_path |
| - elif platform.system() == 'Windows': |
| - options.binary_location = os.path.join(dartium_dir, 'chrome.exe') |
| - elif platform.system() == 'Darwin': |
| - options.binary_location = os.path.join(dartium_dir, 'Chromium.app', |
| - 'Contents', 'MacOS', 'Chromium') |
| - else: |
| - options.binary_location = os.path.join(dartium_dir, 'chrome') |
| + options.add_argument('--allow-file-access-from-files') |
| + if browser == 'dartium': |
| + script_dir = os.path.dirname(os.path.abspath(__file__)) |
| + dartium_dir = os.path.join(script_dir, '..', '..', 'client', 'tests', |
| + 'dartium') |
| + options = selenium.webdriver.chrome.options.Options() |
| + # enable ShadowDOM and style scoped for Dartium |
| + options.add_argument('--enable-shadow-dom') |
| + options.add_argument('--enable-style-scoped') |
| + options.add_argument('--allow-file-access-from-files') |
| + if executable_path is not None: |
| + options.binary_location = executable_path |
| + elif platform.system() == 'Windows': |
| + options.binary_location = os.path.join(dartium_dir, 'chrome.exe') |
| + elif platform.system() == 'Darwin': |
| + options.binary_location = os.path.join(dartium_dir, 'Chromium.app', |
| + 'Contents', 'MacOS', 'Chromium') |
| + else: options.binary_location = os.path.join(dartium_dir, 'chrome') |
|
Bill Hesse
2012/12/21 00:22:17
DBC: Do we really allow this formatting of else:
Emily Fortuna
2012/12/21 00:33:08
oh man -- no. not sure how that got in there to be
|
| return selenium.webdriver.Chrome(chrome_options=options) |
| elif browser == 'ff': |
| script_dir = os.path.dirname(os.path.abspath(__file__)) |