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

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

Issue 17589007: dart:io | Change names for SecureSocket exceptions. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Move VerifyFields to throw ArgumentErrors Created 7 years, 6 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_argument_test.dart
diff --git a/tests/standalone/io/raw_secure_server_socket_argument_test.dart b/tests/standalone/io/raw_secure_server_socket_argument_test.dart
index 6c78cbc7f6ffe889846f99213997934f47edbe05..dd1fc40481f5f64193068a27b7f08ad6b01922f9 100644
--- a/tests/standalone/io/raw_secure_server_socket_argument_test.dart
+++ b/tests/standalone/io/raw_secure_server_socket_argument_test.dart
@@ -18,11 +18,31 @@ const CERTIFICATE = "localhost_cert";
void testArguments() {
Expect.throws(() =>
- RawSecureServerSocket.bind(SERVER_ADDRESS, 65536, 5, CERTIFICATE));
+ RawSecureServerSocket.bind(SERVER_ADDRESS, 65536, CERTIFICATE));
Expect.throws(() =>
RawSecureServerSocket.bind(SERVER_ADDRESS, -1, CERTIFICATE));
Expect.throws(() =>
- RawSecureServerSocket.bind(SERVER_ADDRESS, 0, -1, CERTIFICATE));
+ RawSecureServerSocket.bind(SERVER_ADDRESS, 0, CERTIFICATE, backlog: -1));
+ Expect.throws(() => RawSecureSocket.connect(SERVER_ADDRESS, 3456,
Anders Johnsen 2013/06/25 05:55:03 maybe add a validator for the right error?
Bill Hesse 2013/06/25 12:41:14 Done.
+ sendClientCertificate: true,
+ certificateName: 12.3));
+ Expect.throws(() => RawSecureSocket.connect(SERVER_ADDRESS, null));
+ Expect.throws(() => RawSecureSocket.connect(SERVER_ADDRESS, -1));
+ Expect.throws(() => RawSecureSocket.connect(SERVER_ADDRESS, 345656));
+ Expect.throws(() => RawSecureSocket.connect(SERVER_ADDRESS, 'hest'));
+ Expect.throws(() => RawSecureSocket.connect(null, 0));
+ Expect.throws(() => RawSecureSocket.connect(SERVER_ADDRESS, 0,
+ is_server: true));
+ Expect.throws(() => RawSecureSocket.connect(SERVER_ADDRESS, 0,
+ certificateName: 77));
+ Expect.throws(() => RawSecureSocket.connect(SERVER_ADDRESS, 0,
+ requestClientCertificate: 'fisk'));
+ Expect.throws(() => RawSecureSocket.connect(SERVER_ADDRESS, 0,
+ requireClientCertificate: 'fisk'));
+ Expect.throws(() => RawSecureSocket.connect(SERVER_ADDRESS, 0,
+ sendClientCertificate: 'fisk'));
+ Expect.throws(() => RawSecureSocket.connect(SERVER_ADDRESS, 0,
+ onBadCertificate: 'hund'));
}

Powered by Google App Engine
This is Rietveld 408576698