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

Side by Side Diff: third_party/pkg/angular/test/io/expression_extractor_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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 library ng.tool.expression_extractor_spec; 1 library ng.tool.expression_extractor_spec;
2 2
3 import 'package:di/di.dart'; 3 import 'package:di/di.dart';
4 import 'package:di/dynamic_injector.dart'; 4 import 'package:di/dynamic_injector.dart';
5 import 'package:angular/tools/common.dart'; 5 import 'package:angular/tools/common.dart';
6 import 'package:angular/tools/io.dart'; 6 import 'package:angular/tools/io.dart';
7 import 'package:angular/tools/io_impl.dart'; 7 import 'package:angular/tools/io_impl.dart';
8 import 'package:angular/tools/source_crawler_impl.dart'; 8 import 'package:angular/tools/source_crawler_impl.dart';
9 import 'package:angular/tools/html_extractor.dart'; 9 import 'package:angular/tools/html_extractor.dart';
10 import 'package:angular/tools/source_metadata_extractor.dart'; 10 import 'package:angular/tools/source_metadata_extractor.dart';
11 import '../jasmine_syntax.dart'; 11 import '../jasmine_syntax.dart';
12 import 'package:unittest/unittest.dart'; 12 import 'package:unittest/unittest.dart';
13 13
14 main() => describe('expression_extractor', () { 14 main() => describe('expression_extractor', () {
15 it('should extract all expressions from source and templates', () { 15 it('should extract all expressions from source and templates', () {
16 Module module = new Module(); 16 Module module = new Module();
17 17
18 Injector injector = new DynamicInjector(modules: [module], 18 Injector injector = new DynamicInjector(modules: [module],
19 allowImplicitInjection: true); 19 allowImplicitInjection: true);
20 20
21 IoService ioService = new IoServiceImpl(); 21 IoService ioService = new IoServiceImpl();
22 var sourceCrawler = new SourceCrawlerImpl(['packages/']); 22 var sourceCrawler = new SourceCrawlerImpl(['packages/']);
23 var sourceMetadataExtractor = new SourceMetadataExtractor(); 23 var sourceMetadataExtractor = new SourceMetadataExtractor(sourceCrawler);
24 List<DirectiveInfo> directives = 24 List<DirectiveInfo> directives =
25 sourceMetadataExtractor 25 sourceMetadataExtractor
26 .gatherDirectiveInfo('test/io/test_files/main.dart', sourceCrawler); 26 .gatherDirectiveInfo('test/io/test_files/main.dart');
27 var htmlExtractor = new HtmlExpressionExtractor(directives); 27 var htmlExtractor = new HtmlExpressionExtractor(directives, ioService);
28 htmlExtractor.crawl('test/io/test_files/', ioService); 28 htmlExtractor.crawl('test/io/test_files/');
29 29
30 var expressions = htmlExtractor.expressions; 30 var expressions = htmlExtractor.expressions;
31 expect(expressions, unorderedEquals([ 31 expect(expressions, unorderedEquals([
32 'ctrl.expr', 32 'ctrl.expr',
33 'ctrl.anotherExpression', 33 'ctrl.anotherExpression',
34 'ctrl.callback', 34 'ctrl.callback',
35 'ctrl.twoWayStuff', 35 'ctrl.twoWayStuff',
36 'attr', 36 'attr',
37 'expr', 37 'expr',
38 'anotherExpression', 38 'anotherExpression',
39 'callback', 39 'callback',
40 'twoWayStuff', 40 'twoWayStuff',
41 'exported + expression', 41 'exported + expression',
42 'ctrl.inline.template.expression', 42 'ctrl.inline.template.expression',
43 'ngIfCondition', 43 'ngIfCondition',
44 'ctrl.if' 44 'ctrl.if'
45 ])); 45 ]));
46 }); 46 });
47 }); 47 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698