Index: tests/standalone/io/http_server_socket_test.dart |
diff --git a/tests/standalone/io/http_server_socket_test.dart b/tests/standalone/io/http_server_socket_test.dart |
index a7722caa373e1918487e073b267d74b399db0950..120001caa4efbc4f01f7d0b47cd1df61c5db4716 100644 |
--- a/tests/standalone/io/http_server_socket_test.dart |
+++ b/tests/standalone/io/http_server_socket_test.dart |
@@ -84,6 +84,18 @@ class SocketMock implements Socket { |
} |
} |
+ List<int> read([int len]) { |
+ var result; |
+ if (len == null) { |
+ result = _data; |
+ _data = []; |
+ } else { |
+ result = new Uint8List(len); |
+ readList(result, 0, len); |
+ } |
+ return result; |
+ } |
+ |
int readList(List<int> buffer, int offset, int count) { |
int max = min(count, _data.length); |
buffer.setRange(offset, max, _data); |