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

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

Issue 2901103002: Fix closing namespace comments in //net. (Closed)
Patch Set: Rebase. Created 3 years, 7 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
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/parse_name.h" 5 #include "net/cert/internal/parse_name.h"
6 6
7 #include "net/cert/internal/test_helpers.h" 7 #include "net/cert/internal/test_helpers.h"
8 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
9 9
10 namespace net { 10 namespace net {
(...skipping 11 matching lines...) Expand all
22 std::string* result) { 22 std::string* result) {
23 std::string path = "net/data/verify_name_match_unittest/names/" + prefix + 23 std::string path = "net/data/verify_name_match_unittest/names/" + prefix +
24 "-" + value_type + "-" + suffix + ".pem"; 24 "-" + value_type + "-" + suffix + ".pem";
25 25
26 const PemBlockMapping mappings[] = { 26 const PemBlockMapping mappings[] = {
27 {"NAME", result}, 27 {"NAME", result},
28 }; 28 };
29 29
30 return ReadTestDataFromPemFile(path, mappings); 30 return ReadTestDataFromPemFile(path, mappings);
31 } 31 }
32 } 32
33 } // anonymous namespace
33 34
34 TEST(ParseNameTest, IA5SafeStringValue) { 35 TEST(ParseNameTest, IA5SafeStringValue) {
35 const uint8_t der[] = { 36 const uint8_t der[] = {
36 0x46, 0x6f, 0x6f, 0x20, 0x62, 0x61, 0x72, 37 0x46, 0x6f, 0x6f, 0x20, 0x62, 0x61, 0x72,
37 }; 38 };
38 X509NameAttribute value(der::Input(), der::kIA5String, der::Input(der)); 39 X509NameAttribute value(der::Input(), der::kIA5String, der::Input(der));
39 std::string result_unsafe; 40 std::string result_unsafe;
40 ASSERT_TRUE(value.ValueAsStringUnsafe(&result_unsafe)); 41 ASSERT_TRUE(value.ValueAsStringUnsafe(&result_unsafe));
41 ASSERT_EQ("Foo bar", result_unsafe); 42 ASSERT_EQ("Foo bar", result_unsafe);
42 std::string result; 43 std::string result;
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 0x75, 0xc4, 0x8d, 0x69, 0xc4, 0x87}; 325 0x75, 0xc4, 0x8d, 0x69, 0xc4, 0x87};
325 der::Input rdn_input(der); 326 der::Input rdn_input(der);
326 RDNSequence rdn; 327 RDNSequence rdn;
327 ASSERT_TRUE(ParseName(rdn_input, &rdn)); 328 ASSERT_TRUE(ParseName(rdn_input, &rdn));
328 std::string output; 329 std::string output;
329 ASSERT_TRUE(ConvertToRFC2253(rdn, &output)); 330 ASSERT_TRUE(ConvertToRFC2253(rdn, &output));
330 ASSERT_EQ("SN=Lu\\C4\\8Di\\C4\\87", output); 331 ASSERT_EQ("SN=Lu\\C4\\8Di\\C4\\87", output);
331 } 332 }
332 333
333 } // namespace net 334 } // namespace net
OLDNEW
« no previous file with comments | « net/cert/cert_verify_proc_whitelist_unittest.cc ('k') | net/cert/nss_profile_filter_chromeos_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698