OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/base/x509_util.h" | 5 #include "net/cert/x509_util.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/time.h" | 9 #include "base/time.h" |
10 #include "net/base/x509_certificate.h" | 10 #include "net/cert/x509_certificate.h" |
11 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
12 | 12 |
13 namespace net { | 13 namespace net { |
14 | 14 |
15 namespace x509_util { | 15 namespace x509_util { |
16 | 16 |
17 TEST(X509UtilTest, SortClientCertificates) { | 17 TEST(X509UtilTest, SortClientCertificates) { |
18 CertificateList certs; | 18 CertificateList certs; |
19 | 19 |
20 const base::Time now = base::Time::Now(); | 20 const base::Time now = base::Time::Now(); |
(...skipping 24 matching lines...) Expand all Loading... |
45 EXPECT_EQ("not yet valid", certs[2]->subject().common_name); | 45 EXPECT_EQ("not yet valid", certs[2]->subject().common_name); |
46 ASSERT_TRUE(certs[3].get()); | 46 ASSERT_TRUE(certs[3].get()); |
47 EXPECT_EQ("expired", certs[3]->subject().common_name); | 47 EXPECT_EQ("expired", certs[3]->subject().common_name); |
48 ASSERT_FALSE(certs[4].get()); | 48 ASSERT_FALSE(certs[4].get()); |
49 ASSERT_FALSE(certs[5].get()); | 49 ASSERT_FALSE(certs[5].get()); |
50 } | 50 } |
51 | 51 |
52 } // namespace x509_util | 52 } // namespace x509_util |
53 | 53 |
54 } // namespace net | 54 } // namespace net |
OLD | NEW |