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

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

Issue 27903006: Improves how to initialize polymer apps and fixes polymer build and linter to (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 | « pkg/polymer/test/build/polyfill_injector_test.dart ('k') | pkg/polymer/test/event_path_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 74eab9e0b5b21eacc2b0a08214e1989b1d15d2fd..32bd762499d2a8dd24b1c1b8c231848c41efc488 100644
--- a/pkg/polymer/test/build/script_compactor_test.dart
+++ b/pkg/polymer/test/build/script_compactor_test.dart
@@ -16,6 +16,7 @@ void main() {
testPhases('no changes', phases, {
'a|web/test.html': '<!DOCTYPE html><html></html>',
+ 'a|web/test.html.scriptUrls': '[]',
}, {
'a|web/test.html': '<!DOCTYPE html><html></html>',
});
@@ -34,22 +35,23 @@ void main() {
'a|web/test.html':
'<!DOCTYPE html><html><head>'
'<script type="application/dart" src="a.dart"></script>',
+ 'a|web/test.html.scriptUrls': '[]',
}, {
'a|web/test.html':
- '<!DOCTYPE html><html><head></head><body>'
+ '<!DOCTYPE html><html><head>'
'<script type="application/dart" '
'src="test.html_bootstrap.dart"></script>'
- '<script src="packages/browser/dart.js"></script>'
- '</body></html>',
+ '</head><body></body></html>',
'a|web/test.html_bootstrap.dart':
'''$MAIN_HEADER
import 'a.dart' as i0;
void main() {
- initPolymer([
+ configureForDeployment([
'a.dart',
]);
+ i0.main();
}
'''.replaceAll('\n ', '\n'),
});
@@ -57,18 +59,17 @@ void main() {
testPhases('several scripts', phases, {
'a|web/test.html':
'<!DOCTYPE html><html><head>'
- '<script type="application/dart" src="a.dart"></script>'
- '<script type="application/dart" src="b.dart"></script>'
'</head><body><div>'
- '<script type="application/dart" src="c.dart"></script>'
- '</div>'
- '<script type="application/dart" src="d.dart"></script>',
+ '<script type="application/dart" src="d.dart"></script>'
+ '</div>',
+ 'a|web/test.html.scriptUrls':
+ '[["a", "web/a.dart"],["a", "web/b.dart"],["a", "web/c.dart"]]',
}, {
'a|web/test.html':
- '<!DOCTYPE html><html><head></head><body><div></div>'
- '<script type="application/dart" '
- 'src="test.html_bootstrap.dart"></script>'
- '<script src="packages/browser/dart.js"></script>'
+ '<!DOCTYPE html><html><head></head><body><div>'
+ '<script type="application/dart" src="test.html_bootstrap.dart">'
+ '</script>'
+ '</div>'
'</body></html>',
'a|web/test.html_bootstrap.dart':
@@ -79,12 +80,13 @@ void main() {
import 'd.dart' as i3;
void main() {
- initPolymer([
+ configureForDeployment([
'a.dart',
'b.dart',
'c.dart',
'd.dart',
]);
+ i3.main();
}
'''.replaceAll('\n ', '\n'),
});
« no previous file with comments | « pkg/polymer/test/build/polyfill_injector_test.dart ('k') | pkg/polymer/test/event_path_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698