shdocvw: Correct OnAmbientPropertyChange regression.

This commit is contained in:
Alistair Leslie-Hughes 2009-02-04 11:51:59 +11:00 committed by Alexandre Julliard
parent 601a1364b9
commit a14a75b85e
2 changed files with 19 additions and 12 deletions

View File

@ -719,9 +719,9 @@ static HRESULT WINAPI OleControl_OnAmbientPropertyChange(IOleControl *iface, DIS
switch(dispID) { switch(dispID) {
case DISPID_UNKNOWN: case DISPID_UNKNOWN:
/* Unknown means multiple properties changed, so check them all. */ /* Unknown means multiple properties changed, so check them all.
on_offlineconnected_change(This); * BUT the Webbrowser OleControl object doesnt appear to do this.
on_silent_change(This); */
return S_OK; return S_OK;
case DISPID_AMBIENT_OFFLINEIFNOTCONNECTED: case DISPID_AMBIENT_OFFLINEIFNOTCONNECTED:
return on_offlineconnected_change(This); return on_offlineconnected_change(This);

View File

@ -69,6 +69,9 @@ DEFINE_GUID(GUID_NULL,0,0,0,0,0,0,0,0,0,0,0);
expect_ ## func = called_ ## func = FALSE; \ expect_ ## func = called_ ## func = FALSE; \
}while(0) }while(0)
#define CLEAR_CALLED(func) \
expect_ ## func = called_ ## func = FALSE
DEFINE_EXPECT(GetContainer); DEFINE_EXPECT(GetContainer);
DEFINE_EXPECT(Site_GetWindow); DEFINE_EXPECT(Site_GetWindow);
DEFINE_EXPECT(ShowObject); DEFINE_EXPECT(ShowObject);
@ -1787,15 +1790,19 @@ static void test_ambient_unknown(IWebBrowser2 *wb, IOleControl *control, BOOL is
hres = IOleControl_OnAmbientPropertyChange(control, DISPID_UNKNOWN); hres = IOleControl_OnAmbientPropertyChange(control, DISPID_UNKNOWN);
ok(hres == S_OK, "OnAmbientPropertyChange failed %08x\n", hres); ok(hres == S_OK, "OnAmbientPropertyChange failed %08x\n", hres);
if(is_clientsite) CHECK_EXPECT(Invoke_AMBIENT_OFFLINEIFNOTCONNECTED);
{ CHECK_EXPECT(Invoke_AMBIENT_SILENT);
CHECK_CALLED(Invoke_AMBIENT_OFFLINEIFNOTCONNECTED); CHECK_EXPECT(Invoke_AMBIENT_USERMODE);
CHECK_CALLED(Invoke_AMBIENT_SILENT); CHECK_EXPECT(Invoke_AMBIENT_DLCONTROL);
todo_wine CHECK_CALLED(Invoke_AMBIENT_USERMODE); CHECK_EXPECT(Invoke_AMBIENT_USERAGENT);
todo_wine CHECK_CALLED(Invoke_AMBIENT_DLCONTROL); CHECK_EXPECT(Invoke_AMBIENT_PALETTE);
todo_wine CHECK_CALLED(Invoke_AMBIENT_USERAGENT);
todo_wine CHECK_CALLED(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) static void test_wb_funcs(IUnknown *unk, BOOL is_clientsite)