Commit f48fa4b9 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

shdocvw: Added InternetExplorer::get_Visible implementation.

parent 74ccbf00
......@@ -372,8 +372,11 @@ static HRESULT WINAPI InternetExplorer_get_Path(IWebBrowser2 *iface, BSTR *Path)
static HRESULT WINAPI InternetExplorer_get_Visible(IWebBrowser2 *iface, VARIANT_BOOL *pBool)
{
InternetExplorer *This = impl_from_IWebBrowser2(iface);
FIXME("(%p)->(%p)\n", This, pBool);
return E_NOTIMPL;
TRACE("(%p)->(%p)\n", This, pBool);
*pBool = IsWindowVisible(This->frame_hwnd) ? VARIANT_TRUE : VARIANT_FALSE;
return S_OK;
}
static HRESULT WINAPI InternetExplorer_put_Visible(IWebBrowser2 *iface, VARIANT_BOOL Value)
......
......@@ -27,6 +27,28 @@
#include "ole2.h"
#include "exdisp.h"
static void test_visible(IWebBrowser2 *wb)
{
VARIANT_BOOL b;
HRESULT hres;
b = 0x100;
hres = IWebBrowser2_get_Visible(wb, &b);
ok(hres == S_OK, "get_Visible failed: %08x\n", hres);
ok(b == VARIANT_FALSE, "Visible = %x\n", hres);
hres = IWebBrowser2_put_Visible(wb, VARIANT_TRUE);
ok(hres == S_OK, "put_Visible failed: %08x\n", hres);
b = 0x100;
hres = IWebBrowser2_get_Visible(wb, &b);
ok(hres == S_OK, "get_Visible failed: %08x\n", hres);
ok(b == VARIANT_TRUE, "Visible = %x\n", hres);
hres = IWebBrowser2_put_Visible(wb, VARIANT_FALSE);
ok(hres == S_OK, "put_Visible failed: %08x\n", hres);
}
static void test_InternetExplorer(void)
{
IWebBrowser2 *wb;
......@@ -44,6 +66,8 @@ static void test_InternetExplorer(void)
hres = IUnknown_QueryInterface(unk, &IID_IWebBrowser2, (void**)&wb);
ok(hres == S_OK, "Could not get IWebBrowser2 interface: %08x\n", hres);
test_visible(wb);
IWebBrowser2_Release(wb);
ref = IUnknown_Release(unk);
ok(!ref, "object not destroyed, ref=%u\n", ref);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment