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

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

Issue 1699163002: More SecurityContext calls accept a password. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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/security_context_argument_test.dart
diff --git a/tests/standalone/io/security_context_argument_test.dart b/tests/standalone/io/security_context_argument_test.dart
index 91de8dceea933d179b5cb6c82a8bf43419bdeb96..b3195b119cf3a19ccf8b62f5abbc0dba525cdd8b 100644
--- a/tests/standalone/io/security_context_argument_test.dart
+++ b/tests/standalone/io/security_context_argument_test.dart
@@ -31,9 +31,20 @@ void testUsePrivateKeyArguments() {
fileSystemException);
Expect.throws(() => c.usePrivateKeySync(1), argumentOrTypeError);
Expect.throws(() => c.usePrivateKeySync(null), argumentError);
+
+ // Bad password type.
Expect.throws(() => c.usePrivateKeySync(
localFile('certificates/server_key.pem'), password: 3),
argumentOrTypeError);
+ Expect.throws(() => c.setTrustedCertificatesBytes(
+ localFile('certificates/server_key.pem'), password: 3),
+ argumentOrTypeError);
+ Expect.throws(() => c.useCertificateChainBytes(
Bill Hesse 2016/02/16 20:33:05 We could do more tests - Null, and a really long s
zra 2016/02/17 18:42:44 Done.
+ localFile('certificates/server_key.pem'), password: 3),
+ argumentOrTypeError);
+ Expect.throws(() => c.setClientAuthoritiesBytes(
+ localFile('certificates/server_key.pem'), password: 3),
+ argumentOrTypeError);
// Empty data.
Expect.throws(() => c.usePrivateKeyBytes([], password: 'dartdart'),

Powered by Google App Engine
This is Rietveld 408576698