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) |