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

Unified Diff: tests/standalone/io/socket_close_test.dart

Issue 12213092: Rework Timer interface. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 7 years, 10 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: tests/standalone/io/socket_close_test.dart
diff --git a/tests/standalone/io/socket_close_test.dart b/tests/standalone/io/socket_close_test.dart
index 426f45a557c688fbbfb741981105016f3b24e158..3dddf4efbef5c96f9e4e985fc7ecb708ab1dd27c 100644
--- a/tests/standalone/io/socket_close_test.dart
+++ b/tests/standalone/io/socket_close_test.dart
@@ -33,13 +33,13 @@ class SocketClose {
void proceed() {
if (_iterations < ITERATIONS) {
- new Timer(0, sendData);
+ Timer.run(sendData);
} else {
shutdown();
}
}
- void sendData(Timer timer) {
+ void sendData() {
void dataHandler() {
switch (_mode) {
@@ -296,7 +296,7 @@ class SocketCloseServer {
Expect.fail("Server socket error");
}
- waitForResult(Timer timer) {
+ waitForResult() {
// Make sure all iterations have been run. In multiple of these
// scenarios it is possible to get the SERVERSHUTDOWN message
// before we have received the last close event on the
@@ -332,7 +332,7 @@ class SocketCloseServer {
port.close();
_donePort.send(null);
} else {
- new Timer(100, waitForResult);
+ new Timer(new Duration(milliseconds: 100), waitForResult);
}
}
@@ -354,7 +354,7 @@ class SocketCloseServer {
_server.onError = errorHandlerServer;
replyTo.send(_server.port, null);
} else {
- new Timer(0, waitForResult);
+ Timer.run(waitForResult);
}
}
« no previous file with comments | « tests/standalone/io/skipping_dart2js_compilations_test.dart ('k') | tests/standalone/io/socket_stream_close_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698