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

Unified Diff: tools/testing/architecture.py

Issue 8566021: Made changes to the test architecture so that we can run frameworks other than (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/test.py ('k') | tools/testing/run_selenium.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/testing/architecture.py
===================================================================
--- tools/testing/architecture.py (revision 1522)
+++ tools/testing/architecture.py (working copy)
@@ -425,13 +425,14 @@
return 0
-class WebDriverArchiecture(FrogChromiumArchitecture):
+class WebDriverArchitecture(FrogChromiumArchitecture):
"""Architecture that runs compiled dart->JS (via frog) through a variety of
real browsers using WebDriver."""
- def __init__(self, root_path, arch, mode, component, test):
- super(WebDriverArchiecture, self).__init__(root_path, arch, mode,
+ def __init__(self, root_path, arch, mode, component, test, browser='chrome'):
+ super(WebDriverArchitecture, self).__init__(root_path, arch, mode,
component, test)
+ self.browser = browser
def GetRunCommand(self, fatal_static_type_errors=False):
"""Returns a command line to execute for the test."""
@@ -442,7 +443,7 @@
f = open(html_output_file, 'w')
f.write(self.GetHtmlContents())
f.close()
- return [selenium_location, html_output_file]
+ return [selenium_location, html_output_file, self.browser]
class StandaloneArchitecture(Architecture):
@@ -540,7 +541,7 @@
return subprocess.call(cmd)
-def GetArchitecture(arch, mode, component, test):
+def GetArchitecture(arch, mode, component, test, flags):
Siggi Cherem (dart-lang) 2011/11/15 02:16:18 One suggestion: we might be able to do this withou
root_path = os.path.abspath(os.path.join(os.path.dirname(sys.argv[0]), '..'))
if component == 'chromium':
return DartcChromiumArchitecture(root_path, arch, mode, component, test)
@@ -552,7 +553,13 @@
return FrogChromiumArchitecture(root_path, arch, mode, component, test)
elif component == 'webdriver':
- return WebDriverArchiecture(root_path, arch, mode, component, test)
+ browser_flag = 'chrome'
+ if 'ff' in flags or 'firefox' in flags:
+ browser_flag = 'ff'
+ elif 'ie' in flags or 'explorer' in flags or 'internet-explorer' in flags:
+ browser_flag = 'ie'
+ return WebDriverArchitecture(root_path, arch, mode, component, test,
+ browser=browser_flag)
elif component in ['vm', 'frog', 'frogsh']:
return StandaloneArchitecture(root_path, arch, mode, component, test)
« no previous file with comments | « tools/test.py ('k') | tools/testing/run_selenium.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698