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

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
Index: tools/testing/architecture.py
===================================================================
--- tools/testing/architecture.py (revision 1463)
+++ tools/testing/architecture.py (working copy)
@@ -423,12 +423,12 @@
return 0
-class WebDriverArchiecture(ChromiumArchitecture):
- """Architecture that runs compiled dart->JS (via frog) through a variety of
- real browsers using WebDriver."""
+class WebDriverArchitecture(ChromiumArchitecture):
+ """Architecture that runs compiled dart->JS (via frog) through a
+ real browser (by default, Chrome) using WebDriver."""
def __init__(self, root_path, arch, mode, component, test):
- super(WebDriverArchiecture, self).__init__(root_path, arch, mode,
+ super(WebDriverArchitecture, self).__init__(root_path, arch, mode,
component, test)
def GetCompileCommand(self, fatal_static_type_errors=False):
@@ -443,7 +443,7 @@
cmd.append(self.GetTestScriptFile())
return cmd
- def GetRunCommand(self, fatal_static_type_errors=False):
+ def GetRunCommand(self, browser='chrome', fatal_static_type_errors=False):
Siggi Cherem (dart-lang) 2011/11/14 23:56:06 this will possibly be not compatible with calls th
"""Returns a command line to execute for the test."""
selenium_location = os.path.join(self.root_path, 'tools', 'testing',
'run_selenium.py')
@@ -452,9 +452,23 @@
f = open(html_output_file, 'w')
f.write(self.GetHtmlContents())
f.close()
- return [selenium_location, html_output_file]
+ return [selenium_location, html_output_file, browser]
+class FirefoxDriverArchitecture(WebDriverArchitecture):
Siggi Cherem (dart-lang) 2011/11/14 23:56:06 if you end up adding the parameter to the construc
+ def GetRunCommand(self, fatal_static_type_errors=False):
+ """Returns a command line to execute for the test."""
+ return super(FirefoxDriverArchitecture, self).GetRunCommand(browser='ff',
+ fatal_static_type_errors = fatal_static_type_errors)
+
+class IEDriverArchitecture(WebDriverArchitecture):
+
+ def GetRunCommand(self, fatal_static_type_errors=False):
+ """Returns a command line to execute for the test."""
+ return super(IEDriverArchitecture, self).GetRunCommand(browser='ie',
+ fatal_static_type_errors = fatal_static_type_errors)
+
+
class StandaloneArchitecture(Architecture):
"""Base class for architectures that run tests without a browser."""
@@ -561,9 +575,15 @@
elif component == 'frogium':
return FrogChromiumArchitecture(root_path, arch, mode, component, test)
- elif component == 'webdriver':
- return WebDriverArchiecture(root_path, arch, mode, component, test)
+ elif component == 'webdriver' or component == 'webdriverchrome':
+ return WebDriverArchitecture(root_path, arch, mode, component, test)
+ elif component == 'webdriverff':
Siggi Cherem (dart-lang) 2011/11/14 23:56:06 it might be nice to use - or _ on these names, as
+ return FirefoxDriverArchitecture(root_path, arch, mode, component, test)
+
+ elif component == 'webdriverie':
+ return IEDriverArchitecture(root_path, arch, mode, component, test)
+
elif component in ['vm', 'frog', 'frogsh']:
return StandaloneArchitecture(root_path, arch, mode, component, test)

Powered by Google App Engine
This is Rietveld 408576698