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

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

Issue 2893893002: Use generic functions in zones. (Closed)
Patch Set: Fix more tests. Created 3 years, 4 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/compiler/dart2js/dart2js.status ('k') | tests/lib/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/async/async_await_zones_test.dart
diff --git a/tests/lib/async/async_await_zones_test.dart b/tests/lib/async/async_await_zones_test.dart
index cb7011caf896156b5b440a14b9644682a335bab0..9e22029549555a35b96265aa9d19878a480fc3ab 100644
--- a/tests/lib/async/async_await_zones_test.dart
+++ b/tests/lib/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) {
« no previous file with comments | « tests/compiler/dart2js/dart2js.status ('k') | tests/lib/async/future_timeout_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698