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

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

Issue 759223002: Fix HTTP IPv6 test (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 1 month 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/io/http_ipv6_test.dart
diff --git a/tests/standalone/io/http_ipv6_test.dart b/tests/standalone/io/http_ipv6_test.dart
index 99560f02be5041c1267d7f48d48aa8dbb6e7b927..b0d2acf4980dff04bf80fd20073751600a4760ab 100644
--- a/tests/standalone/io/http_ipv6_test.dart
+++ b/tests/standalone/io/http_ipv6_test.dart
@@ -7,25 +7,27 @@
// VMOptions=--short_socket_write
// VMOptions=--short_socket_read --short_socket_write
-import "package:expect/expect.dart";
import "dart:async";
-import "dart:isolate";
import "dart:io";
+import "package:async_helper/async_helper.dart";
+import "package:expect/expect.dart";
+
// Client makes a HTTP 1.0 request without connection keep alive. The
// server sets a content length but still needs to close the
// connection as there is no keep alive.
void testHttpIPv6() {
+ asyncStart();
HttpServer.bind("::", 0).then((server) {
server.listen((HttpRequest request) {
- Expect.equals(request.headers["host"][0], "[::]:${server.port}");
- Expect.equals(request.requestedUri.host, "::");
+ Expect.equals(request.headers["host"][0], "[::1]:${server.port}");
+ Expect.equals(request.requestedUri.host, "::1");
request.response.close();
});
var client = new HttpClient();
- var url = Uri.parse('http://[::]:${server.port}/xxx');
- Expect.equals(url.host, '::');
+ var url = Uri.parse('http://[::1]:${server.port}/xxx');
+ Expect.equals(url.host, '::1');
client.openUrl('GET', url)
.then((request) => request.close())
.then((response) {
@@ -33,6 +35,7 @@ void testHttpIPv6() {
}).whenComplete(() {
server.close();
client.close();
+ asyncEnd();
});
});
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698