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

Unified Diff: tools/testing/dart/browser_controller.dart

Issue 25876002: test.py: Propagate the global --dartium option to the browser controller (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/testing/dart/test_runner.dart » ('j') | tools/testing/dart/test_runner.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « no previous file | tools/testing/dart/test_runner.dart » ('j') | tools/testing/dart/test_runner.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698