diff options
author | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-14 23:15:47 +0000 |
---|---|---|
committer | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-14 23:15:47 +0000 |
commit | 3753f52d42975eaefcafca9fc0257ec24e161a9c (patch) | |
tree | c9622baf613dd1b47c304d30e1ded74fa84fce54 /chrome/browser/automation/automation_provider.cc | |
parent | 9e23bb1bba29dad5305e8f8a08341aefe7275502 (diff) | |
download | chromium_src-3753f52d42975eaefcafca9fc0257ec24e161a9c.zip chromium_src-3753f52d42975eaefcafca9fc0257ec24e161a9c.tar.gz chromium_src-3753f52d42975eaefcafca9fc0257ec24e161a9c.tar.bz2 |
Implement chrome_proces_util for linux and enable download ui test.
To get the PID from the socket, we use lsof (fuser doesn't work with unix sockets apparently).
The download shelf, save page, and browser ui tests now pass.
Review URL: http://codereview.chromium.org/66071
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13716 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/automation/automation_provider.cc')
-rw-r--r-- | chrome/browser/automation/automation_provider.cc | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/chrome/browser/automation/automation_provider.cc b/chrome/browser/automation/automation_provider.cc index 1f1adc2..34d1599 100644 --- a/chrome/browser/automation/automation_provider.cc +++ b/chrome/browser/automation/automation_provider.cc @@ -29,6 +29,7 @@ #include "chrome/browser/tab_contents/web_contents_view.h" #include "chrome/common/chrome_paths.h" #include "chrome/common/notification_registrar.h" +#include "chrome/common/platform_util.h" #include "chrome/common/pref_service.h" #include "chrome/test/automation/automation_messages.h" #include "net/base/cookie_monster.h" @@ -1038,6 +1039,8 @@ void AutomationProvider::OnMessageReceived(const IPC::Message& message) { OverrideEncoding) IPC_MESSAGE_HANDLER(AutomationMsg_SavePackageShouldPromptUser, SavePackageShouldPromptUser) + IPC_MESSAGE_HANDLER(AutomationMsg_WindowTitle, + GetWindowTitle) IPC_END_MESSAGE_MAP() } @@ -1896,14 +1899,9 @@ void AutomationProvider::ExecuteJavascript(int handle, void AutomationProvider::GetShelfVisibility(int handle, bool* visible) { *visible = false; -#if defined(OS_WIN) WebContents* web_contents = GetWebContentsForHandle(handle, NULL); if (web_contents) *visible = web_contents->IsDownloadShelfVisible(); -#else - // TODO(port): Enable when web_contents->IsDownloadShelfVisible is ported. - NOTIMPLEMENTED(); -#endif } void AutomationProvider::GetConstrainedWindowCount(int handle, int* count) { @@ -2450,7 +2448,7 @@ void AutomationProvider::IsPageMenuCommandEnabled(int browser_handle, } #if defined(OS_WIN) -// TODO(port): Enable these. +// TODO(port): Enable this. void AutomationProvider::PrintNow(int tab_handle, IPC::Message* reply_message) { NavigationController* tab = NULL; @@ -2467,6 +2465,7 @@ void AutomationProvider::PrintNow(int tab_handle, AutomationMsg_PrintNow::WriteReplyParams(reply_message, false); Send(reply_message); } +#endif void AutomationProvider::SavePage(int tab_handle, const std::wstring& file_name, @@ -2496,6 +2495,8 @@ void AutomationProvider::SavePage(int tab_handle, *success = true; } +#if defined(OS_WIN) +// TODO(port): Enable these. void AutomationProvider::GetAutocompleteEditText(int autocomplete_edit_handle, bool* success, std::wstring* text) { @@ -2850,3 +2851,8 @@ void AutomationProvider::OnTabReposition( } #endif // defined(OS_WIN) + +void AutomationProvider::GetWindowTitle(int handle, string16* text) { + gfx::NativeWindow window = window_tracker_->GetResource(handle); + text->assign(platform_util::GetWindowTitle(window)); +} |