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

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

Issue 14766003: Add v6Only named argument to ServerSocket and etc. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Merge Created 7 years, 8 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
« runtime/bin/socket_linux.cc ('K') | « sdk/lib/io/socket.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 80d9e7da092398e3c9cf0d87a3ca81f1f9e1f9fa..d483b8eb2656d3f714f1a6695bd98e1c9f835293 100644
--- a/tests/standalone/io/socket_ipv6_test.dart
+++ b/tests/standalone/io/socket_ipv6_test.dart
@@ -88,6 +88,21 @@ void testIPv4Lookup() {
});
}
+void testIPv4toIPv6_IPV6Only() {
+ InternetAddress.lookup("::0", type: ANY)
+ .then((serverAddr) {
+ ServerSocket.bind(serverAddr.first, 0, v6Only: true)
+ .then((server) {
+ server.listen((socket) {
+ throw "Unexpcted socket";
+ });
+ Socket.connect("127.0.0.1", server.port).catchError((error) {
+ server.close();
+ });
+ });
+ });
+}
+
void main() {
testIPv6toIPv6();
testIPv4toIPv6();
@@ -95,4 +110,6 @@ void main() {
testIPv4toIPv4();
testIPv6Lookup();
testIPv4Lookup();
+
+ testIPv4toIPv6_IPV6Only();
}
« runtime/bin/socket_linux.cc ('K') | « sdk/lib/io/socket.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698