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

Unified Diff: pkg/polymer/test/build/script_compactor_test.dart

Issue 151893003: Use a transformer to initialize custom elements and call initMethod. This is the (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 11 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 | « pkg/polymer/test/build/all_phases_test.dart ('k') | pkg/polymer/test/event_handlers_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/polymer/test/build/script_compactor_test.dart
diff --git a/pkg/polymer/test/build/script_compactor_test.dart b/pkg/polymer/test/build/script_compactor_test.dart
index e3ec79c68ca02798ad8a61536b65a3c5dcc146d4..2d32a746c4f0e0770aa3c6fe318d6857700dbbe0 100644
--- a/pkg/polymer/test/build/script_compactor_test.dart
+++ b/pkg/polymer/test/build/script_compactor_test.dart
@@ -50,7 +50,6 @@ void main() {
void main() {
configureForDeployment([
- 'a.dart',
]);
i0.main();
}
@@ -66,7 +65,52 @@ void main() {
'</div>',
'a|web/test.html.scriptUrls':
'[["a", "web/a.dart"],["a", "web/b.dart"],["a", "web/c.dart"]]',
- 'a|web/d.dart': 'library d;\nmain(){}',
+ 'a|web/d.dart': 'library d;\nmain(){}\n@initMethod mD(){}',
+
+ 'a|web/a.dart':
+ 'import "package:polymer/polymer.dart";\n'
+ '@initMethod mA(){}\n',
+
+ 'a|web/b.dart':
+ 'export "e.dart";\n'
+ 'export "f.dart" show XF1, mF1;\n'
+ 'export "g.dart" hide XG1, mG1;\n'
+ 'export "h.dart" show XH1, mH1 hide mH1, mH2;\n'
+ '@initMethod mB(){}\n',
+
+ 'a|web/c.dart':
+ 'import "package:polymer/polymer.dart";\n'
+ 'part "c_part.dart"\n'
+ '@CustomTag("x-c2") class XC2 {}\n',
+
+ 'a|web/c_part.dart':
+ '@CustomTag("x-c1") class XC1 {}\n',
+
+ 'a|web/e.dart':
+ 'import "package:polymer/polymer.dart";\n'
+ '@CustomTag("x-e") class XE {}\n'
+ '@initMethod mE(){}\n',
+
+ 'a|web/f.dart':
+ 'import "package:polymer/polymer.dart";\n'
+ '@CustomTag("x-f1") class XF1 {}\n'
+ '@initMethod mF1(){}\n'
+ '@CustomTag("x-f2") class XF2 {}\n'
+ '@initMethod mF2(){}\n',
+
+ 'a|web/g.dart':
+ 'import "package:polymer/polymer.dart";\n'
+ '@CustomTag("x-g1") class XG1 {}\n'
+ '@initMethod mG1(){}\n'
+ '@CustomTag("x-g2") class XG2 {}\n'
+ '@initMethod mG2(){}\n',
+
+ 'a|web/h.dart':
+ 'import "package:polymer/polymer.dart";\n'
+ '@CustomTag("x-h1") class XH1 {}\n'
+ '@initMethod mH1(){}\n'
+ '@CustomTag("x-h2") class XH2 {}\n'
+ '@initMethod mH2(){}\n',
}, {
'a|web/test.html':
'<!DOCTYPE html><html><head></head><body><div>'
@@ -84,10 +128,18 @@ void main() {
void main() {
configureForDeployment([
- 'a.dart',
- 'b.dart',
- 'c.dart',
- 'd.dart',
+ i0.mA,
+ () => Polymer.register('x-e', i1.XE),
+ i1.mE,
+ () => Polymer.register('x-f1', i1.XF1),
+ i1.mF1,
+ () => Polymer.register('x-g2', i1.XG2),
+ i1.mG2,
+ () => Polymer.register('x-h1', i1.XH1),
+ i1.mB,
+ () => Polymer.register('x-c1', i2.XC1),
+ () => Polymer.register('x-c2', i2.XC2),
+ i3.mD,
]);
i3.main();
}
« no previous file with comments | « pkg/polymer/test/build/all_phases_test.dart ('k') | pkg/polymer/test/event_handlers_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698