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

Unified Diff: webrtc/api/dtlsidentitystore_unittest.cc

Issue 1749193002: DtlsIdentityStoreInterface::RequestIdentity gets optional expires param. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Addressed nit 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
« no previous file with comments | « webrtc/api/dtlsidentitystore.cc ('k') | webrtc/api/peerconnectionfactory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/api/dtlsidentitystore_unittest.cc
diff --git a/webrtc/api/dtlsidentitystore_unittest.cc b/webrtc/api/dtlsidentitystore_unittest.cc
index 584ebb31fbb0558a7f2ef472b244ec6b2be07823..809e885216c2c4edcfe409064b470f9be18687c0 100644
--- a/webrtc/api/dtlsidentitystore_unittest.cc
+++ b/webrtc/api/dtlsidentitystore_unittest.cc
@@ -85,7 +85,9 @@ class DtlsIdentityStoreTest : public testing::Test {
TEST_F(DtlsIdentityStoreTest, RequestIdentitySuccessRSA) {
EXPECT_TRUE_WAIT(store_->HasFreeIdentityForTesting(rtc::KT_RSA), kTimeoutMs);
- store_->RequestIdentity(rtc::KT_RSA, observer_.get());
+ store_->RequestIdentity(rtc::KeyParams(rtc::KT_RSA),
+ rtc::Optional<uint64_t>(),
+ observer_.get());
EXPECT_TRUE_WAIT(observer_->LastRequestSucceeded(), kTimeoutMs);
EXPECT_TRUE_WAIT(store_->HasFreeIdentityForTesting(rtc::KT_RSA), kTimeoutMs);
@@ -93,7 +95,9 @@ TEST_F(DtlsIdentityStoreTest, RequestIdentitySuccessRSA) {
observer_->Reset();
// Verifies that the callback is async when a free identity is ready.
- store_->RequestIdentity(rtc::KT_RSA, observer_.get());
+ store_->RequestIdentity(rtc::KeyParams(rtc::KT_RSA),
+ rtc::Optional<uint64_t>(),
+ observer_.get());
EXPECT_FALSE(observer_->call_back_called());
EXPECT_TRUE_WAIT(observer_->LastRequestSucceeded(), kTimeoutMs);
}
@@ -102,13 +106,17 @@ TEST_F(DtlsIdentityStoreTest, RequestIdentitySuccessECDSA) {
// Since store currently does not preemptively generate free ECDSA identities
// we do not invoke HasFreeIdentityForTesting between requests.
- store_->RequestIdentity(rtc::KT_ECDSA, observer_.get());
+ store_->RequestIdentity(rtc::KeyParams(rtc::KT_ECDSA),
+ rtc::Optional<uint64_t>(),
+ observer_.get());
EXPECT_TRUE_WAIT(observer_->LastRequestSucceeded(), kTimeoutMs);
observer_->Reset();
// Verifies that the callback is async when a free identity is ready.
- store_->RequestIdentity(rtc::KT_ECDSA, observer_.get());
+ store_->RequestIdentity(rtc::KeyParams(rtc::KT_ECDSA),
+ rtc::Optional<uint64_t>(),
+ observer_.get());
EXPECT_FALSE(observer_->call_back_called());
EXPECT_TRUE_WAIT(observer_->LastRequestSucceeded(), kTimeoutMs);
}
@@ -116,7 +124,9 @@ TEST_F(DtlsIdentityStoreTest, RequestIdentitySuccessECDSA) {
TEST_F(DtlsIdentityStoreTest, DeleteStoreEarlyNoCrashRSA) {
EXPECT_FALSE(store_->HasFreeIdentityForTesting(rtc::KT_RSA));
- store_->RequestIdentity(rtc::KT_RSA, observer_.get());
+ store_->RequestIdentity(rtc::KeyParams(rtc::KT_RSA),
+ rtc::Optional<uint64_t>(),
+ observer_.get());
store_.reset();
worker_thread_->Stop();
@@ -126,7 +136,9 @@ TEST_F(DtlsIdentityStoreTest, DeleteStoreEarlyNoCrashRSA) {
TEST_F(DtlsIdentityStoreTest, DeleteStoreEarlyNoCrashECDSA) {
EXPECT_FALSE(store_->HasFreeIdentityForTesting(rtc::KT_ECDSA));
- store_->RequestIdentity(rtc::KT_ECDSA, observer_.get());
+ store_->RequestIdentity(rtc::KeyParams(rtc::KT_ECDSA),
+ rtc::Optional<uint64_t>(),
+ observer_.get());
store_.reset();
worker_thread_->Stop();
« no previous file with comments | « webrtc/api/dtlsidentitystore.cc ('k') | webrtc/api/peerconnectionfactory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698