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

Unified Diff: third_party/pkg/angular/test/core/scope_spec.dart

Issue 148453003: Updating Angular version (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 11 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/scope_spec.dart
diff --git a/third_party/pkg/angular/test/core/scope_spec.dart b/third_party/pkg/angular/test/core/scope_spec.dart
index 348945e5c23ad9b0209f134212863f9a9eec8950..9924581e690f59adf5365982ef92d2d36d5e219d 100644
--- a/third_party/pkg/angular/test/core/scope_spec.dart
+++ b/third_party/pkg/angular/test/core/scope_spec.dart
@@ -20,6 +20,7 @@ main() {
describe(r'$root', () {
it(r'should point to itself', inject((Scope $rootScope) {
expect($rootScope.$root).toEqual($rootScope);
+ expect($rootScope.$root).toEqual($rootScope);
expect($rootScope.$root).toBeTruthy();
}));
@@ -106,6 +107,22 @@ main() {
expect(digestedValue).toEqual(1);
}));
+ it(r'should skip auto digest if requested on any scope', inject((Scope $rootScope) {
+ var scope = $rootScope.$new();
+ var digestedValue = 0;
+ scope.a = 1;
+ scope.$watch('a', (newValue, oldValue, _this) {
+ digestedValue = newValue;
+ });
+ expect(digestedValue).toEqual(0);
+ zone.run(() {
+ scope.$skipAutoDigest();
+ });
+ expect(digestedValue).toEqual(0);
+ zone.run(noop);
+ expect(digestedValue).toEqual(1);
+ }));
+
it(r'should throw exception if asked to skip auto digest outside of a turn',
inject((Scope $rootScope) {
var digestedValue = 0;
« no previous file with comments | « third_party/pkg/angular/test/core/registry_spec.dart ('k') | third_party/pkg/angular/test/core_dom/compiler_spec.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698