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

Unified Diff: third_party/pkg/angular/test/tools/source_metadata_extractor_spec.dart

Issue 176943008: Update the Angular/DI tests to latest from github. (Closed) Base URL: https://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/tools/source_metadata_extractor_spec.dart
diff --git a/third_party/pkg/angular/test/tools/source_metadata_extractor_spec.dart b/third_party/pkg/angular/test/tools/source_metadata_extractor_spec.dart
index 37ca3938866900be901ef5a18eb321e61d672a90..238c6a7477dfe9a197108a1598b1efb878db645b 100644
--- a/third_party/pkg/angular/test/tools/source_metadata_extractor_spec.dart
+++ b/third_party/pkg/angular/test/tools/source_metadata_extractor_spec.dart
@@ -12,12 +12,12 @@ main() => describe('SourceMetadataExtractor', () {
it('should extract expressions and attribute names with expressions', () {
var info = extractDirectiveInfo([
- new DirectiveMetadata('FooComponent', COMPONENT, null, {
+ new DirectiveMetadata('FooComponent', COMPONENT, 'foo-component', {
'barVal': '@bar',
- 'bazExpr1': '<=>baz1',
- 'bazExpr2': '=>baz2',
- 'bazExpr3': '=>!baz3',
- 'bazCallback': '&aux',
+ 'baz-expr1': '<=>baz1',
+ 'baz-expr2': '=>baz2',
+ 'baz-expr3': '=>!baz3',
+ 'baz-callback': '&aux',
})
]);
@@ -36,7 +36,7 @@ main() => describe('SourceMetadataExtractor', () {
it('should build a component selector if one is not explicitly specified', () {
var info = extractDirectiveInfo([
- new DirectiveMetadata('MyFooComponent', COMPONENT, null, {
+ new DirectiveMetadata('MyFooComponent', COMPONENT, 'my-foo', {
'foo-expr': '=>fooExpr'
})
]);
@@ -47,7 +47,7 @@ main() => describe('SourceMetadataExtractor', () {
it('should build an element directive selector if one is not explicitly specified', () {
var info = extractDirectiveInfo([
- new DirectiveMetadata('MyFooDirective', DIRECTIVE, null, {
+ new DirectiveMetadata('MyFooDirective', DIRECTIVE, 'my-foo', {
'foo-expr': '=>fooExpr'
})
]);
@@ -58,7 +58,7 @@ main() => describe('SourceMetadataExtractor', () {
it('should build an attr directive selector if one is not explicitly specified', () {
var info = extractDirectiveInfo([
- new DirectiveMetadata('MyFooAttrDirective', DIRECTIVE, null, {
+ new DirectiveMetadata('MyFooAttrDirective', '[my-foo]', '[my-foo]', {
'foo-expr': '=>fooExpr'
})
]);
@@ -69,7 +69,7 @@ main() => describe('SourceMetadataExtractor', () {
it('should figure out attribute name if dot(.) is used', () {
var info = extractDirectiveInfo([
- new DirectiveMetadata('MyFooAttrDirective', DIRECTIVE, null, {
+ new DirectiveMetadata('MyFooAttrDirective', DIRECTIVE, '[my-foo]', {
'.': '=>fooExpr'
})
]);
@@ -119,8 +119,8 @@ flattenList(list, map) => list.map(map).fold([], (prev, exprs) =>
List<DirectiveInfo> extractDirectiveInfo(List<DirectiveMetadata> metadata) {
var sourceCrawler = new MockSourceCrawler();
var metadataCollector = new MockDirectiveMetadataCollectingVisitor(metadata);
- var extractor = new SourceMetadataExtractor(sourceCrawler, metadataCollector);
- return extractor.gatherDirectiveInfo('');
+ var extractor = new SourceMetadataExtractor(metadataCollector);
+ return extractor.gatherDirectiveInfo('', sourceCrawler);
}
class MockDirectiveMetadataCollectingVisitor

Powered by Google App Engine
This is Rietveld 408576698