summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome_frame/test/chrome_frame_test_utils.cc6
1 files changed, 1 insertions, 5 deletions
diff --git a/chrome_frame/test/chrome_frame_test_utils.cc b/chrome_frame/test/chrome_frame_test_utils.cc
index 0d9f5d2..aeedeee 100644
--- a/chrome_frame/test/chrome_frame_test_utils.cc
+++ b/chrome_frame/test/chrome_frame_test_utils.cc
@@ -720,11 +720,7 @@ HRESULT WebBrowserEventSink::CloseWebBrowser() {
DCHECK(process_id_to_wait_for_ == 0);
if (!web_browser2_)
return E_FAIL;
- HWND hwnd = NULL;
- HRESULT hr = web_browser2_->get_HWND(reinterpret_cast<SHANDLE_PTR*>(&hwnd));
- if (!::IsWindow(hwnd))
- return E_UNEXPECTED;
- EXPECT_TRUE(::PostMessage(hwnd, WM_SYSCOMMAND, SC_CLOSE, 0));
+ web_browser2_->Quit();
return S_OK;
}