mirror of
https://github.com/reactos/wine.git
synced 2024-11-25 20:59:54 +00:00
shdocvw: Added [get|put]_Silent implementation.
As we don't have any dialog in WebBrowser implemented yet, all we have to do is to store silent value.
This commit is contained in:
parent
38d33e33ae
commit
f86827317b
@ -128,6 +128,7 @@ struct WebBrowser {
|
||||
VARIANT_BOOL address_bar;
|
||||
VARIANT_BOOL status_bar;
|
||||
VARIANT_BOOL tool_bar;
|
||||
VARIANT_BOOL silent;
|
||||
|
||||
DocHost doc_host;
|
||||
};
|
||||
|
@ -809,6 +809,49 @@ static void test_ie_funcs(IUnknown *unk)
|
||||
IWebBrowser2_Release(wb);
|
||||
}
|
||||
|
||||
static void test_Silent(IUnknown *unk)
|
||||
{
|
||||
IWebBrowser2 *wb;
|
||||
VARIANT_BOOL b;
|
||||
HRESULT hres;
|
||||
|
||||
hres = IUnknown_QueryInterface(unk, &IID_IWebBrowser2, (void**)&wb);
|
||||
ok(hres == S_OK, "Could not get IWebBrowser2 interface: %08lx\n", hres);
|
||||
if(FAILED(hres))
|
||||
return;
|
||||
|
||||
b = 100;
|
||||
hres = IWebBrowser2_get_Silent(wb, &b);
|
||||
ok(hres == S_OK, "get_Silent failed: %08lx\n", hres);
|
||||
ok(b == VARIANT_FALSE, "b=%x\n", b);
|
||||
|
||||
hres = IWebBrowser2_put_Silent(wb, VARIANT_TRUE);
|
||||
ok(hres == S_OK, "set_Silent failed: %08lx\n", hres);
|
||||
|
||||
b = 100;
|
||||
hres = IWebBrowser2_get_Silent(wb, &b);
|
||||
ok(hres == S_OK, "get_Silent failed: %08lx\n", hres);
|
||||
ok(b == VARIANT_TRUE, "b=%x\n", b);
|
||||
|
||||
hres = IWebBrowser2_put_Silent(wb, 100);
|
||||
ok(hres == S_OK, "set_Silent failed: %08lx\n", hres);
|
||||
|
||||
b = 100;
|
||||
hres = IWebBrowser2_get_Silent(wb, &b);
|
||||
ok(hres == S_OK, "get_Silent failed: %08lx\n", hres);
|
||||
ok(b == VARIANT_TRUE, "b=%x\n", b);
|
||||
|
||||
hres = IWebBrowser2_put_Silent(wb, VARIANT_FALSE);
|
||||
ok(hres == S_OK, "set_Silent failed: %08lx\n", hres);
|
||||
|
||||
b = 100;
|
||||
hres = IWebBrowser2_get_Silent(wb, &b);
|
||||
ok(hres == S_OK, "get_Silent failed: %08lx\n", hres);
|
||||
ok(b == VARIANT_FALSE, "b=%x\n", b);
|
||||
|
||||
IWebBrowser_Release(wb);
|
||||
}
|
||||
|
||||
static void test_GetControlInfo(IUnknown *unk)
|
||||
{
|
||||
IOleControl *control;
|
||||
@ -911,6 +954,7 @@ static void test_WebBrowser(void)
|
||||
test_ClientSite(unk, NULL);
|
||||
test_ie_funcs(unk);
|
||||
test_GetControlInfo(unk);
|
||||
test_Silent(unk);
|
||||
|
||||
ref = IUnknown_Release(unk);
|
||||
ok(ref == 0, "ref=%ld, expected 0\n", ref);
|
||||
|
@ -749,15 +749,21 @@ static HRESULT WINAPI WebBrowser_put_Offline(IWebBrowser2 *iface, VARIANT_BOOL b
|
||||
static HRESULT WINAPI WebBrowser_get_Silent(IWebBrowser2 *iface, VARIANT_BOOL *pbSilent)
|
||||
{
|
||||
WebBrowser *This = WEBBROWSER_THIS(iface);
|
||||
FIXME("(%p)->(%p)\n", This, pbSilent);
|
||||
return E_NOTIMPL;
|
||||
|
||||
TRACE("(%p)->(%p)\n", This, pbSilent);
|
||||
|
||||
*pbSilent = This->silent;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI WebBrowser_put_Silent(IWebBrowser2 *iface, VARIANT_BOOL bSilent)
|
||||
{
|
||||
WebBrowser *This = WEBBROWSER_THIS(iface);
|
||||
FIXME("(%p)->(%x)\n", This, bSilent);
|
||||
return E_NOTIMPL;
|
||||
|
||||
TRACE("(%p)->(%x)\n", This, bSilent);
|
||||
|
||||
This->silent = bSilent ? VARIANT_TRUE : VARIANT_FALSE;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI WebBrowser_get_RegisterAsBrowser(IWebBrowser2 *iface,
|
||||
@ -947,6 +953,7 @@ static HRESULT WebBrowser_Create(INT version, IUnknown *pOuter, REFIID riid, voi
|
||||
ret->address_bar = VARIANT_TRUE;
|
||||
ret->status_bar = VARIANT_TRUE;
|
||||
ret->tool_bar = VARIANT_TRUE;
|
||||
ret->silent = VARIANT_FALSE;
|
||||
|
||||
WebBrowser_OleObject_Init(ret);
|
||||
WebBrowser_ViewObject_Init(ret);
|
||||
|
Loading…
Reference in New Issue
Block a user