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

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

Issue 22859069: Reapply "Make Map constructors return LinkedHashMap." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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
« tests/corelib/map_values2_test.dart ('K') | « tests/corelib/map_values2_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/io/http_detach_socket_test.dart
diff --git a/tests/standalone/io/http_detach_socket_test.dart b/tests/standalone/io/http_detach_socket_test.dart
index 1ced3d86342a34a723716dee21c6245e5afdb148..6b38de25a0d9f787085a95d6972c6be2a4903cb1 100644
--- a/tests/standalone/io/http_detach_socket_test.dart
+++ b/tests/standalone/io/http_detach_socket_test.dart
@@ -78,12 +78,15 @@ void testClientDetachSocket() {
socket.listen(
(data) => body.write(new String.fromCharCodes(data)),
onDone: () {
- Expect.equals("GET / HTTP/1.1\r\n"
- "accept-encoding: gzip\r\n"
- "content-length: 0\r\n"
- "host: 127.0.0.1:${server.port}\r\n\r\n"
- "Some data",
- body.toString());
+ List<String> lines = body.toString().split("\r\n");
+ Expect.equals(6, lines.length);
+ Expect.equals("GET / HTTP/1.1", lines[0]);
+ Expect.equals("", lines[4]);
+ Expect.equals("Some data", lines[5]);
+ lines.sort(); // Lines 1-3 becomes 3-5 in a fixed order.
+ Expect.equals("accept-encoding: gzip", lines[3]);
+ Expect.equals("content-length: 0", lines[4]);
+ Expect.equals("host: 127.0.0.1:${server.port}", lines[5]);
socket.close();
});
server.close();
« tests/corelib/map_values2_test.dart ('K') | « tests/corelib/map_values2_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698