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

Unified Diff: net/url_request/url_request_unittest.h

Issue 62145: Yet another scrape atttempt (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/tools/testserver/testserver.py ('k') | webkit/glue/searchable_form_data.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request_unittest.h
===================================================================
--- net/url_request/url_request_unittest.h (revision 13436)
+++ net/url_request/url_request_unittest.h (working copy)
@@ -260,20 +260,22 @@
bool Start(net::TestServerLauncher::Protocol protocol,
const std::string& host_name, int port,
const FilePath& document_root,
- const FilePath& cert_path) {
+ const FilePath& cert_path,
+ const std::wstring& file_root_url) {
std::string blank;
return Start(protocol, host_name, port, document_root, cert_path,
- blank, blank);
+ file_root_url, blank, blank);
}
bool Start(net::TestServerLauncher::Protocol protocol,
const std::string& host_name, int port,
const FilePath& document_root,
const FilePath& cert_path,
+ const std::wstring& file_root_url,
const std::string& url_user,
const std::string& url_password) {
if (!launcher_.Start(protocol,
- host_name, port, document_root, cert_path))
+ host_name, port, document_root, cert_path, file_root_url))
return false;
std::string scheme;
@@ -338,13 +340,20 @@
static scoped_refptr<HTTPTestServer> CreateServer(
const std::wstring& document_root,
MessageLoop* loop) {
+ return CreateServerWithFileRootURL(document_root, std::wstring(), loop);
+ }
+
+ static scoped_refptr<HTTPTestServer> CreateServerWithFileRootURL(
+ const std::wstring& document_root,
+ const std::wstring& file_root_url,
+ MessageLoop* loop) {
scoped_refptr<HTTPTestServer> test_server = new HTTPTestServer();
test_server->loop_ = loop;
FilePath no_cert;
FilePath docroot = FilePath::FromWStringHack(document_root);
if (!test_server->Start(net::TestServerLauncher::ProtoHTTP,
kDefaultHostName, kHTTPDefaultPort,
- docroot, no_cert)) {
+ docroot, no_cert, file_root_url)) {
return NULL;
}
return test_server;
@@ -438,7 +447,7 @@
if (!test_server->Start(net::TestServerLauncher::ProtoHTTP,
net::TestServerLauncher::kHostName,
net::TestServerLauncher::kOKHTTPSPort,
- docroot, certpath)) {
+ docroot, certpath, std::wstring())) {
return NULL;
}
return test_server;
@@ -454,7 +463,7 @@
if (!test_server->Start(net::TestServerLauncher::ProtoHTTP,
net::TestServerLauncher::kMismatchedHostName,
net::TestServerLauncher::kOKHTTPSPort,
- docroot, certpath)) {
+ docroot, certpath, std::wstring())) {
return NULL;
}
return test_server;
@@ -469,7 +478,7 @@
if (!test_server->Start(net::TestServerLauncher::ProtoHTTP,
net::TestServerLauncher::kHostName,
net::TestServerLauncher::kBadHTTPSPort,
- docroot, certpath)) {
+ docroot, certpath, std::wstring())) {
return NULL;
}
return test_server;
@@ -484,7 +493,7 @@
FilePath docroot = FilePath::FromWStringHack(document_root);
FilePath certpath = FilePath::FromWStringHack(cert_path);
if (!test_server->Start(net::TestServerLauncher::ProtoHTTP,
- host_name, port, docroot, certpath)) {
+ host_name, port, docroot, certpath, std::wstring())) {
return NULL;
}
return test_server;
@@ -517,7 +526,7 @@
FilePath docroot = FilePath::FromWStringHack(document_root);
FilePath no_cert;
if (!test_server->Start(net::TestServerLauncher::ProtoFTP,
- kDefaultHostName, kFTPDefaultPort, docroot, no_cert,
+ kDefaultHostName, kFTPDefaultPort, docroot, no_cert, std::wstring(),
url_user, url_password)) {
return NULL;
}
« no previous file with comments | « net/tools/testserver/testserver.py ('k') | webkit/glue/searchable_form_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698