OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2016 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2016 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
11 #include "webrtc/rtc_base/rtccertificategenerator.h" | 11 #include "webrtc/rtc_base/rtccertificategenerator.h" |
12 | 12 |
13 #include <memory> | 13 #include <memory> |
14 | 14 |
| 15 #include "webrtc/api/optional.h" |
15 #include "webrtc/rtc_base/checks.h" | 16 #include "webrtc/rtc_base/checks.h" |
16 #include "webrtc/rtc_base/gunit.h" | 17 #include "webrtc/rtc_base/gunit.h" |
17 #include "webrtc/rtc_base/logging.h" | 18 #include "webrtc/rtc_base/logging.h" |
18 #include "webrtc/rtc_base/optional.h" | |
19 #include "webrtc/rtc_base/thread.h" | 19 #include "webrtc/rtc_base/thread.h" |
20 | 20 |
21 namespace rtc { | 21 namespace rtc { |
22 | 22 |
23 class RTCCertificateGeneratorFixture : public RTCCertificateGeneratorCallback { | 23 class RTCCertificateGeneratorFixture : public RTCCertificateGeneratorCallback { |
24 public: | 24 public: |
25 RTCCertificateGeneratorFixture() | 25 RTCCertificateGeneratorFixture() |
26 : signaling_thread_(Thread::Current()), | 26 : signaling_thread_(Thread::Current()), |
27 worker_thread_(Thread::Create()), | 27 worker_thread_(Thread::Create()), |
28 generate_async_completed_(false) { | 28 generate_async_completed_(false) { |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 | 143 |
144 fixture_->generator()->GenerateCertificateAsync( | 144 fixture_->generator()->GenerateCertificateAsync( |
145 invalid_params, | 145 invalid_params, |
146 Optional<uint64_t>(), | 146 Optional<uint64_t>(), |
147 fixture_); | 147 fixture_); |
148 EXPECT_TRUE_WAIT(fixture_->GenerateAsyncCompleted(), kGenerationTimeoutMs); | 148 EXPECT_TRUE_WAIT(fixture_->GenerateAsyncCompleted(), kGenerationTimeoutMs); |
149 EXPECT_FALSE(fixture_->certificate()); | 149 EXPECT_FALSE(fixture_->certificate()); |
150 } | 150 } |
151 | 151 |
152 } // namespace rtc | 152 } // namespace rtc |
OLD | NEW |