fix(benchmarks): fix infinite scroll benchmark.

This commit is contained in:
Rado Kirov 2015-02-05 20:47:30 -08:00
parent 746f85a621
commit 7dba3a3e32
1 changed files with 24 additions and 6 deletions

View File

@ -9,8 +9,11 @@ import {bootstrap, Component, Template, TemplateConfig, ViewPort, Compiler}
import {reflector} from 'angular2/src/reflection/reflection'; import {reflector} from 'angular2/src/reflection/reflection';
import {CompilerCache} from 'angular2/src/core/compiler/compiler'; import {CompilerCache} from 'angular2/src/core/compiler/compiler';
import {DirectiveMetadataReader} from 'angular2/src/core/compiler/directive_metadata_reader'; import {DirectiveMetadataReader} from 'angular2/src/core/compiler/directive_metadata_reader';
import {ShadowDomStrategy, NativeShadowDomStrategy} from 'angular2/src/core/compiler/shadow_dom_strategy';
import {TemplateLoader} from 'angular2/src/core/compiler/template_loader'; import {TemplateLoader} from 'angular2/src/core/compiler/template_loader';
import {LifeCycle} from 'angular2/src/core/life_cycle/life_cycle'; import {LifeCycle} from 'angular2/src/core/life_cycle/life_cycle';
import {XHR} from 'angular2/src/core/compiler/xhr/xhr';
import {XHRImpl} from 'angular2/src/core/compiler/xhr/xhr_impl';
import {NgIf, NgRepeat} from 'angular2/directives'; import {NgIf, NgRepeat} from 'angular2/directives';
import {App, setupReflectorForApp} from './app'; import {App, setupReflectorForApp} from './app';
@ -169,9 +172,11 @@ export function setupReflectorForAngular() {
}); });
reflector.registerType(Compiler, { reflector.registerType(Compiler, {
'factory': (changeDetection, templateLoader, reader, parser, compilerCache) => new Compiler(changeDetection, templateLoader, reader, parser, compilerCache), "factory": (changeDetection, templateLoader, reader, parser, compilerCache, shadowDomStrategy) =>
'parameters': [[ChangeDetection], [TemplateLoader], [DirectiveMetadataReader], [Parser], [CompilerCache]], new Compiler(changeDetection, templateLoader, reader, parser, compilerCache, shadowDomStrategy),
'annotations': [] "parameters": [[ChangeDetection], [TemplateLoader], [DirectiveMetadataReader], [Parser],
[CompilerCache], [ShadowDomStrategy]],
"annotations": []
}); });
reflector.registerType(CompilerCache, { reflector.registerType(CompilerCache, {
@ -187,9 +192,15 @@ export function setupReflectorForAngular() {
}); });
reflector.registerType(TemplateLoader, { reflector.registerType(TemplateLoader, {
'factory': () => new TemplateLoader(), "factory": (xhr) => new TemplateLoader(xhr),
'parameters': [], "parameters": [[XHR]],
'annotations': [] "annotations": []
});
reflector.registerType(XHR, {
"factory": () => new XHRImpl(),
"parameters": [],
"annotations": []
}); });
reflector.registerType(DirectiveMetadataReader, { reflector.registerType(DirectiveMetadataReader, {
@ -209,4 +220,11 @@ export function setupReflectorForAngular() {
"parameters": [[ChangeDetector]], "parameters": [[ChangeDetector]],
"annotations": [] "annotations": []
}); });
reflector.registerType(ShadowDomStrategy, {
"factory": () => new NativeShadowDomStrategy(),
"parameters": [],
"annotations": []
});
} }