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

Unified Diff: tests/lib_strong/async/async_await_zones_test.dart

Issue 3014593002: Use generic functions in zones. (Closed)
Patch Set: Added changes missing from patch set #2 Created 3 years, 3 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 | « tests/lib/mirrors/invocation_fuzz_test.dart ('k') | tests/lib_strong/async/future_timeout_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/lib_strong/async/async_await_zones_test.dart
diff --git a/tests/lib_strong/async/async_await_zones_test.dart b/tests/lib_strong/async/async_await_zones_test.dart
index cb7011caf896156b5b440a14b9644682a335bab0..fb3dc50c062e897abd081adebe0c00bdb797d193 100644
--- a/tests/lib_strong/async/async_await_zones_test.dart
+++ b/tests/lib_strong/async/async_await_zones_test.dart
@@ -94,7 +94,8 @@ increaseDepth() {
Expect.isTrue(depth < 20);
}
-registerCallback(Zone self, ZoneDelegate parent, Zone zone, f) {
+ZoneCallback<R> registerCallback<R>(
+ Zone self, ZoneDelegate parent, Zone zone, R f()) {
var oldDepth = depth;
increaseDepth();
return parent.registerCallback(zone, () {
@@ -103,7 +104,8 @@ registerCallback(Zone self, ZoneDelegate parent, Zone zone, f) {
});
}
-registerUnaryCallback(Zone self, ZoneDelegate parent, Zone zone, f) {
+ZoneUnaryCallback<R, T> registerUnaryCallback<R, T>(
+ Zone self, ZoneDelegate parent, Zone zone, R f(T arg)) {
var oldDepth = depth;
increaseDepth();
return parent.registerUnaryCallback(zone, (x) {
@@ -112,7 +114,8 @@ registerUnaryCallback(Zone self, ZoneDelegate parent, Zone zone, f) {
});
}
-registerBinaryCallback(Zone self, ZoneDelegate parent, Zone zone, f) {
+ZoneBinaryCallback<R, T1, T2> registerBinaryCallback<R, T1, T2>(
+ Zone self, ZoneDelegate parent, Zone zone, R f(T1 arg1, T2 arg2)) {
var oldDepth = depth;
increaseDepth();
return parent.registerBinaryCallback(zone, (x, y) {
@@ -121,7 +124,7 @@ registerBinaryCallback(Zone self, ZoneDelegate parent, Zone zone, f) {
});
}
-sm(Zone self, ZoneDelegate parent, Zone zone, f) {
+void sm(Zone self, ZoneDelegate parent, Zone zone, f) {
var oldDepth = depth;
increaseDepth();
return parent.scheduleMicrotask(zone, () {
« no previous file with comments | « tests/lib/mirrors/invocation_fuzz_test.dart ('k') | tests/lib_strong/async/future_timeout_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698