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

Unified Diff: tests/standalone/io/secure_server_socket_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
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 bf1bc05a0bb15aba16820edba4fc820774b29a51..478a53aa8a0fbbd350f8acad515923f548f210ff 100644
--- a/tests/standalone/io/secure_server_socket_test.dart
+++ b/tests/standalone/io/secure_server_socket_test.dart
@@ -17,7 +17,7 @@ const CERTIFICATE = "localhost_cert";
void testSimpleBind() {
ReceivePort port = new ReceivePort();
- SecureServerSocket.bind(HOST_NAME, 0, 5, CERTIFICATE).then((s) {
+ SecureServerSocket.bind(HOST_NAME, 0, CERTIFICATE).then((s) {
Expect.isTrue(s.port > 0);
s.close();
port.close();
@@ -30,7 +30,7 @@ void testInvalidBind() {
port.receive((_, __) { count++; if (count == 3) port.close(); });
// Bind to a unknown DNS name.
- SecureServerSocket.bind("ko.faar.__hest__", 0, 5, CERTIFICATE).then((_) {
+ SecureServerSocket.bind("ko.faar.__hest__", 0, CERTIFICATE).then((_) {
Expect.fail("Failure expected");
}).catchError((error) {
Expect.isTrue(error is SocketIOException);
@@ -38,7 +38,7 @@ void testInvalidBind() {
});
// Bind to an unavaliable IP-address.
- SecureServerSocket.bind("8.8.8.8", 0, 5, CERTIFICATE).then((_) {
+ SecureServerSocket.bind("8.8.8.8", 0, CERTIFICATE).then((_) {
Expect.fail("Failure expected");
}).catchError((error) {
Expect.isTrue(error is SocketIOException);
@@ -49,10 +49,9 @@ 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(HOST_NAME, 0, 5, CERTIFICATE).then((s) {
+ SecureServerSocket.bind(HOST_NAME, 0, CERTIFICATE).then((s) {
SecureServerSocket.bind(HOST_NAME,
s.port,
- 5,
CERTIFICATE).then((t) {
Expect.equals('windows', Platform.operatingSystem);
Expect.equals(s.port, t.port);
@@ -70,7 +69,7 @@ void testInvalidBind() {
void testSimpleConnect(String certificate) {
ReceivePort port = new ReceivePort();
- SecureServerSocket.bind(HOST_NAME, 0, 5, certificate).then((server) {
+ SecureServerSocket.bind(HOST_NAME, 0, certificate).then((server) {
var clientEndFuture = SecureSocket.connect(HOST_NAME, server.port);
server.listen((serverEnd) {
clientEndFuture.then((clientEnd) {
@@ -85,7 +84,7 @@ void testSimpleConnect(String certificate) {
void testSimpleConnectFail(String certificate) {
ReceivePort port = new ReceivePort();
- SecureServerSocket.bind(HOST_NAME, 0, 5, certificate).then((server) {
+ SecureServerSocket.bind(HOST_NAME, 0, certificate).then((server) {
var clientEndFuture = SecureSocket.connect(HOST_NAME, server.port)
.then((clientEnd) {
Expect.fail("No client connection expected.");
@@ -105,7 +104,7 @@ void testSimpleConnectFail(String certificate) {
void testServerListenAfterConnect() {
ReceivePort port = new ReceivePort();
- SecureServerSocket.bind(HOST_NAME, 0, 5, CERTIFICATE).then((server) {
+ SecureServerSocket.bind(HOST_NAME, 0, CERTIFICATE).then((server) {
Expect.isTrue(server.port > 0);
var clientEndFuture = SecureSocket.connect(HOST_NAME, server.port);
new Timer(const Duration(milliseconds: 500), () {
@@ -146,7 +145,7 @@ void testSimpleReadWrite() {
}
}
- SecureServerSocket.bind(HOST_NAME, 0, 5, CERTIFICATE).then((server) {
+ SecureServerSocket.bind(HOST_NAME, 0, 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