| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/cert_verifier.h" | 5 #include "net/cert/cert_verifier.h" |
| 6 | 6 |
| 7 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
| 8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "net/base/test_data_directory.h" | |
| 10 #include "net/cert/x509_certificate.h" | 9 #include "net/cert/x509_certificate.h" |
| 11 #include "net/test/cert_test_util.h" | 10 #include "net/test/cert_test_util.h" |
| 11 #include "net/test/test_data_directory.h" |
| 12 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
| 13 | 13 |
| 14 namespace net { | 14 namespace net { |
| 15 | 15 |
| 16 TEST(CertVerifierTest, RequestParamsComparators) { | 16 TEST(CertVerifierTest, RequestParamsComparators) { |
| 17 const scoped_refptr<X509Certificate> ok_cert = | 17 const scoped_refptr<X509Certificate> ok_cert = |
| 18 ImportCertFromFile(GetTestCertsDirectory(), "ok_cert.pem"); | 18 ImportCertFromFile(GetTestCertsDirectory(), "ok_cert.pem"); |
| 19 ASSERT_TRUE(ok_cert.get()); | 19 ASSERT_TRUE(ok_cert.get()); |
| 20 | 20 |
| 21 const scoped_refptr<X509Certificate> expired_cert = | 21 const scoped_refptr<X509Certificate> expired_cert = |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 | 120 |
| 121 if (tests[i].equal) { | 121 if (tests[i].equal) { |
| 122 EXPECT_TRUE(!(key1 < key2) && !(key2 < key1)); | 122 EXPECT_TRUE(!(key1 < key2) && !(key2 < key1)); |
| 123 } else { | 123 } else { |
| 124 EXPECT_TRUE((key1 < key2) || (key2 < key1)); | 124 EXPECT_TRUE((key1 < key2) || (key2 < key1)); |
| 125 } | 125 } |
| 126 } | 126 } |
| 127 } | 127 } |
| 128 | 128 |
| 129 } // namespace net | 129 } // namespace net |
| OLD | NEW |