Chromium Code Reviews| Index: tools/testing/dart/browser_controller.dart |
| diff --git a/tools/testing/dart/browser_controller.dart b/tools/testing/dart/browser_controller.dart |
| index b8727ea4342ac7a9004293d1ea5154c31fe3ec80..c70a6b74e5dc642c217468a04c9d8e9bf2185642 100644 |
| --- a/tools/testing/dart/browser_controller.dart |
| +++ b/tools/testing/dart/browser_controller.dart |
| @@ -48,13 +48,13 @@ abstract class Browser { |
| Browser(); |
| - factory Browser.byName(String name) { |
| + factory Browser.byName(String name, [Map globalConfiguration = const {}]) { |
| if (name == 'ff' || name == 'firefox') { |
| return new Firefox(); |
| } else if (name == 'chrome') { |
| return new Chrome(); |
| } else if (name == 'dartium') { |
| - return new Dartium(); |
| + return new Dartium(globalConfiguration); |
| } else if (name == 'safari') { |
| return new Safari(); |
| } else if (name.startsWith('ie')) { |
| @@ -393,12 +393,12 @@ class Chrome extends Browser { |
| } |
| class Dartium extends Chrome { |
| + final Map globalConfiguration; |
| + |
| + Dartium(this.globalConfiguration); |
| + |
| String _getBinary() { |
| - if (Platform.operatingSystem == 'macos') { |
| - return new Path('client/tests/dartium/Chromium.app/Contents/' |
| - 'MacOS/Chromium').toNativePath(); |
| - } |
| - return new Path('client/tests/dartium/chrome').toNativePath(); |
| + return Locations.getDartiumLocation(globalConfiguration); |
| } |
| Map<String, String> _getEnvironment() { |
| @@ -628,6 +628,8 @@ class BrowserTest { |
| * whenever a test completes. |
| */ |
| class BrowserTestRunner { |
| + final Map globalConfiguration; |
| + |
| String local_ip; |
|
kasperl
2013/10/03 14:14:18
Would it be super painful to change this to localI
kustermann
2013/10/03 14:48:22
Maybe. I'll try to suppress the pain.
|
| String browserName; |
| int maxNumBrowsers; |
| @@ -650,7 +652,10 @@ class BrowserTestRunner { |
| BrowserTestingServer testingServer; |
| - BrowserTestRunner(this.local_ip, this.browserName, this.maxNumBrowsers); |
| + BrowserTestRunner(this.globalConfiguration, |
| + this.local_ip, |
| + this.browserName, |
| + this.maxNumBrowsers); |
| Future<bool> start() { |
| // If [browserName] doesn't support opening new windows, we use new iframes |
| @@ -893,7 +898,7 @@ class BrowserTestRunner { |
| } |
| Browser getInstance() { |
| - var browser = new Browser.byName(browserName); |
| + var browser = new Browser.byName(browserName, globalConfiguration); |
| browser.logger = logger; |
| return browser; |
| } |