From 8b725c77fde0a5d9af3ddd1a13117e5f04dd69b3 Mon Sep 17 00:00:00 2001 From: vsavkin Date: Thu, 8 Oct 2015 08:22:11 -0700 Subject: [PATCH] fix(tests): fix tests --- docs/typescript-definition-package/index.js | 2 +- karma-dart.conf.js | 2 +- .../angular2/src/core/application_common.ts | 4 +- modules/angular2/src/core/application_ref.ts | 2 +- .../src/core/compiler/runtime_compiler.ts | 2 +- modules/angular2/src/core/di/exceptions.ts | 3 + .../src/core/linker/element_injector.ts | 3 +- .../angular2/src/core/linker/element_ref.ts | 1 - .../angular2/src/core/pipes/pipe_binding.ts | 3 +- .../reflection/reflection_capabilities.ts | 10 ++- modules/angular2/src/core/util/decorators.ts | 3 +- modules/angular2/src/core/zone/ng_zone.dart | 4 + modules/angular2/src/router/router_outlet.ts | 83 ++++++++----------- .../angular2/test/core/application_spec.ts | 2 +- .../test/core/life_cycle/life_cycle_spec.ts | 2 +- .../test/core/linker/compiler_spec.ts | 8 +- .../linker/dynamic_component_loader_spec.ts | 2 +- .../test/core/linker/element_injector_spec.ts | 4 +- .../test/core/linker/integration_spec.ts | 5 +- modules/angular2/test/core/pipes/spies.ts | 4 +- .../render/dom/events/event_manager_spec.ts | 1 - modules/angular2/test/core/spies.dart | 2 +- .../test/http/backends/jsonp_backend_spec.ts | 5 +- .../angular2/test/router/router_link_spec.ts | 2 +- modules/angular2/test/tools/spies.dart | 4 +- .../worker/renderer_integration_spec.ts | 5 +- 26 files changed, 82 insertions(+), 86 deletions(-) diff --git a/docs/typescript-definition-package/index.js b/docs/typescript-definition-package/index.js index 115cdf03d4..7407a34b1c 100644 --- a/docs/typescript-definition-package/index.js +++ b/docs/typescript-definition-package/index.js @@ -60,7 +60,7 @@ module.exports = new Package('angular-v2-docs', [jsdocPackage, nunjucksPackage, { id: 'angular2/router', references: ['./angular2.d.ts'], - remapTypes: {Type: 'ng.Type', InjectableReference: 'ng.InjectableReference'}, + remapTypes: {Type: 'ng.Type', InjectableReference: 'ng.InjectableReference', ElementRef: 'ng.ElementRef', DynamicComponentLoader: 'ng.DynamicComponentLoader'}, modules: {'angular2/router': {namespace: 'ngRouter', id: 'angular2/router'}} }, { diff --git a/karma-dart.conf.js b/karma-dart.conf.js index 307c710b41..28951466aa 100644 --- a/karma-dart.conf.js +++ b/karma-dart.conf.js @@ -16,8 +16,8 @@ var packageSources = { 'utf': 'packages/utf', // Local dependencies, transpiled from the source. - 'angular2/test/': 'dist/dart/angular2/test/', 'angular2': 'dist/dart/angular2/lib', + 'angular2/test/': 'dist/dart/angular2/test/', 'http': 'dist/dart/http/lib', 'angular2_material': 'dist/dart/angular2_material/lib', 'benchpress': 'dist/dart/benchpress/lib', diff --git a/modules/angular2/src/core/application_common.ts b/modules/angular2/src/core/application_common.ts index 5c6c29670d..887469a50f 100644 --- a/modules/angular2/src/core/application_common.ts +++ b/modules/angular2/src/core/application_common.ts @@ -29,7 +29,7 @@ import { } from 'angular2/src/core/linker/dynamic_component_loader'; import {TestabilityRegistry, Testability} from 'angular2/src/core/testability/testability'; import {Renderer} from 'angular2/src/core/render/api'; -import {DomRenderer, DOCUMENT} from 'angular2/src/core/render/render'; +import {DomRenderer, DomRenderer_, DOCUMENT} from 'angular2/src/core/render/render'; import { SharedStylesHost, DomSharedStylesHost @@ -55,7 +55,7 @@ export function applicationDomBindings(): Array { new Binding(EVENT_MANAGER_PLUGINS, {toClass: DomEventsPlugin, multi: true}), new Binding(EVENT_MANAGER_PLUGINS, {toClass: KeyEventsPlugin, multi: true}), new Binding(EVENT_MANAGER_PLUGINS, {toClass: HammerGesturesPlugin, multi: true}), - DomRenderer, + bind(DomRenderer).toClass(DomRenderer_), bind(Renderer).toAlias(DomRenderer), DomSharedStylesHost, bind(SharedStylesHost).toAlias(DomSharedStylesHost), diff --git a/modules/angular2/src/core/application_ref.ts b/modules/angular2/src/core/application_ref.ts index 739d02f845..0220af1ff3 100644 --- a/modules/angular2/src/core/application_ref.ts +++ b/modules/angular2/src/core/application_ref.ts @@ -74,7 +74,7 @@ function _componentBindings(appComponentType: Type): Array) => p.then(ref => ref.instance), [APP_COMPONENT_REF_PROMISE]), diff --git a/modules/angular2/src/core/compiler/runtime_compiler.ts b/modules/angular2/src/core/compiler/runtime_compiler.ts index 5dcf293827..4891f6b76e 100644 --- a/modules/angular2/src/core/compiler/runtime_compiler.ts +++ b/modules/angular2/src/core/compiler/runtime_compiler.ts @@ -10,7 +10,7 @@ import {Promise, PromiseWrapper} from 'angular2/src/core/facade/async'; export abstract class RuntimeCompiler extends Compiler {} @Injectable() -export class RuntimeCompiler_ extends Compiler_ { +export class RuntimeCompiler_ extends Compiler_ implements RuntimeCompiler { constructor(_protoViewFactory: ProtoViewFactory, private _templateCompiler: TemplateCompiler) { super(_protoViewFactory); } diff --git a/modules/angular2/src/core/di/exceptions.ts b/modules/angular2/src/core/di/exceptions.ts index ec4bd8ff28..c7f8a9017b 100644 --- a/modules/angular2/src/core/di/exceptions.ts +++ b/modules/angular2/src/core/di/exceptions.ts @@ -135,6 +135,9 @@ export class CyclicDependencyError extends AbstractBindingError { * ``` */ export abstract class InstantiationError extends WrappedException { + constructor(message, originalException, originalStack, context) { + super(message, originalException, originalStack, context); + } abstract addKey(injector: Injector, key: Key): void; get wrapperMessage(): string { return unimplemented(); }; get causeKey(): Key { return unimplemented(); }; diff --git a/modules/angular2/src/core/linker/element_injector.ts b/modules/angular2/src/core/linker/element_injector.ts index 1aeed3df83..4b18d99961 100644 --- a/modules/angular2/src/core/linker/element_injector.ts +++ b/modules/angular2/src/core/linker/element_injector.ts @@ -30,7 +30,7 @@ import { BindingWithVisibility, DependencyProvider } from 'angular2/src/core/di/injector'; -import {resolveBinding, ResolvedFactory} from 'angular2/src/core/di/binding'; +import {resolveBinding, ResolvedFactory, ResolvedBinding_} from 'angular2/src/core/di/binding'; import {AttributeMetadata, QueryMetadata} from '../metadata/di'; @@ -53,7 +53,6 @@ import {PipeBinding} from '../pipes/pipe_binding'; import {LifecycleHooks} from './interfaces'; import {ViewContainerRef_} from "./view_container_ref"; -import {ResolvedBinding_} from "../di/binding"; var _staticKeys; diff --git a/modules/angular2/src/core/linker/element_ref.ts b/modules/angular2/src/core/linker/element_ref.ts index 3f303c96a4..df2635da03 100644 --- a/modules/angular2/src/core/linker/element_ref.ts +++ b/modules/angular2/src/core/linker/element_ref.ts @@ -1,7 +1,6 @@ import {BaseException, unimplemented} from 'angular2/src/core/facade/exceptions'; import {ViewRef, ViewRef_} from './view_ref'; import {RenderViewRef, RenderElementRef, Renderer} from 'angular2/src/core/render/api'; -import {ChangeDetectorRef} from "../change_detection/change_detector_ref"; /** * Represents a location in a View that has an injection, change-detection and render context diff --git a/modules/angular2/src/core/pipes/pipe_binding.ts b/modules/angular2/src/core/pipes/pipe_binding.ts index 2590924276..1bda08686f 100644 --- a/modules/angular2/src/core/pipes/pipe_binding.ts +++ b/modules/angular2/src/core/pipes/pipe_binding.ts @@ -1,8 +1,7 @@ import {Type} from 'angular2/src/core/facade/lang'; -import {ResolvedFactory, resolveBinding} from 'angular2/src/core/di/binding'; +import {ResolvedFactory, resolveBinding, ResolvedBinding_} from 'angular2/src/core/di/binding'; import {Key, ResolvedBinding, Binding} from 'angular2/src/core/di'; import {PipeMetadata} from '../metadata/directives'; -import {ResolvedBinding_} from "../di/binding"; export class PipeBinding extends ResolvedBinding_ { constructor(public name: string, public pure: boolean, key: Key, diff --git a/modules/angular2/src/core/reflection/reflection_capabilities.ts b/modules/angular2/src/core/reflection/reflection_capabilities.ts index b3e55fe8f0..191727e3c1 100644 --- a/modules/angular2/src/core/reflection/reflection_capabilities.ts +++ b/modules/angular2/src/core/reflection/reflection_capabilities.ts @@ -1,9 +1,15 @@ -import {Type, isPresent, isFunction, global, stringify} from 'angular2/src/core/facade/lang'; +import { + Type, + isPresent, + isFunction, + global, + stringify, + ConcreteType +} from 'angular2/src/core/facade/lang'; import {BaseException, WrappedException} from 'angular2/src/core/facade/exceptions'; import {ListWrapper} from 'angular2/src/core/facade/collection'; import {GetterFn, SetterFn, MethodFn} from './types'; import {PlatformReflectionCapabilities} from 'platform_reflection_capabilities'; -import {ConcreteType} from "../facade/lang"; export class ReflectionCapabilities implements PlatformReflectionCapabilities { private _reflect: any; diff --git a/modules/angular2/src/core/util/decorators.ts b/modules/angular2/src/core/util/decorators.ts index 053792c993..3d8c3ffac4 100644 --- a/modules/angular2/src/core/util/decorators.ts +++ b/modules/angular2/src/core/util/decorators.ts @@ -1,5 +1,4 @@ -import {global, Type, isFunction, stringify} from 'angular2/src/core/facade/lang'; -import {ConcreteType} from "../facade/lang"; +import {ConcreteType, global, Type, isFunction, stringify} from 'angular2/src/core/facade/lang'; /** * Declares the interface to be used with {@link Class}. diff --git a/modules/angular2/src/core/zone/ng_zone.dart b/modules/angular2/src/core/zone/ng_zone.dart index 5ffbe7985e..38a1e09252 100644 --- a/modules/angular2/src/core/zone/ng_zone.dart +++ b/modules/angular2/src/core/zone/ng_zone.dart @@ -293,3 +293,7 @@ class NgZone { zoneValues: {'_innerZone': true}); } } + +class NgZone_ extends NgZone { + NgZone_({bool enableLongStackTrace}) : super(enableLongStackTrace: enableLongStackTrace); +} diff --git a/modules/angular2/src/router/router_outlet.ts b/modules/angular2/src/router/router_outlet.ts index ae15542b27..c1f129f3d7 100644 --- a/modules/angular2/src/router/router_outlet.ts +++ b/modules/angular2/src/router/router_outlet.ts @@ -1,6 +1,6 @@ import {Promise, PromiseWrapper} from 'angular2/src/core/facade/async'; import {StringMapWrapper} from 'angular2/src/core/facade/collection'; -import {isBlank, isPresent} from 'angular2/src/core/facade/lang'; +import {isBlank, isPresent, Type} from 'angular2/src/core/facade/lang'; import {BaseException, WrappedException} from 'angular2/src/core/facade/exceptions'; import {Directive, Attribute} from 'angular2/src/core/metadata'; @@ -12,7 +12,6 @@ import {ComponentInstruction, RouteParams} from './instruction'; import {ROUTE_DATA} from './route_data'; import * as hookMod from './lifecycle_annotations'; import {hasLifecycleHook} from './route_lifecycle_reflector'; -import {Type} from "../core/facade/lang"; let _resolveToTrue = PromiseWrapper.resolve(true); @@ -25,59 +24,14 @@ let _resolveToTrue = PromiseWrapper.resolve(true); * * ``` */ -export abstract class RouterOutlet { - name: string = null; - - /** - * Called by the Router to instantiate a new component during the commit phase of a navigation. - * This method in turn is responsible for calling the `onActivate` hook of its child. - */ - abstract activate(nextInstruction: ComponentInstruction): Promise; - - /** - * Called by the {@link Router} during the commit phase of a navigation when an outlet - * reuses a component between different routes. - * This method in turn is responsible for calling the `onReuse` hook of its child. - */ - abstract reuse(nextInstruction: ComponentInstruction): Promise; - - /** - * Called by the {@link Router} when an outlet reuses a component across navigations. - * This method in turn is responsible for calling the `onReuse` hook of its child. - */ - abstract deactivate(nextInstruction: ComponentInstruction): Promise; - - /** - * Called by the {@link Router} during recognition phase of a navigation. - * - * If this resolves to `false`, the given navigation is cancelled. - * - * This method delegates to the child component's `canDeactivate` hook if it exists, - * and otherwise resolves to true. - */ - abstract canDeactivate(nextInstruction: ComponentInstruction): Promise; - - /** - * Called by the {@link Router} during recognition phase of a navigation. - * - * If the new child component has a different Type than the existing child component, - * this will resolve to `false`. You can't reuse an old component when the new component - * is of a different Type. - * - * Otherwise, this method delegates to the child component's `canReuse` hook if it exists, - * or resolves to true if the hook is not present. - */ - abstract canReuse(nextInstruction: ComponentInstruction): Promise; -} - @Directive({selector: 'router-outlet'}) -export class RouterOutlet_ extends RouterOutlet { +export class RouterOutlet { + name: string = null; private _componentRef: ComponentRef = null; private _currentInstruction: ComponentInstruction = null; constructor(private _elementRef: ElementRef, private _loader: DynamicComponentLoader, private _parentRouter: routerMod.Router, @Attribute('name') nameAttr: string) { - super(); if (isPresent(nameAttr)) { this.name = nameAttr; this._parentRouter.registerAuxOutlet(this); @@ -86,6 +40,10 @@ export class RouterOutlet_ extends RouterOutlet { } } + /** + * Called by the Router to instantiate a new component during the commit phase of a navigation. + * This method in turn is responsible for calling the `onActivate` hook of its child. + */ activate(nextInstruction: ComponentInstruction): Promise { var previousInstruction = this._currentInstruction; this._currentInstruction = nextInstruction; @@ -107,6 +65,11 @@ export class RouterOutlet_ extends RouterOutlet { }); } + /** + * Called by the {@link Router} during the commit phase of a navigation when an outlet + * reuses a component between different routes. + * This method in turn is responsible for calling the `onReuse` hook of its child. + */ reuse(nextInstruction: ComponentInstruction): Promise { var previousInstruction = this._currentInstruction; this._currentInstruction = nextInstruction; @@ -120,6 +83,10 @@ export class RouterOutlet_ extends RouterOutlet { true); } + /** + * Called by the {@link Router} when an outlet reuses a component across navigations. + * This method in turn is responsible for calling the `onReuse` hook of its child. + */ deactivate(nextInstruction: ComponentInstruction): Promise { var next = _resolveToTrue; if (isPresent(this._componentRef) && isPresent(this._currentInstruction) && @@ -135,6 +102,14 @@ export class RouterOutlet_ extends RouterOutlet { }); } + /** + * Called by the {@link Router} during recognition phase of a navigation. + * + * If this resolves to `false`, the given navigation is cancelled. + * + * This method delegates to the child component's `canDeactivate` hook if it exists, + * and otherwise resolves to true. + */ canDeactivate(nextInstruction: ComponentInstruction): Promise { if (isBlank(this._currentInstruction)) { return _resolveToTrue; @@ -146,6 +121,16 @@ export class RouterOutlet_ extends RouterOutlet { return _resolveToTrue; } + /** + * Called by the {@link Router} during recognition phase of a navigation. + * + * If the new child component has a different Type than the existing child component, + * this will resolve to `false`. You can't reuse an old component when the new component + * is of a different Type. + * + * Otherwise, this method delegates to the child component's `canReuse` hook if it exists, + * or resolves to true if the hook is not present. + */ canReuse(nextInstruction: ComponentInstruction): Promise { var result; diff --git a/modules/angular2/test/core/application_spec.ts b/modules/angular2/test/core/application_spec.ts index 33a0cb6ca8..3acafc8ea2 100644 --- a/modules/angular2/test/core/application_spec.ts +++ b/modules/angular2/test/core/application_spec.ts @@ -21,7 +21,7 @@ import {bind, Inject, Injector, LifeCycle} from 'angular2/core'; import {ExceptionHandler} from 'angular2/src/core/facade/exceptions'; import {Testability, TestabilityRegistry} from 'angular2/src/core/testability/testability'; import {IS_DART} from '../platform'; -import {ComponentRef_} from "../../src/core/linker/dynamic_component_loader"; +import {ComponentRef_} from "angular2/src/core/linker/dynamic_component_loader"; @Component({selector: 'hello-app'}) @View({template: '{{greeting}} world!'}) diff --git a/modules/angular2/test/core/life_cycle/life_cycle_spec.ts b/modules/angular2/test/core/life_cycle/life_cycle_spec.ts index e07cdaed31..fa871f6f5e 100644 --- a/modules/angular2/test/core/life_cycle/life_cycle_spec.ts +++ b/modules/angular2/test/core/life_cycle/life_cycle_spec.ts @@ -14,7 +14,7 @@ import { inject } from 'angular2/test_lib'; import {SpyChangeDetector} from '../spies'; -import {LifeCycle_} from "../../../src/core/life_cycle/life_cycle"; +import {LifeCycle_} from "angular2/src/core/life_cycle/life_cycle"; export function main() { describe("LifeCycle", () => { diff --git a/modules/angular2/test/core/linker/compiler_spec.ts b/modules/angular2/test/core/linker/compiler_spec.ts index 0fb703aebe..44d8b213cb 100644 --- a/modules/angular2/test/core/linker/compiler_spec.ts +++ b/modules/angular2/test/core/linker/compiler_spec.ts @@ -24,7 +24,7 @@ import {Compiler} from 'angular2/src/core/linker/compiler'; import {ProtoViewFactory} from 'angular2/src/core/linker/proto_view_factory'; import {reflector, ReflectionInfo} from 'angular2/src/core/reflection/reflection'; import {AppProtoView} from 'angular2/src/core/linker/view'; -import {Compiler_} from "../../../src/core/linker/compiler"; +import {Compiler_} from "angular2/src/core/linker/compiler"; export function main() { describe('Compiler', () => { @@ -37,8 +37,10 @@ export function main() { protoViewFactorySpy = new SpyProtoViewFactory(); someProtoView = new AppProtoView(null, null, null, null, null, null); protoViewFactorySpy.spy('createHost').andReturn(someProtoView); - return - [bind(ProtoViewFactory).toValue(protoViewFactorySpy), bind(Compiler).toClass(Compiler_)]; + var factoryBinding = bind(ProtoViewFactory).toValue(protoViewFactorySpy); + var classBinding = bind(Compiler).toClass(Compiler_); + var bindings = [factoryBinding, classBinding]; + return bindings; }); beforeEach(inject([Compiler], (_compiler) => { diff --git a/modules/angular2/test/core/linker/dynamic_component_loader_spec.ts b/modules/angular2/test/core/linker/dynamic_component_loader_spec.ts index c12b0268db..60629b6b0e 100644 --- a/modules/angular2/test/core/linker/dynamic_component_loader_spec.ts +++ b/modules/angular2/test/core/linker/dynamic_component_loader_spec.ts @@ -24,7 +24,7 @@ import {DynamicComponentLoader} from 'angular2/src/core/linker/dynamic_component import {ElementRef} from 'angular2/src/core/linker/element_ref'; import {DOCUMENT} from 'angular2/src/core/render/render'; import {DOM} from 'angular2/src/core/dom/dom_adapter'; -import {RootTestComponent_} from "../../../src/test_lib/test_component_builder"; +import {RootTestComponent_} from "angular2/src/test_lib/test_component_builder"; export function main() { describe('DynamicComponentLoader', function() { diff --git a/modules/angular2/test/core/linker/element_injector_spec.ts b/modules/angular2/test/core/linker/element_injector_spec.ts index 682c6a1cc6..22149b4b5a 100644 --- a/modules/angular2/test/core/linker/element_injector_spec.ts +++ b/modules/angular2/test/core/linker/element_injector_spec.ts @@ -39,7 +39,7 @@ import { } from 'angular2/src/core/metadata'; import {OnDestroy} from 'angular2/lifecycle_hooks'; import {bind, Injector, Binding, Optional, Inject, Injectable, Self, SkipSelf, InjectMetadata, Host, HostMetadata, SkipSelfMetadata} from 'angular2/core'; -import {ViewContainerRef} from 'angular2/src/core/linker/view_container_ref'; +import {ViewContainerRef, ViewContainerRef_} from 'angular2/src/core/linker/view_container_ref'; import {TemplateRef, TemplateRef_} from 'angular2/src/core/linker/template_ref'; import {ElementRef} from 'angular2/src/core/linker/element_ref'; import {DynamicChangeDetector, ChangeDetectorRef, Parser, Lexer} from 'angular2/src/core/change_detection/change_detection'; @@ -905,7 +905,7 @@ export function main() { it('should inject ViewContainerRef', () => { var inj = injector(ListWrapper.concat([NeedsViewContainer], extraBindings)); - expect(inj.get(NeedsViewContainer).viewContainer).toBeAnInstanceOf(ViewContainerRef); + expect(inj.get(NeedsViewContainer).viewContainer).toBeAnInstanceOf(ViewContainerRef_); }); it("should inject TemplateRef", () => { diff --git a/modules/angular2/test/core/linker/integration_spec.ts b/modules/angular2/test/core/linker/integration_spec.ts index b3e359d56a..e3ba471bec 100644 --- a/modules/angular2/test/core/linker/integration_spec.ts +++ b/modules/angular2/test/core/linker/integration_spec.ts @@ -90,7 +90,7 @@ import {TemplateRef} from 'angular2/src/core/linker/template_ref'; import {DomRenderer} from 'angular2/src/core/render/dom/dom_renderer'; import {IS_DART} from '../../platform'; -import {Compiler_} from "../../../src/core/linker/compiler"; +import {Compiler_} from "angular2/src/core/linker/compiler"; const ANCHOR_ELEMENT = CONST_EXPR(new OpaqueToken('AnchorElement')); @@ -1018,9 +1018,8 @@ export function main() { })); describe('dynamic ViewContainers', () => { - it('should allow to create a ViewContainerRef at any bound location', - inject([TestComponentBuilder, AsyncTestCompleter, bind(Compiler).toClass(Compiler_)], + inject([TestComponentBuilder, AsyncTestCompleter, Compiler], (tcb: TestComponentBuilder, async, compiler) => { tcb.overrideView(MyComp, new ViewMetadata({ template: '
', diff --git a/modules/angular2/test/core/pipes/spies.ts b/modules/angular2/test/core/pipes/spies.ts index 5aac0afcae..d9edf4cfbd 100644 --- a/modules/angular2/test/core/pipes/spies.ts +++ b/modules/angular2/test/core/pipes/spies.ts @@ -1,7 +1,7 @@ -import {ChangeDetectorRef} from 'angular2/src/core/change_detection/change_detection'; +import {ChangeDetectorRef_} from 'angular2/src/core/change_detection/change_detector_ref'; import {SpyObject, proxy} from 'angular2/test_lib'; export class SpyChangeDetectorRef extends SpyObject { - constructor() { super(ChangeDetectorRef); } + constructor() { super(ChangeDetectorRef_); } } \ No newline at end of file diff --git a/modules/angular2/test/core/render/dom/events/event_manager_spec.ts b/modules/angular2/test/core/render/dom/events/event_manager_spec.ts index 0d4abc29e5..7b2458476f 100644 --- a/modules/angular2/test/core/render/dom/events/event_manager_spec.ts +++ b/modules/angular2/test/core/render/dom/events/event_manager_spec.ts @@ -108,7 +108,6 @@ class FakeEventManagerPlugin extends EventManagerPlugin { class FakeNgZone extends NgZone_ { constructor() { super({enableLongStackTrace: false}); } - run(fn) { fn(); } runOutsideAngular(fn) { return fn(); } diff --git a/modules/angular2/test/core/spies.dart b/modules/angular2/test/core/spies.dart index 427873bfd0..848ca4ecf4 100644 --- a/modules/angular2/test/core/spies.dart +++ b/modules/angular2/test/core/spies.dart @@ -53,7 +53,7 @@ class SpyView extends SpyObject implements AppView { } @proxy -class SpyElementRef extends SpyObject implements ElementRef { +class SpyElementRef extends SpyObject implements ElementRef_ { noSuchMethod(m) => super.noSuchMethod(m); } diff --git a/modules/angular2/test/http/backends/jsonp_backend_spec.ts b/modules/angular2/test/http/backends/jsonp_backend_spec.ts index 09a8d7d7ec..82a0d4dbdc 100644 --- a/modules/angular2/test/http/backends/jsonp_backend_spec.ts +++ b/modules/angular2/test/http/backends/jsonp_backend_spec.ts @@ -16,7 +16,8 @@ import {BrowserJsonp} from 'angular2/src/http/backends/browser_jsonp'; import { JSONPConnection, JSONPConnection_, - JSONPBackend + JSONPBackend, + JSONPBackend_ } from 'angular2/src/http/backends/jsonp_backend'; import {bind, Injector} from 'angular2/core'; import {isPresent, StringWrapper} from 'angular2/src/core/facade/lang'; @@ -74,7 +75,7 @@ export function main() { bind(ResponseOptions) .toClass(BaseResponseOptions), bind(BrowserJsonp).toClass(MockBrowserJsonp), - JSONPBackend + bind(JSONPBackend).toClass(JSONPBackend_) ]); backend = injector.get(JSONPBackend); let base = new BaseRequestOptions(); diff --git a/modules/angular2/test/router/router_link_spec.ts b/modules/angular2/test/router/router_link_spec.ts index 83d60be677..23490c05bc 100644 --- a/modules/angular2/test/router/router_link_spec.ts +++ b/modules/angular2/test/router/router_link_spec.ts @@ -32,7 +32,7 @@ import { } from 'angular2/router'; import {DOM} from 'angular2/src/core/dom/dom_adapter'; -import {ComponentInstruction_} from "../../src/router/instruction"; +import {ComponentInstruction_} from "angular2/src/router/instruction"; var dummyInstruction = new Instruction(new ComponentInstruction_('detail', [], null), null, {}); diff --git a/modules/angular2/test/tools/spies.dart b/modules/angular2/test/tools/spies.dart index a1020e1c0e..1356186b91 100644 --- a/modules/angular2/test/tools/spies.dart +++ b/modules/angular2/test/tools/spies.dart @@ -1,7 +1,7 @@ import 'package:angular2/test_lib.dart' show SpyObject; import 'package:angular2/core.dart' show LifeCycle, Injector, bind; import 'package:angular2/src/core/linker/dynamic_component_loader.dart' - show ComponentRef; + show ComponentRef_; import 'dart:js'; @proxy @@ -10,7 +10,7 @@ class SpyLifeCycle extends SpyObject implements LifeCycle { } @proxy -class SpyComponentRef extends SpyObject implements ComponentRef { +class SpyComponentRef extends SpyObject implements ComponentRef_ { Injector injector; SpyComponentRef() { diff --git a/modules/angular2/test/web_workers/worker/renderer_integration_spec.ts b/modules/angular2/test/web_workers/worker/renderer_integration_spec.ts index c802a1615a..977e550b20 100644 --- a/modules/angular2/test/web_workers/worker/renderer_integration_spec.ts +++ b/modules/angular2/test/web_workers/worker/renderer_integration_spec.ts @@ -38,7 +38,7 @@ import { RenderFragmentRef, Renderer } from "angular2/src/core/render/api"; -import {DomRenderer} from 'angular2/src/core/render/dom/dom_renderer'; +import {DomRenderer, DomRenderer_} from 'angular2/src/core/render/dom/dom_renderer'; import {DefaultRenderView} from 'angular2/src/core/render/view'; import { RenderProtoViewRefStore, @@ -106,7 +106,8 @@ export function main() { bind(RenderProtoViewRefStore) .toValue(uiRenderProtoViewStore), bind(RenderViewWithFragmentsStore).toValue(uiRenderViewStore), - bind(Renderer).toClass(DomRenderer) + bind(DomRenderer).toClass(DomRenderer_), + bind(Renderer).toAlias(DomRenderer) ]); var uiSerializer = uiInjector.get(Serializer); var domRenderer = uiInjector.get(DomRenderer);