2015-10-13 07:29:13 +00:00
|
|
|
import 'package:angular2/testing_internal.dart' show SpyObject;
|
2015-10-28 17:34:13 +00:00
|
|
|
import 'package:angular2/core.dart' show Injector, bind;
|
|
|
|
|
import 'package:angular2/src/core/application_ref.dart' show ApplicationRef;
|
2015-10-02 14:37:23 +00:00
|
|
|
import 'package:angular2/src/core/linker/dynamic_component_loader.dart'
|
2015-10-08 15:22:11 +00:00
|
|
|
show ComponentRef_;
|
2015-09-04 21:44:24 +00:00
|
|
|
import 'dart:js';
|
|
|
|
|
|
|
|
|
|
@proxy
|
2015-10-28 17:34:13 +00:00
|
|
|
class SpyApplicationRef extends SpyObject implements ApplicationRef {
|
|
|
|
|
tick() {}
|
2015-09-04 21:44:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@proxy
|
2015-10-08 15:22:11 +00:00
|
|
|
class SpyComponentRef extends SpyObject implements ComponentRef_ {
|
2015-09-04 21:44:24 +00:00
|
|
|
Injector injector;
|
|
|
|
|
|
2015-09-16 00:13:48 +00:00
|
|
|
SpyComponentRef() {
|
2016-01-12 19:36:58 +00:00
|
|
|
this.injector = Injector
|
|
|
|
|
.resolveAndCreate([bind(ApplicationRef).toClass(SpyApplicationRef)]);
|
2015-09-04 21:44:24 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void callNgProfilerTimeChangeDetection([config]) {
|
2015-09-16 00:13:48 +00:00
|
|
|
context['ng']['profiler']
|
|
|
|
|
.callMethod('timeChangeDetection', config != null ? [config] : []);
|
2015-09-04 21:44:24 +00:00
|
|
|
}
|