2016-04-29 00:50:03 +00:00
|
|
|
import {ReflectiveInjector, provide} from '@angular/core';
|
|
|
|
|
import {ApplicationRef, ApplicationRef_} from '@angular/core/src/application_ref';
|
2016-06-08 23:38:52 +00:00
|
|
|
import {SpyObject} from '@angular/core/testing/testing_internal';
|
|
|
|
|
|
|
|
|
|
import {global} from '../../../src/facade/lang';
|
2015-10-28 17:34:13 +00:00
|
|
|
|
|
|
|
|
export class SpyApplicationRef extends SpyObject {
|
|
|
|
|
constructor() { super(ApplicationRef_); }
|
|
|
|
|
}
|
2015-09-04 21:44:24 +00:00
|
|
|
|
2015-09-16 00:13:48 +00:00
|
|
|
export class SpyComponentRef extends SpyObject {
|
2016-06-08 22:45:15 +00:00
|
|
|
injector: any /** TODO #9100 */;
|
2015-09-04 21:44:24 +00:00
|
|
|
constructor() {
|
|
|
|
|
super();
|
2016-04-14 19:35:24 +00:00
|
|
|
this.injector = ReflectiveInjector.resolveAndCreate(
|
2016-06-03 00:30:40 +00:00
|
|
|
[{provide: ApplicationRef, useClass: SpyApplicationRef}]);
|
2015-09-04 21:44:24 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2016-06-08 22:45:15 +00:00
|
|
|
export function callNgProfilerTimeChangeDetection(config?: any /** TODO #9100 */): void {
|
2015-09-04 21:44:24 +00:00
|
|
|
(<any>global).ng.profiler.timeChangeDetection(config);
|
|
|
|
|
}
|