2016-06-23 12:47:54 -04:00
|
|
|
/**
|
|
|
|
* @license
|
|
|
|
* Copyright Google Inc. All Rights Reserved.
|
|
|
|
*
|
|
|
|
* Use of this source code is governed by an MIT-style license that can be
|
|
|
|
* found in the LICENSE file at https://angular.io/license
|
|
|
|
*/
|
|
|
|
|
2016-04-28 20:50:03 -04:00
|
|
|
import {ReflectiveInjector, provide} from '@angular/core';
|
|
|
|
import {ApplicationRef, ApplicationRef_} from '@angular/core/src/application_ref';
|
2016-06-08 19:38:52 -04:00
|
|
|
import {SpyObject} from '@angular/core/testing/testing_internal';
|
|
|
|
|
|
|
|
import {global} from '../../../src/facade/lang';
|
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 {
|
2016-06-08 18:45:15 -04:00
|
|
|
injector: any /** TODO #9100 */;
|
2015-09-04 17:44:24 -04:00
|
|
|
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
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-06-08 18:45:15 -04:00
|
|
|
export function callNgProfilerTimeChangeDetection(config?: any /** TODO #9100 */): void {
|
2015-09-04 17:44:24 -04:00
|
|
|
(<any>global).ng.profiler.timeChangeDetection(config);
|
|
|
|
}
|