diff options
author | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-09 21:46:15 +0000 |
---|---|---|
committer | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-09 21:46:15 +0000 |
commit | 3683cbb58a3e46cc3bb3860268e7bcf6ca499a0b (patch) | |
tree | c72557a7a4f3f24328757dd3c658b58865b57c0c /chrome/browser/automation | |
parent | b3d7a18cfceb5305aa563a321408665e4d7d3d12 (diff) | |
download | chromium_src-3683cbb58a3e46cc3bb3860268e7bcf6ca499a0b.zip chromium_src-3683cbb58a3e46cc3bb3860268e7bcf6ca499a0b.tar.gz chromium_src-3683cbb58a3e46cc3bb3860268e7bcf6ca499a0b.tar.bz2 |
UI test portage, second try.
first try here: <http://codereview.chromium.org/63149>
Review URL: http://codereview.chromium.org/67006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13464 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/automation')
4 files changed, 17 insertions, 19 deletions
diff --git a/chrome/browser/automation/automation_provider.cc b/chrome/browser/automation/automation_provider.cc index 81d0137..067302a 100644 --- a/chrome/browser/automation/automation_provider.cc +++ b/chrome/browser/automation/automation_provider.cc @@ -2100,17 +2100,14 @@ void AutomationProvider::GetDownloadDirectory( } } -#if defined(OS_WIN) -// TODO(port): Remove windowsisms. -void AutomationProvider::OpenNewBrowserWindow(int show_command) { +void AutomationProvider::OpenNewBrowserWindow(bool show) { // 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_command != SW_HIDE) + if (show) 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 0c4f876..eafd5fe 100644 --- a/chrome/browser/automation/automation_provider.h +++ b/chrome/browser/automation/automation_provider.h @@ -266,7 +266,8 @@ class AutomationProvider : public base::RefCounted<AutomationProvider>, void GetAutocompleteEditForBrowser(int browser_handle, bool* success, int* autocomplete_edit_handle); - void OpenNewBrowserWindow(int show_command); + // If |show| is true, call Show() on the new window after creating it. + void OpenNewBrowserWindow(bool show); 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 a4b7c6f..630eca1 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 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"; +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"; std::vector<URLRequestSlowDownloadJob*> URLRequestSlowDownloadJob::kPendingRequests; @@ -32,11 +32,11 @@ void URLRequestSlowDownloadJob::Start() { /* static */ void URLRequestSlowDownloadJob::AddUITestUrls() { URLRequestFilter* filter = URLRequestFilter::GetInstance(); - filter->AddUrlHandler(GURL(WideToUTF8(kUnknownSizeUrl)), + filter->AddUrlHandler(GURL(kUnknownSizeUrl), &URLRequestSlowDownloadJob::Factory); - filter->AddUrlHandler(GURL(WideToUTF8(kKnownSizeUrl)), + filter->AddUrlHandler(GURL(kKnownSizeUrl), &URLRequestSlowDownloadJob::Factory); - filter->AddUrlHandler(GURL(WideToUTF8(kFinishDownloadUrl)), + filter->AddUrlHandler(GURL(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() != WideToUTF8(kFinishDownloadUrl)) + if (request->url().spec() != 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 29cf57a..eee858a 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 wchar_t kUnknownSizeUrl[]; - static const wchar_t kKnownSizeUrl[]; - static const wchar_t kFinishDownloadUrl[]; + static const char kUnknownSizeUrl[]; + static const char kKnownSizeUrl[]; + static const char kFinishDownloadUrl[]; // For UI tests: adds the testing URLs to the URLRequestFilter. static void AddUITestUrls(); |