From 71f65dd427f9a579d258162fd02a73ae9a500916 Mon Sep 17 00:00:00 2001 From: "ananta@chromium.org" Date: Wed, 11 Feb 2009 19:14:56 +0000 Subject: 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 --- chrome/test/ui/ui_test.cc | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'chrome/test/ui/ui_test.cc') 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; } -- cgit v1.1