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

Unified Diff: third_party/pkg/angular/test/core/core_directive_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/core/core_directive_spec.dart
===================================================================
--- third_party/pkg/angular/test/core/core_directive_spec.dart (revision 33054)
+++ third_party/pkg/angular/test/core/core_directive_spec.dart (working copy)
@@ -5,7 +5,8 @@
main() => describe('DirectiveMap', () {
beforeEach(module((Module module) {
- module..type(AnnotatedIoComponent);
+ module
+ ..type(AnnotatedIoComponent);
}));
it('should extract attr map from annotated component', inject((DirectiveMap directives) {
@@ -20,6 +21,7 @@
expect(annotation.publishTypes).toEqual([String]);
expect(annotation.template).toEqual('template');
expect(annotation.templateUrl).toEqual('templateUrl');
+ expect(annotation.cssUrl).toEqual('cssUrl');
expect(annotation.cssUrls).toEqual(['cssUrls']);
expect(annotation.applyAuthorStyles).toEqual(true);
expect(annotation.resetStyleInheritance).toEqual(true);
@@ -39,10 +41,10 @@
describe('exceptions', () {
it('should throw when annotation is for existing mapping', () {
var module = new Module()
- ..type(DirectiveMap)
- ..type(Bad1Component)
- ..type(MetadataExtractor)
- ..type(FieldMetadataExtractor);
+ ..type(DirectiveMap)
+ ..type(Bad1Component)
+ ..type(MetadataExtractor)
+ ..type(FieldMetadataExtractor);
var injector = new DynamicInjector(modules: [module]);
expect(() {
@@ -53,10 +55,10 @@
it('should throw when annotated both getter and setter', () {
var module = new Module()
- ..type(DirectiveMap)
- ..type(Bad2Component)
- ..type(MetadataExtractor)
- ..type(FieldMetadataExtractor);
+ ..type(DirectiveMap)
+ ..type(Bad2Component)
+ ..type(MetadataExtractor)
+ ..type(FieldMetadataExtractor);
var injector = new DynamicInjector(modules: [module]);
expect(() {
@@ -71,7 +73,8 @@
selector: 'annotated-io',
template: 'template',
templateUrl: 'templateUrl',
- cssUrl: const ['cssUrls'],
+ cssUrl: 'cssUrl',
+ cssUrls: const ['cssUrls'],
applyAuthorStyles: true,
resetStyleInheritance: true,
publishAs: 'ctrl',
@@ -80,10 +83,11 @@
exportExpressions: const ['exportExpressions'],
map: const {
'foo': '=>foo'
- })
+ }
+)
class AnnotatedIoComponent {
AnnotatedIoComponent(Scope scope) {
- scope.rootScope.context['ioComponent'] = this;
+ scope.$root.ioComponent = this;
}
@NgAttr('attr')
@@ -114,7 +118,8 @@
template: r'<content></content>',
map: const {
'foo': '=>foo'
- })
+ }
+)
class Bad1Component {
@NgOneWay('foo')
String foo;
@@ -122,7 +127,8 @@
@NgComponent(
selector: 'bad2',
- template: r'<content></content>')
+ template: r'<content></content>'
+)
class Bad2Component {
@NgOneWay('foo')
get foo => null;
« no previous file with comments | « third_party/pkg/angular/test/config/filter_tests.dart ('k') | third_party/pkg/angular/test/core/interpolate_spec.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698