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

Unified Diff: test/http_body_test.dart

Issue 2945343002: Change '127.0.0.1' to 'localhost' to support both IPv4 and IPv6 envs. (Closed)
Patch Set: Created 3 years, 6 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: test/http_body_test.dart
diff --git a/test/http_body_test.dart b/test/http_body_test.dart
index e8d84c089332e5aeb09a07160f4bcf55d3b16f6e..bb74a5dfee5c1897583853d6271083f55ffd5e7a 100644
--- a/test/http_body_test.dart
+++ b/test/http_body_test.dart
@@ -14,7 +14,7 @@ void testHttpClientResponseBody() {
dynamic expectedBody,
String type,
[bool shouldFail = false]) {
- HttpServer.bind("127.0.0.1", 0).then((server) {
+ HttpServer.bind("localhost", 0).then((server) {
Bill Hesse 2017/06/23 13:49:08 Consider if you want to use InternetAddress.lookup
keertip 2017/06/27 17:51:06 Acknowledged.
server.listen((request) {
request.listen(
(_) {},
@@ -27,7 +27,7 @@ void testHttpClientResponseBody() {
});
var client = new HttpClient();
- client.get("127.0.0.1", server.port, "/")
+ client.get("localhost", server.port, "/")
.then((request) => request.close())
.then(HttpBodyHandler.processResponse)
.then((body) {
@@ -87,7 +87,7 @@ void testHttpServerRequestBody() {
String type,
{bool shouldFail: false,
Encoding defaultEncoding: UTF8}) {
- HttpServer.bind("127.0.0.1", 0).then((server) {
+ HttpServer.bind("localhost", 0).then((server) {
server.transform(new HttpBodyHandler(defaultEncoding: defaultEncoding))
.listen((body) {
if (shouldFail) return;
@@ -143,7 +143,7 @@ void testHttpServerRequestBody() {
});
var client = new HttpClient();
- client.post("127.0.0.1", server.port, "/")
+ client.post("localhost", server.port, "/")
.then((request) {
if (mimeType != null) {
request.headers.contentType =
« pubspec.yaml ('K') | « pubspec.yaml ('k') | test/http_multipart_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698