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