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

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

Issue 772443002: Version 1.8.2 (Closed) Base URL: http://dart.googlecode.com/svn/branches/1.8/
Patch Set: Created 6 years 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 | « dart/tests/language/await_regression_test.dart ('k') | dart/tools/VERSION » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/tests/standalone/io/http_ipv6_test.dart
===================================================================
--- dart/tests/standalone/io/http_ipv6_test.dart (revision 41980)
+++ dart/tests/standalone/io/http_ipv6_test.dart (working copy)
@@ -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 @@
}).whenComplete(() {
server.close();
client.close();
+ asyncEnd();
});
});
}
« no previous file with comments | « dart/tests/language/await_regression_test.dart ('k') | dart/tools/VERSION » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698