forked from angular/angular
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathspies.dart
More file actions
27 lines (22 loc) · 774 Bytes
/
Copy pathspies.dart
File metadata and controls
27 lines (22 loc) · 774 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import 'package:angular2/test_lib.dart' show SpyObject;
import 'package:angular2/core.dart' show LifeCycle, Injector, bind;
import 'package:angular2/src/core/compiler/dynamic_component_loader.dart'
show ComponentRef;
import 'dart:js';
@proxy
class SpyLifeCycle extends SpyObject implements LifeCycle {
noSuchMethod(m) => super.noSuchMethod(m);
}
@proxy
class SpyComponentRef extends SpyObject implements ComponentRef {
Injector injector;
SpyComponentRef() {
this.injector =
Injector.resolveAndCreate([bind(LifeCycle).toClass(SpyLifeCycle)]);
}
noSuchMethod(m) => super.noSuchMethod(m);
}
void callNgProfilerTimeChangeDetection([config]) {
context['ng']['profiler']
.callMethod('timeChangeDetection', config != null ? [config] : []);
}