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

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

Issue 14640008: Change the signature for all network bind calls. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed review comments by whesse@ 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
« no previous file with comments | « tests/standalone/io/socket_close_test.dart ('k') | tests/standalone/io/socket_info_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/io/socket_exception_test.dart
diff --git a/tests/standalone/io/socket_exception_test.dart b/tests/standalone/io/socket_exception_test.dart
index 4713c74c17ff964348f5ac8469b1aac6f01351bb..79f5b72682bac2047100ed4ccdeb32c66ec58be8 100644
--- a/tests/standalone/io/socket_exception_test.dart
+++ b/tests/standalone/io/socket_exception_test.dart
@@ -15,7 +15,7 @@ class SocketExceptionTest {
bool exceptionCaught = false;
bool wrongExceptionCaught = false;
- ServerSocket.bind().then((server) {
+ ServerSocket.bind("127.0.0.1", 0).then((server) {
Expect.isNotNull(server);
server.close();
try {
@@ -29,7 +29,7 @@ class SocketExceptionTest {
Expect.equals(true, !wrongExceptionCaught);
// Test invalid host.
- ServerSocket.bind("__INVALID_HOST__")
+ ServerSocket.bind("__INVALID_HOST__", 0)
.then((server) { })
.catchError((e) => e is SocketIOException);
});
@@ -37,7 +37,7 @@ class SocketExceptionTest {
static void serverSocketCloseListenTest() {
var port = new ReceivePort();
- ServerSocket.bind().then((server) {
+ ServerSocket.bind("127.0.0.1", 0).then((server) {
Socket.connect("127.0.0.1", server.port).then((socket) {
server.close();
server.listen(
@@ -49,7 +49,7 @@ class SocketExceptionTest {
static void serverSocketListenCloseTest() {
var port = new ReceivePort();
- ServerSocket.bind().then((server) {
+ ServerSocket.bind("127.0.0.1", 0).then((server) {
Socket.connect("127.0.0.1", server.port).then((socket) {
server.listen(
(incoming) => server.close(),
@@ -62,7 +62,7 @@ class SocketExceptionTest {
bool exceptionCaught = false;
bool wrongExceptionCaught = false;
- ServerSocket.bind().then((server) {
+ ServerSocket.bind("127.0.0.1", 0).then((server) {
Expect.isNotNull(server);
int port = server.port;
Socket.connect("127.0.0.1", port).then((client) {
@@ -104,7 +104,7 @@ class SocketExceptionTest {
}
static void clientSocketDestroyNoErrorTest() {
- ServerSocket.bind().then((server) {
+ ServerSocket.bind("127.0.0.1", 0).then((server) {
server.listen((socket) {
socket.pipe(socket);
});
@@ -116,7 +116,7 @@ class SocketExceptionTest {
}
static void clientSocketAddDestroyNoErrorTest() {
- ServerSocket.bind().then((server) {
+ ServerSocket.bind("127.0.0.1", 0).then((server) {
server.listen((socket) {
// Passive block data by not sobscribing to socket.
});
@@ -129,7 +129,7 @@ class SocketExceptionTest {
}
static void clientSocketAddCloseNoErrorTest() {
- ServerSocket.bind().then((server) {
+ ServerSocket.bind("127.0.0.1", 0).then((server) {
var completer = new Completer();
server.listen((socket) {
// The socket is 'paused' until the future completes.
@@ -153,7 +153,7 @@ class SocketExceptionTest {
}
static void clientSocketAddCloseErrorTest() {
- ServerSocket.bind().then((server) {
+ ServerSocket.bind("127.0.0.1", 0).then((server) {
var completer = new Completer();
server.listen((socket) {
completer.future.then((_) => socket.destroy());
@@ -192,7 +192,7 @@ class SocketExceptionTest {
}
static void clientSocketAddCloseResultErrorTest() {
- ServerSocket.bind().then((server) {
+ ServerSocket.bind("127.0.0.1", 0).then((server) {
var completer = new Completer();
server.listen((socket) {
completer.future.then((_) => socket.destroy());
« no previous file with comments | « tests/standalone/io/socket_close_test.dart ('k') | tests/standalone/io/socket_info_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698