| Index: third_party/pkg/angular/lib/mock/module.dart
|
| diff --git a/third_party/pkg/angular/lib/mock/module.dart b/third_party/pkg/angular/lib/mock/module.dart
|
| index 92b7386a64631bcdd3761c6ea05b9b604f17255f..9f5ca5f84e32cae6729dd1383a055f75ceb1ec2a 100644
|
| --- a/third_party/pkg/angular/lib/mock/module.dart
|
| +++ b/third_party/pkg/angular/lib/mock/module.dart
|
| @@ -1,26 +1,42 @@
|
| +/**
|
| +*
|
| +* Classes and utilities for testing and prototyping in AngularDart.
|
| +*
|
| +* This is an optional library. You must import it in addition to the [angular.dart]
|
| +* (#angular/angular) library,
|
| +* like so:
|
| +*
|
| +* import 'package:angular/angular.dart';
|
| +* import 'package:angular/mock/module.dart';
|
| +*
|
| +*
|
| +*/
|
| library angular.mock;
|
|
|
| import 'dart:async' as dart_async;
|
| import 'dart:collection' show ListBase;
|
| -import 'dart:convert' show JSON;
|
| import 'dart:html';
|
| import 'dart:js' as js;
|
| +
|
| import 'package:angular/angular.dart';
|
| -import 'package:angular/utils.dart' as utils;
|
| +import 'package:angular/core/module_internal.dart';
|
| +import 'package:angular/core_dom/module_internal.dart';
|
| +import 'package:angular/core/parser/parser.dart';
|
| import 'package:di/di.dart';
|
| -import 'package:di/dynamic_injector.dart';
|
| -import 'package:unittest/mock.dart';
|
| +import 'package:mock/mock.dart';
|
| +
|
| +import 'http_backend.dart';
|
|
|
| +export 'package:angular/mock/test_injection.dart';
|
| +export 'http_backend.dart';
|
| export 'zone.dart';
|
|
|
| part 'debug.dart';
|
| part 'exception_handler.dart';
|
| -part 'http_backend.dart';
|
| part 'log.dart';
|
| part 'probe.dart';
|
| part 'test_bed.dart';
|
| part 'mock_window.dart';
|
| -part 'test_injection.dart';
|
|
|
| /**
|
| * Use in addition to [AngularModule] in your tests.
|
| @@ -32,7 +48,7 @@ part 'test_injection.dart';
|
| * - [MockHttpBackend] instead of [HttpBackend]
|
| * - [Logger]
|
| * - [RethrowExceptionHandler] instead of [ExceptionHandler]
|
| - * - [NgZone] which displays errors to console;
|
| + * - [VmTurnZone] which displays errors to console;
|
| */
|
| class AngularMockModule extends Module {
|
| AngularMockModule() {
|
| @@ -41,9 +57,11 @@ class AngularMockModule extends Module {
|
| type(Probe);
|
| type(Logger);
|
| type(MockHttpBackend);
|
| + value(Element, document.body);
|
| + value(Node, document.body);
|
| factory(HttpBackend, (Injector i) => i.get(MockHttpBackend));
|
| - factory(NgZone, (_) {
|
| - return new NgZone()
|
| + factory(VmTurnZone, (_) {
|
| + return new VmTurnZone()
|
| ..onError = (e, s, LongStackTrace ls) => dump('EXCEPTION: $e\n$s\n$ls');
|
| });
|
| type(Window, implementedBy: MockWindow);
|
|
|