summaryrefslogtreecommitdiffstats
path: root/chrome/browser/automation
diff options
context:
space:
mode:
authorevanm@google.com <evanm@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-23 21:15:42 +0000
committerevanm@google.com <evanm@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-23 21:15:42 +0000
commitd2d89baed092e57c107dc801b2a9ce3e0f6d4327 (patch)
treed5ea2ac2cabfe24eb351c3d8ad3b92746f9dc130 /chrome/browser/automation
parent03393da161328db98bdaf32e65c2877a259df916 (diff)
downloadchromium_src-d2d89baed092e57c107dc801b2a9ce3e0f6d4327.zip
chromium_src-d2d89baed092e57c107dc801b2a9ce3e0f6d4327.tar.gz
chromium_src-d2d89baed092e57c107dc801b2a9ce3e0f6d4327.tar.bz2
Port some more parts of browser/
This first needs http://codereview.chromium.org/6492 (porting base/process_util). BUG=2333 Review URL: http://codereview.chromium.org/6268 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3858 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/automation')
-rw-r--r--chrome/browser/automation/url_request_failed_dns_job.cc4
-rw-r--r--chrome/browser/automation/url_request_failed_dns_job.h2
-rw-r--r--chrome/browser/automation/url_request_mock_http_job.cc12
-rw-r--r--chrome/browser/automation/url_request_mock_net_error_job.cc2
-rw-r--r--chrome/browser/automation/url_request_slow_download_job.cc6
5 files changed, 12 insertions, 14 deletions
diff --git a/chrome/browser/automation/url_request_failed_dns_job.cc b/chrome/browser/automation/url_request_failed_dns_job.cc
index de8ff47..ce20816 100644
--- a/chrome/browser/automation/url_request_failed_dns_job.cc
+++ b/chrome/browser/automation/url_request_failed_dns_job.cc
@@ -10,8 +10,8 @@
#include "net/url_request/url_request.h"
#include "net/url_request/url_request_filter.h"
-const wchar_t URLRequestFailedDnsJob::kTestUrl[] =
- L"http://url.handled.by.fake.dns/";
+const char URLRequestFailedDnsJob::kTestUrl[] =
+ "http://url.handled.by.fake.dns/";
void URLRequestFailedDnsJob::Start() {
MessageLoop::current()->PostTask(FROM_HERE, NewRunnableMethod(
diff --git a/chrome/browser/automation/url_request_failed_dns_job.h b/chrome/browser/automation/url_request_failed_dns_job.h
index f63e2ab..52748fe 100644
--- a/chrome/browser/automation/url_request_failed_dns_job.h
+++ b/chrome/browser/automation/url_request_failed_dns_job.h
@@ -19,7 +19,7 @@ class URLRequestFailedDnsJob : public URLRequestJob {
const std::string& scheme);
// A test URL that can be used in UI tests.
- static const wchar_t kTestUrl[];
+ static const char kTestUrl[];
// For UI tests: adds the testing URLs to the URLRequestFilter.
static void AddUITestUrls();
diff --git a/chrome/browser/automation/url_request_mock_http_job.cc b/chrome/browser/automation/url_request_mock_http_job.cc
index d72b395..3a3c7d9 100644
--- a/chrome/browser/automation/url_request_mock_http_job.cc
+++ b/chrome/browser/automation/url_request_mock_http_job.cc
@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include <windows.h>
-
#include "chrome/browser/automation/url_request_mock_http_job.h"
#include "base/file_util.h"
@@ -34,7 +32,7 @@ URLRequestJob* URLRequestMockHTTPJob::Factory(URLRequest* request,
// Convert the file:/// URL to a path on disk.
std::wstring file_path;
- net::FileURLToFilePath(GURL(file_url), &file_path);
+ net::FileURLToFilePath(GURL(WideToUTF8(file_url)), &file_path);
URLRequestMockHTTPJob* job = new URLRequestMockHTTPJob(request);
job->file_path_ = file_path;
return job;
@@ -52,10 +50,10 @@ void URLRequestMockHTTPJob::AddUITestUrls(const std::wstring& base_path) {
/* static */
GURL URLRequestMockHTTPJob::GetMockUrl(const std::wstring& path) {
- std::wstring url = L"http://";
- url.append(UTF8ToWide(kMockHostname));
- url.append(L"/");
- url.append(path);
+ std::string url = "http://";
+ url.append(kMockHostname);
+ url.append("/");
+ url.append(WideToUTF8(path));
return GURL(url);
}
diff --git a/chrome/browser/automation/url_request_mock_net_error_job.cc b/chrome/browser/automation/url_request_mock_net_error_job.cc
index cd633a8..1061942 100644
--- a/chrome/browser/automation/url_request_mock_net_error_job.cc
+++ b/chrome/browser/automation/url_request_mock_net_error_job.cc
@@ -58,7 +58,7 @@ URLRequestJob* URLRequestMockNetErrorJob::Factory(URLRequest* request,
file_url.append(UTF8ToWide(url.path()));
// Convert the file:/// URL to a path on disk.
std::wstring file_path;
- net::FileURLToFilePath(GURL(file_url), &file_path);
+ net::FileURLToFilePath(GURL(WideToUTF8(file_url)), &file_path);
job->file_path_ = file_path;
return job;
}
diff --git a/chrome/browser/automation/url_request_slow_download_job.cc b/chrome/browser/automation/url_request_slow_download_job.cc
index ec4d61f..e1a2c84f0 100644
--- a/chrome/browser/automation/url_request_slow_download_job.cc
+++ b/chrome/browser/automation/url_request_slow_download_job.cc
@@ -31,11 +31,11 @@ void URLRequestSlowDownloadJob::Start() {
/* static */
void URLRequestSlowDownloadJob::AddUITestUrls() {
URLRequestFilter* filter = URLRequestFilter::GetInstance();
- filter->AddUrlHandler(GURL(kUnknownSizeUrl),
+ filter->AddUrlHandler(GURL(WideToUTF8(kUnknownSizeUrl)),
&URLRequestSlowDownloadJob::Factory);
- filter->AddUrlHandler(GURL(kKnownSizeUrl),
+ filter->AddUrlHandler(GURL(WideToUTF8(kKnownSizeUrl)),
&URLRequestSlowDownloadJob::Factory);
- filter->AddUrlHandler(GURL(kFinishDownloadUrl),
+ filter->AddUrlHandler(GURL(WideToUTF8(kFinishDownloadUrl)),
&URLRequestSlowDownloadJob::Factory);
}