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

Side by Side Diff: extensions/common/cast/cast_cert_validator_unittest.cc

Issue 1908953003: Convert //extensions/{common,shell} from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase? Created 4 years, 8 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 | « extensions/common/cast/cast_cert_validator.cc ('k') | extensions/common/event_filter.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 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 "extensions/common/cast/cast_cert_validator.h" 5 #include "extensions/common/cast/cast_cert_validator.h"
6 6
7 #include "extensions/common/cast/cast_cert_validator_test_helpers.h" 7 #include "extensions/common/cast/cast_cert_validator_test_helpers.h"
8 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
9 9
10 namespace extensions { 10 namespace extensions {
(...skipping 29 matching lines...) Expand all
40 // a valid signature generated by the device certificate. 40 // a valid signature generated by the device certificate.
41 // 41 //
42 void RunTest(TestResult expected_result, 42 void RunTest(TestResult expected_result,
43 const std::string& expected_common_name, 43 const std::string& expected_common_name,
44 CastDeviceCertPolicy expected_policy, 44 CastDeviceCertPolicy expected_policy,
45 const std::string& certs_file_name, 45 const std::string& certs_file_name,
46 const base::Time::Exploded& time, 46 const base::Time::Exploded& time,
47 const std::string& optional_signed_data_file_name) { 47 const std::string& optional_signed_data_file_name) {
48 auto certs = cast_test_helpers::ReadCertificateChainFromFile(certs_file_name); 48 auto certs = cast_test_helpers::ReadCertificateChainFromFile(certs_file_name);
49 49
50 scoped_ptr<CertVerificationContext> context; 50 std::unique_ptr<CertVerificationContext> context;
51 CastDeviceCertPolicy policy; 51 CastDeviceCertPolicy policy;
52 bool result = VerifyDeviceCert(certs, time, &context, &policy); 52 bool result = VerifyDeviceCert(certs, time, &context, &policy);
53 53
54 if (expected_result == RESULT_FAIL) { 54 if (expected_result == RESULT_FAIL) {
55 ASSERT_FALSE(result); 55 ASSERT_FALSE(result);
56 return; 56 return;
57 } 57 }
58 58
59 ASSERT_TRUE(result); 59 ASSERT_TRUE(result);
60 EXPECT_EQ(expected_policy, policy); 60 EXPECT_EQ(expected_policy, policy);
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 CreateString(kEx2Message))); 414 CreateString(kEx2Message)));
415 } 415 }
416 416
417 } // namespace 417 } // namespace
418 418
419 } // namespace cast_crypto 419 } // namespace cast_crypto
420 420
421 } // namespace api 421 } // namespace api
422 422
423 } // namespace extensions 423 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/common/cast/cast_cert_validator.cc ('k') | extensions/common/event_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698