| OLD | NEW |
| 1 /* | 1 /* |
| 2 * libjingle | 2 * libjingle |
| 3 * Copyright 2015 Google Inc. | 3 * Copyright 2015 Google Inc. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are met: | 6 * modification, are permitted provided that the following conditions are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright notice, | 8 * 1. Redistributions of source code must retain the above copyright notice, |
| 9 * this list of conditions and the following disclaimer. | 9 * this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright notice, | 10 * 2. Redistributions in binary form must reproduce the above copyright notice, |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 }; | 76 }; |
| 77 | 77 |
| 78 class DtlsIdentityStoreTest : public testing::Test { | 78 class DtlsIdentityStoreTest : public testing::Test { |
| 79 protected: | 79 protected: |
| 80 DtlsIdentityStoreTest() | 80 DtlsIdentityStoreTest() |
| 81 : worker_thread_(new rtc::Thread()), | 81 : worker_thread_(new rtc::Thread()), |
| 82 store_(new DtlsIdentityStoreImpl(rtc::Thread::Current(), | 82 store_(new DtlsIdentityStoreImpl(rtc::Thread::Current(), |
| 83 worker_thread_.get())), | 83 worker_thread_.get())), |
| 84 observer_( | 84 observer_( |
| 85 new rtc::RefCountedObject<MockDtlsIdentityRequestObserver>()) { | 85 new rtc::RefCountedObject<MockDtlsIdentityRequestObserver>()) { |
| 86 CHECK(worker_thread_->Start()); | 86 RTC_CHECK(worker_thread_->Start()); |
| 87 } | 87 } |
| 88 ~DtlsIdentityStoreTest() {} | 88 ~DtlsIdentityStoreTest() {} |
| 89 | 89 |
| 90 static void SetUpTestCase() { | 90 static void SetUpTestCase() { |
| 91 rtc::InitializeSSL(); | 91 rtc::InitializeSSL(); |
| 92 } | 92 } |
| 93 static void TearDownTestCase() { | 93 static void TearDownTestCase() { |
| 94 rtc::CleanupSSL(); | 94 rtc::CleanupSSL(); |
| 95 } | 95 } |
| 96 | 96 |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 TEST_F(DtlsIdentityStoreTest, DeleteStoreEarlyNoCrashECDSA) { | 143 TEST_F(DtlsIdentityStoreTest, DeleteStoreEarlyNoCrashECDSA) { |
| 144 EXPECT_FALSE(store_->HasFreeIdentityForTesting(rtc::KT_ECDSA)); | 144 EXPECT_FALSE(store_->HasFreeIdentityForTesting(rtc::KT_ECDSA)); |
| 145 | 145 |
| 146 store_->RequestIdentity(rtc::KT_ECDSA, observer_.get()); | 146 store_->RequestIdentity(rtc::KT_ECDSA, observer_.get()); |
| 147 store_.reset(); | 147 store_.reset(); |
| 148 | 148 |
| 149 worker_thread_->Stop(); | 149 worker_thread_->Stop(); |
| 150 EXPECT_FALSE(observer_->call_back_called()); | 150 EXPECT_FALSE(observer_->call_back_called()); |
| 151 } | 151 } |
| 152 | 152 |
| OLD | NEW |