mshtml/tests: Enable compilation with long types.

Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Eric Pouech 2022-03-01 08:34:13 +01:00 committed by Alexandre Julliard
parent 816395e877
commit e06b668f40
11 changed files with 2822 additions and 2823 deletions

View file

@ -1,4 +1,3 @@
EXTRADEFS = -DWINE_NO_LONG_TYPES
TESTDLL = mshtml.dll
IMPORTS = ole32 oleaut32 wininet user32 urlmon gdi32 advapi32
C_SRCS = \

View file

@ -189,7 +189,7 @@ static void _test_ifaces(unsigned line, IUnknown *iface, REFIID *iids)
for(piid = iids; *piid; piid++) {
hres = IUnknown_QueryInterface(iface, *piid, (void**)&unk);
ok_(__FILE__,line) (hres == S_OK, "Could not get %s interface: %08x\n", wine_dbgstr_guid(*piid), hres);
ok_(__FILE__,line) (hres == S_OK, "Could not get %s interface: %08lx\n", wine_dbgstr_guid(*piid), hres);
if(SUCCEEDED(hres))
IUnknown_Release(unk);
}
@ -208,10 +208,10 @@ static void set_plugin_readystate(READYSTATE state)
plugin_readystate = state;
hres = IOleClientSite_QueryInterface(client_site, &IID_IPropertyNotifySink, (void**)&prop_notif);
ok(hres == S_OK, "Could not get IPropertyNotifySink iface: %08x\n", hres);
ok(hres == S_OK, "Could not get IPropertyNotifySink iface: %08lx\n", hres);
hres = IPropertyNotifySink_OnChanged(prop_notif, DISPID_READYSTATE);
ok(hres == S_OK, "OnChanged(DISPID_READYSTATE) failed: %08x\n", hres);
ok(hres == S_OK, "OnChanged(DISPID_READYSTATE) failed: %08lx\n", hres);
IPropertyNotifySink_Release(prop_notif);
}
@ -223,14 +223,14 @@ static void test_mon_displayname(IMoniker *mon, const WCHAR *exname, const WCHAR
HRESULT hres;
hres = IMoniker_GetDisplayName(mon, NULL, NULL, &display_name);
ok(hres == S_OK, "GetDisplayName failed: %08x\n", hres);
ok(hres == S_OK, "GetDisplayName failed: %08lx\n", hres);
ok(!lstrcmpW(display_name, exname) || broken(broken_name && !lstrcmpW(display_name, broken_name)),
"display_name = %s\n", wine_dbgstr_w(display_name));
CoTaskMemFree(display_name);
hres = IMoniker_IsSystemMoniker(mon, &mksys);
ok(hres == S_OK, "IsSystemMoniker failed: %08x\n", hres);
ok(mksys == MKSYS_URLMONIKER, "mksys = %d\n", mksys);
ok(hres == S_OK, "IsSystemMoniker failed: %08lx\n", hres);
ok(mksys == MKSYS_URLMONIKER, "mksys = %ld\n", mksys);
}
static LRESULT WINAPI plugin_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
@ -314,13 +314,13 @@ static HRESULT WINAPI ConnectionPoint_Advise(IConnectionPoint *iface, IUnknown *
CHECK_EXPECT(Advise);
hres = IUnknown_QueryInterface(pUnkSink, &IID_IDispatch, (void**)&sink_disp);
ok(hres == S_OK, "Could not get IDispatch iface: %08x\n", hres);
ok(hres == S_OK, "Could not get IDispatch iface: %08lx\n", hres);
hres = IUnknown_QueryInterface(pUnkSink, &IID_IDispatchEx, (void**)&dispex);
ok(hres == E_NOINTERFACE, "QueryInterface(IID_IDispatchEx) returned: %08x\n", hres);
ok(hres == E_NOINTERFACE, "QueryInterface(IID_IDispatchEx) returned: %08lx\n", hres);
hres = IUnknown_QueryInterface(pUnkSink, &DIID_DispActiveXTest, (void**)&ax_test);
ok(hres == S_OK, "Could not get DispActiveXTest iface: %08x\n", hres);
ok(hres == S_OK, "Could not get DispActiveXTest iface: %08lx\n", hres);
DispActiveXTest_Release(ax_test);
*pdwCookie = 0xdeadbeef;
@ -331,7 +331,7 @@ static HRESULT WINAPI ConnectionPoint_Unadvise(IConnectionPoint *iface, DWORD dw
{
CHECK_EXPECT(Unadvise);
ok(dwCookie == 0xdeadbeef, "dwCookie = %x\n", dwCookie);
ok(dwCookie == 0xdeadbeef, "dwCookie = %lx\n", dwCookie);
if(sink_disp) {
IDispatch_Release(sink_disp);
@ -396,7 +396,7 @@ static HRESULT WINAPI OleControl_OnAmbientPropertyChange(IOleControl *iface, DIS
CHECK_EXPECT2(OnAmbientPropertyChange_UNKNOWN);
break;
default:
ok(0, "unexpected call %d\n", dispID);
ok(0, "unexpected call %ld\n", dispID);
}
return S_OK;
@ -443,15 +443,15 @@ static HRESULT WINAPI QuickActivate_QuickActivate(IQuickActivate *iface, QACONTA
CHECK_EXPECT(QuickActivate);
ok(container != NULL, "container == NULL\n");
ok(container->cbSize == sizeof(*container), "container->cbSize = %d\n", container->cbSize);
ok(container->cbSize == sizeof(*container), "container->cbSize = %ld\n", container->cbSize);
ok(container->pClientSite != NULL, "container->pClientSite == NULL\n");
ok(container->pAdviseSink != NULL, "container->pAdviseSink == NULL\n");
ok(container->pPropertyNotifySink != NULL, "container->pPropertyNotifySink == NULL\n");
ok(!container->pUnkEventSink, "container->pUnkEventSink != NULL\n");
ok(container->dwAmbientFlags == (QACONTAINER_SUPPORTSMNEMONICS|QACONTAINER_MESSAGEREFLECT|QACONTAINER_USERMODE),
"container->dwAmbientFlags = %x\n", container->dwAmbientFlags);
"container->dwAmbientFlags = %lx\n", container->dwAmbientFlags);
if(have_container)
ok(!container->colorFore, "container->colorFore = %d\n", container->colorFore); /* FIXME */
ok(!container->colorFore, "container->colorFore = %ld\n", container->colorFore); /* FIXME */
todo_wine
ok(container->colorBack, "container->colorBack == 0\n"); /* FIXME */
if(have_container)
@ -460,20 +460,20 @@ static HRESULT WINAPI QuickActivate_QuickActivate(IQuickActivate *iface, QACONTA
ok(!container->pFont, "container->pFont = %p\n", container->pFont);
todo_wine
ok(container->pUndoMgr != NULL, "container->pUndoMgr == NULL\n");
ok(!container->dwAppearance, "container->dwAppearance = %x\n", container->dwAppearance);
ok(!container->dwAppearance, "container->dwAppearance = %lx\n", container->dwAppearance);
if(have_container)
ok(!container->lcid, "container->lcid = %x\n", container->lcid);
ok(!container->lcid, "container->lcid = %lx\n", container->lcid);
ok(!container->hpal, "container->hpal = %p\n", container->hpal);
ok(!container->pBindHost, "container->pBindHost != NULL\n");
ok(!container->pOleControlSite, "container->pOleControlSite != NULL\n");
ok(!container->pServiceProvider, "container->pServiceProvider != NULL\n");
ok(control->cbSize == sizeof(*control), "control->cbSize = %d\n", control->cbSize);
ok(!control->dwMiscStatus, "control->dwMiscStatus = %x\n", control->dwMiscStatus);
ok(!control->dwViewStatus, "control->dwViewStatus = %x\n", control->dwViewStatus);
ok(!control->dwEventCookie, "control->dwEventCookie = %x\n", control->dwEventCookie);
ok(!control->dwPropNotifyCookie, "control->dwPropNotifyCookie = %x\n", control->dwPropNotifyCookie);
ok(!control->dwPointerActivationPolicy, "control->dwPointerActivationPolicy = %x\n", control->dwPointerActivationPolicy);
ok(control->cbSize == sizeof(*control), "control->cbSize = %ld\n", control->cbSize);
ok(!control->dwMiscStatus, "control->dwMiscStatus = %lx\n", control->dwMiscStatus);
ok(!control->dwViewStatus, "control->dwViewStatus = %lx\n", control->dwViewStatus);
ok(!control->dwEventCookie, "control->dwEventCookie = %lx\n", control->dwEventCookie);
ok(!control->dwPropNotifyCookie, "control->dwPropNotifyCookie = %lx\n", control->dwPropNotifyCookie);
ok(!control->dwPointerActivationPolicy, "control->dwPointerActivationPolicy = %lx\n", control->dwPointerActivationPolicy);
ok(iface_cmp((IUnknown*)container->pClientSite, (IUnknown*)container->pAdviseSink),
"container->pClientSite != container->pAdviseSink\n");
@ -570,20 +570,20 @@ static HRESULT WINAPI PersistPropertyBag_Load(IPersistPropertyBag *face, IProper
V_VT(&v) = VT_BSTR;
hres = IPropertyBag_Read(pPropBag, param_nameW, &v, NULL);
ok(hres == S_OK, "Read failed: %08x\n", hres);
ok(hres == S_OK, "Read failed: %08lx\n", hres);
ok(V_VT(&v) == VT_BSTR, "V_VT(&v) = %d\n", V_VT(&v));
ok(!lstrcmpW(V_BSTR(&v), L"param_value"), "V_BSTR(v) = %s\n", wine_dbgstr_w(V_BSTR(&v)));
V_VT(&v) = VT_I4;
V_I4(&v) = 0xdeadbeef;
hres = IPropertyBag_Read(pPropBag, param_nameW, &v, NULL);
ok(hres == DISP_E_TYPEMISMATCH, "Read failed: %08x, expected DISP_E_TYPEMISMATCH\n", hres);
ok(hres == DISP_E_TYPEMISMATCH, "Read failed: %08lx, expected DISP_E_TYPEMISMATCH\n", hres);
ok(V_VT(&v) == VT_I4, "V_VT(&v) = %d\n", V_VT(&v));
ok(V_I4(&v) == 0xdeadbeef, "V_I4(v) = %x\n", V_I4(&v));
ok(V_I4(&v) == 0xdeadbeef, "V_I4(v) = %lx\n", V_I4(&v));
V_VT(&v) = VT_BSTR;
hres = IPropertyBag_Read(pPropBag, num_paramW, &v, NULL);
ok(hres == S_OK, "Read failed: %08x\n", hres);
ok(hres == S_OK, "Read failed: %08lx\n", hres);
ok(V_VT(&v) == VT_BSTR, "V_VT(&v) = %d\n", V_VT(&v));
ok(!lstrcmpW(V_BSTR(&v), L"3"), "V_BSTR(v) = %s\n", wine_dbgstr_w(V_BSTR(&v)));
SysFreeString(V_BSTR(&v));
@ -591,27 +591,27 @@ static HRESULT WINAPI PersistPropertyBag_Load(IPersistPropertyBag *face, IProper
V_VT(&v) = VT_I4;
V_I4(&v) = 0xdeadbeef;
hres = IPropertyBag_Read(pPropBag, num_paramW, &v, NULL);
ok(hres == S_OK, "Read failed: %08x\n", hres);
ok(hres == S_OK, "Read failed: %08lx\n", hres);
ok(V_VT(&v) == VT_I4, "V_VT(&v) = %d\n", V_VT(&v));
ok(V_I4(&v) == 3, "V_I4(v) = %x\n", V_I4(&v));
ok(V_I4(&v) == 3, "V_I4(v) = %lx\n", V_I4(&v));
V_VT(&v) = VT_BSTR;
V_BSTR(&v) = (BSTR)0xdeadbeef;
hres = IPropertyBag_Read(pPropBag, no_paramW, &v, NULL);
ok(hres == E_INVALIDARG, "Read failed: %08x\n", hres);
ok(hres == E_INVALIDARG, "Read failed: %08lx\n", hres);
ok(V_VT(&v) == VT_BSTR, "V_VT(&v) = %d\n", V_VT(&v));
ok(V_BSTR(&v) == (BSTR)0xdeadbeef, "V_BSTR(v) = %p\n", V_BSTR(&v));
set_plugin_readystate(READYSTATE_INTERACTIVE);
hres = IOleClientSite_QueryInterface(client_site, &IID_IBindHost, (void**)&bind_host);
ok(hres == S_OK, "Could not get IBindHost iface: %08x\n", hres);
ok(hres == S_OK, "Could not get IBindHost iface: %08lx\n", hres);
hres = IOleClientSite_QueryInterface(client_site, &IID_IServiceProvider, (void**)&sp);
ok(hres == S_OK, "Could not get IServiceProvider iface: %08x\n", hres);
ok(hres == S_OK, "Could not get IServiceProvider iface: %08lx\n", hres);
hres = IServiceProvider_QueryService(sp, &SID_SBindHost, &IID_IBindHost, (void**)&bind_host2);
ok(hres == S_OK, "QueryService(SID_SBindHost) failed: %08x\n", hres);
ok(hres == S_OK, "QueryService(SID_SBindHost) failed: %08lx\n", hres);
IServiceProvider_Release(sp);
ok(iface_cmp((IUnknown*)bind_host, (IUnknown*)bind_host2), "bind_host != bind_host2\n");
@ -619,7 +619,7 @@ static HRESULT WINAPI PersistPropertyBag_Load(IPersistPropertyBag *face, IProper
mon = NULL;
hres = IBindHost_CreateMoniker(bind_host, test_swfW, NULL, &mon, 0);
ok(hres == S_OK, "CreateMoniker failed: %08x\n", hres);
ok(hres == S_OK, "CreateMoniker failed: %08lx\n", hres);
ok(mon != NULL, "mon == NULL\n");
test_mon_displayname(mon, L"about:test.swf", L"about:blanktest.swf");
IMoniker_Release(mon);
@ -628,7 +628,7 @@ static HRESULT WINAPI PersistPropertyBag_Load(IPersistPropertyBag *face, IProper
mon = NULL;
hres = IOleClientSite_GetMoniker(client_site, OLEGETMONIKER_ONLYIFTHERE, OLEWHICHMK_CONTAINER, &mon);
ok(hres == S_OK, "GetMoniker failed: %08x\n", hres);
ok(hres == S_OK, "GetMoniker failed: %08lx\n", hres);
ok(mon != NULL, "mon == NULL\n");
test_mon_displayname(mon, L"about:blank", NULL);
IMoniker_Release(mon);
@ -782,7 +782,7 @@ static HRESULT WINAPI Dispatch_Invoke(IDispatch *iface, DISPID dispIdMember, REF
*/
return S_OK;
default:
ok(0, "unexpected call %d\n", dispIdMember);
ok(0, "unexpected call %ld\n", dispIdMember);
}
return E_NOTIMPL;
@ -927,8 +927,8 @@ static HRESULT WINAPI ViewObjectEx_SetAdvise(IViewObjectEx *iface, DWORD aspects
{
CHECK_EXPECT(SetAdvise);
ok(aspects == DVASPECT_CONTENT, "aspects = %x\n", aspects);
ok(!advf, "advf = %x\n", advf);
ok(aspects == DVASPECT_CONTENT, "aspects = %lx\n", aspects);
ok(!advf, "advf = %lx\n", advf);
ok(pAdvSink != NULL, "pAdvSink = NULL\n");
return S_OK;
@ -1046,7 +1046,7 @@ static HRESULT WINAPI OleObject_Close(IOleObject *iface, DWORD dwSaveOption)
{
CHECK_EXPECT(Close);
ok(dwSaveOption == OLECLOSE_NOSAVE, "dwSaveOption = %d\n", dwSaveOption);
ok(dwSaveOption == OLECLOSE_NOSAVE, "dwSaveOption = %ld\n", dwSaveOption);
return S_OK;
}
@ -1089,34 +1089,34 @@ static HRESULT WINAPI OleObject_DoVerb(IOleObject *iface, LONG iVerb, LPMSG lpms
CHECK_EXPECT(DoVerb);
ok(iVerb == OLEIVERB_INPLACEACTIVATE, "iVerb = %d\n", iVerb);
ok(iVerb == OLEIVERB_INPLACEACTIVATE, "iVerb = %ld\n", iVerb);
ok(!lpmsg, "lpmsg != NULL\n");
ok(pActiveSite != NULL, "pActiveSite == NULL\n");
ok(!lindex, "lindex = %d\n", lindex);
ok(!lindex, "lindex = %ld\n", lindex);
ok(hwndParent != NULL, "hwndParent == NULL\n");
ok(lprcPosRect != NULL, "lprcPosRect == NULL\n");
hres = IOleClientSite_QueryInterface(pActiveSite, &IID_IOleInPlaceSiteEx, (void**)&ip_site);
ok(hres == S_OK, "Could not get IOleInPlaceSiteEx iface: %08x\n", hres);
ok(hres == S_OK, "Could not get IOleInPlaceSiteEx iface: %08lx\n", hres);
hres = IOleInPlaceSiteEx_CanInPlaceActivate(ip_site);
ok(hres == S_OK, "CanInPlaceActivate failed: %08x\n", hres);
ok(hres == S_OK, "CanInPlaceActivate failed: %08lx\n", hres);
SET_EXPECT(InPlaceObject_GetWindow);
no_redraw = 0xdeadbeef;
hres = IOleInPlaceSiteEx_OnInPlaceActivateEx(ip_site, &no_redraw, 0);
ok(hres == S_OK, "InPlaceActivateEx failed: %08x\n", hres);
ok(hres == S_OK, "InPlaceActivateEx failed: %08lx\n", hres);
ok(!no_redraw, "no_redraw = %x\n", no_redraw);
CHECK_CALLED(InPlaceObject_GetWindow);
no_redraw = 0xdeadbeef;
hres = IOleInPlaceSiteEx_OnInPlaceActivateEx(ip_site, &no_redraw, 0);
ok(hres == S_OK, "InPlaceActivateEx failed: %08x\n", hres);
ok(hres == S_OK, "InPlaceActivateEx failed: %08lx\n", hres);
ok(no_redraw == 0xdeadbeef, "no_redraw = %x\n", no_redraw);
hwnd = NULL;
hres = IOleInPlaceSiteEx_GetWindow(ip_site, &hwnd);
ok(hres == S_OK, "GetWindow failed: %08x\n", hres);
ok(hres == S_OK, "GetWindow failed: %08lx\n", hres);
ok(hwnd != NULL, "hwnd == NULL\n");
ok(hwnd == hwndParent, "hwnd != hwndParent\n");
@ -1126,7 +1126,7 @@ static HRESULT WINAPI OleObject_DoVerb(IOleObject *iface, LONG iVerb, LPMSG lpms
ip_uiwindow = NULL;
frame_info.cb = sizeof(OLEINPLACEFRAMEINFO);
hres = IOleInPlaceSiteEx_GetWindowContext(ip_site, &ip_frame, &ip_uiwindow, &pos_rect, &clip_rect, &frame_info);
ok(hres == S_OK, "GetWindowContext failed: %08x\n", hres);
ok(hres == S_OK, "GetWindowContext failed: %08lx\n", hres);
ok(ip_frame != NULL, "ip_frame == NULL\n");
ok(ip_uiwindow != NULL, "ip_uiwindow == NULL\n");
ok((IOleInPlaceUIWindow*)ip_frame != ip_uiwindow, "ip_frame == ip_uiwindow\n");
@ -1146,7 +1146,7 @@ static HRESULT WINAPI OleObject_DoVerb(IOleObject *iface, LONG iVerb, LPMSG lpms
IOleInPlaceSiteEx_Release(ip_site);
hres = IOleClientSite_ShowObject(client_site);
ok(hres == S_OK, "ShowObject failed: %08x\n", hres);
ok(hres == S_OK, "ShowObject failed: %08lx\n", hres);
SET_EXPECT(InPlaceObject_GetWindow);
SET_EXPECT(SetObjectRects);
@ -1217,7 +1217,7 @@ static HRESULT WINAPI OleObject_EnumAdvise(IOleObject *iface, IEnumSTATDATA **pp
static HRESULT WINAPI OleObject_GetMiscStatus(IOleObject *iface, DWORD dwAspect, DWORD *pdwStatus)
{
CHECK_EXPECT(GetMiscStatus);
ok(dwAspect == DVASPECT_CONTENT, "dwAspect = %d\n", dwAspect);
ok(dwAspect == DVASPECT_CONTENT, "dwAspect = %ld\n", dwAspect);
ok(pdwStatus != NULL, "pdwStatus == NULL\n");
*pdwStatus = OLEMISC_SETCLIENTSITEFIRST|OLEMISC_ACTIVATEWHENVISIBLE
|OLEMISC_INSIDEOUT|OLEMISC_CANTLINKINSIDE|OLEMISC_RECOMPOSEONRESIZE;
@ -1301,10 +1301,10 @@ static HRESULT WINAPI OleInPlaceObject_InPlaceDeactivate(IOleInPlaceObjectWindow
CHECK_EXPECT(InPlaceDeactivate);
hres = IOleClientSite_QueryInterface(client_site, &IID_IOleInPlaceSite, (void**)&ip_site);
ok(hres == S_OK, "Could not get IOleInPlaceSite iface: %08x\n", hres);
ok(hres == S_OK, "Could not get IOleInPlaceSite iface: %08lx\n", hres);
hres = IOleInPlaceSite_OnInPlaceDeactivate(ip_site);
ok(hres == S_OK, "OnInPlaceDeactivate failed: %08x\n", hres);
ok(hres == S_OK, "OnInPlaceDeactivate failed: %08lx\n", hres);
IOleInPlaceSite_Release(ip_site);
return S_OK;
@ -1520,9 +1520,9 @@ static void test_elem_dispex(IDispatchEx *dispex)
hres = IDispatchEx_GetDispID(dispex, str, 0, &id);
CHECK_CALLED(GetIDsOfNames_scriptprop);
SysFreeString(str);
ok(hres == S_OK, "GetDispID failed: %08x\n", hres);
ok(hres == S_OK, "GetDispID failed: %08lx\n", hres);
todo_wine
ok(id == DISPID_SCRIPTPROP, "id = %d\n", id);
ok(id == DISPID_SCRIPTPROP, "id = %ld\n", id);
SET_EXPECT(Invoke_SECURITYCTX);
SET_EXPECT(Invoke_SCRIPTPROP);
@ -1530,9 +1530,9 @@ static void test_elem_dispex(IDispatchEx *dispex)
memset(&ei, 0, sizeof(ei));
V_VT(&v) = VT_EMPTY;
hres = IDispatchEx_InvokeEx(dispex, id, LOCALE_NEUTRAL, DISPATCH_PROPERTYGET, &dp, &v, &ei, NULL);
ok(hres == S_OK, "InvokeEx failed: %08x\n", hres);
ok(hres == S_OK, "InvokeEx failed: %08lx\n", hres);
ok(V_VT(&v) == VT_I4, "V_VT(v) = %d\n", V_VT(&v));
ok(V_I4(&v) == 4, "V_I4(v) = %d\n", V_I4(&v));
ok(V_I4(&v) == 4, "V_I4(v) = %ld\n", V_I4(&v));
CHECK_CALLED(Invoke_SECURITYCTX);
CHECK_CALLED(Invoke_SCRIPTPROP);
}
@ -1550,7 +1550,7 @@ static void test_iface_wrapping(IHTMLObjectElement *elem)
SET_EXPECT(wrapped_Release);
unk = (void*)0xdeadbeef;
hres = IHTMLObjectElement_QueryInterface(elem, &IID_ITestActiveX, (void**)&unk);
ok(hres == S_OK, "QueryInterface(IID_ITestActiveX failed: %08x\n", hres);
ok(hres == S_OK, "QueryInterface(IID_ITestActiveX failed: %08lx\n", hres);
CHECK_CALLED(QI_ITestActiveX);
CHECK_CALLED(wrapped_AddRef);
CHECK_CALLED(wrapped_Release);
@ -1568,17 +1568,17 @@ static void test_iface_wrapping(IHTMLObjectElement *elem)
SET_EXPECT(wrapped_func);
hres = ((HRESULT (WINAPI*)(IUnknown*,int,double))vtbl[63])(unk, 10, 32.0);
ok(hres == S_OK, "wrapped_func returned %08x\n", hres);
ok(hres == S_OK, "wrapped_func returned %08lx\n", hres);
CHECK_CALLED(wrapped_func);
hres = IUnknown_QueryInterface(unk, &IID_IHTMLObjectElement, (void**)&elem2);
ok(hres == S_OK, "Could not get IHTMLObjectElement from wrapped iface: %08x\n", hres);
ok(hres == S_OK, "Could not get IHTMLObjectElement from wrapped iface: %08lx\n", hres);
ok(iface_cmp((IUnknown*)elem2, (IUnknown*)elem), "elem2 != elem\n");
IHTMLObjectElement_Release(elem2);
SET_EXPECT(wrapped_Release);
ref = IUnknown_Release(unk);
ok(!ref, "ref=%d\n", ref);
ok(!ref, "ref=%ld\n", ref);
CHECK_CALLED(wrapped_Release);
SET_EXPECT(QI_ITestActiveX);
@ -1586,7 +1586,7 @@ static void test_iface_wrapping(IHTMLObjectElement *elem)
SET_EXPECT(wrapped_Release);
unk = (void*)0xdeadbeef;
hres = IHTMLObjectElement_QueryInterface(elem, &IID_ITestActiveX, (void**)&unk2);
ok(hres == S_OK, "QueryInterface(IID_ITestActiveX failed: %08x\n", hres);
ok(hres == S_OK, "QueryInterface(IID_ITestActiveX failed: %08lx\n", hres);
CHECK_CALLED(QI_ITestActiveX);
CHECK_CALLED(wrapped_AddRef);
CHECK_CALLED(wrapped_Release);
@ -1595,7 +1595,7 @@ static void test_iface_wrapping(IHTMLObjectElement *elem)
SET_EXPECT(wrapped_Release);
ref = IUnknown_Release(unk2);
ok(!ref, "ref=%d\n", ref);
ok(!ref, "ref=%ld\n", ref);
CHECK_CALLED(wrapped_Release);
}
@ -1611,41 +1611,41 @@ static void test_object_elem(IHTMLDocument2 *doc)
HRESULT hres;
hres = IHTMLDocument2_QueryInterface(doc, &IID_IHTMLDocument3, (void**)&doc3);
ok(hres == S_OK, "Could not get IHTMLDocument3 iface: %08x\n", hres);
ok(hres == S_OK, "Could not get IHTMLDocument3 iface: %08lx\n", hres);
str = SysAllocString(L"objid");
elem = (void*)0xdeadbeef;
hres = IHTMLDocument3_getElementById(doc3, str, &elem);
IHTMLDocument3_Release(doc3);
SysFreeString(str);
ok(hres == S_OK, "getElementById failed: %08x\n", hres);
ok(hres == S_OK, "getElementById failed: %08lx\n", hres);
ok(elem != NULL, "elem == NULL\n");
hres = IHTMLElement_QueryInterface(elem, &IID_IHTMLObjectElement, (void**)&objelem);
IHTMLElement_Release(elem);
ok(hres == S_OK, "Could not get IHTMLObjectElement iface: %08x\n", hres);
ok(hres == S_OK, "Could not get IHTMLObjectElement iface: %08lx\n", hres);
SET_EXPECT(Invoke_SECURITYCTX);
hres = IHTMLObjectElement_get_object(objelem, &disp);
ok(hres == S_OK, "get_object failed: %08x\n", hres);
ok(hres == S_OK, "get_object failed: %08lx\n", hres);
ok(disp == &Dispatch, "disp != Dispatch\n");
CHECK_CALLED(Invoke_SECURITYCTX);
hres = IHTMLObjectElement_QueryInterface(objelem, &IID_IDispatchEx, (void**)&dispex);
ok(hres == S_OK, "QueryInterface failed: %08x\n", hres);
ok(hres == S_OK, "QueryInterface failed: %08lx\n", hres);
test_elem_dispex(dispex);
IDispatchEx_Release(dispex);
test_iface_wrapping(objelem);
hres = IHTMLObjectElement_get_width(objelem, &v);
ok(hres == S_OK, "get_width failed: %08x\n", hres);
ok(hres == S_OK, "get_width failed: %08lx\n", hres);
ok(V_VT(&v) == VT_BSTR, "V_VT(width) = %d\n", V_VT(&v));
ok(!lstrcmpW(V_BSTR(&v), L"300"), "V_BSTR(width) = %s\n", wine_dbgstr_w(V_BSTR(&v)));
VariantClear(&v);
hres = IHTMLObjectElement_get_height(objelem, &v);
ok(hres == S_OK, "get_height failed: %08x\n", hres);
ok(hres == S_OK, "get_height failed: %08lx\n", hres);
ok(V_VT(&v) == VT_BSTR, "V_VT(height) = %d\n", V_VT(&v));
ok(!lstrcmpW(V_BSTR(&v), L"200"), "V_BSTR(height) = %s\n", wine_dbgstr_w(V_BSTR(&v)));
VariantClear(&v);
@ -1655,12 +1655,12 @@ static void test_object_elem(IHTMLDocument2 *doc)
SET_EXPECT(OnAmbientPropertyChange_UNKNOWN);
SET_EXPECT(Invoke_ENABLED);
hres = IHTMLObjectElement_put_width(objelem, v);
ok(hres == S_OK, "put_width failed: %08x\n", hres);
ok(hres == S_OK, "put_width failed: %08lx\n", hres);
CHECK_CALLED(OnAmbientPropertyChange_UNKNOWN);
CLEAR_CALLED(Invoke_ENABLED); /* Not called on IE10 */
hres = IHTMLObjectElement_get_width(objelem, &v);
ok(hres == S_OK, "get_width failed: %08x\n", hres);
ok(hres == S_OK, "get_width failed: %08lx\n", hres);
ok(V_VT(&v) == VT_BSTR, "V_VT(width) = %d\n", V_VT(&v));
ok(!lstrcmpW(V_BSTR(&v), L"400"), "V_BSTR(width) = %s\n", wine_dbgstr_w(V_BSTR(&v)));
VariantClear(&v);
@ -1670,12 +1670,12 @@ static void test_object_elem(IHTMLDocument2 *doc)
SET_EXPECT(OnAmbientPropertyChange_UNKNOWN);
SET_EXPECT(Invoke_ENABLED);
hres = IHTMLObjectElement_put_height(objelem, v);
ok(hres == S_OK, "put_height failed: %08x\n", hres);
ok(hres == S_OK, "put_height failed: %08lx\n", hres);
CHECK_CALLED(OnAmbientPropertyChange_UNKNOWN);
CLEAR_CALLED(Invoke_ENABLED); /* Not called on IE10 */
hres = IHTMLObjectElement_get_height(objelem, &v);
ok(hres == S_OK, "get_height failed: %08x\n", hres);
ok(hres == S_OK, "get_height failed: %08lx\n", hres);
ok(V_VT(&v) == VT_BSTR, "V_VT(height) = %d\n", V_VT(&v));
ok(!lstrcmpW(V_BSTR(&v), L"250"), "V_BSTR(height) = %s\n", wine_dbgstr_w(V_BSTR(&v)));
VariantClear(&v);
@ -1694,31 +1694,31 @@ static void test_container(IHTMLDocument2 *doc_obj)
container = NULL;
hres = IOleClientSite_GetContainer(client_site, &container);
ok(hres == S_OK, "GetContainer failed: %08x\n", hres);
ok(hres == S_OK, "GetContainer failed: %08lx\n", hres);
ok(container != NULL, "container == NULL\n");
hres = IHTMLDocument2_get_parentWindow(doc_obj, &parent_window);
ok(hres == S_OK, "get_parentWindow failed: %08x\n", hres);
ok(hres == S_OK, "get_parentWindow failed: %08lx\n", hres);
ok(parent_window != NULL, "parentWindow == NULL\n");
hres = IHTMLWindow2_get_document(parent_window, &doc);
ok(hres == S_OK, "get_document failed: %08x\n", hres);
ok(hres == S_OK, "get_document failed: %08lx\n", hres);
ok(doc != NULL, "doc == NULL\n");
ok(iface_cmp((IUnknown*)doc, (IUnknown*)container), "container != doc\n");
IHTMLDocument2_Release(doc);
hres = IOleClientSite_QueryInterface(client_site, &IID_IServiceProvider, (void**)&serv_prov);
ok(hres == S_OK, "Could not get IServiceProvider iface: %08x\n", hres);
ok(hres == S_OK, "Could not get IServiceProvider iface: %08lx\n", hres);
hres = IServiceProvider_QueryService(serv_prov, &IID_IHTMLWindow2, &IID_IHTMLWindow2, (void**)&html_window);
ok(hres == S_OK, "Could not get IHTMLWindow2 service: %08x\n", hres);
ok(hres == S_OK, "Could not get IHTMLWindow2 service: %08lx\n", hres);
todo_wine
ok(!iface_cmp((IUnknown*)html_window, (IUnknown*)parent_window), "html_window != parent_window\n");
IHTMLWindow2_Release(html_window);
SET_EXPECT(QueryService_TestActiveX);
hres = IServiceProvider_QueryService(serv_prov, &CLSID_TestActiveX, &IID_IUnknown, (void**)&unk);
ok(hres == S_OK, "QueryService(CLSID_TestActiveX) failed: %08x\n", hres);
ok(hres == S_OK, "QueryService(CLSID_TestActiveX) failed: %08lx\n", hres);
ok(unk == (IUnknown*)&OleObject, "unexpected unk %p\n", unk);
CHECK_CALLED(QueryService_TestActiveX);
IUnknown_Release(unk);
@ -1735,11 +1735,11 @@ static void test_ui_activate(void)
HRESULT hres;
hres = IOleClientSite_QueryInterface(client_site, &IID_IOleInPlaceSite, (void**)&ip_site);
ok(hres == S_OK, "Could not get IOleInPlaceSite iface: %08x\n", hres);
ok(hres == S_OK, "Could not get IOleInPlaceSite iface: %08lx\n", hres);
SET_EXPECT(Invoke_ENABLED);
hres = IOleInPlaceSite_OnUIActivate(ip_site);
ok(hres == S_OK, "OnUIActivate failed: %08x\n", hres);
ok(hres == S_OK, "OnUIActivate failed: %08lx\n", hres);
CLEAR_CALLED(Invoke_ENABLED); /* Not called on IE10 */
IOleInPlaceSite_Release(ip_site);
@ -2075,23 +2075,23 @@ static HRESULT WINAPI DocumentSite_ActivateMe(IOleDocumentSite *iface, IOleDocum
HRESULT hres;
hres = IOleDocumentView_QueryInterface(pViewToActivate, &IID_IOleDocument, (void**)&document);
ok(hres == S_OK, "could not get IOleDocument: %08x\n", hres);
ok(hres == S_OK, "could not get IOleDocument: %08lx\n", hres);
hres = IOleDocument_CreateView(document, &InPlaceSite, NULL, 0, &view);
IOleDocument_Release(document);
ok(hres == S_OK, "CreateView failed: %08x\n", hres);
ok(hres == S_OK, "CreateView failed: %08lx\n", hres);
hres = IOleDocumentView_SetInPlaceSite(view, &InPlaceSite);
ok(hres == S_OK, "SetInPlaceSite failed: %08x\n", hres);
ok(hres == S_OK, "SetInPlaceSite failed: %08lx\n", hres);
hres = IOleDocumentView_UIActivate(view, TRUE);
ok(hres == S_OK, "UIActivate failed: %08x\n", hres);
ok(hres == S_OK, "UIActivate failed: %08lx\n", hres);
hres = IOleDocumentView_SetRect(view, &rect);
ok(hres == S_OK, "SetRect failed: %08x\n", hres);
ok(hres == S_OK, "SetRect failed: %08lx\n", hres);
hres = IOleDocumentView_Show(view, TRUE);
ok(hres == S_OK, "Show failed: %08x\n", hres);
ok(hres == S_OK, "Show failed: %08lx\n", hres);
return S_OK;
}
@ -2194,7 +2194,7 @@ static HRESULT WINAPI PropertyNotifySink_OnChanged(IPropertyNotifySink *iface, D
static const WCHAR completeW[] = {'c','o','m','p','l','e','t','e',0};
hres = IHTMLDocument2_get_readyState(notif_doc, &state);
ok(hres == S_OK, "get_readyState failed: %08x\n", hres);
ok(hres == S_OK, "get_readyState failed: %08lx\n", hres);
if(!lstrcmpW(state, completeW))
doc_complete = TRUE;
@ -2236,10 +2236,10 @@ static void doc_load_string(IHTMLDocument2 *doc, const char *str)
mem = GlobalAlloc(0, len);
memcpy(mem, str, len);
hr = CreateStreamOnHGlobal(mem, TRUE, &stream);
ok(hr == S_OK, "Failed to create a stream, hr %#x.\n", hr);
ok(hr == S_OK, "Failed to create a stream, hr %#lx.\n", hr);
hr = IHTMLDocument2_QueryInterface(doc, &IID_IPersistStreamInit, (void**)&init);
ok(hr == S_OK, "Failed to get IPersistStreamInit, hr %#x.\n", hr);
ok(hr == S_OK, "Failed to get IPersistStreamInit, hr %#lx.\n", hr);
IPersistStreamInit_Load(init, stream);
IPersistStreamInit_Release(init);
@ -2254,15 +2254,15 @@ static void do_advise(IUnknown *unk, REFIID riid, IUnknown *unk_advise)
HRESULT hres;
hres = IUnknown_QueryInterface(unk, &IID_IConnectionPointContainer, (void**)&container);
ok(hres == S_OK, "QueryInterface(IID_IConnectionPointContainer) failed: %08x\n", hres);
ok(hres == S_OK, "QueryInterface(IID_IConnectionPointContainer) failed: %08lx\n", hres);
hres = IConnectionPointContainer_FindConnectionPoint(container, riid, &cp);
IConnectionPointContainer_Release(container);
ok(hres == S_OK, "FindConnectionPoint failed: %08x\n", hres);
ok(hres == S_OK, "FindConnectionPoint failed: %08lx\n", hres);
hres = IConnectionPoint_Advise(cp, unk_advise, &cookie);
IConnectionPoint_Release(cp);
ok(hres == S_OK, "Advise failed: %08x\n", hres);
ok(hres == S_OK, "Advise failed: %08lx\n", hres);
}
static void set_client_site(IHTMLDocument2 *doc, BOOL set)
@ -2279,19 +2279,19 @@ static void set_client_site(IHTMLDocument2 *doc, BOOL set)
}
hres = IHTMLDocument2_QueryInterface(doc, &IID_IOleObject, (void**)&oleobj);
ok(hres == S_OK, "Could not et IOleObject: %08x\n", hres);
ok(hres == S_OK, "Could not et IOleObject: %08lx\n", hres);
hres = IOleObject_SetClientSite(oleobj, set ? &ClientSite : NULL);
ok(hres == S_OK, "SetClientSite failed: %08x\n", hres);
ok(hres == S_OK, "SetClientSite failed: %08lx\n", hres);
if(set) {
IHlinkTarget *hlink;
hres = IOleObject_QueryInterface(oleobj, &IID_IHlinkTarget, (void**)&hlink);
ok(hres == S_OK, "Could not get IHlinkTarget iface: %08x\n", hres);
ok(hres == S_OK, "Could not get IHlinkTarget iface: %08lx\n", hres);
hres = IHlinkTarget_Navigate(hlink, 0, NULL);
ok(hres == S_OK, "Navgate failed: %08x\n", hres);
ok(hres == S_OK, "Navgate failed: %08lx\n", hres);
IHlinkTarget_Release(hlink);
}
@ -2305,7 +2305,7 @@ static IHTMLDocument2 *create_document(void)
hres = CoCreateInstance(&CLSID_HTMLDocument, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER,
&IID_IHTMLDocument2, (void**)&doc);
ok(hres == S_OK, "CoCreateInstance failed: %08x\n", hres);
ok(hres == S_OK, "CoCreateInstance failed: %08lx\n", hres);
return doc;
}
@ -2334,7 +2334,7 @@ static void release_doc(IHTMLDocument2 *doc)
set_client_site(doc, FALSE);
ref = IHTMLDocument2_Release(doc);
ok(!ref || broken(ref == 1) /* Vista */, "ref = %d\n", ref);
ok(!ref || broken(ref == 1) /* Vista */, "ref = %ld\n", ref);
if(client_site) {
IOleClientSite_Release(client_site);
@ -2346,7 +2346,7 @@ static void release_doc(IHTMLDocument2 *doc)
plugin_hwnd = NULL;
}
ok(!activex_refcnt, "activex_refcnt = %d\n", activex_refcnt);
ok(!activex_refcnt, "activex_refcnt = %ld\n", activex_refcnt);
}
static void init_test(int behavior)
@ -2367,7 +2367,7 @@ static void test_event_call(void)
V_VT(&res) = VT_EMPTY;
hres = IDispatch_Invoke(sink_disp, 1, &IID_NULL, 0, DISPATCH_METHOD, &dp, &res, &ei, NULL);
ok(hres == S_OK, "Invoke failed: %08x\n", hres);
ok(hres == S_OK, "Invoke failed: %08lx\n", hres);
ok(V_VT(&res) == VT_I4 && V_I4(&res) == 6, "unexpected result\n");
V_VT(args) = VT_I4;
@ -2377,12 +2377,12 @@ static void test_event_call(void)
dp.cArgs = 2;
V_VT(&res) = VT_EMPTY;
hres = IDispatch_Invoke(sink_disp, 2, &IID_NULL, 0, DISPATCH_METHOD, &dp, &res, &ei, NULL);
ok(hres == S_OK, "Invoke failed: %08x\n", hres);
ok(V_VT(&res) == VT_I4 && V_I4(&res) == 7, "unexpected result: %d\n", V_I4(&res));
ok(hres == S_OK, "Invoke failed: %08lx\n", hres);
ok(V_VT(&res) == VT_I4 && V_I4(&res) == 7, "unexpected result: %ld\n", V_I4(&res));
V_VT(&res) = VT_ERROR;
hres = IDispatch_Invoke(sink_disp, 10, &IID_NULL, 0, DISPATCH_METHOD, &dp, &res, &ei, NULL);
ok(hres == S_OK, "Invoke failed: %08x\n", hres);
ok(hres == S_OK, "Invoke failed: %08lx\n", hres);
ok(V_VT(&res) == VT_EMPTY, "V_VT(res) = %d\n", V_VT(&res));
}
@ -2592,13 +2592,13 @@ static void test_exec_script(IHTMLDocument2 *doc, const WCHAR *codew, const WCHA
HRESULT hres;
hres = IHTMLDocument2_get_parentWindow(doc, &window);
ok(hres == S_OK, "get_parentWindow failed: %08x\n", hres);
ok(hres == S_OK, "get_parentWindow failed: %08lx\n", hres);
code = SysAllocString(codew);
lang = SysAllocString(langw);
hres = IHTMLWindow2_execScript(window, code, lang, &v);
ok(hres == S_OK, "execScript failed: %08x\n", hres);
ok(hres == S_OK, "execScript failed: %08lx\n", hres);
SysFreeString(lang);
VariantClear(&v);
@ -2684,13 +2684,13 @@ static void load_typelib(void)
GetModuleFileNameW(NULL, path, MAX_PATH);
hres = LoadTypeLib(path, &typelib);
ok(hres == S_OK, "LoadTypeLib failed: %08x\n", hres);
ok(hres == S_OK, "LoadTypeLib failed: %08lx\n", hres);
hres = ITypeLib_GetTypeInfoOfGuid(typelib, &DIID_DispActiveXTest, &actxtest_typeinfo);
ok(hres == S_OK, "GetTypeInfoOfGuid(DIID_DispActiveXTest) failed: %08x\n", hres);
ok(hres == S_OK, "GetTypeInfoOfGuid(DIID_DispActiveXTest) failed: %08lx\n", hres);
hres = ITypeLib_GetTypeInfoOfGuid(typelib, &CLSID_ActiveXTest, &class_typeinfo);
ok(hres == S_OK, "GetTypeInfoOfGuid(CLSID_ActiveXTest) failed: %08x\n", hres);
ok(hres == S_OK, "GetTypeInfoOfGuid(CLSID_ActiveXTest) failed: %08lx\n", hres);
ITypeLib_Release(typelib);
}
@ -2738,7 +2738,7 @@ static BOOL register_activex(void)
hres = CoRegisterClassObject(&CLSID_TestActiveX, (IUnknown*)&activex_cf,
CLSCTX_INPROC_SERVER, REGCLS_MULTIPLEUSE, &regid);
ok(hres == S_OK, "Could not register control: %08x\n", hres);
ok(hres == S_OK, "Could not register control: %08lx\n", hres);
return TRUE;
}

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -107,11 +107,11 @@ static void test_href(IHTMLLocation *loc, const struct location_test *test)
hres = IHTMLLocation_get_href(loc, NULL);
ok(hres == E_POINTER,
"%s: get_href should have failed with E_POINTER (0x%08x), was: 0x%08x\n",
"%s: get_href should have failed with E_POINTER (0x%08lx), was: 0x%08lx\n",
test->name, E_POINTER, hres);
hres = IHTMLLocation_get_href(loc, &str);
ok(hres == S_OK, "%s: get_href failed: 0x%08x\n", test->name, hres);
ok(hres == S_OK, "%s: get_href failed: 0x%08lx\n", test->name, hres);
if(hres == S_OK)
ok(str_eq_wa(str, test->href),
"%s: expected retrieved href to be L\"%s\", was: %s\n",
@ -119,7 +119,7 @@ static void test_href(IHTMLLocation *loc, const struct location_test *test)
SysFreeString(str);
hres = IHTMLLocation_toString(loc, &str);
ok(hres == S_OK, "%s: toString failed: 0x%08x\n", test->name, hres);
ok(hres == S_OK, "%s: toString failed: 0x%08lx\n", test->name, hres);
ok(str_eq_wa(str, test->href), "%s: toString returned %s, expected %s\n",
test->name, wine_dbgstr_w(str), test->href);
SysFreeString(str);
@ -132,11 +132,11 @@ static void test_protocol(IHTMLLocation *loc, const struct location_test *test)
hres = IHTMLLocation_get_protocol(loc, NULL);
ok(hres == E_POINTER,
"%s: get_protocol should have failed with E_POINTER (0x%08x), was: 0x%08x\n",
"%s: get_protocol should have failed with E_POINTER (0x%08lx), was: 0x%08lx\n",
test->name, E_POINTER, hres);
hres = IHTMLLocation_get_protocol(loc, &str);
ok(hres == S_OK, "%s: get_protocol failed: 0x%08x\n", test->name, hres);
ok(hres == S_OK, "%s: get_protocol failed: 0x%08lx\n", test->name, hres);
if(hres == S_OK)
ok(str_eq_wa(str, test->protocol),
"%s: expected retrieved protocol to be L\"%s\", was: %s\n",
@ -151,11 +151,11 @@ static void test_host(IHTMLLocation *loc, const struct location_test *test)
hres = IHTMLLocation_get_host(loc, NULL);
ok(hres == E_POINTER,
"%s: get_host should have failed with E_POINTER (0x%08x), was: 0x%08x\n",
"%s: get_host should have failed with E_POINTER (0x%08lx), was: 0x%08lx\n",
test->name, E_POINTER, hres);
hres = IHTMLLocation_get_host(loc, &str);
ok(hres == S_OK, "%s: get_host failed: 0x%08x\n", test->name, hres);
ok(hres == S_OK, "%s: get_host failed: 0x%08lx\n", test->name, hres);
if(hres == S_OK){
int len = test->host ? strlen(test->host) : 0;
ok(str_eq_wa(str, test->host),
@ -175,11 +175,11 @@ static void test_hostname(IHTMLLocation *loc, IHTMLDocument2 *doc, const struct
hres = IHTMLLocation_get_hostname(loc, NULL);
ok(hres == E_POINTER,
"%s: get_hostname should have failed with E_POINTER (0x%08x), was: 0x%08x\n",
"%s: get_hostname should have failed with E_POINTER (0x%08lx), was: 0x%08lx\n",
test->name, E_POINTER, hres);
hres = IHTMLLocation_get_hostname(loc, &str);
ok(hres == S_OK, "%s: get_hostname failed: 0x%08x\n", test->name, hres);
ok(hres == S_OK, "%s: get_hostname failed: 0x%08lx\n", test->name, hres);
if(hres == S_OK)
ok(str_eq_wa(str, test->hostname),
"%s: expected retrieved hostname to be L\"%s\", was: %s\n",
@ -187,7 +187,7 @@ static void test_hostname(IHTMLLocation *loc, IHTMLDocument2 *doc, const struct
SysFreeString(str);
hres = IHTMLDocument2_get_domain(doc, &str);
ok(hres == S_OK, "%s: get_domain failed: 0x%08x\n", test->name, hres);
ok(hres == S_OK, "%s: get_domain failed: 0x%08lx\n", test->name, hres);
if(hres == S_OK)
ok(str_eq_wa(str, test->hostname ? test->hostname : ""),
"%s: expected retrieved domain to be L\"%s\", was: %s\n",
@ -202,11 +202,11 @@ static void test_port(IHTMLLocation *loc, const struct location_test *test)
hres = IHTMLLocation_get_port(loc, NULL);
ok(hres == E_POINTER,
"%s: get_port should have failed with E_POINTER (0x%08x), was: 0x%08x\n",
"%s: get_port should have failed with E_POINTER (0x%08lx), was: 0x%08lx\n",
test->name, E_POINTER, hres);
hres = IHTMLLocation_get_port(loc, &str);
ok(hres == S_OK, "%s: get_port failed: 0x%08x\n", test->name, hres);
ok(hres == S_OK, "%s: get_port failed: 0x%08lx\n", test->name, hres);
if(hres == S_OK)
ok(str_eq_wa(str, test->port)
|| (!str && !*test->port), /* IE11 */
@ -222,11 +222,11 @@ static void test_pathname(IHTMLLocation *loc, const struct location_test *test)
hres = IHTMLLocation_get_pathname(loc, NULL);
ok(hres == E_POINTER,
"%s: get_pathname should have failed with E_POINTER (0x%08x), was: 0x%08x\n",
"%s: get_pathname should have failed with E_POINTER (0x%08lx), was: 0x%08lx\n",
test->name, E_POINTER, hres);
hres = IHTMLLocation_get_pathname(loc, &str);
ok(hres == S_OK, "%s: get_pathname failed: 0x%08x\n", test->name, hres);
ok(hres == S_OK, "%s: get_pathname failed: 0x%08lx\n", test->name, hres);
if(hres == S_OK)
/* FIXME: We seem to be testing location in a buggy state. Path names do not
* include leading slash, while other tests confirm that it should be there */
@ -244,11 +244,11 @@ static void test_search(IHTMLLocation *loc, const struct location_test *test)
hres = IHTMLLocation_get_search(loc, NULL);
ok(hres == E_POINTER,
"%s: get_search should have failed with E_POINTER (0x%08x), was: 0x%08x\n",
"%s: get_search should have failed with E_POINTER (0x%08lx), was: 0x%08lx\n",
test->name, E_POINTER, hres);
hres = IHTMLLocation_get_search(loc, &str);
ok(hres == S_OK, "%s: get_search failed: 0x%08x\n", test->name, hres);
ok(hres == S_OK, "%s: get_search failed: 0x%08lx\n", test->name, hres);
if(hres == S_OK)
ok(str_eq_wa(str, test->search),
"%s: expected retrieved search to be L\"%s\", was: %s\n",
@ -263,11 +263,11 @@ static void test_hash(IHTMLLocation *loc, const struct location_test *test)
hres = IHTMLLocation_get_hash(loc, NULL);
ok(hres == E_POINTER,
"%s: get_hash should have failed with E_POINTER (0x%08x), was: 0x%08x\n",
"%s: get_hash should have failed with E_POINTER (0x%08lx), was: 0x%08lx\n",
test->name, E_POINTER, hres);
hres = IHTMLLocation_get_hash(loc, &str);
ok(hres == S_OK, "%s: get_hash failed: 0x%08x\n", test->name, hres);
ok(hres == S_OK, "%s: get_hash failed: 0x%08lx\n", test->name, hres);
if(hres == S_OK)
ok(str_eq_wa(str, test->hash),
"%s: expected retrieved hash to be L\"%s\", was: %s\n",
@ -287,13 +287,13 @@ static void perform_test(const struct location_test* test)
IHTMLLocation *location;
hres = CreateBindCtx(0, &bc);
ok(hres == S_OK, "%s: CreateBindCtx failed: 0x%08x\n", test->name, hres);
ok(hres == S_OK, "%s: CreateBindCtx failed: 0x%08lx\n", test->name, hres);
if(FAILED(hres))
return;
MultiByteToWideChar(CP_ACP, 0, test->url, -1, url, ARRAY_SIZE(url));
hres = CreateURLMoniker(NULL, url, &url_mon);
ok(hres == S_OK, "%s: CreateURLMoniker failed: 0x%08x\n", test->name, hres);
ok(hres == S_OK, "%s: CreateURLMoniker failed: 0x%08lx\n", test->name, hres);
if(FAILED(hres)){
IBindCtx_Release(bc);
return;
@ -305,7 +305,7 @@ static void perform_test(const struct location_test* test)
#if !defined(__i386__) && !defined(__x86_64__)
todo_wine
#endif
ok(hres == S_OK, "%s: CoCreateInstance failed: 0x%08x\n", test->name, hres);
ok(hres == S_OK, "%s: CoCreateInstance failed: 0x%08lx\n", test->name, hres);
if(FAILED(hres)){
IMoniker_Release(url_mon);
IBindCtx_Release(bc);
@ -324,7 +324,7 @@ static void perform_test(const struct location_test* test)
hres = IHTMLDocument2_QueryInterface(doc, &IID_IPersistMoniker,
(void**)&persist_mon);
ok(hres == S_OK, "%s: IHTMlDocument2_QueryInterface failed: 0x%08x\n", test->name, hres);
ok(hres == S_OK, "%s: IHTMlDocument2_QueryInterface failed: 0x%08lx\n", test->name, hres);
if(FAILED(hres)){
IHTMLDocument2_Release(doc);
IMoniker_Release(url_mon);
@ -334,7 +334,7 @@ static void perform_test(const struct location_test* test)
hres = IPersistMoniker_Load(persist_mon, FALSE, url_mon, bc,
STGM_SHARE_EXCLUSIVE | STGM_READWRITE);
ok(hres == S_OK, "%s: IPersistMoniker_Load failed: 0x%08x\n", test->name, hres);
ok(hres == S_OK, "%s: IPersistMoniker_Load failed: 0x%08lx\n", test->name, hres);
if(FAILED(hres)){
IPersistMoniker_Release(persist_mon);
IHTMLDocument2_Release(doc);
@ -344,7 +344,7 @@ static void perform_test(const struct location_test* test)
}
hres = IHTMLDocument2_get_location(doc, &location);
ok(hres == S_OK, "%s: IHTMLDocument2_get_location failed: 0x%08x\n", test->name, hres);
ok(hres == S_OK, "%s: IHTMLDocument2_get_location failed: 0x%08lx\n", test->name, hres);
if(FAILED(hres)){
IPersistMoniker_Release(persist_mon);
IHTMLDocument2_Release(doc);

View file

@ -36,7 +36,7 @@ static void test_HTMLLoadOptions(void)
hres = CoCreateInstance(&CLSID_HTMLLoadOptions, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER,
&IID_IHtmlLoadOptions, (void**)&loadopts);
ok(hres == S_OK, "creating HTMLLoadOptions failed: %08x\n", hres);
ok(hres == S_OK, "creating HTMLLoadOptions failed: %08lx\n", hres);
if(FAILED(hres))
return;
@ -44,64 +44,64 @@ static void test_HTMLLoadOptions(void)
size = 0xdeadbeef;
memset(buf, 0xdd, sizeof(buf));
hres = IHtmlLoadOptions_QueryOption(loadopts, i, NULL, &size);
ok(hres == S_OK, "QueryOption failed: %08x\n", hres);
ok(size == 0, "size = %d\n", size);
ok(hres == S_OK, "QueryOption failed: %08lx\n", hres);
ok(size == 0, "size = %ld\n", size);
ok(buf[0] == 0xdd, "buf changed\n");
}
size = 0xdeadbeef;
hres = IHtmlLoadOptions_QueryOption(loadopts, HTMLLOADOPTION_CODEPAGE, NULL, &size);
ok(hres == S_OK, "QueryOption failed: %08x\n", hres);
ok(size == 0, "size = %d\n", size);
ok(hres == S_OK, "QueryOption failed: %08lx\n", hres);
ok(size == 0, "size = %ld\n", size);
hres = IHtmlLoadOptions_SetOption(loadopts, HTMLLOADOPTION_CODEPAGE, &data, sizeof(data));
ok(hres == S_OK, "SetOption failed: %08x\n", hres);
ok(hres == S_OK, "SetOption failed: %08lx\n", hres);
size = sizeof(data);
memset(buf, 0xdd, sizeof(buf));
hres = IHtmlLoadOptions_QueryOption(loadopts, HTMLLOADOPTION_CODEPAGE, buf, &size);
ok(hres == S_OK, "QueryOption failed: %08x\n", hres);
ok(size == sizeof(data), "size = %d\n", size);
ok(hres == S_OK, "QueryOption failed: %08lx\n", hres);
ok(size == sizeof(data), "size = %ld\n", size);
ok(*(DWORD*)buf == data, "unexpected buf\n");
size = sizeof(data)-1;
memset(buf, 0xdd, sizeof(buf));
hres = IHtmlLoadOptions_QueryOption(loadopts, HTMLLOADOPTION_CODEPAGE, buf, &size);
ok(hres == E_FAIL, "QueryOption failed: %08x\n", hres);
ok(size == sizeof(data) || !size, "size = %d\n", size);
ok(hres == E_FAIL, "QueryOption failed: %08lx\n", hres);
ok(size == sizeof(data) || !size, "size = %ld\n", size);
ok(buf[0] == 0xdd, "buf changed\n");
data = 100;
hres = IHtmlLoadOptions_SetOption(loadopts, HTMLLOADOPTION_CODEPAGE, &data, 0);
ok(hres == S_OK, "SetOption failed: %08x\n", hres);
ok(hres == S_OK, "SetOption failed: %08lx\n", hres);
size = 0xdeadbeef;
memset(buf, 0xdd, sizeof(buf));
hres = IHtmlLoadOptions_QueryOption(loadopts, HTMLLOADOPTION_CODEPAGE, buf, &size);
ok(hres == S_OK, "QueryOption failed: %08x\n", hres);
ok(size == 0, "size = %d\n", size);
ok(hres == S_OK, "QueryOption failed: %08lx\n", hres);
ok(size == 0, "size = %ld\n", size);
ok(buf[0] == 0xdd, "buf changed\n");
hres = IHtmlLoadOptions_SetOption(loadopts, HTMLLOADOPTION_CODEPAGE, NULL, 0);
ok(hres == S_OK, "SetOption failed: %08x\n", hres);
ok(hres == S_OK, "SetOption failed: %08lx\n", hres);
hres = IHtmlLoadOptions_SetOption(loadopts, 1000, &data, sizeof(data));
ok(hres == S_OK, "SetOption failed: %08x\n", hres);
ok(hres == S_OK, "SetOption failed: %08lx\n", hres);
size = sizeof(data);
memset(buf, 0xdd, sizeof(buf));
hres = IHtmlLoadOptions_QueryOption(loadopts, 1000, buf, &size);
ok(hres == S_OK, "QueryOption failed: %08x\n", hres);
ok(size == sizeof(data), "size = %d\n", size);
ok(hres == S_OK, "QueryOption failed: %08lx\n", hres);
ok(size == sizeof(data), "size = %ld\n", size);
ok(*(DWORD*)buf == data, "unexpected buf\n");
hres = IHtmlLoadOptions_SetOption(loadopts, 1000, buf, sizeof(buf));
ok(hres == S_OK, "SetOption failed: %08x\n", hres);
ok(hres == S_OK, "SetOption failed: %08lx\n", hres);
size = 0xdeadbeef;
hres = IHtmlLoadOptions_QueryOption(loadopts, 1000, buf, &size);
ok(hres == S_OK, "QueryOption failed: %08x\n", hres);
ok(size == sizeof(buf), "size = %d\n", size);
ok(hres == S_OK, "QueryOption failed: %08lx\n", hres);
ok(size == sizeof(buf), "size = %ld\n", size);
IHtmlLoadOptions_Release(loadopts);
}

View file

@ -115,7 +115,7 @@ static HRESULT WINAPI ProtocolSink_ReportProgress(IInternetProtocolSink *iface,
ok(ulStatusCode == BINDSTATUS_MIMETYPEAVAILABLE
|| ulStatusCode == BINDSTATUS_VERIFIEDMIMETYPEAVAILABLE,
"ulStatusCode=%d\n", ulStatusCode);
"ulStatusCode=%ld\n", ulStatusCode);
ok(!lstrcmpW(szStatusText, text_html), "szStatusText != text/html\n");
return S_OK;
@ -128,7 +128,7 @@ static HRESULT WINAPI ProtocolSink_ReportData(IInternetProtocolSink *iface, DWOR
ok(ulProgress == ulProgressMax, "ulProgress != ulProgressMax\n");
ok(grfBSCF == (BSCF_FIRSTDATANOTIFICATION | BSCF_LASTDATANOTIFICATION | BSCF_DATAFULLYAVAILABLE),
"grcf = %08x\n", grfBSCF);
"grcf = %08lx\n", grfBSCF);
return S_OK;
}
@ -140,15 +140,15 @@ static HRESULT WINAPI ProtocolSink_ReportResult(IInternetProtocolSink *iface, HR
if(expect_hr_win32err) {
ok((hrResult&0xffff0000) == ((FACILITY_WIN32 << 16)|0x80000000) || hrResult == expect_hrResult,
"expected win32 err or %08x got: %08x\n", expect_hrResult, hrResult);
"expected win32 err or %08lx got: %08lx\n", expect_hrResult, hrResult);
}else {
ok(hrResult == expect_hrResult || (expect_hrResult == E_INVALIDARG && hrResult == MK_E_SYNTAX)
|| (expect_hrResult == HRESULT_FROM_WIN32(ERROR_RESOURCE_TYPE_NOT_FOUND) &&
(hrResult == MK_E_SYNTAX || hrResult == HRESULT_FROM_WIN32(ERROR_DLL_NOT_FOUND))),
"expected: %08x got: %08x\n", expect_hrResult, hrResult);
"expected: %08lx got: %08lx\n", expect_hrResult, hrResult);
expect_hrResult = hrResult;
}
ok(dwError == 0, "dwError = %d\n", dwError);
ok(dwError == 0, "dwError = %ld\n", dwError);
ok(!szResult, "szResult != NULL\n");
return S_OK;
@ -196,7 +196,7 @@ static HRESULT WINAPI BindInfo_GetBindInfo(IInternetBindInfo *iface, DWORD *grfB
ok(grfBINDF != NULL, "grfBINDF == NULL\n");
ok(pbindinfo != NULL, "pbindinfo == NULL\n");
ok(pbindinfo->cbSize == sizeof(BINDINFO), "wrong size of pbindinfo: %d\n", pbindinfo->cbSize);
ok(pbindinfo->cbSize == sizeof(BINDINFO), "wrong size of pbindinfo: %ld\n", pbindinfo->cbSize);
*grfBINDF = bindf;
return S_OK;
@ -234,9 +234,9 @@ static void test_protocol_fail(IInternetProtocol *protocol, LPCWSTR url, HRESULT
hres = IInternetProtocol_Start(protocol, url, &protocol_sink, &bind_info, 0, 0);
if(expect_win32err)
ok((hres&0xffff0000) == ((FACILITY_WIN32 << 16)|0x80000000) || hres == expect_hrResult,
"expected win32 err or %08x got: %08x\n", expected_hres, hres);
"expected win32 err or %08lx got: %08lx\n", expected_hres, hres);
else
ok(hres == expect_hrResult, "expected: %08x got: %08x\n", expect_hrResult, hres);
ok(hres == expect_hrResult, "expected: %08lx got: %08lx\n", expect_hrResult, hres);
CHECK_CALLED(GetBindInfo);
CHECK_CALLED(ReportResult);
@ -254,7 +254,7 @@ static void protocol_start(IInternetProtocol *protocol, const WCHAR *url)
expect_hr_win32err = FALSE;
hres = IInternetProtocol_Start(protocol, url, &protocol_sink, &bind_info, 0, 0);
ok(hres == S_OK, "Start failed: %08x\n", hres);
ok(hres == S_OK, "Start failed: %08lx\n", hres);
CHECK_CALLED(GetBindInfo);
CHECK_CALLED(ReportProgress);
@ -272,14 +272,14 @@ static void test_res_url_fail(const WCHAR *url_suffix)
wcscat(url, url_suffix);
hres = CoCreateInstance(&CLSID_ResProtocol, NULL, CLSCTX_INPROC_SERVER, &IID_IInternetProtocol, (void**)&protocol);
ok(hres == S_OK, "Could not create ResProtocol instance: %08x\n", hres);
ok(hres == S_OK, "Could not create ResProtocol instance: %08lx\n", hres);
SET_EXPECT(GetBindInfo);
SET_EXPECT(ReportResult);
expect_hr_win32err = TRUE;
hres = IInternetProtocol_Start(protocol, url, &protocol_sink, &bind_info, 0, 0);
ok(HRESULT_FACILITY(hres) == FACILITY_WIN32,
"%s: expected win32 error, got: %08x\n", debugstr_w(url_suffix), hres);
"%s: expected win32 error, got: %08lx\n", debugstr_w(url_suffix), hres);
CHECK_CALLED(GetBindInfo);
CHECK_CALLED(ReportResult);
@ -298,19 +298,19 @@ static void test_res_url(const char *url_suffix)
MultiByteToWideChar(CP_ACP, 0, url_suffix, -1, url+res_url_base_len, ARRAY_SIZE(url)-res_url_base_len);
hres = CoCreateInstance(&CLSID_ResProtocol, NULL, CLSCTX_INPROC_SERVER, &IID_IInternetProtocol, (void**)&protocol);
ok(hres == S_OK, "Could not create ResProtocol instance: %08x\n", hres);
ok(hres == S_OK, "Could not create ResProtocol instance: %08lx\n", hres);
protocol_start(protocol, url);
hres = IInternetProtocol_Read(protocol, buf, sizeof(buf), &size);
ok(hres == S_OK, "Read failed: %08x\n", hres);
ok(hres == S_OK, "Read failed: %08lx\n", hres);
hres = IInternetProtocol_Terminate(protocol, 0);
ok(hres == S_OK, "Terminate failed: %08x\n", hres);
ok(hres == S_OK, "Terminate failed: %08lx\n", hres);
ref = IInternetProtocol_Release(protocol);
ok(!ref, "ref=%u\n", ref);
ok(!ref, "ref=%lu\n", ref);
}
static void res_sec_url_cmp(LPCWSTR url, DWORD size, LPCWSTR file)
@ -331,12 +331,12 @@ static void res_sec_url_cmp(LPCWSTR url, DWORD size, LPCWSTR file)
if (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)
win_skip("SearchPathW is not implemented\n");
else
ok(0, "SearchPath failed: %u\n", GetLastError());
ok(0, "SearchPath failed: %lu\n", GetLastError());
return;
}
len += ARRAY_SIZE(fileW)+1;
ok(len == size, "wrong size %u, expected %u\n", size, len);
ok(len == size, "wrong size %lu, expected %lu\n", size, len);
ok(!lstrcmpW(url + ARRAY_SIZE(fileW), buf), "wrong file part %s\n", wine_dbgstr_w(url));
}
@ -365,12 +365,12 @@ static void test_res_protocol(void)
static const WCHAR mshtml_dllW[] = {'m','s','h','t','m','l','.','d','l','l',0};
hres = CoGetClassObject(&CLSID_ResProtocol, CLSCTX_INPROC_SERVER, NULL, &IID_IUnknown, (void**)&unk);
ok(hres == S_OK, "CoGetClassObject failed: %08x\n", hres);
ok(hres == S_OK, "CoGetClassObject failed: %08lx\n", hres);
if(FAILED(hres))
return;
hres = IUnknown_QueryInterface(unk, &IID_IInternetProtocolInfo, (void**)&protocol_info);
ok(hres == S_OK, "Could not get IInternetProtocolInfo interface: %08x\n", hres);
ok(hres == S_OK, "Could not get IInternetProtocolInfo interface: %08lx\n", hres);
if(SUCCEEDED(hres)) {
WCHAR buf[128];
DWORD size, expected_size;
@ -381,56 +381,56 @@ static void test_res_protocol(void)
hres = IInternetProtocolInfo_ParseUrl(protocol_info, blank_url, i, 0, buf,
ARRAY_SIZE(buf), &size, 0);
ok(hres == INET_E_DEFAULT_ACTION,
"[%d] failed: %08x, expected INET_E_DEFAULT_ACTION\n", i, hres);
"[%d] failed: %08lx, expected INET_E_DEFAULT_ACTION\n", i, hres);
}
}
hres = IInternetProtocolInfo_ParseUrl(protocol_info, blank_url, PARSE_SECURITY_URL, 0, buf,
ARRAY_SIZE(buf), &size, 0);
ok(hres == S_OK, "ParseUrl failed: %08x\n", hres);
ok(hres == S_OK, "ParseUrl failed: %08lx\n", hres);
res_sec_url_cmp(buf, size, mshtml_dllW);
ok(size == lstrlenW(buf)+1, "size = %d\n", size);
ok(size == lstrlenW(buf)+1, "size = %ld\n", size);
expected_size = size;
hres = IInternetProtocolInfo_ParseUrl(protocol_info, blank_url, PARSE_SECURITY_URL, 0, buf,
expected_size, &size, 0);
ok(hres == S_OK, "ParseUrl failed: %08x\n", hres);
ok(hres == S_OK, "ParseUrl failed: %08lx\n", hres);
res_sec_url_cmp(buf, size, mshtml_dllW);
ok(size == expected_size, "size = %d\n", size);
ok(size == expected_size, "size = %ld\n", size);
size = 0;
hres = IInternetProtocolInfo_ParseUrl(protocol_info, blank_url, PARSE_SECURITY_URL, 0, buf,
3, &size, 0);
ok(hres == S_FALSE, "ParseUrl failed: %08x, expected S_FALSE\n", hres);
ok(size == expected_size, "size = %d\n", size);
ok(hres == S_FALSE, "ParseUrl failed: %08lx, expected S_FALSE\n", hres);
ok(size == expected_size, "size = %ld\n", size);
hres = IInternetProtocolInfo_ParseUrl(protocol_info, wrong_url1, PARSE_SECURITY_URL, 0, buf,
ARRAY_SIZE(buf), &size, 0);
ok(hres == MK_E_SYNTAX || hres == E_INVALIDARG,
"ParseUrl failed: %08x, expected MK_E_SYNTAX\n", hres);
"ParseUrl failed: %08lx, expected MK_E_SYNTAX\n", hres);
hres = IInternetProtocolInfo_ParseUrl(protocol_info, wrong_url5, PARSE_SECURITY_URL, 0, buf,
ARRAY_SIZE(buf), &size, 0);
ok(hres == MK_E_SYNTAX, "ParseUrl failed: %08x, expected MK_E_SYNTAX\n", hres);
ok(hres == MK_E_SYNTAX, "ParseUrl failed: %08lx, expected MK_E_SYNTAX\n", hres);
hres = IInternetProtocolInfo_ParseUrl(protocol_info, wrong_url6, PARSE_SECURITY_URL, 0, buf,
ARRAY_SIZE(buf), &size, 0);
ok(hres == MK_E_SYNTAX, "ParseUrl failed: %08x, expected MK_E_SYNTAX\n", hres);
ok(hres == MK_E_SYNTAX, "ParseUrl failed: %08lx, expected MK_E_SYNTAX\n", hres);
size = 0xdeadbeef;
buf[0] = '?';
hres = IInternetProtocolInfo_ParseUrl(protocol_info, blank_url, PARSE_DOMAIN, 0, buf,
ARRAY_SIZE(buf), &size, 0);
ok(hres == S_OK || hres == E_FAIL, "ParseUrl failed: %08x\n", hres);
ok(hres == S_OK || hres == E_FAIL, "ParseUrl failed: %08lx\n", hres);
ok(buf[0] == '?', "buf changed\n");
ok(size == ARRAY_SIZE(blank_url) || size == ARRAY_SIZE(buf), /* IE8 */ "size=%d\n", size);
ok(size == ARRAY_SIZE(blank_url) || size == ARRAY_SIZE(buf), /* IE8 */ "size=%ld\n", size);
size = 0xdeadbeef;
hres = IInternetProtocolInfo_ParseUrl(protocol_info, wrong_url1, PARSE_DOMAIN, 0, buf,
ARRAY_SIZE(buf), &size, 0);
ok(hres == S_OK || hres == E_FAIL, "ParseUrl failed: %08x\n", hres);
ok(hres == S_OK || hres == E_FAIL, "ParseUrl failed: %08lx\n", hres);
ok(buf[0] == '?', "buf changed\n");
ok(size == ARRAY_SIZE(wrong_url1) || size == ARRAY_SIZE(buf), /* IE8 */ "size=%d\n", size);
ok(size == ARRAY_SIZE(wrong_url1) || size == ARRAY_SIZE(buf), /* IE8 */ "size=%ld\n", size);
if (0)
{
@ -439,20 +439,20 @@ static void test_res_protocol(void)
buf[0] = '?';
hres = IInternetProtocolInfo_ParseUrl(protocol_info, NULL, PARSE_DOMAIN, 0, buf,
ARRAY_SIZE(buf), &size, 0);
ok(hres == E_FAIL, "ParseUrl failed: %08x\n", hres);
ok(hres == E_FAIL, "ParseUrl failed: %08lx\n", hres);
ok(buf[0] == '?', "buf changed\n");
ok(size == 1, "size=%u, expected 1\n", size);
ok(size == 1, "size=%lu, expected 1\n", size);
buf[0] = '?';
hres = IInternetProtocolInfo_ParseUrl(protocol_info, blank_url, PARSE_DOMAIN, 0, buf,
ARRAY_SIZE(buf), NULL, 0);
ok(hres == E_POINTER, "ParseUrl failed: %08x\n", hres);
ok(hres == E_POINTER, "ParseUrl failed: %08lx\n", hres);
ok(buf[0] == '?', "buf changed\n");
buf[0] = '?';
hres = IInternetProtocolInfo_ParseUrl(protocol_info, NULL, PARSE_DOMAIN, 0, buf,
ARRAY_SIZE(buf), NULL, 0);
ok(hres == E_POINTER, "ParseUrl failed: %08x\n", hres);
ok(hres == E_POINTER, "ParseUrl failed: %08lx\n", hres);
ok(buf[0] == '?', "buf changed\n");
}
@ -460,32 +460,32 @@ static void test_res_protocol(void)
hres = IInternetProtocolInfo_ParseUrl(protocol_info, blank_url, PARSE_UNESCAPE+1, 0, buf,
ARRAY_SIZE(buf), &size, 0);
ok(hres == INET_E_DEFAULT_ACTION,
"ParseUrl failed: %08x, expected INET_E_DEFAULT_ACTION\n", hres);
"ParseUrl failed: %08lx, expected INET_E_DEFAULT_ACTION\n", hres);
ok(buf[0] == '?', "buf changed\n");
size = 0xdeadbeef;
hres = IInternetProtocolInfo_CombineUrl(protocol_info, blank_url, test_part_url,
0, buf, ARRAY_SIZE(buf), &size, 0);
ok(hres == INET_E_USE_DEFAULT_PROTOCOLHANDLER, "CombineUrl failed: %08x\n", hres);
ok(size == 0xdeadbeef, "size=%d\n", size);
ok(hres == INET_E_USE_DEFAULT_PROTOCOLHANDLER, "CombineUrl failed: %08lx\n", hres);
ok(size == 0xdeadbeef, "size=%ld\n", size);
size = 0xdeadbeef;
hres = IInternetProtocolInfo_CombineUrl(protocol_info, blank_url, test_part_url,
URL_FILE_USE_PATHURL, buf, ARRAY_SIZE(buf), &size, 0);
ok(hres == INET_E_USE_DEFAULT_PROTOCOLHANDLER, "CombineUrl failed: %08x\n", hres);
ok(size == 0xdeadbeef, "size=%d\n", size);
ok(hres == INET_E_USE_DEFAULT_PROTOCOLHANDLER, "CombineUrl failed: %08lx\n", hres);
ok(size == 0xdeadbeef, "size=%ld\n", size);
size = 0xdeadbeef;
hres = IInternetProtocolInfo_CombineUrl(protocol_info, NULL, NULL,
URL_FILE_USE_PATHURL, NULL, 0xdeadbeef, NULL, 0);
ok(hres == INET_E_USE_DEFAULT_PROTOCOLHANDLER, "CombineUrl failed: %08x\n", hres);
ok(size == 0xdeadbeef, "size=%d\n", size);
ok(hres == INET_E_USE_DEFAULT_PROTOCOLHANDLER, "CombineUrl failed: %08lx\n", hres);
ok(size == 0xdeadbeef, "size=%ld\n", size);
hres = IInternetProtocolInfo_CompareUrl(protocol_info, blank_url, blank_url, 0);
ok(hres == E_NOTIMPL, "CompareUrl failed: %08x\n", hres);
ok(hres == E_NOTIMPL, "CompareUrl failed: %08lx\n", hres);
hres = IInternetProtocolInfo_CompareUrl(protocol_info, NULL, NULL, 0xdeadbeef);
ok(hres == E_NOTIMPL, "CompareUrl failed: %08x\n", hres);
ok(hres == E_NOTIMPL, "CompareUrl failed: %08lx\n", hres);
for(i=0; i<30; i++) {
if(i == QUERY_USES_NETWORK || i == QUERY_IS_SECURE || i == QUERY_IS_SAFE)
@ -494,43 +494,43 @@ static void test_res_protocol(void)
hres = IInternetProtocolInfo_QueryInfo(protocol_info, blank_url, i, 0,
buf, sizeof(buf), &size, 0);
ok(hres == INET_E_USE_DEFAULT_PROTOCOLHANDLER,
"QueryInfo(%d) returned: %08x, expected INET_E_USE_DEFAULT_PROTOCOLHANDLER\n", i, hres);
"QueryInfo(%d) returned: %08lx, expected INET_E_USE_DEFAULT_PROTOCOLHANDLER\n", i, hres);
}
size = 0xdeadbeef;
memset(buf, '?', sizeof(buf));
hres = IInternetProtocolInfo_QueryInfo(protocol_info, blank_url, QUERY_USES_NETWORK, 0,
buf, sizeof(buf), &size, 0);
ok(hres == S_OK, "QueryInfo(QUERY_USES_NETWORK) failed: %08x\n", hres);
ok(size == sizeof(DWORD), "size=%d\n", size);
ok(!*(DWORD*)buf, "buf=%d\n", *(DWORD*)buf);
ok(hres == S_OK, "QueryInfo(QUERY_USES_NETWORK) failed: %08lx\n", hres);
ok(size == sizeof(DWORD), "size=%ld\n", size);
ok(!*(DWORD*)buf, "buf=%ld\n", *(DWORD*)buf);
memset(buf, '?', sizeof(buf));
hres = IInternetProtocolInfo_QueryInfo(protocol_info, blank_url, QUERY_USES_NETWORK, 0,
buf, sizeof(buf), NULL, 0);
ok(hres == S_OK, "QueryInfo(QUERY_USES_NETWORK) failed: %08x\n", hres);
ok(!*(DWORD*)buf, "buf=%d\n", *(DWORD*)buf);
ok(hres == S_OK, "QueryInfo(QUERY_USES_NETWORK) failed: %08lx\n", hres);
ok(!*(DWORD*)buf, "buf=%ld\n", *(DWORD*)buf);
hres = IInternetProtocolInfo_QueryInfo(protocol_info, blank_url, QUERY_USES_NETWORK, 0,
buf, 3, &size, 0);
ok(hres == E_FAIL, "QueryInfo(QUERY_USES_NETWORK) failed: %08x, expected E_FAIL\n", hres);
ok(hres == E_FAIL, "QueryInfo(QUERY_USES_NETWORK) failed: %08lx, expected E_FAIL\n", hres);
size = 0xdeadbeef;
memset(buf, '?', sizeof(buf));
hres = IInternetProtocolInfo_QueryInfo(protocol_info, NULL, QUERY_USES_NETWORK, 0,
buf, sizeof(buf), &size, 0);
ok(hres == S_OK, "QueryInfo(QUERY_USES_NETWORK) failed: %08x\n", hres);
ok(size == sizeof(DWORD), "size=%d\n", size);
ok(!*(DWORD*)buf, "buf=%d\n", *(DWORD*)buf);
ok(hres == S_OK, "QueryInfo(QUERY_USES_NETWORK) failed: %08lx\n", hres);
ok(size == sizeof(DWORD), "size=%ld\n", size);
ok(!*(DWORD*)buf, "buf=%ld\n", *(DWORD*)buf);
hres = IInternetProtocolInfo_QueryInfo(protocol_info, blank_url, QUERY_USES_NETWORK, 0,
NULL, sizeof(buf), &size, 0);
ok(hres == E_FAIL, "QueryInfo(QUERY_USES_NETWORK) failed: %08x, expected E_FAIL\n", hres);
ok(hres == E_FAIL, "QueryInfo(QUERY_USES_NETWORK) failed: %08lx, expected E_FAIL\n", hres);
hres = IInternetProtocolInfo_QueryInfo(protocol_info, blank_url, 60, 0,
NULL, sizeof(buf), &size, 0);
ok(hres == INET_E_USE_DEFAULT_PROTOCOLHANDLER,
"QueryInfo failed: %08x, expected INET_E_USE_DEFAULT_PROTOCOLHANDLER\n", hres);
"QueryInfo failed: %08lx, expected INET_E_USE_DEFAULT_PROTOCOLHANDLER\n", hres);
IInternetProtocolInfo_Release(protocol_info);
}
@ -542,14 +542,14 @@ static void test_res_protocol(void)
BYTE buf[512];
ULONG cb;
hres = IClassFactory_CreateInstance(factory, NULL, &IID_IInternetProtocol, (void**)&protocol);
ok(hres == S_OK, "Could not get IInternetProtocol: %08x\n", hres);
ok(hres == S_OK, "Could not get IInternetProtocol: %08lx\n", hres);
if(SUCCEEDED(hres)) {
IInternetPriority *priority;
hres = IInternetProtocol_QueryInterface(protocol, &IID_IInternetPriority, (void**)&priority);
ok(hres == E_NOINTERFACE,
"QueryInterface(IInternetPriority) returned %08x, expected E_NOINTEFACE\n", hres);
"QueryInterface(IInternetPriority) returned %08lx, expected E_NOINTEFACE\n", hres);
test_protocol_fail(protocol, wrong_url1, E_INVALIDARG, FALSE);
test_protocol_fail(protocol, wrong_url2,
@ -559,58 +559,58 @@ static void test_res_protocol(void)
cb = 0xdeadbeef;
hres = IInternetProtocol_Read(protocol, buf, sizeof(buf), &cb);
ok(hres == E_FAIL, "Read returned %08x expected E_FAIL\n", hres);
ok(cb == 0xdeadbeef, "cb=%u expected 0xdeadbeef\n", cb);
ok(hres == E_FAIL, "Read returned %08lx expected E_FAIL\n", hres);
ok(cb == 0xdeadbeef, "cb=%lu expected 0xdeadbeef\n", cb);
protocol_start(protocol, blank_url);
hres = IInternetProtocol_Read(protocol, buf, 2, &cb);
ok(hres == S_OK, "Read failed: %08x\n", hres);
ok(cb == 2, "cb=%u expected 2\n", cb);
ok(hres == S_OK, "Read failed: %08lx\n", hres);
ok(cb == 2, "cb=%lu expected 2\n", cb);
hres = IInternetProtocol_Read(protocol, buf, sizeof(buf), &cb);
ok(hres == S_OK, "Read failed: %08x\n", hres);
ok(hres == S_OK, "Read failed: %08lx\n", hres);
hres = IInternetProtocol_Read(protocol, buf, sizeof(buf), &cb);
ok(hres == S_FALSE, "Read failed: %08x expected S_FALSE\n", hres);
ok(cb == 0, "cb=%u expected 0\n", cb);
ok(hres == S_FALSE, "Read failed: %08lx expected S_FALSE\n", hres);
ok(cb == 0, "cb=%lu expected 0\n", cb);
hres = IInternetProtocol_UnlockRequest(protocol);
ok(hres == S_OK, "UnlockRequest failed: %08x\n", hres);
ok(hres == S_OK, "UnlockRequest failed: %08lx\n", hres);
protocol_start(protocol, blank_url);
hres = IInternetProtocol_Read(protocol, buf, 2, &cb);
ok(hres == S_OK, "Read failed: %08x\n", hres);
ok(hres == S_OK, "Read failed: %08lx\n", hres);
hres = IInternetProtocol_LockRequest(protocol, 0);
ok(hres == S_OK, "LockRequest failed: %08x\n", hres);
ok(hres == S_OK, "LockRequest failed: %08lx\n", hres);
hres = IInternetProtocol_UnlockRequest(protocol);
ok(hres == S_OK, "UnlockRequest failed: %08x\n", hres);
ok(hres == S_OK, "UnlockRequest failed: %08lx\n", hres);
hres = IInternetProtocol_Read(protocol, buf, sizeof(buf), &cb);
ok(hres == S_OK, "Read failed: %08x\n", hres);
ok(hres == S_OK, "Read failed: %08lx\n", hres);
protocol_start(protocol, blank_url);
hres = IInternetProtocol_LockRequest(protocol, 0);
ok(hres == S_OK, "LockRequest failed: %08x\n", hres);
ok(hres == S_OK, "LockRequest failed: %08lx\n", hres);
hres = IInternetProtocol_Terminate(protocol, 0);
ok(hres == S_OK, "Terminate failed: %08x\n", hres);
ok(hres == S_OK, "Terminate failed: %08lx\n", hres);
hres = IInternetProtocol_Read(protocol, buf, 2, &cb);
ok(hres == S_OK, "Read failed: %08x\n\n", hres);
ok(hres == S_OK, "Read failed: %08lx\n\n", hres);
hres = IInternetProtocol_UnlockRequest(protocol);
ok(hres == S_OK, "UnlockRequest failed: %08x\n", hres);
ok(hres == S_OK, "UnlockRequest failed: %08lx\n", hres);
hres = IInternetProtocol_Read(protocol, buf, 2, &cb);
ok(hres == S_OK, "Read failed: %08x\n", hres);
ok(hres == S_OK, "Read failed: %08lx\n", hres);
hres = IInternetProtocol_Terminate(protocol, 0);
ok(hres == S_OK, "Terminate failed: %08x\n", hres);
ok(hres == S_OK, "Terminate failed: %08lx\n", hres);
hres = IInternetProtocol_Read(protocol, buf, 2, &cb);
ok(hres == S_OK, "Read failed: %08x\n", hres);
ok(cb == 2, "cb=%u expected 2\n", cb);
ok(hres == S_OK, "Read failed: %08lx\n", hres);
ok(cb == 2, "cb=%lu expected 2\n", cb);
protocol_start(protocol, blank_url);
hres = IInternetProtocol_LockRequest(protocol, 0);
ok(hres == S_OK, "LockRequest failed: %08x\n", hres);
ok(hres == S_OK, "LockRequest failed: %08lx\n", hres);
hres = IInternetProtocol_Read(protocol, buf, sizeof(buf), &cb);
ok(hres == S_OK, "Read failed: %08x\n", hres);
ok(hres == S_OK, "Read failed: %08lx\n", hres);
protocol_start(protocol, blank_url);
hres = IInternetProtocol_Read(protocol, buf, sizeof(buf), &cb);
ok(hres == S_OK, "Read failed: %08x\n", hres);
ok(hres == S_OK, "Read failed: %08lx\n", hres);
hres = IInternetProtocol_Terminate(protocol, 0);
ok(hres == S_OK, "Terminate failed: %08x\n", hres);
ok(hres == S_OK, "Terminate failed: %08lx\n", hres);
IInternetProtocol_Release(protocol);
}
@ -665,43 +665,43 @@ static void do_test_about_protocol(IClassFactory *factory, DWORD bf)
bindf = bf;
hres = IClassFactory_CreateInstance(factory, NULL, &IID_IInternetProtocol, (void**)&protocol);
ok(hres == S_OK, "Could not get IInternetProtocol: %08x\n", hres);
ok(hres == S_OK, "Could not get IInternetProtocol: %08lx\n", hres);
if(FAILED(hres))
return;
hres = IInternetProtocol_QueryInterface(protocol, &IID_IInternetPriority, (void**)&priority);
ok(hres == E_NOINTERFACE,
"QueryInterface(IInternetPriority) returned %08x, expected E_NOINTEFACE\n", hres);
"QueryInterface(IInternetPriority) returned %08lx, expected E_NOINTEFACE\n", hres);
protocol_start(protocol, about_blank_url);
hres = IInternetProtocol_LockRequest(protocol, 0);
ok(hres == S_OK, "LockRequest failed: %08x\n", hres);
ok(hres == S_OK, "LockRequest failed: %08lx\n", hres);
hres = IInternetProtocol_Read(protocol, buf, sizeof(buf), &cb);
ok(hres == S_OK, "Read failed: %08x\n", hres);
ok(cb == sizeof(blank_html), "cb=%d\n", cb);
ok(hres == S_OK, "Read failed: %08lx\n", hres);
ok(cb == sizeof(blank_html), "cb=%ld\n", cb);
ok(!memcmp(buf, blank_html, cb), "Read wrong data\n");
hres = IInternetProtocol_UnlockRequest(protocol);
ok(hres == S_OK, "UnlockRequest failed: %08x\n", hres);
ok(hres == S_OK, "UnlockRequest failed: %08lx\n", hres);
protocol_start(protocol, about_test_url);
hres = IInternetProtocol_LockRequest(protocol, 0);
ok(hres == S_OK, "LockRequest failed: %08x\n", hres);
ok(hres == S_OK, "LockRequest failed: %08lx\n", hres);
hres = IInternetProtocol_Read(protocol, buf, sizeof(buf), &cb);
ok(hres == S_OK, "Read failed: %08x\n", hres);
ok(cb == sizeof(test_html), "cb=%d\n", cb);
ok(hres == S_OK, "Read failed: %08lx\n", hres);
ok(cb == sizeof(test_html), "cb=%ld\n", cb);
ok(!memcmp(buf, test_html, cb), "Read wrong data\n");
hres = IInternetProtocol_UnlockRequest(protocol);
ok(hres == S_OK, "UnlockRequest failed: %08x\n", hres);
ok(hres == S_OK, "UnlockRequest failed: %08lx\n", hres);
protocol_start(protocol, about_res_url);
hres = IInternetProtocol_LockRequest(protocol, 0);
ok(hres == S_OK, "LockRequest failed: %08x\n", hres);
ok(hres == S_OK, "LockRequest failed: %08lx\n", hres);
hres = IInternetProtocol_Read(protocol, buf, sizeof(buf), &cb);
ok(hres == S_OK, "Read failed: %08x\n", hres);
ok(cb == sizeof(blank_html), "cb=%d\n", cb);
ok(hres == S_OK, "Read failed: %08lx\n", hres);
ok(cb == sizeof(blank_html), "cb=%ld\n", cb);
ok(!memcmp(buf, blank_html, cb), "Read wrong data\n");
hres = IInternetProtocol_UnlockRequest(protocol);
ok(hres == S_OK, "UnlockRequest failed: %08x\n", hres);
ok(hres == S_OK, "UnlockRequest failed: %08lx\n", hres);
IInternetProtocol_Release(protocol);
}
@ -714,12 +714,12 @@ static void test_about_protocol(void)
HRESULT hres;
hres = CoGetClassObject(&CLSID_AboutProtocol, CLSCTX_INPROC_SERVER, NULL, &IID_IUnknown, (void**)&unk);
ok(hres == S_OK, "CoGetClassObject failed: %08x\n", hres);
ok(hres == S_OK, "CoGetClassObject failed: %08lx\n", hres);
if(FAILED(hres))
return;
hres = IUnknown_QueryInterface(unk, &IID_IInternetProtocolInfo, (void**)&protocol_info);
ok(hres == S_OK, "Could not get IInternetProtocolInfo interface: %08x\n", hres);
ok(hres == S_OK, "Could not get IInternetProtocolInfo interface: %08lx\n", hres);
if(SUCCEEDED(hres)) {
WCHAR buf[128];
DWORD size;
@ -730,37 +730,37 @@ static void test_about_protocol(void)
hres = IInternetProtocolInfo_ParseUrl(protocol_info, about_blank_url, i, 0, buf,
ARRAY_SIZE(buf), &size, 0);
ok(hres == INET_E_DEFAULT_ACTION,
"[%d] failed: %08x, expected INET_E_DEFAULT_ACTION\n", i, hres);
"[%d] failed: %08lx, expected INET_E_DEFAULT_ACTION\n", i, hres);
}
}
hres = IInternetProtocolInfo_ParseUrl(protocol_info, about_blank_url, PARSE_SECURITY_URL, 0, buf,
ARRAY_SIZE(buf), &size, 0);
ok(hres == S_OK, "ParseUrl failed: %08x\n", hres);
ok(hres == S_OK, "ParseUrl failed: %08lx\n", hres);
ok(!lstrcmpW(about_blank_url, buf), "buf != blank_url\n");
size = 0xdeadbeef;
hres = IInternetProtocolInfo_ParseUrl(protocol_info, about_blank_url, PARSE_SECURITY_URL, 0, buf,
3, &size, 0);
ok(hres == S_FALSE, "ParseUrl failed: %08x, expected S_FALSE\n", hres);
ok(size == 12, "size = %d\n", size);
ok(hres == S_FALSE, "ParseUrl failed: %08lx, expected S_FALSE\n", hres);
ok(size == 12, "size = %ld\n", size);
hres = IInternetProtocolInfo_ParseUrl(protocol_info, about_test_url, PARSE_SECURITY_URL, 0, buf,
ARRAY_SIZE(buf), &size, 0);
ok(hres == S_OK, "ParseUrl failed: %08x\n", hres);
ok(hres == S_OK, "ParseUrl failed: %08lx\n", hres);
ok(!lstrcmpW(about_test_url, buf), "buf != test_url\n");
ok(size == 11, "size = %d\n", size);
ok(size == 11, "size = %ld\n", size);
size = 0xdeadbeef;
buf[0] = '?';
hres = IInternetProtocolInfo_ParseUrl(protocol_info, about_blank_url, PARSE_DOMAIN, 0, buf,
ARRAY_SIZE(buf), &size, 0);
ok(hres == S_OK || hres == E_FAIL, "ParseUrl failed: %08x\n", hres);
ok(hres == S_OK || hres == E_FAIL, "ParseUrl failed: %08lx\n", hres);
ok(buf[0] == '?' || buf[0] == '\0' /* Win10 */,
"Expected buf to be unchanged or empty, got %s\n",
wine_dbgstr_w(buf));
ok(size == ARRAY_SIZE(about_blank_url) || size == ARRAY_SIZE(buf), /* IE8 */
"size=%d\n", size);
"size=%ld\n", size);
if (0)
{
@ -769,51 +769,51 @@ static void test_about_protocol(void)
buf[0] = '?';
hres = IInternetProtocolInfo_ParseUrl(protocol_info, NULL, PARSE_DOMAIN, 0, buf,
ARRAY_SIZE(buf), &size, 0);
ok(hres == E_FAIL, "ParseUrl failed: %08x\n", hres);
ok(hres == E_FAIL, "ParseUrl failed: %08lx\n", hres);
ok(buf[0] == '?', "buf changed\n");
ok(size == 1, "size=%u, expected 1\n", size);
ok(size == 1, "size=%lu, expected 1\n", size);
buf[0] = '?';
hres = IInternetProtocolInfo_ParseUrl(protocol_info, about_blank_url, PARSE_DOMAIN, 0, buf,
ARRAY_SIZE(buf), NULL, 0);
ok(hres == E_POINTER, "ParseUrl failed: %08x\n", hres);
ok(hres == E_POINTER, "ParseUrl failed: %08lx\n", hres);
ok(buf[0] == '?', "buf changed\n");
buf[0] = '?';
hres = IInternetProtocolInfo_ParseUrl(protocol_info, NULL, PARSE_DOMAIN, 0, buf,
ARRAY_SIZE(buf), NULL, 0);
ok(hres == E_POINTER, "ParseUrl failed: %08x\n", hres);
ok(hres == E_POINTER, "ParseUrl failed: %08lx\n", hres);
ok(buf[0] == '?', "buf changed\n");
}
hres = IInternetProtocolInfo_ParseUrl(protocol_info, about_blank_url, PARSE_UNESCAPE+1, 0, buf,
ARRAY_SIZE(buf), &size, 0);
ok(hres == INET_E_DEFAULT_ACTION,
"ParseUrl failed: %08x, expected INET_E_DEFAULT_ACTION\n", hres);
"ParseUrl failed: %08lx, expected INET_E_DEFAULT_ACTION\n", hres);
size = 0xdeadbeef;
hres = IInternetProtocolInfo_CombineUrl(protocol_info, about_blank_url, about_test_url,
0, buf, ARRAY_SIZE(buf), &size, 0);
ok(hres == INET_E_USE_DEFAULT_PROTOCOLHANDLER, "CombineUrl failed: %08x\n", hres);
ok(size == 0xdeadbeef, "size=%d\n", size);
ok(hres == INET_E_USE_DEFAULT_PROTOCOLHANDLER, "CombineUrl failed: %08lx\n", hres);
ok(size == 0xdeadbeef, "size=%ld\n", size);
size = 0xdeadbeef;
hres = IInternetProtocolInfo_CombineUrl(protocol_info, about_blank_url, about_test_url,
URL_FILE_USE_PATHURL, buf, ARRAY_SIZE(buf), &size, 0);
ok(hres == INET_E_USE_DEFAULT_PROTOCOLHANDLER, "CombineUrl failed: %08x\n", hres);
ok(size == 0xdeadbeef, "size=%d\n", size);
ok(hres == INET_E_USE_DEFAULT_PROTOCOLHANDLER, "CombineUrl failed: %08lx\n", hres);
ok(size == 0xdeadbeef, "size=%ld\n", size);
size = 0xdeadbeef;
hres = IInternetProtocolInfo_CombineUrl(protocol_info, NULL, NULL,
URL_FILE_USE_PATHURL, buf, ARRAY_SIZE(buf), &size, 0);
ok(hres == INET_E_USE_DEFAULT_PROTOCOLHANDLER, "CombineUrl failed: %08x\n", hres);
ok(size == 0xdeadbeef, "size=%d\n", size);
ok(hres == INET_E_USE_DEFAULT_PROTOCOLHANDLER, "CombineUrl failed: %08lx\n", hres);
ok(size == 0xdeadbeef, "size=%ld\n", size);
hres = IInternetProtocolInfo_CompareUrl(protocol_info, about_blank_url, about_blank_url, 0);
ok(hres == E_NOTIMPL, "CompareUrl failed: %08x\n", hres);
ok(hres == E_NOTIMPL, "CompareUrl failed: %08lx\n", hres);
hres = IInternetProtocolInfo_CompareUrl(protocol_info, NULL, NULL, 0xdeadbeef);
ok(hres == E_NOTIMPL, "CompareUrl failed: %08x\n", hres);
ok(hres == E_NOTIMPL, "CompareUrl failed: %08lx\n", hres);
for(i=0; i<30; i++) {
switch(i) {
@ -830,7 +830,7 @@ static void test_about_protocol(void)
default:
hres = IInternetProtocolInfo_QueryInfo(protocol_info, about_blank_url, i, 0,
buf, sizeof(buf), &size, 0);
ok(hres == E_FAIL, "QueryInfo(%d) returned: %08x, expected E_FAIL\n", i, hres);
ok(hres == E_FAIL, "QueryInfo(%d) returned: %08lx, expected E_FAIL\n", i, hres);
}
}
@ -838,33 +838,33 @@ static void test_about_protocol(void)
buf, sizeof(buf), &size, 0);
ok(hres == INET_E_USE_DEFAULT_PROTOCOLHANDLER ||
hres == E_FAIL, /* win2k */
"QueryInfo returned: %08x, expected INET_E_USE_DEFAULT_PROTOCOLHANDLER or E_FAIL\n", hres);
"QueryInfo returned: %08lx, expected INET_E_USE_DEFAULT_PROTOCOLHANDLER or E_FAIL\n", hres);
size = 0xdeadbeef;
memset(buf, '?', sizeof(buf));
hres = IInternetProtocolInfo_QueryInfo(protocol_info, about_blank_url, QUERY_USES_NETWORK, 0,
buf, sizeof(buf), &size, 0);
ok(hres == S_OK, "QueryInfo(QUERY_USES_NETWORK) failed: %08x\n", hres);
ok(size == sizeof(DWORD), "size=%d\n", size);
ok(!*(DWORD*)buf, "buf=%d\n", *(DWORD*)buf);
ok(hres == S_OK, "QueryInfo(QUERY_USES_NETWORK) failed: %08lx\n", hres);
ok(size == sizeof(DWORD), "size=%ld\n", size);
ok(!*(DWORD*)buf, "buf=%ld\n", *(DWORD*)buf);
memset(buf, '?', sizeof(buf));
hres = IInternetProtocolInfo_QueryInfo(protocol_info, about_blank_url, QUERY_USES_NETWORK, 0,
buf, sizeof(buf), NULL, 0);
ok(hres == S_OK, "QueryInfo(QUERY_USES_NETWORK) failed: %08x\n", hres);
ok(!*(DWORD*)buf, "buf=%d\n", *(DWORD*)buf);
ok(hres == S_OK, "QueryInfo(QUERY_USES_NETWORK) failed: %08lx\n", hres);
ok(!*(DWORD*)buf, "buf=%ld\n", *(DWORD*)buf);
hres = IInternetProtocolInfo_QueryInfo(protocol_info, about_blank_url, QUERY_USES_NETWORK, 0,
buf, 3, &size, 0);
ok(hres == E_FAIL, "QueryInfo(QUERY_USES_NETWORK) failed: %08x, expected E_FAIL\n", hres);
ok(hres == E_FAIL, "QueryInfo(QUERY_USES_NETWORK) failed: %08lx, expected E_FAIL\n", hres);
hres = IInternetProtocolInfo_QueryInfo(protocol_info, about_blank_url, QUERY_USES_NETWORK, 0,
NULL, sizeof(buf), &size, 0);
ok(hres == E_FAIL, "QueryInfo(QUERY_USES_NETWORK) failed: %08x, expected E_FAIL\n", hres);
ok(hres == E_FAIL, "QueryInfo(QUERY_USES_NETWORK) failed: %08lx, expected E_FAIL\n", hres);
hres = IInternetProtocolInfo_QueryInfo(protocol_info, about_blank_url, 60, 0,
NULL, sizeof(buf), &size, 0);
ok(hres == E_FAIL, "QueryInfo failed: %08x, expected E_FAIL\n", hres);
ok(hres == E_FAIL, "QueryInfo failed: %08lx, expected E_FAIL\n", hres);
IInternetProtocolInfo_Release(protocol_info);
}
@ -890,12 +890,12 @@ static void test_javascript_protocol(void)
HRESULT hres;
hres = CoGetClassObject(&CLSID_JSProtocol, CLSCTX_INPROC_SERVER, NULL, &IID_IUnknown, (void**)&unk);
ok(hres == S_OK, "CoGetClassObject failed: %08x\n", hres);
ok(hres == S_OK, "CoGetClassObject failed: %08lx\n", hres);
if(FAILED(hres))
return;
hres = IUnknown_QueryInterface(unk, &IID_IInternetProtocolInfo, (void**)&protocol_info);
ok(hres == S_OK, "Could not get IInternetProtocolInfo interface: %08x\n", hres);
ok(hres == S_OK, "Could not get IInternetProtocolInfo interface: %08lx\n", hres);
if(SUCCEEDED(hres)) {
WCHAR buf[128];
DWORD size;
@ -906,23 +906,23 @@ static void test_javascript_protocol(void)
hres = IInternetProtocolInfo_ParseUrl(protocol_info, javascript_test_url, i, 0, buf,
ARRAY_SIZE(buf), &size, 0);
ok(hres == INET_E_DEFAULT_ACTION,
"[%d] failed: %08x, expected INET_E_DEFAULT_ACTION\n", i, hres);
"[%d] failed: %08lx, expected INET_E_DEFAULT_ACTION\n", i, hres);
}
}
hres = IInternetProtocolInfo_ParseUrl(protocol_info, javascript_test_url, PARSE_UNESCAPE+1, 0, buf,
ARRAY_SIZE(buf), &size, 0);
ok(hres == INET_E_DEFAULT_ACTION,
"ParseUrl failed: %08x, expected INET_E_DEFAULT_ACTION\n", hres);
"ParseUrl failed: %08lx, expected INET_E_DEFAULT_ACTION\n", hres);
size = 0xdeadbeef;
hres = IInternetProtocolInfo_CombineUrl(protocol_info, javascript_test_url, javascript_test_url,
0, buf, ARRAY_SIZE(buf), &size, 0);
ok(hres == INET_E_USE_DEFAULT_PROTOCOLHANDLER, "CombineUrl failed: %08x\n", hres);
ok(size == 0xdeadbeef, "size=%d\n", size);
ok(hres == INET_E_USE_DEFAULT_PROTOCOLHANDLER, "CombineUrl failed: %08lx\n", hres);
ok(size == 0xdeadbeef, "size=%ld\n", size);
hres = IInternetProtocolInfo_CompareUrl(protocol_info, javascript_test_url, javascript_test_url, 0);
ok(hres == E_NOTIMPL, "CompareUrl failed: %08x\n", hres);
ok(hres == E_NOTIMPL, "CompareUrl failed: %08lx\n", hres);
for(i=0; i<30; i++) {
switch(i) {
@ -933,7 +933,7 @@ static void test_javascript_protocol(void)
hres = IInternetProtocolInfo_QueryInfo(protocol_info, javascript_test_url, i, 0,
buf, sizeof(buf), &size, 0);
ok(hres == INET_E_USE_DEFAULT_PROTOCOLHANDLER,
"QueryInfo(%d) returned: %08x, expected INET_E_USE_DEFAULT_PROTOCOLHANDLER\n", i, hres);
"QueryInfo(%d) returned: %08lx, expected INET_E_USE_DEFAULT_PROTOCOLHANDLER\n", i, hres);
}
}
@ -941,28 +941,28 @@ static void test_javascript_protocol(void)
memset(buf, '?', sizeof(buf));
hres = IInternetProtocolInfo_QueryInfo(protocol_info, javascript_test_url, QUERY_USES_NETWORK, 0,
buf, sizeof(buf), &size, 0);
ok(hres == S_OK, "QueryInfo(QUERY_USES_NETWORK) failed: %08x\n", hres);
ok(size == sizeof(DWORD), "size=%d\n", size);
ok(!*(DWORD*)buf, "buf=%d\n", *(DWORD*)buf);
ok(hres == S_OK, "QueryInfo(QUERY_USES_NETWORK) failed: %08lx\n", hres);
ok(size == sizeof(DWORD), "size=%ld\n", size);
ok(!*(DWORD*)buf, "buf=%ld\n", *(DWORD*)buf);
memset(buf, '?', sizeof(buf));
hres = IInternetProtocolInfo_QueryInfo(protocol_info, javascript_test_url, QUERY_USES_NETWORK, 0,
buf, sizeof(buf), NULL, 0);
ok(hres == S_OK, "QueryInfo(QUERY_USES_NETWORK) failed: %08x\n", hres);
ok(!*(DWORD*)buf, "buf=%d\n", *(DWORD*)buf);
ok(hres == S_OK, "QueryInfo(QUERY_USES_NETWORK) failed: %08lx\n", hres);
ok(!*(DWORD*)buf, "buf=%ld\n", *(DWORD*)buf);
hres = IInternetProtocolInfo_QueryInfo(protocol_info, javascript_test_url, QUERY_USES_NETWORK, 0,
buf, 3, &size, 0);
ok(hres == E_FAIL, "QueryInfo(QUERY_USES_NETWORK) failed: %08x, expected E_FAIL\n", hres);
ok(hres == E_FAIL, "QueryInfo(QUERY_USES_NETWORK) failed: %08lx, expected E_FAIL\n", hres);
hres = IInternetProtocolInfo_QueryInfo(protocol_info, javascript_test_url, QUERY_USES_NETWORK, 0,
NULL, sizeof(buf), &size, 0);
ok(hres == E_FAIL, "QueryInfo(QUERY_USES_NETWORK) failed: %08x, expected E_FAIL\n", hres);
ok(hres == E_FAIL, "QueryInfo(QUERY_USES_NETWORK) failed: %08lx, expected E_FAIL\n", hres);
hres = IInternetProtocolInfo_QueryInfo(protocol_info, javascript_test_url, 60, 0,
NULL, sizeof(buf), &size, 0);
ok(hres == INET_E_USE_DEFAULT_PROTOCOLHANDLER,
"QueryInfo failed: %08x, expected INET_E_USE_DEFAULT_PROTOCOLHANDLER\n", hres);
"QueryInfo failed: %08lx, expected INET_E_USE_DEFAULT_PROTOCOLHANDLER\n", hres);
/* FIXME: test QUERY_IS_SECURE */
@ -1014,18 +1014,18 @@ static void test_com_aggregation(const CLSID *clsid)
HRESULT hres;
hres = CoGetClassObject(clsid, CLSCTX_INPROC_SERVER, NULL, &IID_IClassFactory, (void**)&class_factory);
ok(hres == S_OK, "CoGetClassObject failed: %08x\n", hres);
ok(hres == S_OK, "CoGetClassObject failed: %08lx\n", hres);
hres = IClassFactory_CreateInstance(class_factory, &outer, &IID_IUnknown, (void**)&unk);
ok(hres == S_OK, "CreateInstance returned: %08x\n", hres);
ok(hres == S_OK, "CreateInstance returned: %08lx\n", hres);
hres = IUnknown_QueryInterface(unk, &IID_IInternetProtocol, (void**)&unk2);
ok(hres == S_OK, "Could not get IDispatch iface: %08x\n", hres);
ok(hres == S_OK, "Could not get IDispatch iface: %08lx\n", hres);
SET_EXPECT(outer_QI_test);
hres = IUnknown_QueryInterface(unk2, &outer_test_iid, (void**)&unk3);
CHECK_CALLED(outer_QI_test);
ok(hres == S_OK, "Could not get IInternetProtocol iface: %08x\n", hres);
ok(hres == S_OK, "Could not get IInternetProtocol iface: %08lx\n", hres);
ok(unk3 == (IUnknown*)0xdeadbeef, "unexpected unk2\n");
IUnknown_Release(unk2);
@ -1033,7 +1033,7 @@ static void test_com_aggregation(const CLSID *clsid)
unk = (void*)0xdeadbeef;
hres = IClassFactory_CreateInstance(class_factory, &outer, &IID_IInternetProtocol, (void**)&unk);
ok(hres == E_INVALIDARG, "CreateInstance returned: %08x\n", hres);
ok(hres == E_INVALIDARG, "CreateInstance returned: %08lx\n", hres);
ok(!unk, "unk = %p\n", unk);
IClassFactory_Release(class_factory);

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -72,23 +72,23 @@ static void _test_disp(unsigned line, IUnknown *unk, const IID *diid, const IID
HRESULT hres;
hres = IUnknown_QueryInterface(unk, &IID_IDispatchEx, (void**)&dispex);
ok_(__FILE__,line) (hres == S_OK, "Could not get IDispatch: %08x\n", hres);
ok_(__FILE__,line) (hres == S_OK, "Could not get IDispatch: %08lx\n", hres);
if(FAILED(hres))
return;
ticnt = 0xdeadbeef;
hres = IDispatchEx_GetTypeInfoCount(dispex, &ticnt);
ok_(__FILE__,line) (hres == S_OK, "GetTypeInfoCount failed: %08x\n", hres);
ok_(__FILE__,line) (hres == S_OK, "GetTypeInfoCount failed: %08lx\n", hres);
ok_(__FILE__,line) (ticnt == 1, "ticnt=%u\n", ticnt);
hres = IDispatchEx_GetTypeInfo(dispex, 0, 0, &typeinfo);
ok_(__FILE__,line) (hres == S_OK, "GetTypeInfo failed: %08x\n", hres);
ok_(__FILE__,line) (hres == S_OK, "GetTypeInfo failed: %08lx\n", hres);
if(SUCCEEDED(hres)) {
TYPEATTR *type_attr;
hres = ITypeInfo_GetTypeAttr(typeinfo, &type_attr);
ok_(__FILE__,line) (hres == S_OK, "GetTypeAttr failed: %08x\n", hres);
ok_(__FILE__,line) (hres == S_OK, "GetTypeAttr failed: %08lx\n", hres);
ok_(__FILE__,line) (IsEqualGUID(&type_attr->guid, diid)
|| broken(broken_diid && IsEqualGUID(&type_attr->guid, broken_diid)),
"unexpected guid %s\n", wine_dbgstr_guid(&type_attr->guid));
@ -104,12 +104,12 @@ static void _test_disp(unsigned line, IUnknown *unk, const IID *diid, const IID
static void _test_event_args(unsigned line, const IID *dispiid, const IID *broken_dispiid, DISPID id, WORD wFlags,
DISPPARAMS *pdp, VARIANT *pvarRes, EXCEPINFO *pei, IServiceProvider *pspCaller)
{
ok_(__FILE__,line) (id == DISPID_VALUE, "id = %d\n", id);
ok_(__FILE__,line) (id == DISPID_VALUE, "id = %ld\n", id);
ok_(__FILE__,line) (wFlags == DISPATCH_METHOD, "wFlags = %x\n", wFlags);
ok_(__FILE__,line) (pdp != NULL, "pdp == NULL\n");
ok_(__FILE__,line) (pdp->cArgs == 1, "pdp->cArgs = %d\n", pdp->cArgs);
ok_(__FILE__,line) (pdp->cNamedArgs == 1, "pdp->cNamedArgs = %d\n", pdp->cNamedArgs);
ok_(__FILE__,line) (pdp->rgdispidNamedArgs[0] == DISPID_THIS, "pdp->rgdispidNamedArgs[0] = %d\n",
ok_(__FILE__,line) (pdp->rgdispidNamedArgs[0] == DISPID_THIS, "pdp->rgdispidNamedArgs[0] = %ld\n",
pdp->rgdispidNamedArgs[0]);
ok_(__FILE__,line) (V_VT(pdp->rgvarg) == VT_DISPATCH, "V_VT(rgvarg) = %d\n", V_VT(pdp->rgvarg));
ok_(__FILE__,line) (pvarRes != NULL, "pvarRes == NULL\n");
@ -180,7 +180,7 @@ static HRESULT WINAPI DispatchEx_GetDispID(IDispatchEx *iface, BSTR bstrName, DW
static HRESULT WINAPI DispatchEx_DeleteMemberByName(IDispatchEx *iface, BSTR bstrName, DWORD grfdex)
{
ok(0, "unexpected call %s %x\n", wine_dbgstr_w(bstrName), grfdex);
ok(0, "unexpected call %s %lx\n", wine_dbgstr_w(bstrName), grfdex);
return E_NOTIMPL;
}
@ -223,7 +223,7 @@ static HRESULT WINAPI xmlhttprequest_onreadystatechange(IDispatchEx *iface, DISP
test_event_args(&DIID_DispHTMLXMLHttpRequest, &IID_IHTMLXMLHttpRequest, id, wFlags, pdp, pvarRes, pei, pspCaller);
hres = IHTMLXMLHttpRequest_get_readyState(xhr, &val);
ok(hres == S_OK, "get_readyState failed: %08x\n", hres);
ok(hres == S_OK, "get_readyState failed: %08lx\n", hres);
readystatechange_cnt++;
switch(val) {
@ -241,7 +241,7 @@ static HRESULT WINAPI xmlhttprequest_onreadystatechange(IDispatchEx *iface, DISP
CHECK_EXPECT(xmlhttprequest_onreadystatechange_done);
break;
default:
ok(0, "unexpected readyState: %d\n", val);
ok(0, "unexpected readyState: %ld\n", val);
}
return S_OK;
}
@ -297,7 +297,7 @@ static HRESULT WINAPI PropertyNotifySink_OnChanged(IPropertyNotifySink *iface, D
HRESULT hres;
hres = IHTMLDocument2_get_readyState(notif_doc, &state);
ok(hres == S_OK, "get_readyState failed: %08x\n", hres);
ok(hres == S_OK, "get_readyState failed: %08lx\n", hres);
if(!lstrcmpW(state, L"complete"))
doc_complete = TRUE;
@ -332,15 +332,15 @@ static void do_advise(IUnknown *unk, REFIID riid, IUnknown *unk_advise)
HRESULT hres;
hres = IUnknown_QueryInterface(unk, &IID_IConnectionPointContainer, (void**)&container);
ok(hres == S_OK, "QueryInterface(IID_IConnectionPointContainer) failed: %08x\n", hres);
ok(hres == S_OK, "QueryInterface(IID_IConnectionPointContainer) failed: %08lx\n", hres);
hres = IConnectionPointContainer_FindConnectionPoint(container, riid, &cp);
IConnectionPointContainer_Release(container);
ok(hres == S_OK, "FindConnectionPoint failed: %08x\n", hres);
ok(hres == S_OK, "FindConnectionPoint failed: %08lx\n", hres);
hres = IConnectionPoint_Advise(cp, unk_advise, &cookie);
IConnectionPoint_Release(cp);
ok(hres == S_OK, "Advise failed: %08x\n", hres);
ok(hres == S_OK, "Advise failed: %08lx\n", hres);
}
static void pump_msgs(BOOL *b)
@ -375,7 +375,7 @@ static void create_xmlhttprequest(IHTMLDocument2 *doc)
HRESULT hres;
hres = IHTMLDocument2_get_parentWindow(doc, &window);
ok(hres == S_OK, "get_parentWindow failed: %08x\n", hres);
ok(hres == S_OK, "get_parentWindow failed: %08lx\n", hres);
ok(window != NULL, "window == NULL\n");
hres = IHTMLWindow2_QueryInterface(window, &IID_IHTMLWindow5, (void**)&window5);
@ -388,17 +388,17 @@ static void create_xmlhttprequest(IHTMLDocument2 *doc)
VariantInit(&var);
hres = IHTMLWindow5_get_XMLHttpRequest(window5, &var);
IHTMLWindow5_Release(window5);
ok(hres == S_OK, "get_XMLHttpRequest failed: %08x\n", hres);
ok(hres == S_OK, "get_XMLHttpRequest failed: %08lx\n", hres);
ok(V_VT(&var) == VT_DISPATCH, "V_VT(&var) is %08x, expected VT_DISPATCH\n", V_VT(&var));
hres = IDispatch_QueryInterface(V_DISPATCH(&var), &IID_IHTMLXMLHttpRequestFactory, (void**)&factory);
VariantClear(&var);
ok(hres == S_OK, "QueryInterface(IID_IHTMLXMLHttpRequestFactory) failed: %08x\n", hres);
ok(hres == S_OK, "QueryInterface(IID_IHTMLXMLHttpRequestFactory) failed: %08lx\n", hres);
ok(factory != NULL, "factory == NULL\n");
hres = IHTMLXMLHttpRequestFactory_create(factory, &xhr);
IHTMLXMLHttpRequestFactory_Release(factory);
ok(hres == S_OK, "create failed: %08x\n", hres);
ok(hres == S_OK, "create failed: %08lx\n", hres);
ok(xhr != NULL, "xhr == NULL\n");
}
@ -411,14 +411,14 @@ static void test_header(const struct HEADER_TYPE expect[], int num)
all = NULL;
hres = IHTMLXMLHttpRequest_getAllResponseHeaders(xhr, &all);
ok(hres == S_OK, "getAllResponseHeader failed: %08x\n", hres);
ok(hres == S_OK, "getAllResponseHeader failed: %08lx\n", hres);
ok(all != NULL, "all == NULL\n");
for(i = 0; i < num; ++i) {
text = NULL;
key = SysAllocString(expect[i].key);
hres = IHTMLXMLHttpRequest_getResponseHeader(xhr, key, &text);
ok(hres == S_OK, "getResponseHeader failed, got %08x\n", hres);
ok(hres == S_OK, "getResponseHeader failed, got %08lx\n", hres);
ok(text != NULL, "text == NULL\n");
ok(!lstrcmpW(text, expect[i].value),
"Expect %s: %s, got %s\n", wine_dbgstr_w(expect[i].key), wine_dbgstr_w(expect[i].value),
@ -442,16 +442,16 @@ static void test_illegal_xml(IXMLDOMDocument *xmldom)
BSTR bstr;
hres = IXMLDOMDocument_get_baseName(xmldom, NULL);
ok(hres == E_INVALIDARG, "Expect E_INVALIDARG, got %08x\n", hres);
ok(hres == E_INVALIDARG, "Expect E_INVALIDARG, got %08lx\n", hres);
hres = IXMLDOMDocument_get_baseName(xmldom, &bstr);
ok(hres == S_FALSE, "get_baseName failed: %08x\n", hres);
ok(hres == S_FALSE, "get_baseName failed: %08lx\n", hres);
ok(bstr == NULL, "bstr(%p): %s\n", bstr, wine_dbgstr_w(bstr));
SysFreeString(bstr);
hres = IXMLDOMDocument_get_dataType(xmldom, NULL);
ok(hres == E_INVALIDARG, "Expect E_INVALIDARG, got %08x\n", hres);
ok(hres == E_INVALIDARG, "Expect E_INVALIDARG, got %08lx\n", hres);
hres = IXMLDOMDocument_get_dataType(xmldom, &variant);
ok(hres == S_FALSE, "get_dataType failed: %08x\n", hres);
ok(hres == S_FALSE, "get_dataType failed: %08lx\n", hres);
ok(V_VT(&variant) == VT_NULL, "got %s\n", wine_dbgstr_variant(&variant));
VariantClear(&variant);
@ -460,16 +460,16 @@ static void test_illegal_xml(IXMLDOMDocument *xmldom)
SysFreeString(bstr);
hres = IXMLDOMDocument_get_firstChild(xmldom, NULL);
ok(hres == E_INVALIDARG, "Expect E_INVALIDARG, got %08x\n", hres);
ok(hres == E_INVALIDARG, "Expect E_INVALIDARG, got %08lx\n", hres);
first = (void*)0xdeadbeef;
hres = IXMLDOMDocument_get_firstChild(xmldom, &first);
ok(hres == S_FALSE, "get_firstChild failed: %08x\n", hres);
ok(hres == S_FALSE, "get_firstChild failed: %08lx\n", hres);
ok(first == NULL, "first != NULL\n");
last = (void*)0xdeadbeef;
hres = IXMLDOMDocument_get_lastChild(xmldom, &last);
ok(hres == S_FALSE, "get_lastChild failed: %08x\n", hres);
ok(hres == S_FALSE, "get_lastChild failed: %08lx\n", hres);
ok(last == NULL, "last != NULL\n");
}
@ -480,7 +480,7 @@ static void _set_request_header(unsigned line, IHTMLXMLHttpRequest *xhr, const W
HRESULT hres;
hres = IHTMLXMLHttpRequest_setRequestHeader(xhr, header, value);
ok_(__FILE__,line)(hres == S_OK, "setRequestHeader failed: %08x\n", hres);
ok_(__FILE__,line)(hres == S_OK, "setRequestHeader failed: %08lx\n", hres);
SysFreeString(header);
SysFreeString(value);
@ -496,23 +496,23 @@ static void test_responseXML(const WCHAR *expect_text)
disp = NULL;
hres = IHTMLXMLHttpRequest_get_responseXML(xhr, &disp);
ok(hres == S_OK, "get_responseXML failed: %08x\n", hres);
ok(hres == S_OK, "get_responseXML failed: %08lx\n", hres);
ok(disp != NULL, "disp == NULL\n");
xmldom = NULL;
hres = IDispatch_QueryInterface(disp, &IID_IXMLDOMDocument, (void**)&xmldom);
ok(hres == S_OK, "QueryInterface(IXMLDOMDocument) failed: %08x\n", hres);
ok(hres == S_OK, "QueryInterface(IXMLDOMDocument) failed: %08lx\n", hres);
ok(xmldom != NULL, "xmldom == NULL\n");
hres = IXMLDOMDocument_QueryInterface(xmldom, &IID_IObjectSafety, (void**)&safety);
ok(hres == S_OK, "QueryInterface IObjectSafety failed: %08x\n", hres);
ok(hres == S_OK, "QueryInterface IObjectSafety failed: %08lx\n", hres);
hres = IObjectSafety_GetInterfaceSafetyOptions(safety, NULL, &supported, &enabled);
ok(hres == S_OK, "GetInterfaceSafetyOptions failed: %08x\n", hres);
ok(hres == S_OK, "GetInterfaceSafetyOptions failed: %08lx\n", hres);
ok(broken(supported == (INTERFACESAFE_FOR_UNTRUSTED_CALLER | INTERFACESAFE_FOR_UNTRUSTED_DATA)) ||
supported == (INTERFACESAFE_FOR_UNTRUSTED_CALLER | INTERFACESAFE_FOR_UNTRUSTED_DATA | INTERFACE_USES_SECURITY_MANAGER) /* msxml3 SP8+ */,
"Expected supported: (INTERFACESAFE_FOR_UNTRUSTED_CALLER | INTERFACESAFE_FOR_UNTRUSTED_DATA | INTERFACE_USES_SECURITY_MANAGER), got %08x\n", supported);
"Expected supported: (INTERFACESAFE_FOR_UNTRUSTED_CALLER | INTERFACESAFE_FOR_UNTRUSTED_DATA | INTERFACE_USES_SECURITY_MANAGER), got %08lx\n", supported);
ok(enabled == ((INTERFACESAFE_FOR_UNTRUSTED_CALLER | INTERFACESAFE_FOR_UNTRUSTED_DATA | INTERFACE_USES_SECURITY_MANAGER) & supported),
"Expected enabled: (INTERFACESAFE_FOR_UNTRUSTED_CALLER | INTERFACESAFE_FOR_UNTRUSTED_DATA | INTERFACE_USES_SECURITY_MANAGER), got 0x%08x\n", enabled);
"Expected enabled: (INTERFACESAFE_FOR_UNTRUSTED_CALLER | INTERFACESAFE_FOR_UNTRUSTED_DATA | INTERFACE_USES_SECURITY_MANAGER), got 0x%08lx\n", enabled);
IObjectSafety_Release(safety);
if(!expect_text)
@ -535,7 +535,7 @@ static HRESULT _xhr_open(unsigned line, const WCHAR *url_w, const WCHAR *method_
V_VT(&empty) = VT_EMPTY;
hres = IHTMLXMLHttpRequest_open(xhr, method, url, async, empty, empty);
ok_(__FILE__,line)(hres == S_OK, "open failed: %08x\n", hres);
ok_(__FILE__,line)(hres == S_OK, "open failed: %08lx\n", hres);
SysFreeString(method);
SysFreeString(url);
@ -549,7 +549,7 @@ static void _test_response_text(unsigned line, const WCHAR *expect_text)
HRESULT hres;
hres = IHTMLXMLHttpRequest_get_responseText(xhr, &text);
ok(hres == S_OK, "get_responseText failed: %08x\n", hres);
ok(hres == S_OK, "get_responseText failed: %08lx\n", hres);
ok(text != NULL, "test == NULL\n");
if(expect_text) {
unsigned len;
@ -583,51 +583,51 @@ static void test_sync_xhr(IHTMLDocument2 *doc, const WCHAR *xml_url, const WCHAR
V_VT(&var) = VT_EMPTY;
hres = IHTMLXMLHttpRequest_get_onreadystatechange(xhr, &var);
ok(hres == S_OK, "get_onreadystatechange failed: %08x\n", hres);
ok(hres == S_OK, "get_onreadystatechange failed: %08lx\n", hres);
ok(V_VT(&var) == VT_NULL, "V_VT(onreadystatechange) = %d\n", V_VT(&var));
V_VT(&var) = VT_DISPATCH;
V_DISPATCH(&var) = (IDispatch*)&xmlhttprequest_onreadystatechange_obj;
hres = IHTMLXMLHttpRequest_put_onreadystatechange(xhr, var);
ok(hres == S_OK, "put_onreadystatechange failed: %08x\n", hres);
ok(hres == S_OK, "put_onreadystatechange failed: %08lx\n", hres);
V_VT(&var) = VT_EMPTY;
hres = IHTMLXMLHttpRequest_get_onreadystatechange(xhr, &var);
ok(hres == S_OK, "get_onreadystatechange failed: %08x\n", hres);
ok(hres == S_OK, "get_onreadystatechange failed: %08lx\n", hres);
ok(V_VT(&var) == VT_DISPATCH, "V_VT(onreadystatechange) = %d\n", V_VT(&var));
ok(V_DISPATCH(&var) == (IDispatch*)&xmlhttprequest_onreadystatechange_obj, "unexpected onreadystatechange value\n");
hres = IHTMLXMLHttpRequest_get_readyState(xhr, NULL);
ok(hres == E_POINTER, "Expect E_POINTER, got %08x\n", hres);
ok(hres == E_POINTER, "Expect E_POINTER, got %08lx\n", hres);
val = 0xdeadbeef;
hres = IHTMLXMLHttpRequest_get_readyState(xhr, &val);
ok(hres == S_OK, "get_readyState failed: %08x\n", hres);
ok(val == 0, "Expect UNSENT, got %d\n", val);
ok(hres == S_OK, "get_readyState failed: %08lx\n", hres);
ok(val == 0, "Expect UNSENT, got %ld\n", val);
hres = IHTMLXMLHttpRequest_get_status(xhr, NULL);
ok(hres == E_POINTER, "Expect E_POINTER, got %08x\n", hres);
ok(hres == E_POINTER, "Expect E_POINTER, got %08lx\n", hres);
val = 0xdeadbeef;
hres = IHTMLXMLHttpRequest_get_status(xhr, &val);
ok(hres == E_FAIL, "Expect E_FAIL, got: %08x\n", hres);
ok(val == 0, "Expect 0, got %d\n", val);
ok(hres == E_FAIL, "Expect E_FAIL, got: %08lx\n", hres);
ok(val == 0, "Expect 0, got %ld\n", val);
hres = IHTMLXMLHttpRequest_get_statusText(xhr, NULL);
ok(hres == E_POINTER, "Expect E_POINTER, got %08x\n", hres);
ok(hres == E_POINTER, "Expect E_POINTER, got %08lx\n", hres);
hres = IHTMLXMLHttpRequest_get_statusText(xhr, &text);
ok(hres == E_FAIL, "Expect E_FAIL, got: %08x\n", hres);
ok(hres == E_FAIL, "Expect E_FAIL, got: %08lx\n", hres);
ok(text == NULL, "Expect NULL, got %p\n", text);
text = (BSTR)0xdeadbeef;
hres = IHTMLXMLHttpRequest_getAllResponseHeaders(xhr, &text);
ok(hres == E_FAIL, "got %08x\n", hres);
ok(hres == E_FAIL, "got %08lx\n", hres);
ok(text == NULL, "text = %p\n", text);
text = (BSTR)0xdeadbeef;
hres = IHTMLXMLHttpRequest_getResponseHeader(xhr, content_type, &text);
ok(hres == E_FAIL, "got %08x\n", hres);
ok(hres == E_FAIL, "got %08lx\n", hres);
ok(text == NULL, "text = %p\n", text);
method = SysAllocString(L"GET");
@ -638,7 +638,7 @@ static void test_sync_xhr(IHTMLDocument2 *doc, const WCHAR *xml_url, const WCHAR
SET_EXPECT(xmlhttprequest_onreadystatechange_opened);
hres = IHTMLXMLHttpRequest_open(xhr, method, url, vbool, vempty, vempty);
todo_wine ok(hres == S_OK, "open failed: %08x\n", hres); /* Gecko 30+ only supports async */
todo_wine ok(hres == S_OK, "open failed: %08lx\n", hres); /* Gecko 30+ only supports async */
todo_wine CHECK_CALLED(xmlhttprequest_onreadystatechange_opened);
SysFreeString(method);
@ -652,27 +652,27 @@ static void test_sync_xhr(IHTMLDocument2 *doc, const WCHAR *xml_url, const WCHAR
text = (BSTR)0xdeadbeef;
hres = IHTMLXMLHttpRequest_getAllResponseHeaders(xhr, &text);
ok(hres == E_FAIL, "got %08x\n", hres);
ok(hres == E_FAIL, "got %08lx\n", hres);
ok(text == NULL, "text = %p\n", text);
text = (BSTR)0xdeadbeef;
hres = IHTMLXMLHttpRequest_getResponseHeader(xhr, content_type, &text);
ok(hres == E_FAIL, "got %08x\n", hres);
ok(hres == E_FAIL, "got %08lx\n", hres);
ok(text == NULL, "text = %p\n", text);
val = 0xdeadbeef;
hres = IHTMLXMLHttpRequest_get_status(xhr, &val);
ok(hres == E_FAIL, "Expect E_FAIL, got: %08x\n", hres);
ok(val == 0, "Expect 0, got %d\n", val);
ok(hres == E_FAIL, "Expect E_FAIL, got: %08lx\n", hres);
ok(val == 0, "Expect 0, got %ld\n", val);
hres = IHTMLXMLHttpRequest_get_statusText(xhr, &text);
ok(hres == E_FAIL, "Expect E_FAIL, got: %08x\n", hres);
ok(hres == E_FAIL, "Expect E_FAIL, got: %08lx\n", hres);
ok(text == NULL, "Expect NULL, got %p\n", text);
val = 0xdeadbeef;
hres = IHTMLXMLHttpRequest_get_readyState(xhr, &val);
ok(hres == S_OK, "get_readyState failed: %08x\n", hres);
ok(val == 1, "Expect OPENED, got %d\n", val);
ok(hres == S_OK, "get_readyState failed: %08lx\n", hres);
ok(val == 1, "Expect OPENED, got %ld\n", val);
set_request_header(xhr, L"x-wine-test", L"sync-test");
@ -682,7 +682,7 @@ static void test_sync_xhr(IHTMLDocument2 *doc, const WCHAR *xml_url, const WCHAR
SET_EXPECT(xmlhttprequest_onreadystatechange_done);
loading_cnt = 0;
hres = IHTMLXMLHttpRequest_send(xhr, vempty);
ok(hres == S_OK, "send failed: %08x\n", hres);
ok(hres == S_OK, "send failed: %08lx\n", hres);
CHECK_CALLED(xmlhttprequest_onreadystatechange_opened);
CHECK_CALLED(xmlhttprequest_onreadystatechange_headers_received);
CHECK_CALLED(xmlhttprequest_onreadystatechange_loading);
@ -691,7 +691,7 @@ static void test_sync_xhr(IHTMLDocument2 *doc, const WCHAR *xml_url, const WCHAR
text = NULL;
hres = IHTMLXMLHttpRequest_getResponseHeader(xhr, content_type, &text);
ok(hres == S_OK, "getResponseHeader failed, got %08x\n", hres);
ok(hres == S_OK, "getResponseHeader failed, got %08lx\n", hres);
ok(text != NULL, "text == NULL\n");
SysFreeString(text);
@ -700,11 +700,11 @@ static void test_sync_xhr(IHTMLDocument2 *doc, const WCHAR *xml_url, const WCHAR
val = 0xdeadbeef;
hres = IHTMLXMLHttpRequest_get_status(xhr, &val);
ok(hres == S_OK, "get_status failed: %08x\n", hres);
ok(val == 200, "Expect 200, got %d\n", val);
ok(hres == S_OK, "get_status failed: %08lx\n", hres);
ok(val == 200, "Expect 200, got %ld\n", val);
hres = IHTMLXMLHttpRequest_get_statusText(xhr, &text);
ok(hres == S_OK, "get_statusText failed: %08x\n", hres);
ok(hres == S_OK, "get_statusText failed: %08lx\n", hres);
ok(text != NULL, "text == NULL\n");
ok(!lstrcmpW(text, L"OK"),
"Expected \"OK\", got %s\n", wine_dbgstr_w(text));
@ -712,8 +712,8 @@ static void test_sync_xhr(IHTMLDocument2 *doc, const WCHAR *xml_url, const WCHAR
val = 0xdeadbeef;
hres = IHTMLXMLHttpRequest_get_readyState(xhr, &val);
ok(hres == S_OK, "get_readyState failed: %08x\n", hres);
ok(val == 4, "Expect DONE, got %d\n", val);
ok(hres == S_OK, "get_readyState failed: %08lx\n", hres);
ok(val == 4, "Expect DONE, got %ld\n", val);
test_response_text(expect_text);
test_responseXML(expect_text);
@ -740,51 +740,51 @@ static void test_async_xhr(IHTMLDocument2 *doc, const WCHAR *xml_url, const WCHA
V_VT(&var) = VT_DISPATCH;
V_DISPATCH(&var) = (IDispatch*)&xmlhttprequest_onreadystatechange_obj;
hres = IHTMLXMLHttpRequest_put_onreadystatechange(xhr, var);
ok(hres == S_OK, "put_onreadystatechange failed: %08x\n", hres);
ok(hres == S_OK, "put_onreadystatechange failed: %08lx\n", hres);
V_VT(&var) = VT_EMPTY;
hres = IHTMLXMLHttpRequest_get_onreadystatechange(xhr, &var);
ok(hres == S_OK, "get_onreadystatechange failed: %08x\n", hres);
ok(hres == S_OK, "get_onreadystatechange failed: %08lx\n", hres);
ok(V_VT(&var) == VT_DISPATCH, "V_VT(onreadystatechange) = %d\n", V_VT(&var));
ok(V_DISPATCH(&var) == (IDispatch*)&xmlhttprequest_onreadystatechange_obj, "unexpected onreadystatechange value\n");
hres = IHTMLXMLHttpRequest_getResponseHeader(xhr, NULL, &text);
ok(hres == E_INVALIDARG, "Expect E_INVALIDARG, got %08x\n", hres);
ok(hres == E_INVALIDARG, "Expect E_INVALIDARG, got %08lx\n", hres);
hres = IHTMLXMLHttpRequest_getResponseHeader(xhr, content_type, NULL);
ok(hres == E_POINTER, "Expect E_POINTER, got %08x\n", hres);
ok(hres == E_POINTER, "Expect E_POINTER, got %08lx\n", hres);
hres = IHTMLXMLHttpRequest_getResponseHeader(xhr, NULL, NULL);
ok(hres == E_POINTER || broken(hres == E_INVALIDARG), /* Vista and before */
"Expect E_POINTER, got %08x\n", hres);
"Expect E_POINTER, got %08lx\n", hres);
text = (BSTR)0xdeadbeef;
hres = IHTMLXMLHttpRequest_getResponseHeader(xhr, content_type, &text);
ok(hres == E_FAIL, "got %08x\n", hres);
ok(hres == E_FAIL, "got %08lx\n", hres);
ok(text == NULL, "text = %p\n", text);
hres = IHTMLXMLHttpRequest_getAllResponseHeaders(xhr, NULL);
ok(hres == E_POINTER, "Expect E_POINTER, got %08x\n", hres);
ok(hres == E_POINTER, "Expect E_POINTER, got %08lx\n", hres);
text = (BSTR)0xdeadbeef;
hres = IHTMLXMLHttpRequest_getAllResponseHeaders(xhr, &text);
ok(hres == E_FAIL, "got %08x\n", hres);
ok(hres == E_FAIL, "got %08lx\n", hres);
ok(text == NULL, "text = %p\n", text);
val = 0xdeadbeef;
hres = IHTMLXMLHttpRequest_get_status(xhr, &val);
ok(hres == E_FAIL, "Expect E_FAIL, got: %08x\n", hres);
ok(val == 0, "Expect 0, got %d\n", val);
ok(hres == E_FAIL, "Expect E_FAIL, got: %08lx\n", hres);
ok(val == 0, "Expect 0, got %ld\n", val);
text = (BSTR)0xdeadbeef;
hres = IHTMLXMLHttpRequest_get_statusText(xhr, &text);
ok(hres == E_FAIL, "Expect E_FAIL, got: %08x\n", hres);
ok(hres == E_FAIL, "Expect E_FAIL, got: %08lx\n", hres);
ok(text == NULL, "Expect NULL, got %p\n", text);
val = 0xdeadbeef;
hres = IHTMLXMLHttpRequest_get_readyState(xhr, &val);
ok(hres == S_OK, "get_readyState failed: %08x\n", hres);
ok(val == 0, "Expect UNSENT, got %d\n", val);
ok(hres == S_OK, "get_readyState failed: %08lx\n", hres);
ok(val == 0, "Expect UNSENT, got %ld\n", val);
SET_EXPECT(xmlhttprequest_onreadystatechange_opened);
hres = xhr_open(xml_url, L"GET");
@ -798,27 +798,27 @@ static void test_async_xhr(IHTMLDocument2 *doc, const WCHAR *xml_url, const WCHA
text = (BSTR)0xdeadbeef;
hres = IHTMLXMLHttpRequest_getAllResponseHeaders(xhr, &text);
ok(hres == E_FAIL, "got %08x\n", hres);
ok(hres == E_FAIL, "got %08lx\n", hres);
ok(text == NULL, "text = %p\n", text);
text = (BSTR)0xdeadbeef;
hres = IHTMLXMLHttpRequest_getResponseHeader(xhr, content_type, &text);
ok(hres == E_FAIL, "got %08x\n", hres);
ok(hres == E_FAIL, "got %08lx\n", hres);
ok(text == NULL, "text = %p\n", text);
val = 0xdeadbeef;
hres = IHTMLXMLHttpRequest_get_status(xhr, &val);
ok(hres == E_FAIL, "Expect E_FAIL, got: %08x\n", hres);
ok(val == 0, "Expect 0, got %d\n", val);
ok(hres == E_FAIL, "Expect E_FAIL, got: %08lx\n", hres);
ok(val == 0, "Expect 0, got %ld\n", val);
hres = IHTMLXMLHttpRequest_get_statusText(xhr, &text);
ok(hres == E_FAIL, "Expect E_FAIL, got: %08x\n", hres);
ok(hres == E_FAIL, "Expect E_FAIL, got: %08lx\n", hres);
ok(text == NULL, "Expect NULL, got %p\n", text);
val = 0xdeadbeef;
hres = IHTMLXMLHttpRequest_get_readyState(xhr, &val);
ok(hres == S_OK, "get_readyState failed: %08x\n", hres);
ok(val == 1, "Expect OPENED, got %d\n", val);
ok(hres == S_OK, "get_readyState failed: %08lx\n", hres);
ok(val == 1, "Expect OPENED, got %ld\n", val);
set_request_header(xhr, L"x-wine-test", L"async-test");
@ -830,7 +830,7 @@ static void test_async_xhr(IHTMLDocument2 *doc, const WCHAR *xml_url, const WCHA
V_VT(&vempty) = VT_EMPTY;
hres = IHTMLXMLHttpRequest_send(xhr, vempty);
ok(hres == S_OK, "send failed: %08x\n", hres);
ok(hres == S_OK, "send failed: %08lx\n", hres);
if(SUCCEEDED(hres))
pump_msgs(&called_xmlhttprequest_onreadystatechange_done);
todo_wine CHECK_CALLED(xmlhttprequest_onreadystatechange_opened);
@ -849,7 +849,7 @@ static void test_async_xhr(IHTMLDocument2 *doc, const WCHAR *xml_url, const WCHA
text = NULL;
hres = IHTMLXMLHttpRequest_getAllResponseHeaders(xhr, &text);
ok(hres == S_OK, "getAllResponseHeader failed, got %08x\n", hres);
ok(hres == S_OK, "getAllResponseHeader failed, got %08lx\n", hres);
ok(text != NULL, "text == NULL\n");
SysFreeString(text);
@ -858,20 +858,20 @@ static void test_async_xhr(IHTMLDocument2 *doc, const WCHAR *xml_url, const WCHA
val = 0xdeadbeef;
hres = IHTMLXMLHttpRequest_get_status(xhr, &val);
ok(hres == S_OK, "get_status failed: %08x\n", hres);
ok(val == 200, "Expect 200, got %d\n", val);
ok(hres == S_OK, "get_status failed: %08lx\n", hres);
ok(val == 200, "Expect 200, got %ld\n", val);
text = NULL;
hres = IHTMLXMLHttpRequest_get_statusText(xhr, &text);
ok(hres == S_OK, "get_statusText failed: %08x\n", hres);
ok(hres == S_OK, "get_statusText failed: %08lx\n", hres);
ok(text != NULL, "text == NULL\n");
ok(!lstrcmpW(text, L"OK"), "Expected \"OK\", got %s\n", wine_dbgstr_w(text));
SysFreeString(text);
val = 0xdeadbeef;
hres = IHTMLXMLHttpRequest_get_readyState(xhr, &val);
ok(hres == S_OK, "get_readyState failed: %08x\n", hres);
ok(val == 4, "Expect DONE, got %d\n", val);
ok(hres == S_OK, "get_readyState failed: %08lx\n", hres);
ok(val == 4, "Expect DONE, got %ld\n", val);
test_response_text(expect_text);
test_responseXML(expect_text);
@ -902,15 +902,15 @@ static void test_async_xhr_abort(IHTMLDocument2 *doc, const WCHAR *xml_url)
CHECK_CALLED(xmlhttprequest_onreadystatechange_opened);
hres = IHTMLXMLHttpRequest_abort(xhr);
ok(hres == S_OK, "abort failed: %08x\n", hres);
ok(hres == S_OK, "abort failed: %08lx\n", hres);
hres = IHTMLXMLHttpRequest_get_status(xhr, &val);
ok(hres == E_FAIL, "Expect E_FAIL, got: %08x\n", hres);
ok(val == 0, "Expect 0, got %d\n", val);
ok(hres == E_FAIL, "Expect E_FAIL, got: %08lx\n", hres);
ok(val == 0, "Expect 0, got %ld\n", val);
hres = IHTMLXMLHttpRequest_get_readyState(xhr, &val);
ok(hres == S_OK, "get_readyState failed: %08x\n", hres);
ok(val == 0, "Expect UNSENT, got %d\n", val);
ok(hres == S_OK, "get_readyState failed: %08lx\n", hres);
ok(val == 0, "Expect UNSENT, got %ld\n", val);
IHTMLXMLHttpRequest_Release(xhr);
xhr = NULL;
@ -930,20 +930,20 @@ static void test_async_xhr_abort(IHTMLDocument2 *doc, const WCHAR *xml_url)
SET_EXPECT(xmlhttprequest_onreadystatechange_opened);
SET_EXPECT(xmlhttprequest_onreadystatechange_done);
hres = IHTMLXMLHttpRequest_send(xhr, vempty);
ok(hres == S_OK, "send failed: %08x\n", hres);
ok(hres == S_OK, "send failed: %08lx\n", hres);
todo_wine CHECK_CALLED(xmlhttprequest_onreadystatechange_opened);
hres = IHTMLXMLHttpRequest_abort(xhr);
ok(hres == S_OK, "abort failed: %08x\n", hres);
ok(hres == S_OK, "abort failed: %08lx\n", hres);
CHECK_CALLED(xmlhttprequest_onreadystatechange_done);
hres = IHTMLXMLHttpRequest_get_readyState(xhr, &val);
ok(hres == S_OK, "get_readyState failed: %08x\n", hres);
ok(val == 0, "Expect UNSENT, got %d\n", val);
ok(hres == S_OK, "get_readyState failed: %08lx\n", hres);
ok(val == 0, "Expect UNSENT, got %ld\n", val);
hres = IHTMLXMLHttpRequest_get_status(xhr, &val);
ok(hres == E_FAIL, "Expect E_FAIL, got: %08x\n", hres);
ok(val == 0, "Expect 0, got %d\n", val);
ok(hres == E_FAIL, "Expect E_FAIL, got: %08lx\n", hres);
ok(val == 0, "Expect 0, got %ld\n", val);
ok(loading_cnt == 0, "loading_cnt = %d, expect 0, loading_cnt\n", loading_cnt);
todo_wine ok(readystatechange_cnt == 2, "readystatechange_cnt = %d, expect 2\n", readystatechange_cnt);
@ -966,7 +966,7 @@ static void test_xhr_post(IHTMLDocument2 *doc)
V_VT(&v) = VT_DISPATCH;
V_DISPATCH(&v) = (IDispatch*)&xmlhttprequest_onreadystatechange_obj;
hres = IHTMLXMLHttpRequest_put_onreadystatechange(xhr, v);
ok(hres == S_OK, "put_onreadystatechange failed: %08x\n", hres);
ok(hres == S_OK, "put_onreadystatechange failed: %08lx\n", hres);
SET_EXPECT(xmlhttprequest_onreadystatechange_opened);
xhr_open(L"http://test.winehq.org/tests/post.php", L"POST");
@ -984,7 +984,7 @@ static void test_xhr_post(IHTMLDocument2 *doc)
SET_EXPECT(xmlhttprequest_onreadystatechange_done);
hres = IHTMLXMLHttpRequest_send(xhr, v);
ok(hres == S_OK, "send failed: %08x\n", hres);
ok(hres == S_OK, "send failed: %08lx\n", hres);
if(SUCCEEDED(hres))
pump_msgs(&called_xmlhttprequest_onreadystatechange_done);
@ -1012,11 +1012,11 @@ static IHTMLDocument2 *create_doc_from_url(const WCHAR *start_url)
HRESULT hres;
hres = CreateBindCtx(0, &bc);
ok(hres == S_OK, "CreateBindCtx failed: 0x%08x\n", hres);
ok(hres == S_OK, "CreateBindCtx failed: 0x%08lx\n", hres);
url = SysAllocString(start_url);
hres = CreateURLMoniker(NULL, url, &url_mon);
ok(hres == S_OK, "CreateURLMoniker failed: 0x%08x\n", hres);
ok(hres == S_OK, "CreateURLMoniker failed: 0x%08lx\n", hres);
hres = CoCreateInstance(&CLSID_HTMLDocument, NULL,
CLSCTX_INPROC_SERVER | CLSCTX_INPROC_HANDLER, &IID_IHTMLDocument2,
@ -1024,15 +1024,15 @@ static IHTMLDocument2 *create_doc_from_url(const WCHAR *start_url)
#if !defined(__i386__) && !defined(__x86_64__)
todo_wine
#endif
ok(hres == S_OK, "CoCreateInstance failed: 0x%08x\n", hres);
ok(hres == S_OK, "CoCreateInstance failed: 0x%08lx\n", hres);
hres = IHTMLDocument2_QueryInterface(doc, &IID_IPersistMoniker,
(void**)&persist_mon);
ok(hres == S_OK, "IHTMLDocument2_QueryInterface failed: 0x%08x\n", hres);
ok(hres == S_OK, "IHTMLDocument2_QueryInterface failed: 0x%08lx\n", hres);
hres = IPersistMoniker_Load(persist_mon, FALSE, url_mon, bc,
STGM_SHARE_EXCLUSIVE | STGM_READWRITE);
ok(hres == S_OK, "IPersistMoniker_Load failed: 0x%08x\n", hres);
ok(hres == S_OK, "IPersistMoniker_Load failed: 0x%08lx\n", hres);
IPersistMoniker_Release(persist_mon);
IMoniker_Release(url_mon);