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

Side by Side Diff: net/cert/ct_log_verifier_unittest.cc

Issue 1477643002: Remove the TYPE_WITH_MOVE_CONSTRUCTOR_FOR_CPP_03 macro. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@basepass
Patch Set: type-with-move: no-media Created 5 years 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/cert/ct_log_verifier.h" 5 #include "net/cert/ct_log_verifier.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/time/time.h" 9 #include "base/time/time.h"
10 #include "net/cert/signed_certificate_timestamp.h" 10 #include "net/cert/signed_certificate_timestamp.h"
11 #include "net/cert/signed_tree_head.h" 11 #include "net/cert/signed_tree_head.h"
12 #include "net/test/ct_test_util.h" 12 #include "net/test/ct_test_util.h"
13 #include "testing/gtest/include/gtest/gtest.h" 13 #include "testing/gtest/include/gtest/gtest.h"
14 14
15 namespace net { 15 namespace net {
16 16
17 class CTLogVerifierTest : public ::testing::Test { 17 class CTLogVerifierTest : public ::testing::Test {
18 public: 18 public:
19 CTLogVerifierTest() {} 19 CTLogVerifierTest() {}
20 20
21 void SetUp() override { 21 void SetUp() override {
22 log_ = CTLogVerifier::Create(ct::GetTestPublicKey(), "testlog", 22 log_ = CTLogVerifier::Create(ct::GetTestPublicKey(), "testlog",
23 "https://ct.example.com").Pass(); 23 "https://ct.example.com");
24 24
25 ASSERT_TRUE(log_); 25 ASSERT_TRUE(log_);
26 ASSERT_EQ(log_->key_id(), ct::GetTestPublicKeyId()); 26 ASSERT_EQ(log_->key_id(), ct::GetTestPublicKeyId());
27 } 27 }
28 28
29 protected: 29 protected:
30 scoped_refptr<const CTLogVerifier> log_; 30 scoped_refptr<const CTLogVerifier> log_;
31 }; 31 };
32 32
33 TEST_F(CTLogVerifierTest, VerifiesCertSCT) { 33 TEST_F(CTLogVerifierTest, VerifiesCertSCT) {
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 TEST_F(CTLogVerifierTest, ExcessDataInPublicKey) { 94 TEST_F(CTLogVerifierTest, ExcessDataInPublicKey) {
95 std::string key = ct::GetTestPublicKey(); 95 std::string key = ct::GetTestPublicKey();
96 key += "extra"; 96 key += "extra";
97 97
98 scoped_refptr<const CTLogVerifier> log = 98 scoped_refptr<const CTLogVerifier> log =
99 CTLogVerifier::Create(key, "testlog", "https://ct.example.com"); 99 CTLogVerifier::Create(key, "testlog", "https://ct.example.com");
100 EXPECT_FALSE(log); 100 EXPECT_FALSE(log);
101 } 101 }
102 102
103 } // namespace net 103 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698