Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Side by Side Diff: tools/testing/run_selenium.py

Issue 10661039: added preliminary ShadowDOM tests (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 2
3 # Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 3 # Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
4 # for details. All rights reserved. Use of this source code is governed by a 4 # for details. All rights reserved. Use of this source code is governed by a
5 # BSD-style license that can be found in the LICENSE file. 5 # BSD-style license that can be found in the LICENSE file.
6 # 6 #
7 7
8 """Script to actually open a browser and perform the test, and reports back with 8 """Script to actually open a browser and perform the test, and reports back with
9 the result. It uses Selenium WebDriver when possible for running the tests. It 9 the result. It uses Selenium WebDriver when possible for running the tests. It
10 uses Selenium RC for Safari. 10 uses Selenium RC for Safari.
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 if browser == 'chrome': 137 if browser == 'chrome':
138 # Note: you need ChromeDriver *in your path* to run Chrome, in addition to 138 # Note: you need ChromeDriver *in your path* to run Chrome, in addition to
139 # installing Chrome. Also note that the build bot runs have a different path 139 # installing Chrome. Also note that the build bot runs have a different path
140 # from a normal user -- check the build logs. 140 # from a normal user -- check the build logs.
141 return selenium.webdriver.Chrome() 141 return selenium.webdriver.Chrome()
142 elif browser == 'dartium': 142 elif browser == 'dartium':
143 script_dir = os.path.dirname(os.path.abspath(__file__)) 143 script_dir = os.path.dirname(os.path.abspath(__file__))
144 dartium_dir = os.path.join(script_dir, '..', '..', 'client', 'tests', 144 dartium_dir = os.path.join(script_dir, '..', '..', 'client', 'tests',
145 'dartium') 145 'dartium')
146 options = selenium.webdriver.chrome.options.Options() 146 options = selenium.webdriver.chrome.options.Options()
147 # enable ShadowDOM and style scoped for Dartium
148 options.add_argument('--enable-shadow-dom')
149 options.add_argument('--enable-style-scoped')
147 if executable_path is not None: 150 if executable_path is not None:
148 options.binary_location = executable_path 151 options.binary_location = executable_path
149 elif platform.system() == 'Windows': 152 elif platform.system() == 'Windows':
150 options.binary_location = os.path.join(dartium_dir, 'chrome.exe') 153 options.binary_location = os.path.join(dartium_dir, 'chrome.exe')
151 elif platform.system() == 'Darwin': 154 elif platform.system() == 'Darwin':
152 options.binary_location = os.path.join(dartium_dir, 'Chromium.app', 155 options.binary_location = os.path.join(dartium_dir, 'Chromium.app',
153 'Contents', 'MacOS', 'Chromium') 156 'Contents', 'MacOS', 'Chromium')
154 else: 157 else:
155 options.binary_location = os.path.join(dartium_dir, 'chrome') 158 options.binary_location = os.path.join(dartium_dir, 'chrome')
156 return selenium.webdriver.Chrome(chrome_options=options) 159 return selenium.webdriver.Chrome(chrome_options=options)
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 browser = start_browser(browser_name, executable_path, html_out) 309 browser = start_browser(browser_name, executable_path, html_out)
307 310
308 try: 311 try:
309 output = run_test_in_browser(browser, html_out, timeout, mode) 312 output = run_test_in_browser(browser, html_out, timeout, mode)
310 return report_results(mode, output) 313 return report_results(mode, output)
311 finally: 314 finally:
312 close_browser(browser) 315 close_browser(browser)
313 316
314 if __name__ == "__main__": 317 if __name__ == "__main__":
315 sys.exit(main(sys.argv)) 318 sys.exit(main(sys.argv))
OLDNEW
« tests/html/shadow_dom_test.dart ('K') | « tests/html/shadow_dom_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698