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

Unified Diff: third_party/pkg/angular/test/mock/test_bed_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/mock/test_bed_spec.dart
diff --git a/third_party/pkg/angular/test/mock/test_bed_spec.dart b/third_party/pkg/angular/test/mock/test_bed_spec.dart
index 755ce6eeff3bef27330711de7b815fc418526775..19380a111ff3ddd5e04ce69a030bf5c3560429b7 100644
--- a/third_party/pkg/angular/test/mock/test_bed_spec.dart
+++ b/third_party/pkg/angular/test/mock/test_bed_spec.dart
@@ -17,15 +17,15 @@ describe('test bed', () {
it('should allow for a scope-based compile', () {
inject((Scope scope) {
- Scope childScope = scope.$new();
+ Scope childScope = scope.createChild({});
var element = $('<div my-directive probe="i"></div>');
_.compile(element, scope: childScope);
- Probe probe = _.rootScope.i;
+ Probe probe = _.rootScope.context['i'];
var directiveInst = probe.directive(MyTestBedDirective);
- childScope.$destroy();
+ childScope.destroy();
expect(directiveInst.destroyed).toBe(true);
});
@@ -38,7 +38,7 @@ class MyTestBedDirective {
bool destroyed = false;
MyTestBedDirective(Scope scope) {
- scope.$on(r'$destroy', () {
+ scope.on(ScopeEvent.DESTROY).listen((_) {
destroyed = true;
});
}

Powered by Google App Engine
This is Rietveld 408576698