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

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

Issue 2857393003: Adding to a closed sink throws.
Patch Set: Rebase Created 3 years, 7 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_exception_test.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_upgrade_to_secure_test.dart
diff --git a/tests/standalone/io/socket_upgrade_to_secure_test.dart b/tests/standalone/io/socket_upgrade_to_secure_test.dart
index 84b67be5d4aec29d14277790cf3372710bfc3a61..5b58b56467c10c882336b3db5fafeb5342472bed 100644
--- a/tests/standalone/io/socket_upgrade_to_secure_test.dart
+++ b/tests/standalone/io/socket_upgrade_to_secure_test.dart
@@ -164,7 +164,9 @@ void test(bool hostnameInConnect, bool handshakeBeforeSecure,
SecureSocket.secure(socket, host: HOST, context: clientContext);
}
return future.then((secureSocket) {
- socket.add([0]);
+ Expect.throws(() {
+ socket.add([0]);
+ });
return secureSocket;
});
});
@@ -179,7 +181,9 @@ void test(bool hostnameInConnect, bool handshakeBeforeSecure,
SecureSocket.secure(socket, host: HOST, context: clientContext);
}
return future.then((secureSocket) {
- socket.add([0]);
+ Expect.throws(() {
+ socket.add([0]);
+ });
return secureSocket;
});
});
@@ -191,7 +195,9 @@ void test(bool hostnameInConnect, bool handshakeBeforeSecure,
server.listen((client) {
if (!handshakeBeforeSecure) {
SecureSocket.secureServer(client, serverContext).then((secureClient) {
- client.add([0]);
+ Expect.throws(() {
+ client.add([0]);
+ });
runServer(secureClient).then((_) => server.close());
});
} else {
@@ -199,7 +205,9 @@ void test(bool hostnameInConnect, bool handshakeBeforeSecure,
SecureSocket
.secureServer(client, serverContext, bufferedData: carryOverData)
.then((secureClient) {
- client.add([0]);
+ Expect.throws(() {
+ client.add([0]);
+ });
runServer(secureClient).then((_) => server.close());
});
});
« no previous file with comments | « tests/standalone/io/socket_exception_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698