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

Unified Diff: pkg/observe/test/observe_test_utils.dart

Issue 132403010: big update to observe, template_binding, polymer (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 11 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
Index: pkg/observe/test/observe_test_utils.dart
diff --git a/pkg/observe/test/observe_test_utils.dart b/pkg/observe/test/observe_test_utils.dart
index af447dcff126bfc7b79dae0b7d1632551218cd06..02a88e2430fb3f385949585f1a097e7b0729e1fc 100644
--- a/pkg/observe/test/observe_test_utils.dart
+++ b/pkg/observe/test/observe_test_utils.dart
@@ -4,12 +4,16 @@
library observe.test.observe_test_utils;
+import 'dart:async';
import 'package:observe/observe.dart';
-
import 'package:unittest/unittest.dart';
+export 'package:observe/src/dirty_check.dart' show dirtyCheckZone;
-import 'package:observe/src/microtask.dart';
-export 'package:observe/src/microtask.dart';
+/// A small method to help readability. Used to cause the next "then" in a chain
+/// to happen in the next microtask:
+///
+/// future.then(newMicrotask).then(...)
+newMicrotask(_) => new Future.value();
// TODO(jmesserly): use matchers when we have a way to compare ChangeRecords.
// For now just use the toString.
@@ -21,13 +25,3 @@ List getListChangeRecords(List changes, int index) => changes
List getPropertyChangeRecords(List changes, Symbol property) => changes
.where((c) => c is PropertyChangeRecord && c.name == property).toList();
-
-/**
- * This is a special kind of unit [test], that supports
- * calling [performMicrotaskCheckpoint] during the test to pump events
- * that original from observable objects.
- */
-observeTest(name, testCase) => test(name, wrapMicrotask(testCase));
-
-/** The [solo_test] version of [observeTest]. */
-solo_observeTest(name, testCase) => solo_test(name, wrapMicrotask(testCase));

Powered by Google App Engine
This is Rietveld 408576698