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

Unified Diff: third_party/pkg/angular/test/mock/test_bed_spec.dart

Issue 257423008: Update all Angular libs (run update_all.sh). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 8 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 19380a111ff3ddd5e04ce69a030bf5c3560429b7..e5817ca7b3fe18adba1c0991d2716981d83e6b87 100644
--- a/third_party/pkg/angular/test/mock/test_bed_spec.dart
+++ b/third_party/pkg/angular/test/mock/test_bed_spec.dart
@@ -2,38 +2,38 @@ library angular.mock.test_bed_spec;
import '../_specs.dart';
-main() =>
-describe('test bed', () {
- TestBed _;
- Compiler $compile;
- Injector injector;
- Scope $rootScope;
-
- beforeEach(module((Module module) {
- module..type(MyTestBedDirective);
- return (TestBed tb) => _ = tb;
- }));
+void main() {
+ describe('test bed', () {
+ TestBed _;
+ Compiler compile;
+ Injector injector;
+ Scope rootScope;
+
+ beforeEachModule((Module module) {
+ module..type(MyTestBedDirective);
+ return (TestBed tb) => _ = tb;
+ });
- it('should allow for a scope-based compile', () {
+ it('should allow for a scope-based compile', () {
- inject((Scope scope) {
- Scope childScope = scope.createChild({});
+ inject((Scope scope) {
+ Scope childScope = scope.createChild({});
- var element = $('<div my-directive probe="i"></div>');
- _.compile(element, scope: childScope);
+ _.compile('<div my-directive probe="i"></div>', scope: childScope);
- Probe probe = _.rootScope.context['i'];
- var directiveInst = probe.directive(MyTestBedDirective);
+ Probe probe = _.rootScope.context['i'];
+ var directiveInst = probe.directive(MyTestBedDirective);
- childScope.destroy();
+ childScope.destroy();
- expect(directiveInst.destroyed).toBe(true);
+ expect(directiveInst.destroyed).toBe(true);
+ });
});
- });
-});
+ });
+}
-@NgDirective(selector: '[my-directive]')
+@Decorator(selector: '[my-directive]')
class MyTestBedDirective {
bool destroyed = false;
« no previous file with comments | « third_party/pkg/angular/test/mock/http_backend_spec.dart ('k') | third_party/pkg/angular/test/mock/zone_spec.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698