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

Side by Side Diff: chrome/common/net/x509_certificate_model_unittest.cc

Issue 691593002: Fix OpenSSL x509 unit test build breakage by adding a missing getter for a scoped_refptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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 | no next file » | 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 "chrome/common/net/x509_certificate_model.h" 5 #include "chrome/common/net/x509_certificate_model.h"
6 6
7 #include "base/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "base/path_service.h" 8 #include "base/path_service.h"
9 #include "net/base/test_data_directory.h" 9 #include "net/base/test_data_directory.h"
10 #include "net/test/cert_test_util.h" 10 #include "net/test/cert_test_util.h"
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 311
312 net::CertificateList decoded_certs = 312 net::CertificateList decoded_certs =
313 net::X509Certificate::CreateCertificateListFromBytes( 313 net::X509Certificate::CreateCertificateListFromBytes(
314 pkcs7_string.data(), 314 pkcs7_string.data(),
315 pkcs7_string.size(), 315 pkcs7_string.size(),
316 net::X509Certificate::FORMAT_PKCS7); 316 net::X509Certificate::FORMAT_PKCS7);
317 317
318 ASSERT_EQ(certs.size(), decoded_certs.size()); 318 ASSERT_EQ(certs.size(), decoded_certs.size());
319 #if defined(USE_OPENSSL) 319 #if defined(USE_OPENSSL)
320 for (size_t i = 0; i < certs.size(); ++i) 320 for (size_t i = 0; i < certs.size(); ++i)
321 EXPECT_TRUE(certs[i]->Equals(decoded_certs[i])); 321 EXPECT_TRUE(certs[i]->Equals(decoded_certs[i].get()));
322 #else 322 #else
323 // NSS sorts the certs before writing the file. 323 // NSS sorts the certs before writing the file.
324 EXPECT_TRUE(certs[0]->Equals(decoded_certs.back().get())); 324 EXPECT_TRUE(certs[0]->Equals(decoded_certs.back().get()));
325 for (size_t i = 1; i < certs.size(); ++i) 325 for (size_t i = 1; i < certs.size(); ++i)
326 EXPECT_TRUE(certs[i]->Equals(decoded_certs[i - 1].get())); 326 EXPECT_TRUE(certs[i]->Equals(decoded_certs[i - 1].get()));
327 #endif 327 #endif
328 } 328 }
329 329
330 { 330 {
331 // Write only the first cert. 331 // Write only the first cert.
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 "10 21 14 7F 1B 70 3D 89 1A 40 8A 06 2C 5D 50 19\n" 439 "10 21 14 7F 1B 70 3D 89 1A 40 8A 06 2C 5D 50 19\n"
440 "62 F9 C7 45 89 F2 3D 66 05 3D 7D 75 5B 55 1E 80\n" 440 "62 F9 C7 45 89 F2 3D 66 05 3D 7D 75 5B 55 1E 80\n"
441 "42 72 A1 9A 7C 6D 0A 74 F6 EE A6 21 6C 3A 98 FB\n" 441 "42 72 A1 9A 7C 6D 0A 74 F6 EE A6 21 6C 3A 98 FB\n"
442 "77 82 5F F2 6B 56 E6 DD 9B 8E 50 F0 C6 AE FD EA\n" 442 "77 82 5F F2 6B 56 E6 DD 9B 8E 50 F0 C6 AE FD EA\n"
443 "A6 05 07 A9 26 06 56 B3 B2 D9 B2 37 A0 21 3E 79\n" 443 "A6 05 07 A9 26 06 56 B3 B2 D9 B2 37 A0 21 3E 79\n"
444 "06 1F B9 51 BE F4 B1 49 4D 90 B5 33 E5 0E C7 5E\n" 444 "06 1F B9 51 BE F4 B1 49 4D 90 B5 33 E5 0E C7 5E\n"
445 "5B 40 C5 6A 04 D1 43 7A 94 6A A4 4F 61 FC 82 E0", 445 "5B 40 C5 6A 04 D1 43 7A 94 6A A4 4F 61 FC 82 E0",
446 x509_certificate_model::ProcessRawBitsSignatureWrap( 446 x509_certificate_model::ProcessRawBitsSignatureWrap(
447 cert->os_cert_handle())); 447 cert->os_cert_handle()));
448 } 448 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698