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

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

Issue 201483002: Cleanup for pkg/observe and pkg/polymer (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: fixed other pubspec Created 6 years, 9 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 | « pkg/observe/pubspec.yaml ('k') | pkg/observe/test/path_observer_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/observe/test/observe_test.dart
diff --git a/pkg/observe/test/observe_test.dart b/pkg/observe/test/observe_test.dart
index f973db9a10491aa6fababd1f8e5a2aa689371421..802e4d1f76c2570a6a8a7cae3678c5d0fef56ed4 100644
--- a/pkg/observe/test/observe_test.dart
+++ b/pkg/observe/test/observe_test.dart
@@ -43,7 +43,7 @@ void _tests() {
var maxNumIterations = dirty_check.MAX_DIRTY_CHECK_CYCLES;
var x = new WatcherModel(0);
- var sub = x.changes.listen(expectAsync1((_) { x.value++; },
+ var sub = x.changes.listen(expectAsync((_) { x.value++; },
count: maxNumIterations));
x.value = 1;
Observable.dirtyCheck();
@@ -82,7 +82,7 @@ void _observeTests(createModel(x)) {
});
test('handle future result', () {
- var callback = expectAsync0((){});
+ var callback = expectAsync((){});
return new Future(callback);
});
@@ -106,7 +106,7 @@ void _observeTests(createModel(x)) {
var t = createModel(123);
int called = 0;
- subs.add(t.changes.listen(expectAsync1((records) {
+ subs.add(t.changes.listen(expectAsync((records) {
called++;
expectPropertyChanges(records, watch ? 1 : 2);
})));
@@ -120,7 +120,7 @@ void _observeTests(createModel(x)) {
var t = createModel(123);
int called = 0;
- subs.add(t.changes.listen(expectAsync1((records) {
+ subs.add(t.changes.listen(expectAsync((records) {
called++;
expectPropertyChanges(records, 1);
if (called == 1) {
@@ -139,8 +139,8 @@ void _observeTests(createModel(x)) {
expectPropertyChanges(records, watch ? 1 : 2);
};
- subs.add(t.changes.listen(expectAsync1(verifyRecords)));
- subs.add(t.changes.listen(expectAsync1(verifyRecords)));
+ subs.add(t.changes.listen(expectAsync(verifyRecords)));
+ subs.add(t.changes.listen(expectAsync(verifyRecords)));
t.value = 41;
t.value = 42;
@@ -173,7 +173,7 @@ void _observeTests(createModel(x)) {
test('cancel listening', () {
var t = createModel(123);
var sub;
- sub = t.changes.listen(expectAsync1((records) {
+ sub = t.changes.listen(expectAsync((records) {
expectPropertyChanges(records, 1);
sub.cancel();
t.value = 777;
@@ -185,12 +185,12 @@ void _observeTests(createModel(x)) {
test('cancel and reobserve', () {
var t = createModel(123);
var sub;
- sub = t.changes.listen(expectAsync1((records) {
+ sub = t.changes.listen(expectAsync((records) {
expectPropertyChanges(records, 1);
sub.cancel();
- scheduleMicrotask(expectAsync0(() {
- subs.add(t.changes.listen(expectAsync1((records) {
+ scheduleMicrotask(expectAsync(() {
+ subs.add(t.changes.listen(expectAsync((records) {
expectPropertyChanges(records, 1);
})));
t.value = 777;
« no previous file with comments | « pkg/observe/pubspec.yaml ('k') | pkg/observe/test/path_observer_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698