| 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 |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 }; | 67 }; |
| 68 | 68 |
| 69 class RTCCertificateGeneratorTest | 69 class RTCCertificateGeneratorTest |
| 70 : public testing::Test { | 70 : public testing::Test { |
| 71 public: | 71 public: |
| 72 RTCCertificateGeneratorTest() | 72 RTCCertificateGeneratorTest() |
| 73 : fixture_(new RefCountedObject<RTCCertificateGeneratorFixture>()) {} | 73 : fixture_(new RefCountedObject<RTCCertificateGeneratorFixture>()) {} |
| 74 ~RTCCertificateGeneratorTest() {} | 74 ~RTCCertificateGeneratorTest() {} |
| 75 | 75 |
| 76 protected: | 76 protected: |
| 77 static const int kGenerationTimeoutMs = 1000; | 77 static const int kGenerationTimeoutMs = 10000; |
| 78 | 78 |
| 79 scoped_refptr<RTCCertificateGeneratorFixture> fixture_; | 79 scoped_refptr<RTCCertificateGeneratorFixture> fixture_; |
| 80 }; | 80 }; |
| 81 | 81 |
| 82 TEST_F(RTCCertificateGeneratorTest, GenerateECDSA) { | 82 TEST_F(RTCCertificateGeneratorTest, GenerateECDSA) { |
| 83 EXPECT_TRUE(RTCCertificateGenerator::GenerateCertificate( | 83 EXPECT_TRUE(RTCCertificateGenerator::GenerateCertificate( |
| 84 KeyParams::ECDSA(), | 84 KeyParams::ECDSA(), |
| 85 Optional<uint64_t>())); | 85 Optional<uint64_t>())); |
| 86 } | 86 } |
| 87 | 87 |
| (...skipping 55 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 |