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

Unified Diff: third_party/pkg/angular/test/directive/ng_style_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/directive/ng_style_spec.dart
===================================================================
--- third_party/pkg/angular/test/directive/ng_style_spec.dart (revision 33054)
+++ third_party/pkg/angular/test/directive/ng_style_spec.dart (working copy)
@@ -10,14 +10,14 @@
it('should set', () {
dom.Element element = _.compile('<div ng-style="{height: \'40px\'}"></div>');
- _.rootScope.apply();
+ _.rootScope.$digest();
expect(element.style.height).toEqual('40px');
});
it('should silently ignore undefined style', () {
dom.Element element = _.compile('<div ng-style="myStyle"></div>');
- _.rootScope.apply();
+ _.rootScope.$digest();
expect(element.classes.contains('ng-exception')).toBeFalsy();
});
@@ -35,8 +35,8 @@
document.body.append(element[0]);
_.compile(element);
scope = _.rootScope;
- scope.context['styleObj'] = {'margin-top': '44px'};
- scope.apply();
+ scope['styleObj'] = {'margin-top': '44px'};
+ scope.$apply();
element.css(postCompStyle, postCompVal);
}));
@@ -54,7 +54,7 @@
it(r'should not mess up stuff after $apply with no model changes', () {
element.css('padding-top', '33px');
- scope.apply();
+ scope.$apply();
expect(element.css(preCompStyle)).toEqual(preCompVal);
expect(element.css('margin-top')).toEqual('44px');
expect(element.css(postCompStyle)).toEqual(postCompVal);
@@ -63,8 +63,8 @@
it(r'should not mess up stuff after $apply with non-colliding model changes', () {
- scope.context['styleObj'] = {'padding-top': '99px'};
- scope.apply();
+ scope['styleObj'] = {'padding-top': '99px'};
+ scope.$apply();
expect(element.css(preCompStyle)).toEqual(preCompVal);
expect(element.css('margin-top')).not.toEqual('44px');
expect(element.css('padding-top')).toEqual('99px');
@@ -73,12 +73,12 @@
it(r'should overwrite original styles after a colliding model change', () {
- scope.context['styleObj'] = {'height': '99px', 'width': '88px'};
- scope.apply();
+ scope['styleObj'] = {'height': '99px', 'width': '88px'};
+ scope.$apply();
expect(element.css(preCompStyle)).toEqual('88px');
expect(element.css(postCompStyle)).toEqual('99px');
- scope.context['styleObj'] = {};
- scope.apply();
+ scope['styleObj'] = {};
+ scope.$apply();
expect(element.css(preCompStyle)).not.toEqual('88px');
expect(element.css(postCompStyle)).not.toEqual('99px');
});

Powered by Google App Engine
This is Rietveld 408576698