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

Unified Diff: third_party/pkg/angular/test/routing/ng_view_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/routing/ng_view_spec.dart
diff --git a/third_party/pkg/angular/test/routing/ng_view_spec.dart b/third_party/pkg/angular/test/routing/ng_view_spec.dart
index 22c2304b64f107d0f6255f24953711b91f8a6181..99edd1d4f0e26211b45921721f4d98890262d686 100644
--- a/third_party/pkg/angular/test/routing/ng_view_spec.dart
+++ b/third_party/pkg/angular/test/routing/ng_view_spec.dart
@@ -13,7 +13,7 @@ main() {
beforeEach(module((Module m) {
m
..install(new AngularMockModule())
- ..type(RouteInitializer, implementedBy: FlatRouteInitializer);
+ ..type(RouteInitializerFn, implementedBy: FlatRouteInitializer);
}));
beforeEach(inject((TestBed tb, Router _router, TemplateCache templates) {
@@ -54,7 +54,7 @@ main() {
Element root = _.compile('<ng-view></ng-view>');
expect(root.text).toEqual('');
- _.rootScope.$digest();
+ _.rootScope.apply();
microLeap();
expect(root.text).toEqual('Foo');
}));
@@ -83,7 +83,7 @@ main() {
beforeEach(module((Module m) {
m
..install(new AngularMockModule())
- ..type(RouteInitializer, implementedBy: NestedRouteInitializer);
+ ..type(RouteInitializerFn, implementedBy: NestedRouteInitializer);
}));
beforeEach(inject((TestBed tb, Router _router, TemplateCache templates) {
@@ -128,8 +128,8 @@ main() {
});
}
-class FlatRouteInitializer implements RouteInitializer {
- void init(Router router, ViewFactory view) {
+class FlatRouteInitializer implements Function {
+ void call(Router router, ViewFactory view) {
router.root
..addRoute(
name: 'foo',
@@ -145,8 +145,8 @@ class FlatRouteInitializer implements RouteInitializer {
}
}
-class NestedRouteInitializer implements RouteInitializer {
- void init(Router router, ViewFactory view) {
+class NestedRouteInitializer implements Function {
+ void call(Router router, ViewFactory view) {
router.root
..addRoute(
name: 'library',
@@ -170,9 +170,9 @@ class NestedRouteInitializer implements RouteInitializer {
name: 'read',
path: '/read',
enter: view('book_read.html'))))
- ..addRoute(
- name: 'admin',
- path: '/admin',
- enter: view('admin.html'));
+ ..addRoute(
+ name: 'admin',
+ path: '/admin',
+ enter: view('admin.html'));
}
}

Powered by Google App Engine
This is Rietveld 408576698