diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-11 19:14:56 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-11 19:14:56 +0000 |
commit | 71f65dd427f9a579d258162fd02a73ae9a500916 (patch) | |
tree | 43630d5ca64029a0f82db8831c08a0e032991e31 /chrome/test/ui/ui_test.cc | |
parent | 521c0356810dac743b751c0f96bf605e6b41e880 (diff) | |
download | chromium_src-71f65dd427f9a579d258162fd02a73ae9a500916.zip chromium_src-71f65dd427f9a579d258162fd02a73ae9a500916.tar.gz chromium_src-71f65dd427f9a579d258162fd02a73ae9a500916.tar.bz2 |
The Chrome Automation framework is based on a homegrown request response IPC model and thus ends up duplicating a lot of functionality already available in the SyncChannel.
This CL gets the automation framework to use the SyncChannel. The request response IPCs have been changed to sync IPCs.
Review URL: http://codereview.chromium.org/20189
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9585 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/ui/ui_test.cc')
-rw-r--r-- | chrome/test/ui/ui_test.cc | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/chrome/test/ui/ui_test.cc b/chrome/test/ui/ui_test.cc index 5d88ba9..486ee0d 100644 --- a/chrome/test/ui/ui_test.cc +++ b/chrome/test/ui/ui_test.cc @@ -698,7 +698,7 @@ std::wstring UITest::GetDownloadDirectory() { void UITest::CloseBrowserAsync(BrowserProxy* browser) const { server_->Send( - new AutomationMsg_CloseBrowserRequest(0, browser->handle())); + new AutomationMsg_CloseBrowserRequestAsync(0, browser->handle())); } bool UITest::CloseBrowser(BrowserProxy* browser, @@ -707,26 +707,20 @@ bool UITest::CloseBrowser(BrowserProxy* browser, if (!browser->is_valid() || !browser->handle()) return false; - IPC::Message* response = NULL; - bool succeeded = server_->SendAndWaitForResponse( - new AutomationMsg_CloseBrowserRequest(0, browser->handle()), - &response, AutomationMsg_CloseBrowserResponse__ID); + bool result = true; + + bool succeeded = server_->Send(new AutomationMsg_CloseBrowser( + 0, browser->handle(), &result, application_closed)); if (!succeeded) return false; - void* iter = NULL; - bool result = true; - response->ReadBool(&iter, &result); - response->ReadBool(&iter, application_closed); - if (*application_closed) { // Let's wait until the process dies (if it is not gone already). int r = WaitForSingleObject(process_, INFINITE); DCHECK(r != WAIT_FAILED); } - delete response; return result; } |