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

Unified Diff: third_party/pkg/angular/test/routing/ng_bind_route_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/routing/ng_bind_route_spec.dart
===================================================================
--- third_party/pkg/angular/test/routing/ng_bind_route_spec.dart (revision 33054)
+++ third_party/pkg/angular/test/routing/ng_bind_route_spec.dart (working copy)
@@ -11,7 +11,7 @@
beforeEach(module((Module m) => m
..install(new AngularMockModule())
- ..type(RouteInitializerFn, implementedBy: NestedRouteInitializer)));
+ ..type(RouteInitializer, implementedBy: NestedRouteInitializer)));
beforeEach(inject((TestBed tb) {
_ = tb;
@@ -20,14 +20,14 @@
it('should inject null RouteProvider when no ng-bind-route', async(() {
Element root = _.compile('<div probe="routeProbe"></div>');
- expect(_.rootScope.context['routeProbe'].injector.get(RouteProvider)).toBeNull();
+ expect(_.rootScope['routeProbe'].injector.get(RouteProvider)).toBeNull();
}));
it('should inject RouteProvider with correct flat route', async(() {
Element root = _.compile(
'<div ng-bind-route="library"><div probe="routeProbe"></div></div>');
- expect(_.rootScope.context['routeProbe'].injector.get(RouteProvider).routeName)
+ expect(_.rootScope['routeProbe'].injector.get(RouteProvider).routeName)
.toEqual('library');
}));
@@ -39,15 +39,15 @@
' <div probe="routeProbe"></div>'
' </div>'
'</div>');
- expect(_.rootScope.context['routeProbe'].injector.get(RouteProvider).route.name)
+ expect(_.rootScope['routeProbe'].injector.get(RouteProvider).route.name)
.toEqual('all');
}));
});
}
-class NestedRouteInitializer implements Function {
- void call(Router router, ViewFactory view) {
+class NestedRouteInitializer implements RouteInitializer {
+ void init(Router router, ViewFactory view) {
router.root
..addRoute(
name: 'library',
@@ -71,9 +71,9 @@
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'));
}
}
« no previous file with comments | « third_party/pkg/angular/test/playback/playback_http_spec.dart ('k') | third_party/pkg/angular/test/routing/ng_view_spec.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698