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

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

Issue 1757453002: Rolls back fix of SecurityContext method names. (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 6d5e1e2159f6bf93a96574e049454ef92dff3816..e5332ac0e70c6c14ef9785aa21d899aefa248f6f 100644
--- a/tests/standalone/io/security_context_argument_test.dart
+++ b/tests/standalone/io/security_context_argument_test.dart
@@ -15,71 +15,71 @@ bool tlsException(e) => e is TlsException;
void testUsePrivateKeyArguments() {
var c = new SecurityContext();
- c.useCertificateChainSync(localFile('certificates/server_chain.pem'));
+ c.useCertificateChain(localFile('certificates/server_chain.pem'));
// Wrong password.
- Expect.throws(() => c.usePrivateKeySync(
+ Expect.throws(() => c.usePrivateKey(
localFile('certificates/server_key.pem')),
tlsException);
- Expect.throws(() => c.usePrivateKeySync(
- localFile('certificates/server_key.pem'), password: "iHackSites"),
+ Expect.throws(() => c.usePrivateKey(
+ localFile('certificates/server_key.pem'), password: "iHackSites"),
tlsException);
- Expect.throws(() => c.usePrivateKeySync(
+ Expect.throws(() => c.usePrivateKey(
localFile('certificates/server_key.p12')),
tlsException);
- Expect.throws(() => c.usePrivateKeySync(
- localFile('certificates/server_key.p12'), password: "iHackSites"),
+ Expect.throws(() => c.usePrivateKey(
+ localFile('certificates/server_key.p12'), password: "iHackSites"),
tlsException);
- Expect.throws(() => c.setTrustedCertificatesSync(
+ Expect.throws(() => c.setTrustedCertificates(
localFile('certificates/server_key.p12')),
tlsException);
- Expect.throws(() => c.setTrustedCertificatesSync(
- localFile('certificates/server_key.p12'), password: "iHackSites"),
+ Expect.throws(() => c.setTrustedCertificates(
+ localFile('certificates/server_key.p12'), password: "iHackSites"),
tlsException);
- Expect.throws(() => c.useCertificateChainSync(
+ Expect.throws(() => c.useCertificateChain(
localFile('certificates/server_key.p12')),
tlsException);
- Expect.throws(() => c.useCertificateChainSync(
- localFile('certificates/server_key.p12'), password: "iHackSites"),
+ Expect.throws(() => c.useCertificateChain(
+ localFile('certificates/server_key.p12'), password: "iHackSites"),
tlsException);
- Expect.throws(() => c.setClientAuthoritiesSync(
+ Expect.throws(() => c.setClientAuthorities(
localFile('certificates/server_key.p12')),
argumentError);
- Expect.throws(() => c.setClientAuthoritiesSync(
- localFile('certificates/server_key.p12'), password: "iHackSites"),
+ Expect.throws(() => c.setClientAuthorities(
+ localFile('certificates/server_key.p12'), password: "iHackSites"),
argumentError);
// File does not exist
- Expect.throws(() => c.usePrivateKeySync(
+ Expect.throws(() => c.usePrivateKey(
localFile('certificates/server_key_oops.pem'),
password: "dartdart"),
fileSystemException);
// Wrong type for file name or data
- Expect.throws(() => c.usePrivateKeySync(1), argumentOrTypeError);
- Expect.throws(() => c.usePrivateKeySync(null), argumentError);
+ Expect.throws(() => c.usePrivateKey(1), argumentOrTypeError);
+ Expect.throws(() => c.usePrivateKey(null), argumentError);
Expect.throws(() => c.usePrivateKeyBytes(1), argumentOrTypeError);
Expect.throws(() => c.usePrivateKeyBytes(null), argumentError);
// Too-long passwords.
- Expect.throws(() => c.usePrivateKeySync(
+ Expect.throws(() => c.usePrivateKey(
localFile('certificates/server_key.pem'), password: "dart" * 1000),
argumentError);
- Expect.throws(() => c.usePrivateKeySync(
+ Expect.throws(() => c.usePrivateKey(
localFile('certificates/server_key.p12'), password: "dart" * 1000),
argumentOrTypeError);
- Expect.throws(() => c.setTrustedCertificatesSync(
+ Expect.throws(() => c.setTrustedCertificates(
localFile('certificates/server_key.p12'), password: "dart" * 1000),
argumentOrTypeError);
- Expect.throws(() => c.useCertificateChainSync(
+ Expect.throws(() => c.useCertificateChain(
localFile('certificates/server_key.p12'), password: "dart" * 1000),
argumentOrTypeError);
- Expect.throws(() => c.setClientAuthoritiesSync(
+ Expect.throws(() => c.setClientAuthorities(
localFile('certificates/server_key.p12'), password: "dart" * 1000),
argumentOrTypeError);
// Bad password type.
- Expect.throws(() => c.usePrivateKeySync(
+ Expect.throws(() => c.usePrivateKey(
localFile('certificates/server_key.pem'), password: 3),
argumentOrTypeError);
Expect.throws(() => c.setTrustedCertificatesBytes(
@@ -100,24 +100,24 @@ void testUsePrivateKeyArguments() {
Expect.throws(() => c.setClientAuthoritiesBytes([]), argumentError);
// Malformed PEM certs.
- Expect.throws(() => c.usePrivateKeySync(
+ Expect.throws(() => c.usePrivateKey(
localFile('certificates/client1_key_malformed.pem'),
password: "dartdart"),
tlsException);
- Expect.throws(() => c.setTrustedCertificatesSync(
+ Expect.throws(() => c.setTrustedCertificates(
localFile('certificates/trusted_certs_malformed.pem')),
tlsException);
- Expect.throws(() => c.useCertificateChainSync(
+ Expect.throws(() => c.useCertificateChain(
localFile('certificates/server_chain_malformed1.pem')),
tlsException);
- Expect.throws(() => c.useCertificateChainSync(
+ Expect.throws(() => c.useCertificateChain(
localFile('certificates/server_chain_malformed2.pem')),
tlsException);
- Expect.throws(() => c.setClientAuthoritiesSync(
+ Expect.throws(() => c.setClientAuthorities(
localFile('certificates/client_authority_malformed.pem')),
argumentError);
- c.usePrivateKeySync(
+ c.usePrivateKey(
localFile('certificates/server_key.pem'), password: "dartdart");
}
« no previous file with comments | « tests/standalone/io/secure_unauthorized_test.dart ('k') | tests/standalone/io/socket_upgrade_to_secure_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698