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

Side by Side Diff: net/test/spawned_test_server/base_test_server.cc

Issue 5535006: Add unittests for net::TestRootCerts and regenerate test certificates (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix another hardcoded string Created 7 years, 6 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/net.gyp ('k') | ppapi/tests/test_tcp_socket_private_trusted.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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/test/spawned_test_server/base_test_server.h" 5 #include "net/test/spawned_test_server/base_test_server.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/base64.h" 10 #include "base/base64.h"
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 // Should always use absolute path to load the root certificate. 289 // Should always use absolute path to load the root certificate.
290 base::FilePath root_certificate_path = certificates_dir_; 290 base::FilePath root_certificate_path = certificates_dir_;
291 if (!certificates_dir_.IsAbsolute()) { 291 if (!certificates_dir_.IsAbsolute()) {
292 base::FilePath src_dir; 292 base::FilePath src_dir;
293 if (!PathService::Get(base::DIR_SOURCE_ROOT, &src_dir)) 293 if (!PathService::Get(base::DIR_SOURCE_ROOT, &src_dir))
294 return false; 294 return false;
295 root_certificate_path = src_dir.Append(certificates_dir_); 295 root_certificate_path = src_dir.Append(certificates_dir_);
296 } 296 }
297 297
298 return root_certs->AddFromFile( 298 return root_certs->AddFromFile(
299 root_certificate_path.AppendASCII("root_ca_cert.crt")); 299 root_certificate_path.AppendASCII("root_ca_cert.pem"));
300 } 300 }
301 301
302 bool BaseTestServer::SetupWhenServerStarted() { 302 bool BaseTestServer::SetupWhenServerStarted() {
303 DCHECK(host_port_pair_.port()); 303 DCHECK(host_port_pair_.port());
304 304
305 if (UsingSSL(type_) && !LoadTestRootCert()) 305 if (UsingSSL(type_) && !LoadTestRootCert())
306 return false; 306 return false;
307 307
308 started_ = true; 308 started_ = true;
309 allowed_port_.reset(new ScopedPortException(host_port_pair_.port())); 309 allowed_port_.reset(new ScopedPortException(host_port_pair_.port()));
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 390
391 return GenerateAdditionalArguments(arguments); 391 return GenerateAdditionalArguments(arguments);
392 } 392 }
393 393
394 bool BaseTestServer::GenerateAdditionalArguments( 394 bool BaseTestServer::GenerateAdditionalArguments(
395 base::DictionaryValue* arguments) const { 395 base::DictionaryValue* arguments) const {
396 return true; 396 return true;
397 } 397 }
398 398
399 } // namespace net 399 } // namespace net
OLDNEW
« no previous file with comments | « net/net.gyp ('k') | ppapi/tests/test_tcp_socket_private_trusted.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698