fix(testing): let DOM adapter dictate XHR implementation for tests
The test injector now uses an XHR implementation based on DOM.getXHR, which allows the current DOM adapter to dictate which XHR impl should be used. To prevent the changes to DOM adapter from introducing undesired new dependencies into the benchmarks, separate the async facade into a promise facade which is reexported by facade/async. See #4539
This commit is contained in:
@ -20,9 +20,6 @@ import {MdButton, MdAnchor} from 'angular2_material/src/components/button/button
|
||||
|
||||
import {TestUrlResolver} from './test_url_resolver';
|
||||
|
||||
import {XHR} from 'angular2/src/core/compiler/xhr';
|
||||
import {XHRImpl} from 'angular2/src/core/compiler/xhr_impl';
|
||||
|
||||
|
||||
export function main() {
|
||||
describe('MdButton', () => {
|
||||
@ -33,11 +30,6 @@ export function main() {
|
||||
// with both JS and Dart output.
|
||||
bind(UrlResolver)
|
||||
.toValue(new TestUrlResolver()),
|
||||
|
||||
// Need to use the real XHR implementation (instead of the mock) so we can actually request
|
||||
// the template files, since Angular 2 doesn't have anything like $templateCache. This should
|
||||
// eventually be replaced with a preprocessor that inlines templates.
|
||||
provide(XHR, {useClass: XHRImpl})
|
||||
]);
|
||||
|
||||
beforeEach(inject([TestComponentBuilder], (tcb) => { builder = tcb; }));
|
||||
|
Reference in New Issue
Block a user