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

Unified Diff: third_party/pkg/angular/test/io/template_cache_generator_spec.dart

Issue 180843004: Revert revision 33053 (Closed) Base URL: http://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: third_party/pkg/angular/test/io/template_cache_generator_spec.dart
===================================================================
--- third_party/pkg/angular/test/io/template_cache_generator_spec.dart (revision 33054)
+++ third_party/pkg/angular/test/io/template_cache_generator_spec.dart (working copy)
@@ -8,16 +8,13 @@
import 'package:unittest/unittest.dart';
main() => describe('template_cache_generator', () {
-
- it('should correctly generate the templates cache file (template)', () {
+ it('should correctly generate the templates cache file', () {
var tmpDir = Directory.systemTemp.createTempSync();
Future flush;
try {
flush = generator.main(['test/io/test_files/templates/main.dart',
- Platform.environment['DART_SDK'],
- '${tmpDir.path}/generated.dart', 'generated',
- '%SYSTEM_PACKAGE_ROOT%',
- '/test/io/test_files,rewritten', 'MyComponent3']);
+ '${tmpDir.path}/generated.dart', 'generated', '%SYSTEM_PACKAGE_ROOT%',
+ 'test/io/test_files,rewritten', 'MyComponent3']);
} catch(_) {
tmpDir.deleteSync(recursive: true);
rethrow;
@@ -25,47 +22,15 @@
return flush.then((_) {
expect(new File('${tmpDir.path}/generated.dart').readAsStringSync(),
'// GENERATED, DO NOT EDIT!\n'
- 'library generated;\n'
- '\n'
- 'import \'package:angular/angular.dart\';\n'
- '\n'
- 'primeTemplateCache(TemplateCache tc) {\n'
- 'tc.put("rewritten/templates/main.html", new HttpResponse(200, r"""Hello World!"""));\n'
- '}');
+ 'library generated;\n'
+ '\n'
+ 'import \'package:angular/angular.dart\';\n'
+ '\n'
+ 'primeTemplateCache(TemplateCache tc) {\n'
+ 'tc.put("rewritten/templates/main.html", new HttpResponse(200, r"""Hello World!"""));\n'
+ '}');
}).whenComplete(() {
tmpDir.deleteSync(recursive: true);
});
});
-
- it('should correctly generate the templates cache file (css)', () {
- var tmpDir = Directory.systemTemp.createTempSync();
- Future flush;
- try {
- flush = generator.main(['test/io/test_files/cssUrls/main.dart',
- Platform.environment['DART_SDK'],
- '${tmpDir.path}/generated.dart', 'generated',
- '%SYSTEM_PACKAGE_ROOT%',
- '/test/io/test_files,rewritten', 'MyComponent3']);
- } catch(_) {
- tmpDir.deleteSync(recursive: true);
- rethrow;
- }
- return flush.then((_) {
- expect(new File('${tmpDir.path}/generated.dart').readAsStringSync(),
- '// GENERATED, DO NOT EDIT!\n'
- 'library generated;\n'
- '\n'
- 'import \'package:angular/angular.dart\';\n'
- '\n'
- 'primeTemplateCache(TemplateCache tc) {\n'
- 'tc.put("rewritten/cssUrls/one.css", new HttpResponse(200, r"""body {}"""));\n'
- 'tc.put("rewritten/cssUrls/three.css", new HttpResponse(200, r"""body {}"""));\n'
- 'tc.put("rewritten/cssUrls/two.css", new HttpResponse(200, r"""body {}"""));\n'
- '}');
- }).whenComplete(() {
- //tmpDir.deleteSync(recursive: true);
- });
- });
-
-
});

Powered by Google App Engine
This is Rietveld 408576698