On 01/23/12 10:45, Alistair Leslie-Hughes wrote:
> Hi,
> Corrected Failed Tests.
>
> Changelog:
> jscript: ActiveX objects might not support IServiceProvider
> Interface
>
ax_site = create_ax_site(ctx);
+ IObjectWithSite_SetSite(obj_site, ax_site);
if(ax_site) {
- hres = IObjectWithSite_SetSite(obj_site, ax_site);
IUnknown_Release(ax_site);
}
IObjectWithSite_Release(obj_site);
- if(!ax_site || FAILED(hres)) {
- IUnknown_Release(obj);
- return NULL;
- }
Lack of host IServiceProvider is not the only reason for create_ax_site to fail. Please handle error cases correctly.
CHECK_EXPECT(SetSite);
- ok(pUnkSite != NULL, "pUnkSite == NULL\n");
- hres = IUnknown_QueryInterface(pUnkSite, &IID_IServiceProvider, (void**)&sp);
- ok(hres == S_OK, "Could not get IServiceProvider iface: %08x\n", hres);
- IServiceProvider_Release(sp);
+ if(AllowIServiceProvider)
+ {
+ ok(pUnkSite != NULL, "pUnkSite == NULL\n");
+
+ hres = IUnknown_QueryInterface(pUnkSite, &IID_IServiceProvider, (void**)&sp);
+ ok(hres == S_OK, "Could not get IServiceProvider iface: %08x\n", hres);
+ IServiceProvider_Release(sp);
+ }
return SetSite_hres;
We need a test to see what's passed to SetSite in this case, not just skip all tests.
Jacek