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

Side by Side Diff: net/base/multi_threaded_cert_verifier_unittest.cc

Issue 10855168: Rename X509Certificate::VerifyFlags to CertVerifier::VerifyFlags (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: One missed mac define Created 8 years, 4 months 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 | Annotate | Revision Log
« no previous file with comments | « net/base/cert_verify_proc_win.cc ('k') | net/base/x509_certificate.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/multi_threaded_cert_verifier.h" 5 #include "net/base/multi_threaded_cert_verifier.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/file_path.h" 8 #include "base/file_path.h"
9 #include "base/format_macros.h" 9 #include "base/format_macros.h"
10 #include "base/stringprintf.h" 10 #include "base/stringprintf.h"
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 // hosts are different validation keys. 287 // hosts are different validation keys.
288 MultiThreadedCertVerifier::RequestParams(a_key, a_key, 288 MultiThreadedCertVerifier::RequestParams(a_key, a_key,
289 "www1.example.test", 0), 289 "www1.example.test", 0),
290 MultiThreadedCertVerifier::RequestParams(a_key, a_key, 290 MultiThreadedCertVerifier::RequestParams(a_key, a_key,
291 "www2.example.test", 0), 291 "www2.example.test", 0),
292 -1, 292 -1,
293 }, 293 },
294 { // The same certificate, chain, and host, but with different flags 294 { // The same certificate, chain, and host, but with different flags
295 // are different validation keys. 295 // are different validation keys.
296 MultiThreadedCertVerifier::RequestParams(a_key, a_key, "www.example.test", 296 MultiThreadedCertVerifier::RequestParams(a_key, a_key, "www.example.test",
297 X509Certificate::VERIFY_EV_CERT), 297 CertVerifier::VERIFY_EV_CERT),
298 MultiThreadedCertVerifier::RequestParams(a_key, a_key, "www.example.test", 298 MultiThreadedCertVerifier::RequestParams(a_key, a_key, "www.example.test",
299 0), 299 0),
300 1, 300 1,
301 } 301 }
302 }; 302 };
303 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(tests); ++i) { 303 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(tests); ++i) {
304 SCOPED_TRACE(base::StringPrintf("Test[%" PRIuS "]", i)); 304 SCOPED_TRACE(base::StringPrintf("Test[%" PRIuS "]", i));
305 305
306 const MultiThreadedCertVerifier::RequestParams& key1 = tests[i].key1; 306 const MultiThreadedCertVerifier::RequestParams& key1 = tests[i].key1;
307 const MultiThreadedCertVerifier::RequestParams& key2 = tests[i].key2; 307 const MultiThreadedCertVerifier::RequestParams& key2 = tests[i].key2;
(...skipping 11 matching lines...) Expand all
319 EXPECT_FALSE(key1 < key2); 319 EXPECT_FALSE(key1 < key2);
320 EXPECT_TRUE(key2 < key1); 320 EXPECT_TRUE(key2 < key1);
321 break; 321 break;
322 default: 322 default:
323 FAIL() << "Invalid expectation. Can be only -1, 0, 1"; 323 FAIL() << "Invalid expectation. Can be only -1, 0, 1";
324 } 324 }
325 } 325 }
326 } 326 }
327 327
328 } // namespace net 328 } // namespace net
OLDNEW
« no previous file with comments | « net/base/cert_verify_proc_win.cc ('k') | net/base/x509_certificate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698