2016-06-23 16:47:54 +00: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 16:24:44 +00:00
|
|
|
import {ElementSchemaRegistry, ResourceLoader, UrlResolver} from '@angular/compiler';
|
2016-08-24 20:39:44 +00:00
|
|
|
import {Provider} from '@angular/core';
|
2016-08-31 01:07:40 +00:00
|
|
|
import {MockResourceLoader} from './resource_loader_mock';
|
|
|
|
|
import {MockSchemaRegistry} from './schema_registry_mock';
|
2016-08-24 20:39:44 +00:00
|
|
|
|
2016-08-31 01:07:40 +00:00
|
|
|
export function createUrlResolverWithoutPackagePrefix(): UrlResolver {
|
|
|
|
|
return new UrlResolver();
|
|
|
|
|
}
|
2015-09-14 22:59:09 +00:00
|
|
|
|
2016-08-17 23:37:31 +00: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-08-24 20:39:44 +00:00
|
|
|
export var TEST_COMPILER_PROVIDERS: Provider[] = [
|
2016-08-23 17:52:40 +00:00
|
|
|
{provide: ElementSchemaRegistry, useValue: new MockSchemaRegistry({}, {}, {})},
|
2016-08-17 16:24:44 +00:00
|
|
|
{provide: ResourceLoader, useClass: MockResourceLoader},
|
2016-06-03 00:30:40 +00:00
|
|
|
{provide: UrlResolver, useFactory: createUrlResolverWithoutPackagePrefix}
|
2015-10-12 17:23:51 +00:00
|
|
|
];
|