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

Unified Diff: lib/transformer.dart

Issue 1104453007: add support for x-dart-test link tags in the new test package (Closed) Base URL: git@github.com:dart-lang/web-components.git@master
Patch Set: clarify some comments, and make sure the test/dart.js script remains in the right place Created 5 years, 8 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 | « lib/build/test_compatibility.dart ('k') | pubspec.yaml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/transformer.dart
diff --git a/lib/transformer.dart b/lib/transformer.dart
index e18bcf635d4c449e0ffcb6fc8692210dfb1860f5..fe0ca34a7c73f2a5f4de2bf7089fada5a1c37cfd 100644
--- a/lib/transformer.dart
+++ b/lib/transformer.dart
@@ -12,6 +12,8 @@ import 'build/import_inliner.dart';
export 'build/import_inliner.dart';
import 'build/script_compactor.dart';
export 'build/script_compactor.dart';
+import 'build/test_compatibility.dart';
+export 'build/test_compatibility.dart';
import 'build/web_components.dart';
export 'build/web_components.dart';
@@ -41,6 +43,10 @@ List<List<Transformer>> createDeployPhases(TransformOptions options,
{String sdkDir}) {
var phases = [];
+ /// Must happen first, temporarily rewrites <link rel="x-dart-test"> tags to
+ /// <script type="application/dart" _was_test></script> tags.
+ phases.add([new RewriteXDartTestToScript(options.entryPoints)]);
+
// Must happen before the WebComponents transformer, grabs all dart scripts
// and combines them into one bootstrap file.
phases.add([new ScriptCompactorTransformer(options.entryPoints)]);
@@ -51,6 +57,11 @@ List<List<Transformer>> createDeployPhases(TransformOptions options,
// Inlines all html imports and removes all dart script tags in the process.
phases.add([new ImportInlinerTransformer(options.entryPoints)]);
+
+ /// Must happen last, rewrites
+ /// <script type="application/dart" _was_test></script> tags to
+ /// <link rel="x-dart-test"> tags.
+ phases.add([new RewriteScriptToXDartTest(options.entryPoints)]);
return phases;
}
« no previous file with comments | « lib/build/test_compatibility.dart ('k') | pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698