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

shdocvw: Correct OnAmbientPropertyChange regression.

parent 601a1364
......@@ -719,9 +719,9 @@ static HRESULT WINAPI OleControl_OnAmbientPropertyChange(IOleControl *iface, DIS
switch(dispID) {
case DISPID_UNKNOWN:
/* Unknown means multiple properties changed, so check them all. */
on_offlineconnected_change(This);
on_silent_change(This);
/* Unknown means multiple properties changed, so check them all.
* BUT the Webbrowser OleControl object doesnt appear to do this.
*/
return S_OK;
case DISPID_AMBIENT_OFFLINEIFNOTCONNECTED:
return on_offlineconnected_change(This);
......
......@@ -69,6 +69,9 @@ DEFINE_GUID(GUID_NULL,0,0,0,0,0,0,0,0,0,0,0);
expect_ ## func = called_ ## func = FALSE; \
}while(0)
#define CLEAR_CALLED(func) \
expect_ ## func = called_ ## func = FALSE
DEFINE_EXPECT(GetContainer);
DEFINE_EXPECT(Site_GetWindow);
DEFINE_EXPECT(ShowObject);
......@@ -1787,15 +1790,19 @@ static void test_ambient_unknown(IWebBrowser2 *wb, IOleControl *control, BOOL is
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);
}
CHECK_EXPECT(Invoke_AMBIENT_OFFLINEIFNOTCONNECTED);
CHECK_EXPECT(Invoke_AMBIENT_SILENT);
CHECK_EXPECT(Invoke_AMBIENT_USERMODE);
CHECK_EXPECT(Invoke_AMBIENT_DLCONTROL);
CHECK_EXPECT(Invoke_AMBIENT_USERAGENT);
CHECK_EXPECT(Invoke_AMBIENT_PALETTE);
CLEAR_CALLED(Invoke_AMBIENT_OFFLINEIFNOTCONNECTED);
CLEAR_CALLED(Invoke_AMBIENT_SILENT);
CLEAR_CALLED(Invoke_AMBIENT_USERMODE);
CLEAR_CALLED(Invoke_AMBIENT_DLCONTROL);
CLEAR_CALLED(Invoke_AMBIENT_USERAGENT);
CLEAR_CALLED(Invoke_AMBIENT_PALETTE);
}
static void test_wb_funcs(IUnknown *unk, BOOL is_clientsite)
......
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