Commit 69a8066b authored by Alistair Leslie-Hughes's avatar Alistair Leslie-Hughes Committed by Alexandre Julliard

shdocvw: OnAmbientPropertyChange should refresh all properties with a DISPID_UNKNOWN.

parent 36a2d5ac
......@@ -718,6 +718,11 @@ static HRESULT WINAPI OleControl_OnAmbientPropertyChange(IOleControl *iface, DIS
TRACE("(%p)->(%d)\n", This, dispID);
switch(dispID) {
case DISPID_UNKNOWN:
/* Unknown means multiple properties changed, so check them all. */
on_offlineconnected_change(This);
on_silent_change(This);
return S_OK;
case DISPID_AMBIENT_OFFLINEIFNOTCONNECTED:
return on_offlineconnected_change(This);
case DISPID_AMBIENT_SILENT:
......
......@@ -1773,6 +1773,31 @@ static void test_Offline(IWebBrowser2 *wb, IOleControl *control, BOOL is_clients
ok(b == VARIANT_FALSE, "b=%x\n", b);
}
static void test_ambient_unknown(IWebBrowser2 *wb, IOleControl *control, BOOL is_clientsite)
{
HRESULT hres;
SET_EXPECT(Invoke_AMBIENT_OFFLINEIFNOTCONNECTED);
SET_EXPECT(Invoke_AMBIENT_SILENT);
SET_EXPECT(Invoke_AMBIENT_USERMODE);
SET_EXPECT(Invoke_AMBIENT_DLCONTROL);
SET_EXPECT(Invoke_AMBIENT_USERAGENT);
SET_EXPECT(Invoke_AMBIENT_PALETTE);
hres = IOleControl_OnAmbientPropertyChange(control, DISPID_UNKNOWN);
ok(hres == S_OK, "OnAmbientPropertyChange failed %08x\n", hres);
if(is_clientsite)
{
CHECK_CALLED(Invoke_AMBIENT_OFFLINEIFNOTCONNECTED);
CHECK_CALLED(Invoke_AMBIENT_SILENT);
todo_wine CHECK_CALLED(Invoke_AMBIENT_USERMODE);
todo_wine CHECK_CALLED(Invoke_AMBIENT_DLCONTROL);
todo_wine CHECK_CALLED(Invoke_AMBIENT_USERAGENT);
todo_wine CHECK_CALLED(Invoke_AMBIENT_PALETTE);
}
}
static void test_wb_funcs(IUnknown *unk, BOOL is_clientsite)
{
IWebBrowser2 *wb;
......@@ -1787,6 +1812,7 @@ static void test_wb_funcs(IUnknown *unk, BOOL is_clientsite)
test_Silent(wb, control, is_clientsite);
test_Offline(wb, control, is_clientsite);
test_ambient_unknown(wb, control, is_clientsite);
IWebBrowser_Release(wb);
IOleControl_Release(control);
......
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