fix(WebWorker): Add zone support to MessageBus

Closes #4053
This commit is contained in:
Jason Teplitz
2015-09-08 10:52:06 -07:00
parent 3b9c08676a
commit f3da37c92f
35 changed files with 628 additions and 365 deletions

View File

@ -1,9 +1,17 @@
import {NgZone} from 'angular2/src/core/zone/ng_zone';
export class MockNgZone extends NgZone {
_onEventDone: () => void;
constructor() { super({enableLongStackTrace: false}); }
run(fn: Function): any { return fn(); }
runOutsideAngular(fn: Function): any { return fn(); }
overrideOnEventDone(fn: () => void, opt_waitForAsync: boolean = false): void {
this._onEventDone = fn;
}
simulateZoneExit(): void { this._onEventDone(); }
}