Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(49)

Unified Diff: third_party/pkg/angular/lib/mock/module.dart

Issue 257423008: Update all Angular libs (run update_all.sh). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/pkg/angular/lib/mock/mock_window.dart ('k') | third_party/pkg/angular/lib/mock/probe.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « third_party/pkg/angular/lib/mock/mock_window.dart ('k') | third_party/pkg/angular/lib/mock/probe.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698