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-08-17 12:24:44 -04:00
|
|
|
import {ElementSchemaRegistry, ResourceLoader, UrlResolver} from '@angular/compiler';
|
2016-08-24 16:39:44 -04:00
|
|
|
import {Provider} from '@angular/core';
|
2016-08-30 21:07:40 -04:00
|
|
|
import {MockResourceLoader} from './resource_loader_mock';
|
|
|
|
import {MockSchemaRegistry} from './schema_registry_mock';
|
2016-08-24 16:39:44 -04:00
|
|
|
|
2016-08-30 21:07:40 -04:00
|
|
|
export function createUrlResolverWithoutPackagePrefix(): UrlResolver {
|
|
|
|
return new UrlResolver();
|
|
|
|
}
|
2015-09-14 18:59:09 -04:00
|
|
|
|
2016-08-17 19:37:31 -04:00
|
|
|
// This provider is put here just so that we can access it from multiple
|
|
|
|
// internal test packages.
|
|
|
|
// TODO: get rid of it or move to a separate @angular/internal_testing package
|
2016-12-27 17:55:58 -05:00
|
|
|
export const TEST_COMPILER_PROVIDERS: Provider[] = [
|
2016-09-27 20:10:02 -04:00
|
|
|
{provide: ElementSchemaRegistry, useValue: new MockSchemaRegistry({}, {}, {}, [], [])},
|
2016-08-17 12:24:44 -04:00
|
|
|
{provide: ResourceLoader, useClass: MockResourceLoader},
|
2016-06-02 20:30:40 -04:00
|
|
|
{provide: UrlResolver, useFactory: createUrlResolverWithoutPackagePrefix}
|
2015-10-12 13:23:51 -04:00
|
|
|
];
|