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

Unified Diff: pkg/polymer/test/transform/code_extractor_test.dart

Issue 23445009: Prune the old deploy code. This CL does a few changes: (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 4 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/transform/all_phases_test.dart ('k') | pkg/polymer/test/transform/common.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/polymer/test/transform/code_extractor_test.dart
diff --git a/pkg/polymer/test/transform/code_extractor_test.dart b/pkg/polymer/test/transform/code_extractor_test.dart
index e62ec967a6bb070c8f5f5e95e641010e07679f4c..9619684ab8f6fa430a86703bf8ad5036391180eb 100644
--- a/pkg/polymer/test/transform/code_extractor_test.dart
+++ b/pkg/polymer/test/transform/code_extractor_test.dart
@@ -18,7 +18,7 @@ void main() {
'a|test.html': '<!DOCTYPE html><html></html>',
});
- testPhases('single script', [[new InlineCodeExtractor()]], {
+ testPhases('single script, no lib', [[new InlineCodeExtractor()]], {
'a|test.html':
'<!DOCTYPE html><html><head>'
'<script type="application/dart">main() { }</script>',
@@ -29,14 +29,28 @@ void main() {
'</head><body></body></html>',
'a|test.html.0.dart':
- 'main() { }',
+ 'library test_html_0;\nmain() { }',
+ });
+
+ testPhases('single script, with lib', [[new InlineCodeExtractor()]], {
+ 'a|test.html':
+ '<!DOCTYPE html><html><head>'
+ '<script type="application/dart">library f;\nmain() { }</script>',
+ }, {
+ 'a|test.html':
+ '<!DOCTYPE html><html><head>'
+ '<script type="application/dart" src="test.html.0.dart"></script>'
+ '</head><body></body></html>',
+
+ 'a|test.html.0.dart':
+ 'library f;\nmain() { }',
});
testPhases('multiple scripts', [[new InlineCodeExtractor()]], {
'a|test.html':
'<!DOCTYPE html><html><head>'
- '<script type="application/dart">main1() { }</script>'
- '<script type="application/dart">main2() { }</script>',
+ '<script type="application/dart">library a1;\nmain1() { }</script>'
+ '<script type="application/dart">library a2;\nmain2() { }</script>',
}, {
'a|test.html':
'<!DOCTYPE html><html><head>'
@@ -45,10 +59,10 @@ void main() {
'</head><body></body></html>',
'a|test.html.0.dart':
- 'main1() { }',
+ 'library a1;\nmain1() { }',
'a|test.html.1.dart':
- 'main2() { }',
+ 'library a2;\nmain2() { }',
});
testPhases('multiple deeper scripts', [[new InlineCodeExtractor()]], {
@@ -71,12 +85,12 @@ void main() {
'</div></div></body></html>',
'a|test.html.0.dart':
- 'main1() { }',
+ 'library test_html_0;\nmain1() { }',
'a|test.html.1.dart':
- 'main2() { }',
+ 'library test_html_1;\nmain2() { }',
'a|test.html.2.dart':
- 'main3() { }',
+ 'library test_html_2;\nmain3() { }',
});
}
« no previous file with comments | « pkg/polymer/test/transform/all_phases_test.dart ('k') | pkg/polymer/test/transform/common.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698