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

Side by Side Diff: net/cert/internal/path_builder_unittest.cc

Issue 2346663002: Generalize rebase-errors.py so it works for other files. (Closed)
Patch Set: moar comment wording Created 4 years, 3 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
« no previous file with comments | « no previous file | net/cert/internal/path_builder_verify_certificate_chain_unittest.cc » ('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 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/internal/path_builder.h" 5 #include "net/cert/internal/path_builder.h"
6 6
7 #include "base/base_paths.h" 7 #include "base/base_paths.h"
8 #include "base/cancelable_callback.h" 8 #include "base/cancelable_callback.h"
9 #include "base/files/file_util.h" 9 #include "base/files/file_util.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after
490 490
491 class PathBuilderKeyRolloverTest : public ::testing::Test { 491 class PathBuilderKeyRolloverTest : public ::testing::Test {
492 public: 492 public:
493 PathBuilderKeyRolloverTest() : signature_policy_(1024) {} 493 PathBuilderKeyRolloverTest() : signature_policy_(1024) {}
494 494
495 void SetUp() override { 495 void SetUp() override {
496 ParsedCertificateList path; 496 ParsedCertificateList path;
497 bool unused_result; 497 bool unused_result;
498 std::string unused_errors; 498 std::string unused_errors;
499 499
500 ReadVerifyCertChainTestFromFile("key-rollover-oldchain.pem", &path, 500 ReadVerifyCertChainTestFromFile(
501 &oldroot_, &time_, &unused_result, 501 "net/data/verify_certificate_chain_unittest/key-rollover-oldchain.pem",
502 &unused_errors); 502 &path, &oldroot_, &time_, &unused_result, &unused_errors);
503 ASSERT_EQ(2U, path.size()); 503 ASSERT_EQ(2U, path.size());
504 target_ = path[0]; 504 target_ = path[0];
505 oldintermediate_ = path[1]; 505 oldintermediate_ = path[1];
506 ASSERT_TRUE(target_); 506 ASSERT_TRUE(target_);
507 ASSERT_TRUE(oldintermediate_); 507 ASSERT_TRUE(oldintermediate_);
508 508
509 ReadVerifyCertChainTestFromFile("key-rollover-longrolloverchain.pem", &path, 509 ReadVerifyCertChainTestFromFile(
510 &oldroot_, &time_, &unused_result, 510 "net/data/verify_certificate_chain_unittest/"
511 &unused_errors); 511 "key-rollover-longrolloverchain.pem",
512 &path, &oldroot_, &time_, &unused_result, &unused_errors);
512 ASSERT_EQ(4U, path.size()); 513 ASSERT_EQ(4U, path.size());
513 newintermediate_ = path[1]; 514 newintermediate_ = path[1];
514 newroot_ = path[2]; 515 newroot_ = path[2];
515 newrootrollover_ = path[3]; 516 newrootrollover_ = path[3];
516 ASSERT_TRUE(newintermediate_); 517 ASSERT_TRUE(newintermediate_);
517 ASSERT_TRUE(newroot_); 518 ASSERT_TRUE(newroot_);
518 ASSERT_TRUE(newrootrollover_); 519 ASSERT_TRUE(newrootrollover_);
519 } 520 }
520 521
521 protected: 522 protected:
(...skipping 765 matching lines...) Expand 10 before | Expand all | Expand 10 after
1287 const auto& path1 = result.paths[1]->path; 1288 const auto& path1 = result.paths[1]->path;
1288 ASSERT_EQ(2U, path1.certs.size()); 1289 ASSERT_EQ(2U, path1.certs.size());
1289 EXPECT_EQ(target_, path1.certs[0]); 1290 EXPECT_EQ(target_, path1.certs[0]);
1290 EXPECT_EQ(newintermediate_, path1.certs[1]); 1291 EXPECT_EQ(newintermediate_, path1.certs[1]);
1291 EXPECT_EQ(newroot_, path1.trust_anchor->cert()); 1292 EXPECT_EQ(newroot_, path1.trust_anchor->cert());
1292 } 1293 }
1293 1294
1294 } // namespace 1295 } // namespace
1295 1296
1296 } // namespace net 1297 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | net/cert/internal/path_builder_verify_certificate_chain_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698