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

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

Issue 25010004: Add .address to [Raw]ServerSocket and HttpServer. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Remove 'host' arg from BarbackServer constructor. Created 7 years, 3 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
« no previous file with comments | « tests/standalone/io/http_server_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/socket_ipv6_test.dart
diff --git a/tests/standalone/io/socket_ipv6_test.dart b/tests/standalone/io/socket_ipv6_test.dart
index bded728d20319557ebc4ec702987378f0740aa90..e3a2e9120e8417a862ce8ca31cabff3a9bb45194 100644
--- a/tests/standalone/io/socket_ipv6_test.dart
+++ b/tests/standalone/io/socket_ipv6_test.dart
@@ -5,6 +5,7 @@
import 'dart:io';
import "package:async_helper/async_helper.dart";
+import "package:expect/expect.dart";
const ANY = InternetAddressType.ANY;
@@ -13,6 +14,8 @@ void testIPv6toIPv6() {
InternetAddress.lookup("::0", type: ANY).then((serverAddr) {
InternetAddress.lookup("::1", type: ANY).then((clientAddr) {
ServerSocket.bind(serverAddr.first, 0).then((server) {
+ Expect.equals('::0', server.address.host);
+ Expect.equals('::', server.address.address);
server.listen((socket) {
socket.destroy();
server.close();
@@ -30,6 +33,8 @@ void testIPv4toIPv6() {
asyncStart();
InternetAddress.lookup("::0", type: ANY).then((serverAddr) {
ServerSocket.bind(serverAddr.first, 0).then((server) {
+ Expect.equals('::0', server.address.host);
+ Expect.equals('::', server.address.address);
server.listen((socket) {
socket.destroy();
server.close();
@@ -46,6 +51,8 @@ void testIPv6toIPv4() {
asyncStart();
InternetAddress.lookup("::1", type: ANY).then((clientAddr) {
ServerSocket.bind("127.0.0.1", 0).then((server) {
+ Expect.equals('127.0.0.1', server.address.host);
+ Expect.equals('127.0.0.1', server.address.address);
server.listen((socket) {
throw "Unexpected socket";
});
@@ -60,6 +67,8 @@ void testIPv6toIPv4() {
void testIPv4toIPv4() {
asyncStart();
ServerSocket.bind("127.0.0.1", 0).then((server) {
+ Expect.equals('127.0.0.1', server.address.host);
+ Expect.equals('127.0.0.1', server.address.address);
server.listen((socket) {
socket.destroy();
server.close();
@@ -87,7 +96,7 @@ void testIPv6Lookup() {
void testIPv4Lookup() {
asyncStart();
InternetAddress.lookup("127.0.0.1").then((list) {
- if (list.length < 0) throw "no addresse";
+ if (list.length < 0) throw "no address";
for (var entry in list) {
if (entry.type != InternetAddressType.IP_V4) {
throw "Wrong IP type";
@@ -104,7 +113,7 @@ void testIPv4toIPv6_IPV6Only() {
ServerSocket.bind(serverAddr.first, 0, v6Only: true)
.then((server) {
server.listen((socket) {
- throw "Unexpcted socket";
+ throw "Unexpected socket";
});
Socket.connect("127.0.0.1", server.port).catchError((error) {
server.close();
« no previous file with comments | « tests/standalone/io/http_server_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698