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

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

Issue 14864009: Keep track of when a socket has been destroyed (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 7 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/echo_server_stream_test.dart
diff --git a/tests/standalone/io/echo_server_stream_test.dart b/tests/standalone/io/echo_server_stream_test.dart
index daf2c233b40d09ec756ff63ed40ad69894c4ac81..cc8b9fef46e93d5f3aa9a887a7e388e573462464 100644
--- a/tests/standalone/io/echo_server_stream_test.dart
+++ b/tests/standalone/io/echo_server_stream_test.dart
@@ -17,6 +17,7 @@ import "dart:io";
import "dart:isolate";
part "testing_server.dart";
+int count = 0;
class EchoServerGame {
static const MSGSIZE = 10;
@@ -40,6 +41,7 @@ class EchoServerGame {
List<int> data;
void onData(List<int> data) {
+ print("onData");
Anders Johnsen 2013/05/08 13:11:47 Debug stuff in this file.
int bytesRead = data.length;
for (int i = 0; i < data.length; i++) {
Expect.equals(FIRSTCHAR + i + offset, data[i]);
@@ -48,6 +50,7 @@ class EchoServerGame {
}
void onClosed() {
+ print("onClosed ${++count}");
Expect.equals(MSGSIZE, offset);
_messages++;
if (_messages < MESSAGES) {
@@ -70,10 +73,12 @@ class EchoServerGame {
onDone: onClosed);
_socket.add(_buffer);
_socket.close();
+ print("After close");
data = new List<int>(MSGSIZE);
}
Socket.connect(TestingServer.HOST, _port).then((s) {
+ print("After connect");
_socket = s;
connectHandler();
});
@@ -116,6 +121,7 @@ class EchoServer extends TestingServer {
int offset = 0;
void dataReceived(List<int> data) {
+ print("dataReceived");
int bytesRead;
bytesRead = data.length;
if (bytesRead > 0) {

Powered by Google App Engine
This is Rietveld 408576698