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

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

Issue 14083007: Add new InternetAddress class with a static lookup function (including IPv6 results). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix new test. 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
Index: tests/standalone/io/secure_server_socket_test.dart
diff --git a/tests/standalone/io/secure_server_socket_test.dart b/tests/standalone/io/secure_server_socket_test.dart
index dbe0355b4e2d31cf58b50c7a32f828ece65ffd9b..5e8c95c0594540c7ab1e702c61326922a622c485 100644
--- a/tests/standalone/io/secure_server_socket_test.dart
+++ b/tests/standalone/io/secure_server_socket_test.dart
@@ -12,22 +12,21 @@ import "dart:async";
import "dart:io";
import "dart:isolate";
-const SERVER_ADDRESS = "127.0.0.1";
const HOST_NAME = "localhost";
const CERTIFICATE = "localhost_cert";
void testArguments() {
Expect.throws(() =>
- SecureServerSocket.bind(SERVER_ADDRESS, 65536, 5, CERTIFICATE));
+ SecureServerSocket.bind(HOST_NAME, 65536, 5, CERTIFICATE));
Expect.throws(() =>
- SecureServerSocket.bind(SERVER_ADDRESS, -1, CERTIFICATE));
+ SecureServerSocket.bind(HOST_NAME, -1, CERTIFICATE));
Expect.throws(() =>
- SecureServerSocket.bind(SERVER_ADDRESS, 0, -1, CERTIFICATE));
+ SecureServerSocket.bind(HOST_NAME, 0, -1, CERTIFICATE));
}
void testSimpleBind() {
ReceivePort port = new ReceivePort();
- SecureServerSocket.bind(SERVER_ADDRESS, 0, 5, CERTIFICATE).then((s) {
+ SecureServerSocket.bind(HOST_NAME, 0, 5, CERTIFICATE).then((s) {
Expect.isTrue(s.port > 0);
s.close();
port.close();
@@ -59,8 +58,8 @@ void testInvalidBind() {
// Either an error or a successful bind is allowed.
// Windows platforms allow multiple binding to the same socket, with
// unpredictable results.
- SecureServerSocket.bind(SERVER_ADDRESS, 0, 5, CERTIFICATE).then((s) {
- SecureServerSocket.bind(SERVER_ADDRESS,
+ SecureServerSocket.bind(HOST_NAME, 0, 5, CERTIFICATE).then((s) {
+ SecureServerSocket.bind(HOST_NAME,
s.port,
5,
CERTIFICATE).then((t) {
@@ -80,7 +79,7 @@ void testInvalidBind() {
void testSimpleConnect(String certificate) {
ReceivePort port = new ReceivePort();
- SecureServerSocket.bind(SERVER_ADDRESS, 0, 5, certificate).then((server) {
+ SecureServerSocket.bind(HOST_NAME, 0, 5, certificate).then((server) {
var clientEndFuture = SecureSocket.connect(HOST_NAME, server.port);
server.listen((serverEnd) {
clientEndFuture.then((clientEnd) {
@@ -95,7 +94,7 @@ void testSimpleConnect(String certificate) {
void testSimpleConnectFail(String certificate) {
ReceivePort port = new ReceivePort();
- SecureServerSocket.bind(SERVER_ADDRESS, 0, 5, certificate).then((server) {
+ SecureServerSocket.bind(HOST_NAME, 0, 5, certificate).then((server) {
var clientEndFuture = SecureSocket.connect(HOST_NAME, server.port)
.then((clientEnd) {
Expect.fail("No client connection expected.");
@@ -115,7 +114,7 @@ void testSimpleConnectFail(String certificate) {
void testServerListenAfterConnect() {
ReceivePort port = new ReceivePort();
- SecureServerSocket.bind(SERVER_ADDRESS, 0, 5, CERTIFICATE).then((server) {
+ SecureServerSocket.bind(HOST_NAME, 0, 5, CERTIFICATE).then((server) {
Expect.isTrue(server.port > 0);
var clientEndFuture = SecureSocket.connect(HOST_NAME, server.port);
new Timer(const Duration(milliseconds: 500), () {
@@ -156,7 +155,7 @@ void testSimpleReadWrite() {
}
}
- SecureServerSocket.bind(SERVER_ADDRESS, 0, 5, CERTIFICATE).then((server) {
+ SecureServerSocket.bind(HOST_NAME, 0, 5, CERTIFICATE).then((server) {
server.listen((client) {
int bytesRead = 0;
int bytesWritten = 0;
« no previous file with comments | « tests/standalone/io/secure_server_closing_test.dart ('k') | tests/standalone/io/secure_session_resume_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698