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

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

Issue 38753008: test.py: Support for running tests in checked mode on none-dartium with the browser controller (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
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 | « dart/tests/standalone/standalone.status ('k') | dart/tools/testing/dart/test_options.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/tools/testing/dart/browser_controller.dart
diff --git a/dart/tools/testing/dart/browser_controller.dart b/dart/tools/testing/dart/browser_controller.dart
index 4c1043f1b32f030e0ac5349dd5aa7a39131cec3e..fd7acc26391be2064208408c817f007c33ed74c1 100644
--- a/dart/tools/testing/dart/browser_controller.dart
+++ b/dart/tools/testing/dart/browser_controller.dart
@@ -54,13 +54,15 @@ abstract class Browser {
Browser();
- factory Browser.byName(String name, [Map globalConfiguration = const {}]) {
+ factory Browser.byName(String name,
+ [Map globalConfiguration = const {},
+ bool checkedMode = false]) {
if (name == 'ff' || name == 'firefox') {
return new Firefox();
} else if (name == 'chrome') {
return new Chrome();
} else if (name == 'dartium') {
- return new Dartium(globalConfiguration);
+ return new Dartium(globalConfiguration, checkedMode);
} else if (name == 'safari') {
return new Safari();
} else if (name.startsWith('ie')) {
@@ -410,8 +412,9 @@ class Chrome extends Browser {
class Dartium extends Chrome {
final Map globalConfiguration;
+ final bool checkedMode;
- Dartium(this.globalConfiguration);
+ Dartium(this.globalConfiguration, this.checkedMode);
String _getBinary() {
return Locations.getDartiumLocation(globalConfiguration);
@@ -423,6 +426,9 @@ class Dartium extends Chrome {
// calls in dart to the top-level javascript function "dartPrint()" if
// available.
environment['DART_FORWARDING_PRINT'] = '1';
+ if (checkedMode) {
+ environment['DART_FLAGS'] = '--checked';
+ }
return environment;
}
@@ -657,6 +663,7 @@ class BrowserTestOutput {
*/
class BrowserTestRunner {
final Map globalConfiguration;
+ final bool checkedMode; // needed for dartium
String localIp;
String browserName;
@@ -683,7 +690,8 @@ class BrowserTestRunner {
BrowserTestRunner(this.globalConfiguration,
this.localIp,
this.browserName,
- this.maxNumBrowsers);
+ this.maxNumBrowsers,
+ {bool this.checkedMode: false});
Future<bool> start() {
// If [browserName] doesn't support opening new windows, we use new iframes
@@ -947,7 +955,8 @@ class BrowserTestRunner {
}
Browser getInstance() {
- var browser = new Browser.byName(browserName, globalConfiguration);
+ var browser =
+ new Browser.byName(browserName, globalConfiguration, checkedMode);
browser.logger = logger;
return browser;
}
« no previous file with comments | « dart/tests/standalone/standalone.status ('k') | dart/tools/testing/dart/test_options.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698