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

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

Issue 187843002: Dart2js testing: Add prefix files when running dart2js output on d8 or jsshell. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 10 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
Index: tools/testing/dart/runtime_configuration.dart
diff --git a/tools/testing/dart/runtime_configuration.dart b/tools/testing/dart/runtime_configuration.dart
index fd30dd9931b165908781672498d332ab5ec5a407..6e36589030848a1e42cf07b2ccf7cf8bde760acf 100644
--- a/tools/testing/dart/runtime_configuration.dart
+++ b/tools/testing/dart/runtime_configuration.dart
@@ -16,6 +16,9 @@ import 'test_runner.dart' show
Command,
CommandBuilder;
+import 'utils.dart' show
+ Path;
+
// TODO(ahe): I expect this class will become abstract very soon.
class RuntimeConfiguration {
// TODO(ahe): Remove this constructor and move the switch to
@@ -76,6 +79,8 @@ class RuntimeConfiguration {
// TODO(ahe): Make this method abstract.
throw "Unimplemented runtime '$runtimeType'";
}
+
+ List<String> dart2jsPreambles(Path preambleDir) => [];
}
/// The 'none' runtime configuration.
@@ -124,6 +129,10 @@ class D8RuntimeConfiguration extends CommandLineJavaScriptRuntime {
commandBuilder.getJSCommandlineCommand(
moniker, suite.d8FileName, arguments, environmentOverrides)];
}
+
+ List<String> dart2jsPreambles(Path preambleDir) {
+ return [preambleDir.append('d8.js').toNativePath()];
+ }
}
/// Firefox/SpiderMonkey-based development shell (jsshell).
@@ -142,6 +151,10 @@ class JsshellRuntimeConfiguration extends CommandLineJavaScriptRuntime {
commandBuilder.getJSCommandlineCommand(
moniker, suite.jsShellFileName, arguments, environmentOverrides)];
}
+
+ List<String> dart2jsPreambles(Path preambleDir) {
+ return ['-f', preambleDir.append('jsshell.js').toNativePath(), '-f'];
+ }
}
/// Common runtime configuration for runtimes based on the Dart VM.

Powered by Google App Engine
This is Rietveld 408576698