diff options
Diffstat (limited to 'chrome/browser/automation')
4 files changed, 19 insertions, 16 deletions
diff --git a/chrome/browser/automation/automation_provider.cc b/chrome/browser/automation/automation_provider.cc index 067302a..81d0137 100644 --- a/chrome/browser/automation/automation_provider.cc +++ b/chrome/browser/automation/automation_provider.cc @@ -2100,14 +2100,17 @@ void AutomationProvider::GetDownloadDirectory( } } -void AutomationProvider::OpenNewBrowserWindow(bool show) { +#if defined(OS_WIN) +// TODO(port): Remove windowsisms. +void AutomationProvider::OpenNewBrowserWindow(int show_command) { // We may have no current browser windows open so don't rely on // asking an existing browser to execute the IDC_NEWWINDOW command Browser* browser = Browser::Create(profile_); browser->AddBlankTab(true); - if (show) + if (show_command != SW_HIDE) browser->window()->Show(); } +#endif // defined(OS_WIN) void AutomationProvider::GetWindowForBrowser(int browser_handle, bool* success, diff --git a/chrome/browser/automation/automation_provider.h b/chrome/browser/automation/automation_provider.h index 23840cf..0c4f876 100644 --- a/chrome/browser/automation/automation_provider.h +++ b/chrome/browser/automation/automation_provider.h @@ -266,7 +266,7 @@ class AutomationProvider : public base::RefCounted<AutomationProvider>, void GetAutocompleteEditForBrowser(int browser_handle, bool* success, int* autocomplete_edit_handle); - void OpenNewBrowserWindow(bool show); + void OpenNewBrowserWindow(int show_command); void ShowInterstitialPage(int tab_handle, const std::string& html_text, diff --git a/chrome/browser/automation/url_request_slow_download_job.cc b/chrome/browser/automation/url_request_slow_download_job.cc index 630eca1..a4b7c6f 100644 --- a/chrome/browser/automation/url_request_slow_download_job.cc +++ b/chrome/browser/automation/url_request_slow_download_job.cc @@ -14,12 +14,12 @@ const int kFirstDownloadSize = 1024 * 35; const int kSecondDownloadSize = 1024 * 10; -const char URLRequestSlowDownloadJob::kUnknownSizeUrl[] = - "http://url.handled.by.slow.download/download-unknown-size"; -const char URLRequestSlowDownloadJob::kKnownSizeUrl[] = - "http://url.handled.by.slow.download/download-known-size"; -const char URLRequestSlowDownloadJob::kFinishDownloadUrl[] = - "http://url.handled.by.slow.download/download-finish"; +const wchar_t URLRequestSlowDownloadJob::kUnknownSizeUrl[] = + L"http://url.handled.by.slow.download/download-unknown-size"; +const wchar_t URLRequestSlowDownloadJob::kKnownSizeUrl[] = + L"http://url.handled.by.slow.download/download-known-size"; +const wchar_t URLRequestSlowDownloadJob::kFinishDownloadUrl[] = + L"http://url.handled.by.slow.download/download-finish"; std::vector<URLRequestSlowDownloadJob*> URLRequestSlowDownloadJob::kPendingRequests; @@ -32,11 +32,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); } @@ -44,7 +44,7 @@ void URLRequestSlowDownloadJob::AddUITestUrls() { URLRequestJob* URLRequestSlowDownloadJob::Factory(URLRequest* request, const std::string& scheme) { URLRequestSlowDownloadJob* job = new URLRequestSlowDownloadJob(request); - if (request->url().spec() != kFinishDownloadUrl) + if (request->url().spec() != WideToUTF8(kFinishDownloadUrl)) URLRequestSlowDownloadJob::kPendingRequests.push_back(job); return job; } diff --git a/chrome/browser/automation/url_request_slow_download_job.h b/chrome/browser/automation/url_request_slow_download_job.h index eee858a..29cf57a 100644 --- a/chrome/browser/automation/url_request_slow_download_job.h +++ b/chrome/browser/automation/url_request_slow_download_job.h @@ -32,9 +32,9 @@ class URLRequestSlowDownloadJob : public URLRequestJob { const std::string& scheme); // Test URLs. - static const char kUnknownSizeUrl[]; - static const char kKnownSizeUrl[]; - static const char kFinishDownloadUrl[]; + static const wchar_t kUnknownSizeUrl[]; + static const wchar_t kKnownSizeUrl[]; + static const wchar_t kFinishDownloadUrl[]; // For UI tests: adds the testing URLs to the URLRequestFilter. static void AddUITestUrls(); |