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

Side by Side Diff: net/ocsp/nss_ocsp_unittest.cc

Issue 19579005: Move ReadFileToString to the base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « net/ftp/ftp_directory_listing_parser_unittest.cc ('k') | net/proxy/proxy_resolver_perftest.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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/ocsp/nss_ocsp.h" 5 #include "net/ocsp/nss_ocsp.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 public: 71 public:
72 NssHttpTest() 72 NssHttpTest()
73 : context_(false), 73 : context_(false),
74 handler_(NULL), 74 handler_(NULL),
75 verify_proc_(new CertVerifyProcNSS), 75 verify_proc_(new CertVerifyProcNSS),
76 verifier_(new MultiThreadedCertVerifier(verify_proc_.get())) {} 76 verifier_(new MultiThreadedCertVerifier(verify_proc_.get())) {}
77 virtual ~NssHttpTest() {} 77 virtual ~NssHttpTest() {}
78 78
79 virtual void SetUp() { 79 virtual void SetUp() {
80 std::string file_contents; 80 std::string file_contents;
81 ASSERT_TRUE(file_util::ReadFileToString( 81 ASSERT_TRUE(base::ReadFileToString(
82 GetTestCertsDirectory().AppendASCII("aia-intermediate.der"), 82 GetTestCertsDirectory().AppendASCII("aia-intermediate.der"),
83 &file_contents)); 83 &file_contents));
84 ASSERT_FALSE(file_contents.empty()); 84 ASSERT_FALSE(file_contents.empty());
85 85
86 // Ownership of |handler| is transferred to the URLRequestFilter, but 86 // Ownership of |handler| is transferred to the URLRequestFilter, but
87 // hold onto the original pointer in order to access |request_count()|. 87 // hold onto the original pointer in order to access |request_count()|.
88 scoped_ptr<AiaResponseHandler> handler( 88 scoped_ptr<AiaResponseHandler> handler(
89 new AiaResponseHandler(kAiaHeaders, file_contents)); 89 new AiaResponseHandler(kAiaHeaders, file_contents));
90 handler_ = handler.get(); 90 handler_ = handler.get();
91 91
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 154
155 error = test_callback.WaitForResult(); 155 error = test_callback.WaitForResult();
156 156
157 EXPECT_EQ(OK, error); 157 EXPECT_EQ(OK, error);
158 158
159 // Ensure that NSS made an AIA request for the missing intermediate. 159 // Ensure that NSS made an AIA request for the missing intermediate.
160 EXPECT_LT(0, request_count()); 160 EXPECT_LT(0, request_count());
161 } 161 }
162 162
163 } // namespace net 163 } // namespace net
OLDNEW
« no previous file with comments | « net/ftp/ftp_directory_listing_parser_unittest.cc ('k') | net/proxy/proxy_resolver_perftest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698