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

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

Issue 14036017: Revert "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: 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/raw_secure_server_socket_test.dart
diff --git a/tests/standalone/io/raw_secure_server_socket_test.dart b/tests/standalone/io/raw_secure_server_socket_test.dart
index 7769b52f81665f46d2fe8fa8d7aa3525fc628eb8..3027046557aa8367565305014285226a3436cd1c 100644
--- a/tests/standalone/io/raw_secure_server_socket_test.dart
+++ b/tests/standalone/io/raw_secure_server_socket_test.dart
@@ -12,12 +12,13 @@ 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 testSimpleBind() {
ReceivePort port = new ReceivePort();
- RawSecureServerSocket.bind(HOST_NAME, 0, 5, CERTIFICATE).then((s) {
+ RawSecureServerSocket.bind(SERVER_ADDRESS, 0, 5, CERTIFICATE).then((s) {
Expect.isTrue(s.port > 0);
s.close();
port.close();
@@ -49,8 +50,8 @@ void testInvalidBind() {
// Either an error or a successful bind is allowed.
// Windows platforms allow multiple binding to the same socket, with
// unpredictable results.
- RawSecureServerSocket.bind(HOST_NAME, 0, 5, CERTIFICATE).then((s) {
- RawSecureServerSocket.bind(HOST_NAME,
+ RawSecureServerSocket.bind(SERVER_ADDRESS, 0, 5, CERTIFICATE).then((s) {
+ RawSecureServerSocket.bind(SERVER_ADDRESS,
s.port,
5,
CERTIFICATE).then((t) {
@@ -71,7 +72,7 @@ void testInvalidBind() {
void testSimpleConnect(String certificate) {
ReceivePort port = new ReceivePort();
- RawSecureServerSocket.bind(HOST_NAME, 0, 5, certificate).then((server) {
+ RawSecureServerSocket.bind(SERVER_ADDRESS, 0, 5, certificate).then((server) {
var clientEndFuture = RawSecureSocket.connect(HOST_NAME, server.port);
server.listen((serverEnd) {
clientEndFuture.then((clientEnd) {
@@ -86,7 +87,7 @@ void testSimpleConnect(String certificate) {
void testSimpleConnectFail(String certificate) {
ReceivePort port = new ReceivePort();
- RawSecureServerSocket.bind(HOST_NAME, 0, 5, certificate).then((server) {
+ RawSecureServerSocket.bind(SERVER_ADDRESS, 0, 5, certificate).then((server) {
var clientEndFuture = RawSecureSocket.connect(HOST_NAME, server.port)
.then((clientEnd) {
Expect.fail("No client connection expected.");
@@ -106,7 +107,7 @@ void testSimpleConnectFail(String certificate) {
void testServerListenAfterConnect() {
ReceivePort port = new ReceivePort();
- RawSecureServerSocket.bind(HOST_NAME, 0, 5, CERTIFICATE).then((server) {
+ RawSecureServerSocket.bind(SERVER_ADDRESS, 0, 5, CERTIFICATE).then((server) {
Expect.isTrue(server.port > 0);
var clientEndFuture = RawSecureSocket.connect(HOST_NAME, server.port);
new Timer(const Duration(milliseconds: 500), () {
@@ -431,9 +432,9 @@ void testSimpleReadWrite(bool listenSecure,
if (listenSecure) {
RawSecureServerSocket.bind(
- HOST_NAME, 0, 5, CERTIFICATE).then(serverReady);
+ SERVER_ADDRESS, 0, 5, CERTIFICATE).then(serverReady);
} else {
- RawServerSocket.bind(HOST_NAME, 0, 5).then(serverReady);
+ RawServerSocket.bind(SERVER_ADDRESS, 0, 5).then(serverReady);
}
}
« no previous file with comments | « tests/standalone/io/raw_secure_server_closing_test.dart ('k') | tests/standalone/io/raw_secure_socket_pause_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698