repackaging: all the repackaging changes squashed

This commit is contained in:
Igor Minar
2016-04-28 17:50:03 -07:00
committed by Misko Hevery
parent 505da6c0a8
commit a66cdb469f
860 changed files with 7869 additions and 4985 deletions

View File

@ -1,5 +1,4 @@
import {
AsyncTestCompleter,
beforeEach,
afterEach,
ddescribe,
@ -9,17 +8,25 @@ import {
inject,
it,
xdescribe,
Log,
xit
} from 'angular2/testing_internal';
import {IS_DART, isPresent, stringify} from 'angular2/src/facade/lang';
import {bootstrap, BROWSER_PROVIDERS, BROWSER_APP_PROVIDERS} from 'angular2/platform/browser';
import {ApplicationRef, PlatformRef, disposePlatform} from 'angular2/src/core/application_ref';
import {Console} from 'angular2/src/core/console';
import {Component, Directive, OnDestroy} from 'angular2/core';
import {DOM} from 'angular2/src/platform/dom/dom_adapter';
import {DOCUMENT} from 'angular2/src/platform/dom/dom_tokens';
import {PromiseWrapper, TimerWrapper} from 'angular2/src/facade/async';
} from '@angular/core/testing/testing_internal';
import {
fakeAsync,
flushMicrotasks,
Log,
tick,
} from '@angular/core/testing';
import {AsyncTestCompleter} from '@angular/core/testing/testing_internal';
import {IS_DART, isPresent, stringify} from '../../src/facade/lang';
import {BROWSER_PROVIDERS} from '@angular/platform-browser';
import {BROWSER_APP_DYNAMIC_PROVIDERS} from '@angular/platform-browser-dynamic';
import {bootstrap} from '@angular/platform-browser-dynamic';
import {ApplicationRef, PlatformRef} from '@angular/core/src/application_ref';
import {Console} from '@angular/core/src/console';
import {Component, Directive, OnDestroy} from '@angular/core';
import {getDOM} from '@angular/platform-browser/src/dom/dom_adapter';
import {DOCUMENT} from '@angular/platform-browser/src/dom/dom_tokens';
import {PromiseWrapper, TimerWrapper} from '../../src/facade/async';
import {
provide,
Inject,
@ -29,10 +36,11 @@ import {
coreLoadAndBootstrap,
createPlatform,
ReflectiveInjector
} from 'angular2/core';
import {ExceptionHandler, BaseException} from 'angular2/src/facade/exceptions';
import {Testability, TestabilityRegistry} from 'angular2/src/core/testability/testability';
import {ComponentRef} from "angular2/src/core/linker/component_factory";
} from '@angular/core';
import {disposePlatform} from '@angular/core/src/application_ref';
import {ExceptionHandler, BaseException} from '@angular/core';
import {Testability, TestabilityRegistry} from '@angular/core/src/testability/testability';
import {ComponentRef} from '@angular/core/src/linker/component_factory';
@Component({selector: 'hello-app', template: '{{greeting}} world!'})
class HelloRootCmp {
@ -102,14 +110,14 @@ export function main() {
beforeEach(() => {
disposePlatform();
fakeDoc = DOM.createHtmlDocument();
el = DOM.createElement('hello-app', fakeDoc);
el2 = DOM.createElement('hello-app-2', fakeDoc);
lightDom = DOM.createElement('light-dom-el', fakeDoc);
DOM.appendChild(fakeDoc.body, el);
DOM.appendChild(fakeDoc.body, el2);
DOM.appendChild(el, lightDom);
DOM.setText(lightDom, 'loading');
fakeDoc = getDOM().createHtmlDocument();
el = getDOM().createElement('hello-app', fakeDoc);
el2 = getDOM().createElement('hello-app-2', fakeDoc);
lightDom = getDOM().createElement('light-dom-el', fakeDoc);
getDOM().appendChild(fakeDoc.body, el);
getDOM().appendChild(fakeDoc.body, el2);
getDOM().appendChild(el, lightDom);
getDOM().setText(lightDom, 'loading');
testProviders =
[provide(DOCUMENT, {useValue: fakeDoc}), provide(Console, {useClass: DummyConsole})];
});
@ -140,7 +148,7 @@ export function main() {
});
}));
if (DOM.supportsDOMEvents()) {
if (getDOM().supportsDOMEvents()) {
it('should forward the error to promise when bootstrap fails',
inject([AsyncTestCompleter], (async) => {
// Skip for dart since it causes a confusing error message in console when test passes.
@ -208,7 +216,7 @@ export function main() {
it('should unregister change detectors when components are disposed',
inject([AsyncTestCompleter], (async) => {
var platform = createPlatform(ReflectiveInjector.resolveAndCreate(BROWSER_PROVIDERS));
var app = ReflectiveInjector.resolveAndCreate([BROWSER_APP_PROVIDERS, testProviders],
var app = ReflectiveInjector.resolveAndCreate([BROWSER_APP_DYNAMIC_PROVIDERS, testProviders],
platform.injector)
.get(ApplicationRef);
coreLoadAndBootstrap(app.injector, HelloRootCmp)
@ -250,7 +258,7 @@ export function main() {
log.clear();
var a = ReflectiveInjector.resolveAndCreate(
[
BROWSER_APP_PROVIDERS,
BROWSER_APP_DYNAMIC_PROVIDERS,
provide(APP_INITIALIZER, {useValue: log.fn("app_init1"), multi: true}),
provide(APP_INITIALIZER, {useValue: log.fn("app_init2"), multi: true})
],