ReactOS 0.4.16-dev-1946-g52006dd
httpreq.c File Reference
#include <stdio.h>
#include <assert.h>
#include "windows.h"
#include "msxml2.h"
#include "msxml2did.h"
#include "dispex.h"
#include "initguid.h"
#include "objsafe.h"
#include "mshtml.h"
#include "wine/test.h"
Include dependency graph for httpreq.c:

Go to the source code of this file.

Classes

struct  dispevent
 

Macros

#define COBJMACROS
 
#define CONST_VTABLE
 
#define EXPECT_REF(node, ref)   _expect_ref((IUnknown*)node, ref, __LINE__)
 
#define check_interface(a, b, c)   check_interface_(__LINE__, a, b, c)
 
#define DEFINE_EXPECT(func)    static BOOL expect_ ## func = FALSE, called_ ## func = FALSE
 
#define SET_EXPECT(func)    expect_ ## func = TRUE
 
#define CHECK_EXPECT2(func)
 
#define CHECK_CALLED(func)
 
#define test_open(a, b, c, d)   _test_open(__LINE__,a,b,c,d)
 
#define test_server_open(a, b, c, d)   _test_server_open(__LINE__,a,b,c,d)
 

Functions

static void _expect_ref (IUnknown *obj, ULONG ref, int line)
 
static void check_interface_ (unsigned int line, void *iface_ptr, REFIID iid, BOOL supported)
 
 DEFINE_GUID (SID_SContainerDispatch, 0xb722be00, 0x4e68, 0x101b, 0xa2, 0xbc, 0x00, 0xaa, 0x00, 0x40, 0x47, 0x70)
 
 DEFINE_GUID (SID_UnknownSID, 0x75dd09cb, 0x6c40, 0x11d5, 0x85, 0x43, 0x00, 0xc0, 0x4f, 0xa0, 0xfb, 0xa3)
 
 DEFINE_EXPECT (site_qi_IServiceProvider)
 
 DEFINE_EXPECT (site_qi_IXMLDOMDocument)
 
 DEFINE_EXPECT (site_qi_IOleClientSite)
 
 DEFINE_EXPECT (sp_queryservice_SID_SBindHost)
 
 DEFINE_EXPECT (sp_queryservice_SID_SContainerDispatch_htmldoc2)
 
 DEFINE_EXPECT (sp_queryservice_SID_secmgr_htmldoc2)
 
 DEFINE_EXPECT (sp_queryservice_SID_secmgr_xmldomdoc)
 
 DEFINE_EXPECT (sp_queryservice_SID_secmgr_secmgr)
 
 DEFINE_EXPECT (htmldoc2_get_all)
 
 DEFINE_EXPECT (htmldoc2_get_url)
 
 DEFINE_EXPECT (collection_get_length)
 
static int strcmp_wa (const WCHAR *strw, const char *stra)
 
static BSTR alloc_str_from_narrow (const char *str)
 
static BSTR _bstr_ (const char *str)
 
static void free_bstrs (void)
 
static HRESULT WINAPI htmlecoll_QueryInterface (IHTMLElementCollection *iface, REFIID riid, void **ppvObject)
 
static ULONG WINAPI htmlecoll_AddRef (IHTMLElementCollection *iface)
 
static ULONG WINAPI htmlecoll_Release (IHTMLElementCollection *iface)
 
static HRESULT WINAPI htmlecoll_GetTypeInfoCount (IHTMLElementCollection *iface, UINT *pctinfo)
 
static HRESULT WINAPI htmlecoll_GetTypeInfo (IHTMLElementCollection *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
 
static HRESULT WINAPI htmlecoll_GetIDsOfNames (IHTMLElementCollection *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
 
static HRESULT WINAPI htmlecoll_Invoke (IHTMLElementCollection *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
 
static HRESULT WINAPI htmlecoll_toString (IHTMLElementCollection *iface, BSTR *String)
 
static HRESULT WINAPI htmlecoll_put_length (IHTMLElementCollection *iface, LONG v)
 
static HRESULT WINAPI htmlecoll_get_length (IHTMLElementCollection *iface, LONG *v)
 
static HRESULT WINAPI htmlecoll_get__newEnum (IHTMLElementCollection *iface, IUnknown **p)
 
static HRESULT WINAPI htmlecoll_item (IHTMLElementCollection *iface, VARIANT name, VARIANT index, IDispatch **pdisp)
 
static HRESULT WINAPI htmlecoll_tags (IHTMLElementCollection *iface, VARIANT tagName, IDispatch **pdisp)
 
static HRESULT WINAPI htmldoc2_QueryInterface (IHTMLDocument2 *iface, REFIID riid, void **ppvObject)
 
static ULONG WINAPI htmldoc2_AddRef (IHTMLDocument2 *iface)
 
static ULONG WINAPI htmldoc2_Release (IHTMLDocument2 *iface)
 
static HRESULT WINAPI htmldoc2_GetTypeInfoCount (IHTMLDocument2 *iface, UINT *pctinfo)
 
static HRESULT WINAPI htmldoc2_GetTypeInfo (IHTMLDocument2 *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
 
static HRESULT WINAPI htmldoc2_GetIDsOfNames (IHTMLDocument2 *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
 
static HRESULT WINAPI htmldoc2_Invoke (IHTMLDocument2 *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
 
static HRESULT WINAPI htmldoc2_get_Script (IHTMLDocument2 *iface, IDispatch **p)
 
static HRESULT WINAPI htmldoc2_get_all (IHTMLDocument2 *iface, IHTMLElementCollection **p)
 
static HRESULT WINAPI htmldoc2_get_body (IHTMLDocument2 *iface, IHTMLElement **p)
 
static HRESULT WINAPI htmldoc2_get_activeElement (IHTMLDocument2 *iface, IHTMLElement **p)
 
static HRESULT WINAPI htmldoc2_get_images (IHTMLDocument2 *iface, IHTMLElementCollection **p)
 
static HRESULT WINAPI htmldoc2_get_applets (IHTMLDocument2 *iface, IHTMLElementCollection **p)
 
static HRESULT WINAPI htmldoc2_get_links (IHTMLDocument2 *iface, IHTMLElementCollection **p)
 
static HRESULT WINAPI htmldoc2_get_forms (IHTMLDocument2 *iface, IHTMLElementCollection **p)
 
static HRESULT WINAPI htmldoc2_get_anchors (IHTMLDocument2 *iface, IHTMLElementCollection **p)
 
static HRESULT WINAPI htmldoc2_put_title (IHTMLDocument2 *iface, BSTR v)
 
static HRESULT WINAPI htmldoc2_get_title (IHTMLDocument2 *iface, BSTR *p)
 
static HRESULT WINAPI htmldoc2_get_scripts (IHTMLDocument2 *iface, IHTMLElementCollection **p)
 
static HRESULT WINAPI htmldoc2_put_designMode (IHTMLDocument2 *iface, BSTR v)
 
static HRESULT WINAPI htmldoc2_get_designMode (IHTMLDocument2 *iface, BSTR *p)
 
static HRESULT WINAPI htmldoc2_get_selection (IHTMLDocument2 *iface, IHTMLSelectionObject **p)
 
static HRESULT WINAPI htmldoc2_get_readyState (IHTMLDocument2 *iface, BSTR *p)
 
static HRESULT WINAPI htmldoc2_get_frames (IHTMLDocument2 *iface, IHTMLFramesCollection2 **p)
 
static HRESULT WINAPI htmldoc2_get_embeds (IHTMLDocument2 *iface, IHTMLElementCollection **p)
 
static HRESULT WINAPI htmldoc2_get_plugins (IHTMLDocument2 *iface, IHTMLElementCollection **p)
 
static HRESULT WINAPI htmldoc2_put_alinkColor (IHTMLDocument2 *iface, VARIANT v)
 
static HRESULT WINAPI htmldoc2_get_alinkColor (IHTMLDocument2 *iface, VARIANT *p)
 
static HRESULT WINAPI htmldoc2_put_bgColor (IHTMLDocument2 *iface, VARIANT v)
 
static HRESULT WINAPI htmldoc2_get_bgColor (IHTMLDocument2 *iface, VARIANT *p)
 
static HRESULT WINAPI htmldoc2_put_fgColor (IHTMLDocument2 *iface, VARIANT v)
 
static HRESULT WINAPI htmldoc2_get_fgColor (IHTMLDocument2 *iface, VARIANT *p)
 
static HRESULT WINAPI htmldoc2_put_linkColor (IHTMLDocument2 *iface, VARIANT v)
 
static HRESULT WINAPI htmldoc2_get_linkColor (IHTMLDocument2 *iface, VARIANT *p)
 
static HRESULT WINAPI htmldoc2_put_vlinkColor (IHTMLDocument2 *iface, VARIANT v)
 
static HRESULT WINAPI htmldoc2_get_vlinkColor (IHTMLDocument2 *iface, VARIANT *p)
 
static HRESULT WINAPI htmldoc2_get_referrer (IHTMLDocument2 *iface, BSTR *p)
 
static HRESULT WINAPI htmldoc2_get_location (IHTMLDocument2 *iface, IHTMLLocation **p)
 
static HRESULT WINAPI htmldoc2_get_lastModified (IHTMLDocument2 *iface, BSTR *p)
 
static HRESULT WINAPI htmldoc2_put_URL (IHTMLDocument2 *iface, BSTR v)
 
static HRESULT WINAPI htmldoc2_get_URL (IHTMLDocument2 *iface, BSTR *p)
 
static HRESULT WINAPI htmldoc2_put_domain (IHTMLDocument2 *iface, BSTR v)
 
static HRESULT WINAPI htmldoc2_get_domain (IHTMLDocument2 *iface, BSTR *p)
 
static HRESULT WINAPI htmldoc2_put_cookie (IHTMLDocument2 *iface, BSTR v)
 
static HRESULT WINAPI htmldoc2_get_cookie (IHTMLDocument2 *iface, BSTR *p)
 
static HRESULT WINAPI htmldoc2_put_expando (IHTMLDocument2 *iface, VARIANT_BOOL v)
 
static HRESULT WINAPI htmldoc2_get_expando (IHTMLDocument2 *iface, VARIANT_BOOL *p)
 
static HRESULT WINAPI htmldoc2_put_charset (IHTMLDocument2 *iface, BSTR v)
 
static HRESULT WINAPI htmldoc2_get_charset (IHTMLDocument2 *iface, BSTR *p)
 
static HRESULT WINAPI htmldoc2_put_defaultCharset (IHTMLDocument2 *iface, BSTR v)
 
static HRESULT WINAPI htmldoc2_get_defaultCharset (IHTMLDocument2 *iface, BSTR *p)
 
static HRESULT WINAPI htmldoc2_get_mimeType (IHTMLDocument2 *iface, BSTR *p)
 
static HRESULT WINAPI htmldoc2_get_fileSize (IHTMLDocument2 *iface, BSTR *p)
 
static HRESULT WINAPI htmldoc2_get_fileCreatedDate (IHTMLDocument2 *iface, BSTR *p)
 
static HRESULT WINAPI htmldoc2_get_fileModifiedDate (IHTMLDocument2 *iface, BSTR *p)
 
static HRESULT WINAPI htmldoc2_get_fileUpdatedDate (IHTMLDocument2 *iface, BSTR *p)
 
static HRESULT WINAPI htmldoc2_get_security (IHTMLDocument2 *iface, BSTR *p)
 
static HRESULT WINAPI htmldoc2_get_protocol (IHTMLDocument2 *iface, BSTR *p)
 
static HRESULT WINAPI htmldoc2_get_nameProp (IHTMLDocument2 *iface, BSTR *p)
 
static HRESULT WINAPI htmldoc2_write (IHTMLDocument2 *iface, SAFEARRAY *psarray)
 
static HRESULT WINAPI htmldoc2_writeln (IHTMLDocument2 *iface, SAFEARRAY *psarray)
 
static HRESULT WINAPI htmldoc2_open (IHTMLDocument2 *iface, BSTR url, VARIANT name, VARIANT features, VARIANT replace, IDispatch **pomWindowResult)
 
static HRESULT WINAPI htmldoc2_close (IHTMLDocument2 *iface)
 
static HRESULT WINAPI htmldoc2_clear (IHTMLDocument2 *iface)
 
static HRESULT WINAPI htmldoc2_queryCommandSupported (IHTMLDocument2 *iface, BSTR cmdID, VARIANT_BOOL *pfRet)
 
static HRESULT WINAPI htmldoc2_queryCommandEnabled (IHTMLDocument2 *iface, BSTR cmdID, VARIANT_BOOL *pfRet)
 
static HRESULT WINAPI htmldoc2_queryCommandState (IHTMLDocument2 *iface, BSTR cmdID, VARIANT_BOOL *pfRet)
 
static HRESULT WINAPI htmldoc2_queryCommandIndeterm (IHTMLDocument2 *iface, BSTR cmdID, VARIANT_BOOL *pfRet)
 
static HRESULT WINAPI htmldoc2_queryCommandText (IHTMLDocument2 *iface, BSTR cmdID, BSTR *pfRet)
 
static HRESULT WINAPI htmldoc2_queryCommandValue (IHTMLDocument2 *iface, BSTR cmdID, VARIANT *pfRet)
 
static HRESULT WINAPI htmldoc2_execCommand (IHTMLDocument2 *iface, BSTR cmdID, VARIANT_BOOL showUI, VARIANT value, VARIANT_BOOL *pfRet)
 
static HRESULT WINAPI htmldoc2_execCommandShowHelp (IHTMLDocument2 *iface, BSTR cmdID, VARIANT_BOOL *pfRet)
 
static HRESULT WINAPI htmldoc2_createElement (IHTMLDocument2 *iface, BSTR eTag, IHTMLElement **newElem)
 
static HRESULT WINAPI htmldoc2_put_onhelp (IHTMLDocument2 *iface, VARIANT v)
 
static HRESULT WINAPI htmldoc2_get_onhelp (IHTMLDocument2 *iface, VARIANT *p)
 
static HRESULT WINAPI htmldoc2_put_onclick (IHTMLDocument2 *iface, VARIANT v)
 
static HRESULT WINAPI htmldoc2_get_onclick (IHTMLDocument2 *iface, VARIANT *p)
 
static HRESULT WINAPI htmldoc2_put_ondblclick (IHTMLDocument2 *iface, VARIANT v)
 
static HRESULT WINAPI htmldoc2_get_ondblclick (IHTMLDocument2 *iface, VARIANT *p)
 
static HRESULT WINAPI htmldoc2_put_onkeyup (IHTMLDocument2 *iface, VARIANT v)
 
static HRESULT WINAPI htmldoc2_get_onkeyup (IHTMLDocument2 *iface, VARIANT *p)
 
static HRESULT WINAPI htmldoc2_put_onkeydown (IHTMLDocument2 *iface, VARIANT v)
 
static HRESULT WINAPI htmldoc2_get_onkeydown (IHTMLDocument2 *iface, VARIANT *p)
 
static HRESULT WINAPI htmldoc2_put_onkeypress (IHTMLDocument2 *iface, VARIANT v)
 
static HRESULT WINAPI htmldoc2_get_onkeypress (IHTMLDocument2 *iface, VARIANT *p)
 
static HRESULT WINAPI htmldoc2_put_onmouseup (IHTMLDocument2 *iface, VARIANT v)
 
static HRESULT WINAPI htmldoc2_get_onmouseup (IHTMLDocument2 *iface, VARIANT *p)
 
static HRESULT WINAPI htmldoc2_put_onmousedown (IHTMLDocument2 *iface, VARIANT v)
 
static HRESULT WINAPI htmldoc2_get_onmousedown (IHTMLDocument2 *iface, VARIANT *p)
 
static HRESULT WINAPI htmldoc2_put_onmousemove (IHTMLDocument2 *iface, VARIANT v)
 
static HRESULT WINAPI htmldoc2_get_onmousemove (IHTMLDocument2 *iface, VARIANT *p)
 
static HRESULT WINAPI htmldoc2_put_onmouseout (IHTMLDocument2 *iface, VARIANT v)
 
static HRESULT WINAPI htmldoc2_get_onmouseout (IHTMLDocument2 *iface, VARIANT *p)
 
static HRESULT WINAPI htmldoc2_put_onmouseover (IHTMLDocument2 *iface, VARIANT v)
 
static HRESULT WINAPI htmldoc2_get_onmouseover (IHTMLDocument2 *iface, VARIANT *p)
 
static HRESULT WINAPI htmldoc2_put_onreadystatechange (IHTMLDocument2 *iface, VARIANT v)
 
static HRESULT WINAPI htmldoc2_get_onreadystatechange (IHTMLDocument2 *iface, VARIANT *p)
 
static HRESULT WINAPI htmldoc2_put_onafterupdate (IHTMLDocument2 *iface, VARIANT v)
 
static HRESULT WINAPI htmldoc2_get_onafterupdate (IHTMLDocument2 *iface, VARIANT *p)
 
static HRESULT WINAPI htmldoc2_put_onrowexit (IHTMLDocument2 *iface, VARIANT v)
 
static HRESULT WINAPI htmldoc2_get_onrowexit (IHTMLDocument2 *iface, VARIANT *p)
 
static HRESULT WINAPI htmldoc2_put_onrowenter (IHTMLDocument2 *iface, VARIANT v)
 
static HRESULT WINAPI htmldoc2_get_onrowenter (IHTMLDocument2 *iface, VARIANT *p)
 
static HRESULT WINAPI htmldoc2_put_ondragstart (IHTMLDocument2 *iface, VARIANT v)
 
static HRESULT WINAPI htmldoc2_get_ondragstart (IHTMLDocument2 *iface, VARIANT *p)
 
static HRESULT WINAPI htmldoc2_put_onselectstart (IHTMLDocument2 *iface, VARIANT v)
 
static HRESULT WINAPI htmldoc2_get_onselectstart (IHTMLDocument2 *iface, VARIANT *p)
 
static HRESULT WINAPI htmldoc2_elementFromPoint (IHTMLDocument2 *iface, LONG x, LONG y, IHTMLElement **elementHit)
 
static HRESULT WINAPI htmldoc2_get_parentWindow (IHTMLDocument2 *iface, IHTMLWindow2 **p)
 
static HRESULT WINAPI htmldoc2_get_styleSheets (IHTMLDocument2 *iface, IHTMLStyleSheetsCollection **p)
 
static HRESULT WINAPI htmldoc2_put_onbeforeupdate (IHTMLDocument2 *iface, VARIANT v)
 
static HRESULT WINAPI htmldoc2_get_onbeforeupdate (IHTMLDocument2 *iface, VARIANT *p)
 
static HRESULT WINAPI htmldoc2_put_onerrorupdate (IHTMLDocument2 *iface, VARIANT v)
 
static HRESULT WINAPI htmldoc2_get_onerrorupdate (IHTMLDocument2 *iface, VARIANT *p)
 
static HRESULT WINAPI htmldoc2_toString (IHTMLDocument2 *iface, BSTR *String)
 
static HRESULT WINAPI htmldoc2_createStyleSheet (IHTMLDocument2 *iface, BSTR bstrHref, LONG lIndex, IHTMLStyleSheet **ppnewStyleSheet)
 
static HRESULT WINAPI sp_QueryInterface (IServiceProvider *iface, REFIID riid, void **ppvObject)
 
static ULONG WINAPI sp_AddRef (IServiceProvider *iface)
 
static ULONG WINAPI sp_Release (IServiceProvider *iface)
 
static HRESULT WINAPI sp_QueryService (IServiceProvider *iface, REFGUID service, REFIID riid, void **obj)
 
static HRESULT WINAPI site_QueryInterface (IUnknown *iface, REFIID riid, void **ppvObject)
 
static ULONG WINAPI site_AddRef (IUnknown *iface)
 
static ULONG WINAPI site_Release (IUnknown *iface)
 
static dispeventimpl_from_IDispatch (IDispatch *iface)
 
static HRESULT WINAPI dispevent_QueryInterface (IDispatch *iface, REFIID riid, void **ppvObject)
 
static ULONG WINAPI dispevent_AddRef (IDispatch *iface)
 
static ULONG WINAPI dispevent_Release (IDispatch *iface)
 
static HRESULT WINAPI dispevent_GetTypeInfoCount (IDispatch *iface, UINT *pctinfo)
 
static HRESULT WINAPI dispevent_GetTypeInfo (IDispatch *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
 
static HRESULT WINAPI dispevent_GetIDsOfNames (IDispatch *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
 
static HRESULT WINAPI dispevent_Invoke (IDispatch *iface, DISPID member, REFIID riid, LCID lcid, WORD flags, DISPPARAMS *params, VARIANT *result, EXCEPINFO *excepInfo, UINT *argErr)
 
static IDispatchcreate_dispevent (void)
 
static IXMLHttpRequestcreate_xhr (void)
 
static IServerXMLHTTPRequest * create_server_xhr (void)
 
static void set_safety_opt (IUnknown *unk, DWORD mask, DWORD opts)
 
static void set_xhr_site (IXMLHttpRequest *xhr)
 
static void _test_open (unsigned line, IXMLHttpRequest *xhr, const char *method, const char *url, HRESULT exhres)
 
static void _test_server_open (unsigned line, IServerXMLHTTPRequest *xhr, const char *method, const char *url, HRESULT exhres)
 
static void test_XMLHTTP (void)
 
static void test_server_xhr (void)
 
static void test_safe_httpreq (void)
 
static void test_supporterrorinfo (void)
 
 START_TEST (httpreq)
 

Variables

static const char xmltestA [] = "http://test.winehq.org/tests/xmltest.xml"
 
static const CHAR xmltestbodyA [] = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<a>TEST</a>\n"
 
static BOOL g_enablecallchecks
 
static int g_unexpectedcall
 
static int g_expectedcall
 
static BSTR alloced_bstrs [256]
 
static int alloced_bstrs_count
 
static const IHTMLElementCollectionVtbl TestHTMLECollectionVtbl
 
static IHTMLElementCollection htmlecoll = { &TestHTMLECollectionVtbl }
 
static const IHTMLDocument2Vtbl TestHTMLDocumentVtbl
 
static IHTMLDocument2 htmldoc2 = { &TestHTMLDocumentVtbl }
 
static const IServiceProviderVtbl testprovVtbl
 
static IServiceProvider testprov = { &testprovVtbl }
 
static const IUnknownVtbl testsiteVtbl
 
static IUnknown testsite = { &testsiteVtbl }
 
static IXMLHttpRequesthttpreq
 
static const IDispatchVtbl dispeventVtbl
 

Macro Definition Documentation

◆ CHECK_CALLED

#define CHECK_CALLED (   func)
Value:
do { \
ok(called_ ## func, "expected " #func "\n"); \
expect_ ## func = called_ ## func = FALSE; \
}while(0)
#define FALSE
Definition: types.h:117
GLenum func
Definition: glext.h:6028
#define expect_(expected, got, precision)
Definition: font.c:29

Definition at line 85 of file httpreq.c.

◆ CHECK_EXPECT2

#define CHECK_EXPECT2 (   func)
Value:
do { \
ok(expect_ ##func, "unexpected call " #func "\n"); \
called_ ## func = TRUE; \
}while(0)
#define TRUE
Definition: types.h:120
static BOOL g_enablecallchecks
Definition: httpreq.c:70

Definition at line 78 of file httpreq.c.

◆ check_interface

#define check_interface (   a,
  b,
  c 
)    check_interface_(__LINE__, a, b, c)

Definition at line 49 of file httpreq.c.

◆ COBJMACROS

#define COBJMACROS

Definition at line 22 of file httpreq.c.

◆ CONST_VTABLE

#define CONST_VTABLE

Definition at line 23 of file httpreq.c.

◆ DEFINE_EXPECT

#define DEFINE_EXPECT (   func)     static BOOL expect_ ## func = FALSE, called_ ## func = FALSE

Definition at line 72 of file httpreq.c.

◆ EXPECT_REF

#define EXPECT_REF (   node,
  ref 
)    _expect_ref((IUnknown*)node, ref, __LINE__)

Definition at line 40 of file httpreq.c.

◆ SET_EXPECT

#define SET_EXPECT (   func)     expect_ ## func = TRUE

Definition at line 75 of file httpreq.c.

◆ test_open

#define test_open (   a,
  b,
  c,
  d 
)    _test_open(__LINE__,a,b,c,d)

Definition at line 1424 of file httpreq.c.

◆ test_server_open

#define test_server_open (   a,
  b,
  c,
  d 
)    _test_server_open(__LINE__,a,b,c,d)

Definition at line 1438 of file httpreq.c.

Function Documentation

◆ _bstr_()

static BSTR _bstr_ ( const char str)
static

Definition at line 126 of file httpreq.c.

127{
128 if(!str)
129 return NULL;
130
134}
#define ARRAY_SIZE(A)
Definition: main.h:20
#define NULL
Definition: types.h:112
#define assert(x)
Definition: debug.h:53
static BSTR alloced_bstrs[256]
Definition: httpreq.c:123
static BSTR alloc_str_from_narrow(const char *str)
Definition: httpreq.c:115
static int alloced_bstrs_count
Definition: httpreq.c:124
const WCHAR * str

Referenced by _test_open(), _test_server_open(), and test_XMLHTTP().

◆ _expect_ref()

static void _expect_ref ( IUnknown obj,
ULONG  ref,
int  line 
)
static

Definition at line 41 of file httpreq.c.

42{
43 ULONG rc;
44 IUnknown_AddRef(obj);
45 rc = IUnknown_Release(obj);
46 ok_(__FILE__, line)(rc == ref, "expected refcount %ld, got %ld.\n", ref, rc);
47}
#define ok_(x1, x2)
Definition: atltest.h:61
Definition: parser.c:49
Definition: send.c:48
uint32_t ULONG
Definition: typedefs.h:59

◆ _test_open()

static void _test_open ( unsigned  line,
IXMLHttpRequest xhr,
const char method,
const char url,
HRESULT  exhres 
)
static

Definition at line 1425 of file httpreq.c.

1426{
1427 VARIANT empty, vfalse;
1428 HRESULT hr;
1429
1430 V_VT(&empty) = VT_EMPTY;
1431 V_VT(&vfalse) = VT_BOOL;
1432 V_BOOL(&vfalse) = VARIANT_FALSE;
1433
1434 hr = IXMLHttpRequest_open(xhr, _bstr_(method), _bstr_(url), vfalse, empty, empty);
1435 ok_(__FILE__,line)(hr == exhres, "open(%s %s) failed: %#lx, expected %#lx.\n", method, url, hr, exhres);
1436}
static const WCHAR empty[]
Definition: main.c:47
@ VT_BOOL
Definition: compat.h:2306
@ VT_EMPTY
Definition: compat.h:2295
method
Definition: dragdrop.c:54
static BSTR _bstr_(const char *str)
Definition: httpreq.c:126
static const WCHAR url[]
Definition: encode.c:1384
static IHTMLXMLHttpRequest * xhr
#define V_BOOL(A)
Definition: oleauto.h:224
#define V_VT(A)
Definition: oleauto.h:211
HRESULT hr
Definition: shlfolder.c:183

◆ _test_server_open()

static void _test_server_open ( unsigned  line,
IServerXMLHTTPRequest *  xhr,
const char method,
const char url,
HRESULT  exhres 
)
static

Definition at line 1439 of file httpreq.c.

1440{
1441 VARIANT empty, vfalse;
1442 HRESULT hr;
1443
1444 V_VT(&empty) = VT_EMPTY;
1445 V_VT(&vfalse) = VT_BOOL;
1446 V_BOOL(&vfalse) = VARIANT_FALSE;
1447
1448 hr = IServerXMLHTTPRequest_open(xhr, _bstr_(method), _bstr_(url), vfalse, empty, empty);
1449 ok_(__FILE__,line)(hr == exhres, "open(%s %s) failed: %#lx, expected %#lx.\n", method, url, hr, exhres);
1450}

◆ alloc_str_from_narrow()

static BSTR alloc_str_from_narrow ( const char str)
static

Definition at line 115 of file httpreq.c.

116{
117 int len = MultiByteToWideChar(CP_ACP, 0, str, -1, NULL, 0);
118 BSTR ret = SysAllocStringLen(NULL, len - 1); /* NUL character added automatically */
119 MultiByteToWideChar(CP_ACP, 0, str, -1, ret, len-1);
120 return ret;
121}
#define CP_ACP
Definition: compat.h:109
OLECHAR * BSTR
Definition: compat.h:2293
#define MultiByteToWideChar
Definition: compat.h:110
return ret
Definition: mutex.c:146
GLenum GLsizei len
Definition: glext.h:6722
BSTR WINAPI SysAllocStringLen(const OLECHAR *str, unsigned int len)
Definition: oleaut.c:339

Referenced by _bstr_().

◆ check_interface_()

static void check_interface_ ( unsigned int  line,
void iface_ptr,
REFIID  iid,
BOOL  supported 
)
static

Definition at line 50 of file httpreq.c.

51{
52 IUnknown *iface = iface_ptr;
53 HRESULT hr, expected_hr;
54 IUnknown *unk;
55
56 expected_hr = supported ? S_OK : E_NOINTERFACE;
57
58 hr = IUnknown_QueryInterface(iface, iid, (void **)&unk);
59 ok_(__FILE__, line)(hr == expected_hr, "Got hr %#lx, expected %#lx.\n", hr, expected_hr);
60 if (SUCCEEDED(hr))
61 IUnknown_Release(unk);
62}
#define S_OK
Definition: intsafe.h:52
#define SUCCEEDED(hr)
Definition: intsafe.h:50
#define E_NOINTERFACE
Definition: winerror.h:3479

◆ create_dispevent()

static IDispatch * create_dispevent ( void  )
static

Definition at line 1326 of file httpreq.c.

1327{
1328 dispevent *event = malloc(sizeof(*event));
1329
1330 event->IDispatch_iface.lpVtbl = &dispeventVtbl;
1331 event->ref = 1;
1332
1333 return &event->IDispatch_iface;
1334}
#define malloc
Definition: debug_ros.c:4
struct _cl_event * event
Definition: glext.h:7739
static const IDispatchVtbl dispeventVtbl
Definition: httpreq.c:1315

Referenced by test_XMLHTTP().

◆ create_server_xhr()

static IServerXMLHTTPRequest * create_server_xhr ( void  )
static

Definition at line 1347 of file httpreq.c.

1348{
1349 IServerXMLHTTPRequest *ret;
1350 HRESULT hr;
1351
1352 hr = CoCreateInstance(&CLSID_ServerXMLHTTP30, NULL, CLSCTX_INPROC_SERVER, &IID_IServerXMLHTTPRequest, (void **)&ret);
1353
1354 return SUCCEEDED(hr) ? ret : NULL;
1355}
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
Definition: compobj.c:3325

Referenced by test_server_xhr(), and test_supporterrorinfo().

◆ create_xhr()

static IXMLHttpRequest * create_xhr ( void  )
static

Definition at line 1336 of file httpreq.c.

1337{
1339 HRESULT hr;
1340
1341 hr = CoCreateInstance(&CLSID_XMLHTTPRequest, NULL, CLSCTX_INPROC_SERVER,
1342 &IID_IXMLHttpRequest, (void**)&ret);
1343
1344 return SUCCEEDED(hr) ? ret : NULL;
1345}
const struct _GUID CLSID_XMLHTTPRequest

Referenced by START_TEST(), test_safe_httpreq(), test_supporterrorinfo(), and test_XMLHTTP().

◆ DEFINE_EXPECT() [1/11]

DEFINE_EXPECT ( collection_get_length  )

◆ DEFINE_EXPECT() [2/11]

DEFINE_EXPECT ( htmldoc2_get_all  )

◆ DEFINE_EXPECT() [3/11]

DEFINE_EXPECT ( htmldoc2_get_url  )

◆ DEFINE_EXPECT() [4/11]

DEFINE_EXPECT ( site_qi_IOleClientSite  )

◆ DEFINE_EXPECT() [5/11]

DEFINE_EXPECT ( site_qi_IServiceProvider  )

◆ DEFINE_EXPECT() [6/11]

DEFINE_EXPECT ( site_qi_IXMLDOMDocument  )

◆ DEFINE_EXPECT() [7/11]

DEFINE_EXPECT ( sp_queryservice_SID_SBindHost  )

◆ DEFINE_EXPECT() [8/11]

DEFINE_EXPECT ( sp_queryservice_SID_SContainerDispatch_htmldoc2  )

◆ DEFINE_EXPECT() [9/11]

DEFINE_EXPECT ( sp_queryservice_SID_secmgr_htmldoc2  )

◆ DEFINE_EXPECT() [10/11]

DEFINE_EXPECT ( sp_queryservice_SID_secmgr_secmgr  )

◆ DEFINE_EXPECT() [11/11]

DEFINE_EXPECT ( sp_queryservice_SID_secmgr_xmldomdoc  )

◆ DEFINE_GUID() [1/2]

DEFINE_GUID ( SID_SContainerDispatch  ,
0xb722be00  ,
0x4e68  ,
0x101b  ,
0xa2  ,
0xbc  ,
0x00  ,
0xaa  ,
0x00  ,
0x40  ,
0x47  ,
0x70   
)

◆ DEFINE_GUID() [2/2]

DEFINE_GUID ( SID_UnknownSID  ,
0x75dd09cb  ,
0x6c40  ,
0x11d5  ,
0x85  ,
0x43  ,
0x00  ,
0xc0  ,
0x4f  ,
0xa0  ,
0xfb  ,
0xa3   
)

◆ dispevent_AddRef()

static ULONG WINAPI dispevent_AddRef ( IDispatch iface)
static

Definition at line 1240 of file httpreq.c.

1241{
1243 return InterlockedIncrement( &This->ref );
1244}
#define InterlockedIncrement
Definition: armddk.h:53
static dispevent * impl_from_IDispatch(IDispatch *iface)
Definition: httpreq.c:1218

◆ dispevent_GetIDsOfNames()

static HRESULT WINAPI dispevent_GetIDsOfNames ( IDispatch iface,
REFIID  riid,
LPOLESTR rgszNames,
UINT  cNames,
LCID  lcid,
DISPID rgDispId 
)
static

Definition at line 1271 of file httpreq.c.

1273{
1275 return S_OK;
1276}
static int g_unexpectedcall
Definition: httpreq.c:106

◆ dispevent_GetTypeInfo()

static HRESULT WINAPI dispevent_GetTypeInfo ( IDispatch iface,
UINT  iTInfo,
LCID  lcid,
ITypeInfo **  ppTInfo 
)
static

Definition at line 1264 of file httpreq.c.

1266{
1268 return S_OK;
1269}

◆ dispevent_GetTypeInfoCount()

static HRESULT WINAPI dispevent_GetTypeInfoCount ( IDispatch iface,
UINT pctinfo 
)
static

Definition at line 1257 of file httpreq.c.

1258{
1260 *pctinfo = 0;
1261 return S_OK;
1262}

◆ dispevent_Invoke()

static HRESULT WINAPI dispevent_Invoke ( IDispatch iface,
DISPID  member,
REFIID  riid,
LCID  lcid,
WORD  flags,
DISPPARAMS *  params,
VARIANT result,
EXCEPINFO *  excepInfo,
UINT argErr 
)
static

Definition at line 1278 of file httpreq.c.

1281{
1282 LONG state;
1283 HRESULT hr;
1284
1285 ok(!member, "expected 0 member, got %ld.\n", member);
1286 ok(lcid == LOCALE_SYSTEM_DEFAULT, "expected LOCALE_SYSTEM_DEFAULT, got lcid %lx.\n", lcid);
1287 ok(flags == DISPATCH_METHOD, "expected DISPATCH_METHOD, got %d\n", flags);
1288
1289 ok(params->cArgs == 0, "got %d\n", params->cArgs);
1290 ok(params->cNamedArgs == 0, "got %d\n", params->cNamedArgs);
1291 ok(params->rgvarg == NULL, "got %p\n", params->rgvarg);
1292 ok(params->rgdispidNamedArgs == NULL, "got %p\n", params->rgdispidNamedArgs);
1293
1294 ok(result == NULL, "got %p\n", result);
1295 ok(excepInfo == NULL, "got %p\n", excepInfo);
1296 ok(argErr == NULL, "got %p\n", argErr);
1297
1299
1300 state = READYSTATE_UNINITIALIZED;
1301 hr = IXMLHttpRequest_get_readyState(httpreq, &state);
1302 ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
1303 if (state == READYSTATE_COMPLETE)
1304 {
1305 BSTR text = NULL;
1306
1307 hr = IXMLHttpRequest_get_responseText(httpreq, &text);
1308 ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
1310 }
1311
1312 return E_FAIL;
1313}
static int state
Definition: maze.c:121
#define ok(value,...)
Definition: atltest.h:57
#define E_FAIL
Definition: ddrawi.h:102
LCID lcid
Definition: locale.c:5656
const WCHAR * text
Definition: package.c:1794
GLenum const GLfloat * params
Definition: glext.h:5645
GLbitfield flags
Definition: glext.h:7161
GLuint64EXT * result
Definition: glext.h:11304
static int g_expectedcall
Definition: httpreq.c:106
static IXMLHttpRequest * httpreq
Definition: httpreq.c:1216
#define LOCALE_SYSTEM_DEFAULT
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
Definition: oleaut.c:271
#define DISPATCH_METHOD
Definition: oleauto.h:1006
long LONG
Definition: pedump.c:60

◆ dispevent_QueryInterface()

static HRESULT WINAPI dispevent_QueryInterface ( IDispatch iface,
REFIID  riid,
void **  ppvObject 
)
static

Definition at line 1223 of file httpreq.c.

1224{
1225 *ppvObject = NULL;
1226
1227 if ( IsEqualGUID( riid, &IID_IDispatch) ||
1229 {
1230 *ppvObject = iface;
1231 }
1232 else
1233 return E_NOINTERFACE;
1234
1235 IDispatch_AddRef( iface );
1236
1237 return S_OK;
1238}
const GUID IID_IUnknown
REFIID riid
Definition: atlbase.h:39
const GUID IID_IDispatch
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147

◆ dispevent_Release()

static ULONG WINAPI dispevent_Release ( IDispatch iface)
static

Definition at line 1246 of file httpreq.c.

1247{
1250
1251 if (ref == 0)
1252 free(This);
1253
1254 return ref;
1255}
#define InterlockedDecrement
Definition: armddk.h:52
#define free
Definition: debug_ros.c:5

◆ free_bstrs()

static void free_bstrs ( void  )
static

Definition at line 136 of file httpreq.c.

137{
138 int i;
139 for (i = 0; i < alloced_bstrs_count; i++)
142}
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248

Referenced by test_safe_httpreq(), test_server_xhr(), and test_XMLHTTP().

◆ htmldoc2_AddRef()

static ULONG WINAPI htmldoc2_AddRef ( IHTMLDocument2 *  iface)
static

Definition at line 253 of file httpreq.c.

254{
255 return 2;
256}

◆ htmldoc2_clear()

static HRESULT WINAPI htmldoc2_clear ( IHTMLDocument2 *  iface)
static

Definition at line 631 of file httpreq.c.

632{
633 ok(0, "unexpected call\n");
634 return E_NOTIMPL;
635}
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ htmldoc2_close()

static HRESULT WINAPI htmldoc2_close ( IHTMLDocument2 *  iface)
static

Definition at line 625 of file httpreq.c.

626{
627 ok(0, "unexpected call\n");
628 return E_NOTIMPL;
629}

◆ htmldoc2_createElement()

static HRESULT WINAPI htmldoc2_createElement ( IHTMLDocument2 *  iface,
BSTR  eTag,
IHTMLElement **  newElem 
)
static

Definition at line 693 of file httpreq.c.

695{
696 ok(0, "unexpected call\n");
697 return E_NOTIMPL;
698}

◆ htmldoc2_createStyleSheet()

static HRESULT WINAPI htmldoc2_createStyleSheet ( IHTMLDocument2 *  iface,
BSTR  bstrHref,
LONG  lIndex,
IHTMLStyleSheet **  ppnewStyleSheet 
)
static

Definition at line 954 of file httpreq.c.

956{
957 ok(0, "unexpected call\n");
958 return E_NOTIMPL;
959}

◆ htmldoc2_elementFromPoint()

static HRESULT WINAPI htmldoc2_elementFromPoint ( IHTMLDocument2 *  iface,
LONG  x,
LONG  y,
IHTMLElement **  elementHit 
)
static

Definition at line 904 of file httpreq.c.

906{
907 ok(0, "unexpected call\n");
908 return E_NOTIMPL;
909}

◆ htmldoc2_execCommand()

static HRESULT WINAPI htmldoc2_execCommand ( IHTMLDocument2 *  iface,
BSTR  cmdID,
VARIANT_BOOL  showUI,
VARIANT  value,
VARIANT_BOOL pfRet 
)
static

Definition at line 679 of file httpreq.c.

681{
682 ok(0, "unexpected call\n");
683 return E_NOTIMPL;
684}

◆ htmldoc2_execCommandShowHelp()

static HRESULT WINAPI htmldoc2_execCommandShowHelp ( IHTMLDocument2 *  iface,
BSTR  cmdID,
VARIANT_BOOL pfRet 
)
static

Definition at line 686 of file httpreq.c.

688{
689 ok(0, "unexpected call\n");
690 return E_NOTIMPL;
691}

◆ htmldoc2_get_activeElement()

static HRESULT WINAPI htmldoc2_get_activeElement ( IHTMLDocument2 *  iface,
IHTMLElement **  p 
)
static

Definition at line 311 of file httpreq.c.

312{
313 ok(0, "unexpected call\n");
314 return E_NOTIMPL;
315}

◆ htmldoc2_get_alinkColor()

static HRESULT WINAPI htmldoc2_get_alinkColor ( IHTMLDocument2 *  iface,
VARIANT p 
)
static

Definition at line 413 of file httpreq.c.

414{
415 ok(0, "unexpected call\n");
416 return E_NOTIMPL;
417}

◆ htmldoc2_get_all()

static HRESULT WINAPI htmldoc2_get_all ( IHTMLDocument2 *  iface,
IHTMLElementCollection **  p 
)
static

Definition at line 298 of file httpreq.c.

299{
301 *p = &htmlecoll;
302 return S_OK;
303}
GLfloat GLfloat p
Definition: glext.h:8902
#define CHECK_EXPECT2(func)
Definition: httpreq.c:78
static HRESULT WINAPI htmldoc2_get_all(IHTMLDocument2 *iface, IHTMLElementCollection **p)
Definition: httpreq.c:298
static IHTMLElementCollection htmlecoll
Definition: httpreq.c:244

Referenced by htmldoc2_get_all(), and set_xhr_site().

◆ htmldoc2_get_anchors()

static HRESULT WINAPI htmldoc2_get_anchors ( IHTMLDocument2 *  iface,
IHTMLElementCollection **  p 
)
static

Definition at line 341 of file httpreq.c.

342{
343 ok(0, "unexpected call\n");
344 return E_NOTIMPL;
345}

◆ htmldoc2_get_applets()

static HRESULT WINAPI htmldoc2_get_applets ( IHTMLDocument2 *  iface,
IHTMLElementCollection **  p 
)
static

Definition at line 323 of file httpreq.c.

324{
325 ok(0, "unexpected call\n");
326 return E_NOTIMPL;
327}

◆ htmldoc2_get_bgColor()

static HRESULT WINAPI htmldoc2_get_bgColor ( IHTMLDocument2 *  iface,
VARIANT p 
)
static

Definition at line 425 of file httpreq.c.

426{
427 ok(0, "unexpected call\n");
428 return E_NOTIMPL;
429}

◆ htmldoc2_get_body()

static HRESULT WINAPI htmldoc2_get_body ( IHTMLDocument2 *  iface,
IHTMLElement **  p 
)
static

Definition at line 305 of file httpreq.c.

306{
307 ok(0, "unexpected call\n");
308 return E_NOTIMPL;
309}

◆ htmldoc2_get_charset()

static HRESULT WINAPI htmldoc2_get_charset ( IHTMLDocument2 *  iface,
BSTR p 
)
static

Definition at line 540 of file httpreq.c.

541{
542 ok(0, "unexpected call\n");
543 return E_NOTIMPL;
544}

◆ htmldoc2_get_cookie()

static HRESULT WINAPI htmldoc2_get_cookie ( IHTMLDocument2 *  iface,
BSTR p 
)
static

Definition at line 516 of file httpreq.c.

517{
518 ok(0, "unexpected call\n");
519 return E_NOTIMPL;
520}

◆ htmldoc2_get_defaultCharset()

static HRESULT WINAPI htmldoc2_get_defaultCharset ( IHTMLDocument2 *  iface,
BSTR p 
)
static

Definition at line 552 of file httpreq.c.

553{
554 ok(0, "unexpected call\n");
555 return E_NOTIMPL;
556}

◆ htmldoc2_get_designMode()

static HRESULT WINAPI htmldoc2_get_designMode ( IHTMLDocument2 *  iface,
BSTR p 
)
static

Definition at line 371 of file httpreq.c.

372{
373 ok(0, "unexpected call\n");
374 return E_NOTIMPL;
375}

◆ htmldoc2_get_domain()

static HRESULT WINAPI htmldoc2_get_domain ( IHTMLDocument2 *  iface,
BSTR p 
)
static

Definition at line 504 of file httpreq.c.

505{
506 ok(0, "unexpected call\n");
507 return E_NOTIMPL;
508}

◆ htmldoc2_get_embeds()

static HRESULT WINAPI htmldoc2_get_embeds ( IHTMLDocument2 *  iface,
IHTMLElementCollection **  p 
)
static

Definition at line 395 of file httpreq.c.

396{
397 ok(0, "unexpected call\n");
398 return E_NOTIMPL;
399}

◆ htmldoc2_get_expando()

static HRESULT WINAPI htmldoc2_get_expando ( IHTMLDocument2 *  iface,
VARIANT_BOOL p 
)
static

Definition at line 528 of file httpreq.c.

529{
530 ok(0, "unexpected call\n");
531 return E_NOTIMPL;
532}

◆ htmldoc2_get_fgColor()

static HRESULT WINAPI htmldoc2_get_fgColor ( IHTMLDocument2 *  iface,
VARIANT p 
)
static

Definition at line 437 of file httpreq.c.

438{
439 ok(0, "unexpected call\n");
440 return E_NOTIMPL;
441}

◆ htmldoc2_get_fileCreatedDate()

static HRESULT WINAPI htmldoc2_get_fileCreatedDate ( IHTMLDocument2 *  iface,
BSTR p 
)
static

Definition at line 570 of file httpreq.c.

571{
572 ok(0, "unexpected call\n");
573 return E_NOTIMPL;
574}

◆ htmldoc2_get_fileModifiedDate()

static HRESULT WINAPI htmldoc2_get_fileModifiedDate ( IHTMLDocument2 *  iface,
BSTR p 
)
static

Definition at line 576 of file httpreq.c.

577{
578 ok(0, "unexpected call\n");
579 return E_NOTIMPL;
580}

◆ htmldoc2_get_fileSize()

static HRESULT WINAPI htmldoc2_get_fileSize ( IHTMLDocument2 *  iface,
BSTR p 
)
static

Definition at line 564 of file httpreq.c.

565{
566 ok(0, "unexpected call\n");
567 return E_NOTIMPL;
568}

◆ htmldoc2_get_fileUpdatedDate()

static HRESULT WINAPI htmldoc2_get_fileUpdatedDate ( IHTMLDocument2 *  iface,
BSTR p 
)
static

Definition at line 582 of file httpreq.c.

583{
584 ok(0, "unexpected call\n");
585 return E_NOTIMPL;
586}

◆ htmldoc2_get_forms()

static HRESULT WINAPI htmldoc2_get_forms ( IHTMLDocument2 *  iface,
IHTMLElementCollection **  p 
)
static

Definition at line 335 of file httpreq.c.

336{
337 ok(0, "unexpected call\n");
338 return E_NOTIMPL;
339}

◆ htmldoc2_get_frames()

static HRESULT WINAPI htmldoc2_get_frames ( IHTMLDocument2 *  iface,
IHTMLFramesCollection2 **  p 
)
static

Definition at line 389 of file httpreq.c.

390{
391 ok(0, "unexpected call\n");
392 return E_NOTIMPL;
393}

◆ htmldoc2_get_images()

static HRESULT WINAPI htmldoc2_get_images ( IHTMLDocument2 *  iface,
IHTMLElementCollection **  p 
)
static

Definition at line 317 of file httpreq.c.

318{
319 ok(0, "unexpected call\n");
320 return E_NOTIMPL;
321}

◆ htmldoc2_get_lastModified()

static HRESULT WINAPI htmldoc2_get_lastModified ( IHTMLDocument2 *  iface,
BSTR p 
)
static

Definition at line 479 of file httpreq.c.

480{
481 ok(0, "unexpected call\n");
482 return E_NOTIMPL;
483}

◆ htmldoc2_get_linkColor()

static HRESULT WINAPI htmldoc2_get_linkColor ( IHTMLDocument2 *  iface,
VARIANT p 
)
static

Definition at line 449 of file httpreq.c.

450{
451 ok(0, "unexpected call\n");
452 return E_NOTIMPL;
453}

◆ htmldoc2_get_links()

static HRESULT WINAPI htmldoc2_get_links ( IHTMLDocument2 *  iface,
IHTMLElementCollection **  p 
)
static

Definition at line 329 of file httpreq.c.

330{
331 ok(0, "unexpected call\n");
332 return E_NOTIMPL;
333}

◆ htmldoc2_get_location()

static HRESULT WINAPI htmldoc2_get_location ( IHTMLDocument2 *  iface,
IHTMLLocation **  p 
)
static

Definition at line 473 of file httpreq.c.

474{
475 ok(0, "unexpected call\n");
476 return E_NOTIMPL;
477}

◆ htmldoc2_get_mimeType()

static HRESULT WINAPI htmldoc2_get_mimeType ( IHTMLDocument2 *  iface,
BSTR p 
)
static

Definition at line 558 of file httpreq.c.

559{
560 ok(0, "unexpected call\n");
561 return E_NOTIMPL;
562}

◆ htmldoc2_get_nameProp()

static HRESULT WINAPI htmldoc2_get_nameProp ( IHTMLDocument2 *  iface,
BSTR p 
)
static

Definition at line 600 of file httpreq.c.

601{
602 ok(0, "unexpected call\n");
603 return E_NOTIMPL;
604}

◆ htmldoc2_get_onafterupdate()

static HRESULT WINAPI htmldoc2_get_onafterupdate ( IHTMLDocument2 *  iface,
VARIANT p 
)
static

Definition at line 850 of file httpreq.c.

851{
852 ok(0, "unexpected call\n");
853 return E_NOTIMPL;
854}

◆ htmldoc2_get_onbeforeupdate()

static HRESULT WINAPI htmldoc2_get_onbeforeupdate ( IHTMLDocument2 *  iface,
VARIANT p 
)
static

Definition at line 930 of file httpreq.c.

931{
932 ok(0, "unexpected call\n");
933 return E_NOTIMPL;
934}

◆ htmldoc2_get_onclick()

static HRESULT WINAPI htmldoc2_get_onclick ( IHTMLDocument2 *  iface,
VARIANT p 
)
static

Definition at line 718 of file httpreq.c.

719{
720 ok(0, "unexpected call\n");
721 return E_NOTIMPL;
722}

◆ htmldoc2_get_ondblclick()

static HRESULT WINAPI htmldoc2_get_ondblclick ( IHTMLDocument2 *  iface,
VARIANT p 
)
static

Definition at line 730 of file httpreq.c.

731{
732 ok(0, "unexpected call\n");
733 return E_NOTIMPL;
734}

◆ htmldoc2_get_ondragstart()

static HRESULT WINAPI htmldoc2_get_ondragstart ( IHTMLDocument2 *  iface,
VARIANT p 
)
static

Definition at line 886 of file httpreq.c.

887{
888 ok(0, "unexpected call\n");
889 return E_NOTIMPL;
890}

◆ htmldoc2_get_onerrorupdate()

static HRESULT WINAPI htmldoc2_get_onerrorupdate ( IHTMLDocument2 *  iface,
VARIANT p 
)
static

Definition at line 942 of file httpreq.c.

943{
944 ok(0, "unexpected call\n");
945 return E_NOTIMPL;
946}

◆ htmldoc2_get_onhelp()

static HRESULT WINAPI htmldoc2_get_onhelp ( IHTMLDocument2 *  iface,
VARIANT p 
)
static

Definition at line 706 of file httpreq.c.

707{
708 ok(0, "unexpected call\n");
709 return E_NOTIMPL;
710}

◆ htmldoc2_get_onkeydown()

static HRESULT WINAPI htmldoc2_get_onkeydown ( IHTMLDocument2 *  iface,
VARIANT p 
)
static

Definition at line 754 of file httpreq.c.

755{
756 ok(0, "unexpected call\n");
757 return E_NOTIMPL;
758}

◆ htmldoc2_get_onkeypress()

static HRESULT WINAPI htmldoc2_get_onkeypress ( IHTMLDocument2 *  iface,
VARIANT p 
)
static

Definition at line 766 of file httpreq.c.

767{
768 ok(0, "unexpected call\n");
769 return E_NOTIMPL;
770}

◆ htmldoc2_get_onkeyup()

static HRESULT WINAPI htmldoc2_get_onkeyup ( IHTMLDocument2 *  iface,
VARIANT p 
)
static

Definition at line 742 of file httpreq.c.

743{
744 ok(0, "unexpected call\n");
745 return E_NOTIMPL;
746}

◆ htmldoc2_get_onmousedown()

static HRESULT WINAPI htmldoc2_get_onmousedown ( IHTMLDocument2 *  iface,
VARIANT p 
)
static

Definition at line 790 of file httpreq.c.

791{
792 ok(0, "unexpected call\n");
793 return E_NOTIMPL;
794}

◆ htmldoc2_get_onmousemove()

static HRESULT WINAPI htmldoc2_get_onmousemove ( IHTMLDocument2 *  iface,
VARIANT p 
)
static

Definition at line 802 of file httpreq.c.

803{
804 ok(0, "unexpected call\n");
805 return E_NOTIMPL;
806}

◆ htmldoc2_get_onmouseout()

static HRESULT WINAPI htmldoc2_get_onmouseout ( IHTMLDocument2 *  iface,
VARIANT p 
)
static

Definition at line 814 of file httpreq.c.

815{
816 ok(0, "unexpected call\n");
817 return E_NOTIMPL;
818}

◆ htmldoc2_get_onmouseover()

static HRESULT WINAPI htmldoc2_get_onmouseover ( IHTMLDocument2 *  iface,
VARIANT p 
)
static

Definition at line 826 of file httpreq.c.

827{
828 ok(0, "unexpected call\n");
829 return E_NOTIMPL;
830}

◆ htmldoc2_get_onmouseup()

static HRESULT WINAPI htmldoc2_get_onmouseup ( IHTMLDocument2 *  iface,
VARIANT p 
)
static

Definition at line 778 of file httpreq.c.

779{
780 ok(0, "unexpected call\n");
781 return E_NOTIMPL;
782}

◆ htmldoc2_get_onreadystatechange()

static HRESULT WINAPI htmldoc2_get_onreadystatechange ( IHTMLDocument2 *  iface,
VARIANT p 
)
static

Definition at line 838 of file httpreq.c.

839{
840 ok(0, "unexpected call\n");
841 return E_NOTIMPL;
842}

◆ htmldoc2_get_onrowenter()

static HRESULT WINAPI htmldoc2_get_onrowenter ( IHTMLDocument2 *  iface,
VARIANT p 
)
static

Definition at line 874 of file httpreq.c.

875{
876 ok(0, "unexpected call\n");
877 return E_NOTIMPL;
878}

◆ htmldoc2_get_onrowexit()

static HRESULT WINAPI htmldoc2_get_onrowexit ( IHTMLDocument2 *  iface,
VARIANT p 
)
static

Definition at line 862 of file httpreq.c.

863{
864 ok(0, "unexpected call\n");
865 return E_NOTIMPL;
866}

◆ htmldoc2_get_onselectstart()

static HRESULT WINAPI htmldoc2_get_onselectstart ( IHTMLDocument2 *  iface,
VARIANT p 
)
static

Definition at line 898 of file httpreq.c.

899{
900 ok(0, "unexpected call\n");
901 return E_NOTIMPL;
902}

◆ htmldoc2_get_parentWindow()

static HRESULT WINAPI htmldoc2_get_parentWindow ( IHTMLDocument2 *  iface,
IHTMLWindow2 **  p 
)
static

Definition at line 911 of file httpreq.c.

912{
913 ok(0, "unexpected call\n");
914 return E_NOTIMPL;
915}

◆ htmldoc2_get_plugins()

static HRESULT WINAPI htmldoc2_get_plugins ( IHTMLDocument2 *  iface,
IHTMLElementCollection **  p 
)
static

Definition at line 401 of file httpreq.c.

402{
403 ok(0, "unexpected call\n");
404 return E_NOTIMPL;
405}

◆ htmldoc2_get_protocol()

static HRESULT WINAPI htmldoc2_get_protocol ( IHTMLDocument2 *  iface,
BSTR p 
)
static

Definition at line 594 of file httpreq.c.

595{
596 ok(0, "unexpected call\n");
597 return E_NOTIMPL;
598}

◆ htmldoc2_get_readyState()

static HRESULT WINAPI htmldoc2_get_readyState ( IHTMLDocument2 *  iface,
BSTR p 
)
static

Definition at line 383 of file httpreq.c.

384{
385 ok(0, "unexpected call\n");
386 return E_NOTIMPL;
387}

◆ htmldoc2_get_referrer()

static HRESULT WINAPI htmldoc2_get_referrer ( IHTMLDocument2 *  iface,
BSTR p 
)
static

Definition at line 467 of file httpreq.c.

468{
469 ok(0, "unexpected call\n");
470 return E_NOTIMPL;
471}

◆ htmldoc2_get_Script()

static HRESULT WINAPI htmldoc2_get_Script ( IHTMLDocument2 *  iface,
IDispatch **  p 
)
static

Definition at line 292 of file httpreq.c.

293{
294 ok(0, "unexpected call\n");
295 return E_NOTIMPL;
296}

◆ htmldoc2_get_scripts()

static HRESULT WINAPI htmldoc2_get_scripts ( IHTMLDocument2 *  iface,
IHTMLElementCollection **  p 
)
static

Definition at line 359 of file httpreq.c.

360{
361 ok(0, "unexpected call\n");
362 return E_NOTIMPL;
363}

◆ htmldoc2_get_security()

static HRESULT WINAPI htmldoc2_get_security ( IHTMLDocument2 *  iface,
BSTR p 
)
static

Definition at line 588 of file httpreq.c.

589{
590 ok(0, "unexpected call\n");
591 return E_NOTIMPL;
592}

◆ htmldoc2_get_selection()

static HRESULT WINAPI htmldoc2_get_selection ( IHTMLDocument2 *  iface,
IHTMLSelectionObject **  p 
)
static

Definition at line 377 of file httpreq.c.

378{
379 ok(0, "unexpected call\n");
380 return E_NOTIMPL;
381}

◆ htmldoc2_get_styleSheets()

static HRESULT WINAPI htmldoc2_get_styleSheets ( IHTMLDocument2 *  iface,
IHTMLStyleSheetsCollection **  p 
)
static

Definition at line 917 of file httpreq.c.

919{
920 ok(0, "unexpected call\n");
921 return E_NOTIMPL;
922}

◆ htmldoc2_get_title()

static HRESULT WINAPI htmldoc2_get_title ( IHTMLDocument2 *  iface,
BSTR p 
)
static

Definition at line 353 of file httpreq.c.

354{
355 ok(0, "unexpected call\n");
356 return E_NOTIMPL;
357}

◆ htmldoc2_get_URL()

static HRESULT WINAPI htmldoc2_get_URL ( IHTMLDocument2 *  iface,
BSTR p 
)
static

Definition at line 491 of file httpreq.c.

492{
493 CHECK_EXPECT2(htmldoc2_get_url);
494 *p = SysAllocString(L"http://test.winehq.org/");
495 return S_OK;
496}
#define L(x)
Definition: resources.c:13
BSTR WINAPI SysAllocString(LPCOLESTR str)
Definition: oleaut.c:238

◆ htmldoc2_get_vlinkColor()

static HRESULT WINAPI htmldoc2_get_vlinkColor ( IHTMLDocument2 *  iface,
VARIANT p 
)
static

Definition at line 461 of file httpreq.c.

462{
463 ok(0, "unexpected call\n");
464 return E_NOTIMPL;
465}

◆ htmldoc2_GetIDsOfNames()

static HRESULT WINAPI htmldoc2_GetIDsOfNames ( IHTMLDocument2 *  iface,
REFIID  riid,
LPOLESTR rgszNames,
UINT  cNames,
LCID  lcid,
DISPID rgDispId 
)
static

Definition at line 276 of file httpreq.c.

279{
280 ok(0, "unexpected call\n");
281 return E_NOTIMPL;
282}

◆ htmldoc2_GetTypeInfo()

static HRESULT WINAPI htmldoc2_GetTypeInfo ( IHTMLDocument2 *  iface,
UINT  iTInfo,
LCID  lcid,
ITypeInfo **  ppTInfo 
)
static

Definition at line 269 of file httpreq.c.

271{
272 ok(0, "unexpected call\n");
273 return E_NOTIMPL;
274}

◆ htmldoc2_GetTypeInfoCount()

static HRESULT WINAPI htmldoc2_GetTypeInfoCount ( IHTMLDocument2 *  iface,
UINT pctinfo 
)
static

Definition at line 263 of file httpreq.c.

264{
265 ok(0, "unexpected call\n");
266 return E_NOTIMPL;
267}

◆ htmldoc2_Invoke()

static HRESULT WINAPI htmldoc2_Invoke ( IHTMLDocument2 *  iface,
DISPID  dispIdMember,
REFIID  riid,
LCID  lcid,
WORD  wFlags,
DISPPARAMS *  pDispParams,
VARIANT pVarResult,
EXCEPINFO *  pExcepInfo,
UINT puArgErr 
)
static

Definition at line 284 of file httpreq.c.

287{
288 ok(0, "unexpected call\n");
289 return E_NOTIMPL;
290}

◆ htmldoc2_open()

static HRESULT WINAPI htmldoc2_open ( IHTMLDocument2 *  iface,
BSTR  url,
VARIANT  name,
VARIANT  features,
VARIANT  replace,
IDispatch **  pomWindowResult 
)
static

Definition at line 618 of file httpreq.c.

620{
621 ok(0, "unexpected call\n");
622 return E_NOTIMPL;
623}

◆ htmldoc2_put_alinkColor()

static HRESULT WINAPI htmldoc2_put_alinkColor ( IHTMLDocument2 *  iface,
VARIANT  v 
)
static

Definition at line 407 of file httpreq.c.

408{
409 ok(0, "unexpected call\n");
410 return E_NOTIMPL;
411}

◆ htmldoc2_put_bgColor()

static HRESULT WINAPI htmldoc2_put_bgColor ( IHTMLDocument2 *  iface,
VARIANT  v 
)
static

Definition at line 419 of file httpreq.c.

420{
421 ok(0, "unexpected call\n");
422 return E_NOTIMPL;
423}

◆ htmldoc2_put_charset()

static HRESULT WINAPI htmldoc2_put_charset ( IHTMLDocument2 *  iface,
BSTR  v 
)
static

Definition at line 534 of file httpreq.c.

535{
536 ok(0, "unexpected call\n");
537 return E_NOTIMPL;
538}

◆ htmldoc2_put_cookie()

static HRESULT WINAPI htmldoc2_put_cookie ( IHTMLDocument2 *  iface,
BSTR  v 
)
static

Definition at line 510 of file httpreq.c.

511{
512 ok(0, "unexpected call\n");
513 return E_NOTIMPL;
514}

◆ htmldoc2_put_defaultCharset()

static HRESULT WINAPI htmldoc2_put_defaultCharset ( IHTMLDocument2 *  iface,
BSTR  v 
)
static

Definition at line 546 of file httpreq.c.

547{
548 ok(0, "unexpected call\n");
549 return E_NOTIMPL;
550}

◆ htmldoc2_put_designMode()

static HRESULT WINAPI htmldoc2_put_designMode ( IHTMLDocument2 *  iface,
BSTR  v 
)
static

Definition at line 365 of file httpreq.c.

366{
367 ok(0, "unexpected call\n");
368 return E_NOTIMPL;
369}

◆ htmldoc2_put_domain()

static HRESULT WINAPI htmldoc2_put_domain ( IHTMLDocument2 *  iface,
BSTR  v 
)
static

Definition at line 498 of file httpreq.c.

499{
500 ok(0, "unexpected call\n");
501 return E_NOTIMPL;
502}

◆ htmldoc2_put_expando()

static HRESULT WINAPI htmldoc2_put_expando ( IHTMLDocument2 *  iface,
VARIANT_BOOL  v 
)
static

Definition at line 522 of file httpreq.c.

523{
524 ok(0, "unexpected call\n");
525 return E_NOTIMPL;
526}

◆ htmldoc2_put_fgColor()

static HRESULT WINAPI htmldoc2_put_fgColor ( IHTMLDocument2 *  iface,
VARIANT  v 
)
static

Definition at line 431 of file httpreq.c.

432{
433 ok(0, "unexpected call\n");
434 return E_NOTIMPL;
435}

◆ htmldoc2_put_linkColor()

static HRESULT WINAPI htmldoc2_put_linkColor ( IHTMLDocument2 *  iface,
VARIANT  v 
)
static

Definition at line 443 of file httpreq.c.

444{
445 ok(0, "unexpected call\n");
446 return E_NOTIMPL;
447}

◆ htmldoc2_put_onafterupdate()

static HRESULT WINAPI htmldoc2_put_onafterupdate ( IHTMLDocument2 *  iface,
VARIANT  v 
)
static

Definition at line 844 of file httpreq.c.

845{
846 ok(0, "unexpected call\n");
847 return E_NOTIMPL;
848}

◆ htmldoc2_put_onbeforeupdate()

static HRESULT WINAPI htmldoc2_put_onbeforeupdate ( IHTMLDocument2 *  iface,
VARIANT  v 
)
static

Definition at line 924 of file httpreq.c.

925{
926 ok(0, "unexpected call\n");
927 return E_NOTIMPL;
928}

◆ htmldoc2_put_onclick()

static HRESULT WINAPI htmldoc2_put_onclick ( IHTMLDocument2 *  iface,
VARIANT  v 
)
static

Definition at line 712 of file httpreq.c.

713{
714 ok(0, "unexpected call\n");
715 return E_NOTIMPL;
716}

◆ htmldoc2_put_ondblclick()

static HRESULT WINAPI htmldoc2_put_ondblclick ( IHTMLDocument2 *  iface,
VARIANT  v 
)
static

Definition at line 724 of file httpreq.c.

725{
726 ok(0, "unexpected call\n");
727 return E_NOTIMPL;
728}

◆ htmldoc2_put_ondragstart()

static HRESULT WINAPI htmldoc2_put_ondragstart ( IHTMLDocument2 *  iface,
VARIANT  v 
)
static

Definition at line 880 of file httpreq.c.

881{
882 ok(0, "unexpected call\n");
883 return E_NOTIMPL;
884}

◆ htmldoc2_put_onerrorupdate()

static HRESULT WINAPI htmldoc2_put_onerrorupdate ( IHTMLDocument2 *  iface,
VARIANT  v 
)
static

Definition at line 936 of file httpreq.c.

937{
938 ok(0, "unexpected call\n");
939 return E_NOTIMPL;
940}

◆ htmldoc2_put_onhelp()

static HRESULT WINAPI htmldoc2_put_onhelp ( IHTMLDocument2 *  iface,
VARIANT  v 
)
static

Definition at line 700 of file httpreq.c.

701{
702 ok(0, "unexpected call\n");
703 return E_NOTIMPL;
704}

◆ htmldoc2_put_onkeydown()

static HRESULT WINAPI htmldoc2_put_onkeydown ( IHTMLDocument2 *  iface,
VARIANT  v 
)
static

Definition at line 748 of file httpreq.c.

749{
750 ok(0, "unexpected call\n");
751 return E_NOTIMPL;
752}

◆ htmldoc2_put_onkeypress()

static HRESULT WINAPI htmldoc2_put_onkeypress ( IHTMLDocument2 *  iface,
VARIANT  v 
)
static

Definition at line 760 of file httpreq.c.

761{
762 ok(0, "unexpected call\n");
763 return E_NOTIMPL;
764}

◆ htmldoc2_put_onkeyup()

static HRESULT WINAPI htmldoc2_put_onkeyup ( IHTMLDocument2 *  iface,
VARIANT  v 
)
static

Definition at line 736 of file httpreq.c.

737{
738 ok(0, "unexpected call\n");
739 return E_NOTIMPL;
740}

◆ htmldoc2_put_onmousedown()

static HRESULT WINAPI htmldoc2_put_onmousedown ( IHTMLDocument2 *  iface,
VARIANT  v 
)
static

Definition at line 784 of file httpreq.c.

785{
786 ok(0, "unexpected call\n");
787 return E_NOTIMPL;
788}

◆ htmldoc2_put_onmousemove()

static HRESULT WINAPI htmldoc2_put_onmousemove ( IHTMLDocument2 *  iface,
VARIANT  v 
)
static

Definition at line 796 of file httpreq.c.

797{
798 ok(0, "unexpected call\n");
799 return E_NOTIMPL;
800}

◆ htmldoc2_put_onmouseout()

static HRESULT WINAPI htmldoc2_put_onmouseout ( IHTMLDocument2 *  iface,
VARIANT  v 
)
static

Definition at line 808 of file httpreq.c.

809{
810 ok(0, "unexpected call\n");
811 return E_NOTIMPL;
812}

◆ htmldoc2_put_onmouseover()

static HRESULT WINAPI htmldoc2_put_onmouseover ( IHTMLDocument2 *  iface,
VARIANT  v 
)
static

Definition at line 820 of file httpreq.c.

821{
822 ok(0, "unexpected call\n");
823 return E_NOTIMPL;
824}

◆ htmldoc2_put_onmouseup()

static HRESULT WINAPI htmldoc2_put_onmouseup ( IHTMLDocument2 *  iface,
VARIANT  v 
)
static

Definition at line 772 of file httpreq.c.

773{
774 ok(0, "unexpected call\n");
775 return E_NOTIMPL;
776}

◆ htmldoc2_put_onreadystatechange()

static HRESULT WINAPI htmldoc2_put_onreadystatechange ( IHTMLDocument2 *  iface,
VARIANT  v 
)
static

Definition at line 832 of file httpreq.c.

833{
834 ok(0, "unexpected call\n");
835 return E_NOTIMPL;
836}

◆ htmldoc2_put_onrowenter()

static HRESULT WINAPI htmldoc2_put_onrowenter ( IHTMLDocument2 *  iface,
VARIANT  v 
)
static

Definition at line 868 of file httpreq.c.

869{
870 ok(0, "unexpected call\n");
871 return E_NOTIMPL;
872}

◆ htmldoc2_put_onrowexit()

static HRESULT WINAPI htmldoc2_put_onrowexit ( IHTMLDocument2 *  iface,
VARIANT  v 
)
static

Definition at line 856 of file httpreq.c.

857{
858 ok(0, "unexpected call\n");
859 return E_NOTIMPL;
860}

◆ htmldoc2_put_onselectstart()

static HRESULT WINAPI htmldoc2_put_onselectstart ( IHTMLDocument2 *  iface,
VARIANT  v 
)
static

Definition at line 892 of file httpreq.c.

893{
894 ok(0, "unexpected call\n");
895 return E_NOTIMPL;
896}

◆ htmldoc2_put_title()

static HRESULT WINAPI htmldoc2_put_title ( IHTMLDocument2 *  iface,
BSTR  v 
)
static

Definition at line 347 of file httpreq.c.

348{
349 ok(0, "unexpected call\n");
350 return E_NOTIMPL;
351}

◆ htmldoc2_put_URL()

static HRESULT WINAPI htmldoc2_put_URL ( IHTMLDocument2 *  iface,
BSTR  v 
)
static

Definition at line 485 of file httpreq.c.

486{
487 ok(0, "unexpected call\n");
488 return E_NOTIMPL;
489}

◆ htmldoc2_put_vlinkColor()

static HRESULT WINAPI htmldoc2_put_vlinkColor ( IHTMLDocument2 *  iface,
VARIANT  v 
)
static

Definition at line 455 of file httpreq.c.

456{
457 ok(0, "unexpected call\n");
458 return E_NOTIMPL;
459}

◆ htmldoc2_queryCommandEnabled()

static HRESULT WINAPI htmldoc2_queryCommandEnabled ( IHTMLDocument2 *  iface,
BSTR  cmdID,
VARIANT_BOOL pfRet 
)
static

Definition at line 644 of file httpreq.c.

646{
647 ok(0, "unexpected call\n");
648 return E_NOTIMPL;
649}

◆ htmldoc2_queryCommandIndeterm()

static HRESULT WINAPI htmldoc2_queryCommandIndeterm ( IHTMLDocument2 *  iface,
BSTR  cmdID,
VARIANT_BOOL pfRet 
)
static

Definition at line 658 of file httpreq.c.

660{
661 ok(0, "unexpected call\n");
662 return E_NOTIMPL;
663}

◆ htmldoc2_queryCommandState()

static HRESULT WINAPI htmldoc2_queryCommandState ( IHTMLDocument2 *  iface,
BSTR  cmdID,
VARIANT_BOOL pfRet 
)
static

Definition at line 651 of file httpreq.c.

653{
654 ok(0, "unexpected call\n");
655 return E_NOTIMPL;
656}

◆ htmldoc2_queryCommandSupported()

static HRESULT WINAPI htmldoc2_queryCommandSupported ( IHTMLDocument2 *  iface,
BSTR  cmdID,
VARIANT_BOOL pfRet 
)
static

Definition at line 637 of file httpreq.c.

639{
640 ok(0, "unexpected call\n");
641 return E_NOTIMPL;
642}

◆ htmldoc2_queryCommandText()

static HRESULT WINAPI htmldoc2_queryCommandText ( IHTMLDocument2 *  iface,
BSTR  cmdID,
BSTR pfRet 
)
static

Definition at line 665 of file httpreq.c.

667{
668 ok(0, "unexpected call\n");
669 return E_NOTIMPL;
670}

◆ htmldoc2_queryCommandValue()

static HRESULT WINAPI htmldoc2_queryCommandValue ( IHTMLDocument2 *  iface,
BSTR  cmdID,
VARIANT pfRet 
)
static

Definition at line 672 of file httpreq.c.

674{
675 ok(0, "unexpected call\n");
676 return E_NOTIMPL;
677}

◆ htmldoc2_QueryInterface()

static HRESULT WINAPI htmldoc2_QueryInterface ( IHTMLDocument2 *  iface,
REFIID  riid,
void **  ppvObject 
)
static

Definition at line 247 of file httpreq.c.

248{
249 *ppvObject = NULL;
250 return E_NOINTERFACE;
251}

◆ htmldoc2_Release()

static ULONG WINAPI htmldoc2_Release ( IHTMLDocument2 *  iface)
static

Definition at line 258 of file httpreq.c.

259{
260 return 1;
261}

◆ htmldoc2_toString()

static HRESULT WINAPI htmldoc2_toString ( IHTMLDocument2 *  iface,
BSTR String 
)
static

Definition at line 948 of file httpreq.c.

949{
950 ok(0, "unexpected call\n");
951 return E_NOTIMPL;
952}

◆ htmldoc2_write()

static HRESULT WINAPI htmldoc2_write ( IHTMLDocument2 *  iface,
SAFEARRAY psarray 
)
static

Definition at line 606 of file httpreq.c.

607{
608 ok(0, "unexpected call\n");
609 return E_NOTIMPL;
610}

◆ htmldoc2_writeln()

static HRESULT WINAPI htmldoc2_writeln ( IHTMLDocument2 *  iface,
SAFEARRAY psarray 
)
static

Definition at line 612 of file httpreq.c.

613{
614 ok(0, "unexpected call\n");
615 return E_NOTIMPL;
616}

◆ htmlecoll_AddRef()

static ULONG WINAPI htmlecoll_AddRef ( IHTMLElementCollection *  iface)
static

Definition at line 153 of file httpreq.c.

154{
155 return 2;
156}

◆ htmlecoll_get__newEnum()

static HRESULT WINAPI htmlecoll_get__newEnum ( IHTMLElementCollection *  iface,
IUnknown **  p 
)
static

Definition at line 210 of file httpreq.c.

211{
212 ok(0, "unexpected call\n");
213 return E_NOTIMPL;
214}

◆ htmlecoll_get_length()

static HRESULT WINAPI htmlecoll_get_length ( IHTMLElementCollection *  iface,
LONG v 
)
static

Definition at line 204 of file httpreq.c.

205{
206 CHECK_EXPECT2(collection_get_length);
207 return E_NOTIMPL;
208}

◆ htmlecoll_GetIDsOfNames()

static HRESULT WINAPI htmlecoll_GetIDsOfNames ( IHTMLElementCollection *  iface,
REFIID  riid,
LPOLESTR rgszNames,
UINT  cNames,
LCID  lcid,
DISPID rgDispId 
)
static

Definition at line 176 of file httpreq.c.

179{
180 ok(0, "unexpected call\n");
181 return E_NOTIMPL;
182}

◆ htmlecoll_GetTypeInfo()

static HRESULT WINAPI htmlecoll_GetTypeInfo ( IHTMLElementCollection *  iface,
UINT  iTInfo,
LCID  lcid,
ITypeInfo **  ppTInfo 
)
static

Definition at line 169 of file httpreq.c.

171{
172 ok(0, "unexpected call\n");
173 return E_NOTIMPL;
174}

◆ htmlecoll_GetTypeInfoCount()

static HRESULT WINAPI htmlecoll_GetTypeInfoCount ( IHTMLElementCollection *  iface,
UINT pctinfo 
)
static

Definition at line 163 of file httpreq.c.

164{
165 ok(0, "unexpected call\n");
166 return E_NOTIMPL;
167}

◆ htmlecoll_Invoke()

static HRESULT WINAPI htmlecoll_Invoke ( IHTMLElementCollection *  iface,
DISPID  dispIdMember,
REFIID  riid,
LCID  lcid,
WORD  wFlags,
DISPPARAMS *  pDispParams,
VARIANT pVarResult,
EXCEPINFO *  pExcepInfo,
UINT puArgErr 
)
static

Definition at line 184 of file httpreq.c.

187{
188 ok(0, "unexpected call\n");
189 return E_NOTIMPL;
190}

◆ htmlecoll_item()

static HRESULT WINAPI htmlecoll_item ( IHTMLElementCollection *  iface,
VARIANT  name,
VARIANT  index,
IDispatch **  pdisp 
)
static

Definition at line 216 of file httpreq.c.

217{
218 ok(0, "unexpected call\n");
219 return E_NOTIMPL;
220}

◆ htmlecoll_put_length()

static HRESULT WINAPI htmlecoll_put_length ( IHTMLElementCollection *  iface,
LONG  v 
)
static

Definition at line 198 of file httpreq.c.

199{
200 ok(0, "unexpected call\n");
201 return E_NOTIMPL;
202}

◆ htmlecoll_QueryInterface()

static HRESULT WINAPI htmlecoll_QueryInterface ( IHTMLElementCollection *  iface,
REFIID  riid,
void **  ppvObject 
)
static

Definition at line 146 of file httpreq.c.

147{
148 ok(0, "unexpected call\n");
149 *ppvObject = NULL;
150 return E_NOINTERFACE;
151}

◆ htmlecoll_Release()

static ULONG WINAPI htmlecoll_Release ( IHTMLElementCollection *  iface)
static

Definition at line 158 of file httpreq.c.

159{
160 return 1;
161}

◆ htmlecoll_tags()

static HRESULT WINAPI htmlecoll_tags ( IHTMLElementCollection *  iface,
VARIANT  tagName,
IDispatch **  pdisp 
)
static

Definition at line 222 of file httpreq.c.

223{
224 ok(0, "unexpected call\n");
225 return E_NOTIMPL;
226}

◆ htmlecoll_toString()

static HRESULT WINAPI htmlecoll_toString ( IHTMLElementCollection *  iface,
BSTR String 
)
static

Definition at line 192 of file httpreq.c.

193{
194 ok(0, "unexpected call\n");
195 return E_NOTIMPL;
196}

◆ impl_from_IDispatch()

static dispevent * impl_from_IDispatch ( IDispatch iface)
inlinestatic

Definition at line 1218 of file httpreq.c.

1219{
1220 return CONTAINING_RECORD(iface, dispevent, IDispatch_iface);
1221}
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260

Referenced by dispevent_AddRef(), and dispevent_Release().

◆ set_safety_opt()

static void set_safety_opt ( IUnknown unk,
DWORD  mask,
DWORD  opts 
)
static

Definition at line 1357 of file httpreq.c.

1358{
1359 IObjectSafety *obj_safety;
1360 HRESULT hr;
1361
1362 hr = IUnknown_QueryInterface(unk, &IID_IObjectSafety, (void**)&obj_safety);
1363 ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
1364
1365 hr = IObjectSafety_SetInterfaceSafetyOptions(obj_safety, &IID_IDispatch, mask, mask&opts);
1366 ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
1367
1368 IObjectSafety_Release(obj_safety);
1369}
GLenum GLint GLuint mask
Definition: glext.h:6028

Referenced by test_safe_httpreq().

◆ set_xhr_site()

static void set_xhr_site ( IXMLHttpRequest xhr)
static

Definition at line 1371 of file httpreq.c.

1372{
1373 IObjectWithSite *obj_site;
1374 HRESULT hr;
1375
1376 hr = IXMLHttpRequest_QueryInterface(xhr, &IID_IObjectWithSite, (void**)&obj_site);
1377 ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
1378
1380
1381 SET_EXPECT(site_qi_IServiceProvider);
1382 SET_EXPECT(sp_queryservice_SID_SBindHost);
1383 SET_EXPECT(sp_queryservice_SID_SContainerDispatch_htmldoc2);
1384 SET_EXPECT(sp_queryservice_SID_secmgr_htmldoc2);
1385 SET_EXPECT(sp_queryservice_SID_secmgr_xmldomdoc);
1386 SET_EXPECT(sp_queryservice_SID_secmgr_secmgr);
1387
1388 /* calls to IHTMLDocument2 */
1390 SET_EXPECT(collection_get_length);
1391 SET_EXPECT(htmldoc2_get_url);
1392
1393 SET_EXPECT(site_qi_IXMLDOMDocument);
1394 SET_EXPECT(site_qi_IOleClientSite);
1395
1396 hr = IObjectWithSite_SetSite(obj_site, &testsite);
1397 ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
1398
1399 CHECK_CALLED(site_qi_IServiceProvider);
1400 todo_wine
1401 CHECK_CALLED(sp_queryservice_SID_SBindHost);
1402 CHECK_CALLED(sp_queryservice_SID_SContainerDispatch_htmldoc2);
1403 CHECK_CALLED(sp_queryservice_SID_secmgr_htmldoc2);
1404 todo_wine
1405 CHECK_CALLED(sp_queryservice_SID_secmgr_xmldomdoc);
1406 /* this one isn't very reliable
1407 CHECK_CALLED(sp_queryservice_SID_secmgr_secmgr); */
1408todo_wine {
1410 CHECK_CALLED(collection_get_length);
1411}
1412 CHECK_CALLED(htmldoc2_get_url);
1413
1414todo_wine {
1415 CHECK_CALLED(site_qi_IXMLDOMDocument);
1416 CHECK_CALLED(site_qi_IOleClientSite);
1417}
1418
1420
1421 IObjectWithSite_Release(obj_site);
1422}
#define SET_EXPECT(func)
Definition: httpreq.c:75
static IUnknown testsite
Definition: httpreq.c:1208
#define CHECK_CALLED(func)
Definition: httpreq.c:85
#define todo_wine
Definition: minitest.h:80
const IID IID_IObjectWithSite

Referenced by test_safe_httpreq(), and test_XMLHTTP().

◆ site_AddRef()

static ULONG WINAPI site_AddRef ( IUnknown iface)
static

Definition at line 1191 of file httpreq.c.

1192{
1193 return 2;
1194}

◆ site_QueryInterface()

static HRESULT WINAPI site_QueryInterface ( IUnknown iface,
REFIID  riid,
void **  ppvObject 
)
static

Definition at line 1168 of file httpreq.c.

1169{
1170 *ppvObject = NULL;
1171
1172 if (IsEqualGUID(riid, &IID_IServiceProvider))
1173 CHECK_EXPECT2(site_qi_IServiceProvider);
1174
1175 if (IsEqualGUID(riid, &IID_IXMLDOMDocument))
1176 CHECK_EXPECT2(site_qi_IXMLDOMDocument);
1177
1179 CHECK_EXPECT2(site_qi_IOleClientSite);
1180
1182 *ppvObject = iface;
1183 else if (IsEqualGUID(riid, &IID_IServiceProvider))
1184 *ppvObject = &testprov;
1185
1186 if (*ppvObject) IUnknown_AddRef(iface);
1187
1188 return *ppvObject ? S_OK : E_NOINTERFACE;
1189}
static IServiceProvider testprov
Definition: httpreq.c:1166
const GUID IID_IOleClientSite

◆ site_Release()

static ULONG WINAPI site_Release ( IUnknown iface)
static

Definition at line 1196 of file httpreq.c.

1197{
1198 return 1;
1199}

◆ sp_AddRef()

static ULONG WINAPI sp_AddRef ( IServiceProvider iface)
static

Definition at line 1099 of file httpreq.c.

1100{
1101 return 2;
1102}

◆ sp_QueryInterface()

static HRESULT WINAPI sp_QueryInterface ( IServiceProvider iface,
REFIID  riid,
void **  ppvObject 
)
static

Definition at line 1082 of file httpreq.c.

1083{
1084 *ppvObject = NULL;
1085
1086 if (IsEqualGUID(riid, &IID_IUnknown) ||
1087 IsEqualGUID(riid, &IID_IServiceProvider))
1088 {
1089 *ppvObject = iface;
1090 IServiceProvider_AddRef(iface);
1091 return S_OK;
1092 }
1093
1094 ok(0, "unexpected query interface: %s\n", wine_dbgstr_guid(riid));
1095
1096 return E_NOINTERFACE;
1097}
static __inline const char * wine_dbgstr_guid(const GUID *id)
Definition: debug.h:197

◆ sp_QueryService()

static HRESULT WINAPI sp_QueryService ( IServiceProvider iface,
REFGUID  service,
REFIID  riid,
void **  obj 
)
static

Definition at line 1109 of file httpreq.c.

1110{
1111 *obj = NULL;
1112
1113 if (IsEqualGUID(service, &SID_SBindHost) &&
1114 IsEqualGUID(riid, &IID_IBindHost))
1115 {
1116 CHECK_EXPECT2(sp_queryservice_SID_SBindHost);
1117 }
1118 else if (IsEqualGUID(service, &SID_SContainerDispatch) &&
1119 IsEqualGUID(riid, &IID_IHTMLDocument2))
1120 {
1121 CHECK_EXPECT2(sp_queryservice_SID_SContainerDispatch_htmldoc2);
1122 }
1123 else if (IsEqualGUID(service, &SID_SInternetHostSecurityManager) &&
1124 IsEqualGUID(riid, &IID_IHTMLDocument2))
1125 {
1126 CHECK_EXPECT2(sp_queryservice_SID_secmgr_htmldoc2);
1127 *obj = &htmldoc2;
1128 return S_OK;
1129 }
1130 else if (IsEqualGUID(service, &SID_SInternetHostSecurityManager) &&
1131 IsEqualGUID(riid, &IID_IXMLDOMDocument))
1132 {
1133 CHECK_EXPECT2(sp_queryservice_SID_secmgr_xmldomdoc);
1134 }
1135 else if (IsEqualGUID(service, &SID_SInternetHostSecurityManager) &&
1136 IsEqualGUID(riid, &IID_IInternetHostSecurityManager))
1137 {
1138 CHECK_EXPECT2(sp_queryservice_SID_secmgr_secmgr);
1139 }
1140 else if (IsEqualGUID(service, &SID_UnknownSID) &&
1141 IsEqualGUID(riid, &IID_IStream))
1142 {
1143 /* FIXME: unidentified service id */
1144 }
1145 else if ((IsEqualGUID(service, &IID_IInternetProtocol) && IsEqualGUID(riid, &IID_IInternetProtocol)) ||
1146 (IsEqualGUID(service, &IID_IHttpNegotiate2) && IsEqualGUID(riid, &IID_IHttpNegotiate2)) ||
1147 (IsEqualGUID(service, &IID_IGetBindHandle) && IsEqualGUID(riid, &IID_IGetBindHandle)) ||
1148 (IsEqualGUID(service, &IID_IBindStatusCallback) && IsEqualGUID(riid, &IID_IBindStatusCallback)) ||
1149 (IsEqualGUID(service, &IID_IWindowForBindingUI) && IsEqualGUID(riid, &IID_IWindowForBindingUI)))
1150 {
1151 }
1152 else
1153 ok(0, "unexpected request: sid %s, riid %s\n", wine_dbgstr_guid(service), wine_dbgstr_guid(riid));
1154
1155 return E_NOTIMPL;
1156}
static IHTMLDocument2 htmldoc2
Definition: httpreq.c:1080

◆ sp_Release()

static ULONG WINAPI sp_Release ( IServiceProvider iface)
static

Definition at line 1104 of file httpreq.c.

1105{
1106 return 1;
1107}

◆ START_TEST()

START_TEST ( httpreq  )

Definition at line 1907 of file httpreq.c.

1908{
1910
1912
1913 if (!(xhr = create_xhr()))
1914 {
1915 win_skip("IXMLHTTPRequest is not available\n");
1917 return;
1918 }
1919
1920 IXMLHttpRequest_Release(xhr);
1921
1922 test_XMLHTTP();
1926
1928}
HRESULT WINAPI CoInitialize(LPVOID lpReserved)
Definition: compobj.c:1964
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
Definition: compobj.c:2067
static void test_XMLHTTP(void)
Definition: httpreq.c:1452
static void test_server_xhr(void)
Definition: httpreq.c:1800
static void test_safe_httpreq(void)
Definition: httpreq.c:1844
static void test_supporterrorinfo(void)
Definition: httpreq.c:1864
static IXMLHttpRequest * create_xhr(void)
Definition: httpreq.c:1336
#define win_skip
Definition: minitest.h:67

◆ strcmp_wa()

static int strcmp_wa ( const WCHAR strw,
const char stra 
)
static

Definition at line 108 of file httpreq.c.

109{
110 WCHAR buf[512];
112 return lstrcmpW(strw, buf);
113}
int WINAPI lstrcmpW(LPCWSTR str1, LPCWSTR str2)
Definition: locale.c:4246
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
static const char * strw(LPCWSTR x)
Definition: actctx.c:49
__wchar_t WCHAR
Definition: xmlstorage.h:180

Referenced by test_server_xhr().

◆ test_safe_httpreq()

static void test_safe_httpreq ( void  )
static

Definition at line 1844 of file httpreq.c.

1845{
1847
1848 xhr = create_xhr();
1849
1850 set_safety_opt((IUnknown*)xhr, INTERFACESAFE_FOR_UNTRUSTED_DATA, -1);
1852
1853 /* different scheme */
1854 test_open(xhr, "GET", "https://test.winehq.org/tests/hello.html", E_ACCESSDENIED);
1855
1856 /* different host */
1857 test_open(xhr, "GET", "http://tests.winehq.org/tests/hello.html", E_ACCESSDENIED);
1858 test_open(xhr, "GET", "http://www.test.winehq.org/tests/hello.html", E_ACCESSDENIED);
1859
1860 IXMLHttpRequest_Release(xhr);
1861 free_bstrs();
1862}
#define test_open(a, b, c, d)
Definition: httpreq.c:1424
static void free_bstrs(void)
Definition: httpreq.c:136
static void set_xhr_site(IXMLHttpRequest *xhr)
Definition: httpreq.c:1371
static void set_safety_opt(IUnknown *unk, DWORD mask, DWORD opts)
Definition: httpreq.c:1357
#define E_ACCESSDENIED
Definition: winerror.h:4116

Referenced by START_TEST().

◆ test_server_xhr()

static void test_server_xhr ( void  )
static

Definition at line 1800 of file httpreq.c.

1801{
1802 IServerXMLHTTPRequest *xhr;
1803 BSTR response;
1804 VARIANT body;
1805 HRESULT hr;
1806
1807 /* GET request */
1809
1811
1812 V_VT(&body) = VT_EMPTY;
1813
1814 hr = IServerXMLHTTPRequest_send(xhr, body);
1816 {
1817 skip("No connection could be made with test.winehq.org\n");
1818 IServerXMLHTTPRequest_Release(xhr);
1819 return;
1820 }
1821 ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
1822
1823 hr = IServerXMLHTTPRequest_get_responseText(xhr, &response);
1824 ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
1825 ok(!strcmp_wa(response, xmltestbodyA), "got %s\n", wine_dbgstr_w(response));
1826 SysFreeString(response);
1827
1828 IServerXMLHTTPRequest_Release(xhr);
1829
1830 /* invalid host */
1832
1833 test_server_open(xhr, "GET", "http://invalid.host.test.winehq.org/test/path", S_OK);
1834
1835 V_VT(&body) = VT_EMPTY;
1836 hr = IServerXMLHTTPRequest_send(xhr, body);
1837 todo_wine
1838 ok(hr == WININET_E_NAME_NOT_RESOLVED, "Unexpected hr %#lx.\n", hr);
1839
1840 IServerXMLHTTPRequest_Release(xhr);
1841 free_bstrs();
1842}
#define skip(...)
Definition: atltest.h:64
static const char xmltestA[]
Definition: httpreq.c:64
#define test_server_open(a, b, c, d)
Definition: httpreq.c:1438
static IServerXMLHTTPRequest * create_server_xhr(void)
Definition: httpreq.c:1347
static int strcmp_wa(const WCHAR *strw, const char *stra)
Definition: httpreq.c:108
static const CHAR xmltestbodyA[]
Definition: httpreq.c:65
#define wine_dbgstr_w
Definition: kernel32.h:34
static const void * body(MD5_CTX *ctx, const void *data, unsigned long size)
Definition: md5.c:100
#define WININET_E_NAME_NOT_RESOLVED
Definition: winerror.h:4127
#define INET_E_RESOURCE_NOT_FOUND
Definition: winerror.h:4655

Referenced by START_TEST().

◆ test_supporterrorinfo()

static void test_supporterrorinfo ( void  )
static

Definition at line 1864 of file httpreq.c.

1865{
1866 HRESULT hr;
1868 IServerXMLHTTPRequest *server_xhr;
1869 ISupportErrorInfo *errorinfo, *errorinfo2;
1870
1871 xhr = create_xhr();
1872
1873 EXPECT_REF(xhr, 1);
1874 hr = IXMLHttpRequest_QueryInterface(xhr, &IID_ISupportErrorInfo, (void **)&errorinfo);
1875 ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
1876 EXPECT_REF(xhr, 2);
1877
1878 hr = IXMLHttpRequest_QueryInterface(xhr, &IID_ISupportErrorInfo, (void **)&errorinfo2);
1879 ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
1880 ok(errorinfo == errorinfo2, "Unexpected error info instance.\n");
1881 EXPECT_REF(xhr, 3);
1882
1883 ISupportErrorInfo_Release(errorinfo2);
1884 ISupportErrorInfo_Release(errorinfo);
1885
1886 IXMLHttpRequest_Release(xhr);
1887
1888 /* ServerXMLHTTP */
1889 server_xhr = create_server_xhr();
1890
1891 EXPECT_REF(server_xhr, 1);
1892 hr = IServerXMLHTTPRequest_QueryInterface(server_xhr, &IID_ISupportErrorInfo, (void **)&errorinfo);
1893 ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
1894 EXPECT_REF(server_xhr, 2);
1895
1896 hr = IServerXMLHTTPRequest_QueryInterface(server_xhr, &IID_ISupportErrorInfo, (void **)&errorinfo2);
1897 ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
1898 ok(errorinfo == errorinfo2, "Unexpected error info instance.\n");
1899 EXPECT_REF(server_xhr, 3);
1900
1901 ISupportErrorInfo_Release(errorinfo2);
1902 ISupportErrorInfo_Release(errorinfo);
1903
1904 IServerXMLHTTPRequest_Release(server_xhr);
1905}
#define EXPECT_REF(node, ref)
Definition: httpreq.c:40

Referenced by START_TEST().

◆ test_XMLHTTP()

static void test_XMLHTTP ( void  )
static

Definition at line 1452 of file httpreq.c.

1453{
1454 static const char bodyA[] = "mode=Test";
1455 static const char urlA[] = "http://test.winehq.org/tests/post.php";
1456 static const char referertesturl[] = "http://test.winehq.org/tests/referer.php";
1457
1459 IObjectWithSite *obj_site, *obj_site2;
1460 BSTR bstrResponse, str, str1;
1461 VARIANT varbody;
1462 VARIANT dummy;
1463 LONG state, status, bound;
1465 void *ptr;
1466 HRESULT hr;
1467 HGLOBAL g;
1468
1469 xhr = create_xhr();
1470
1471 check_interface(xhr, &IID_IXMLHttpRequest, TRUE);
1473 check_interface(xhr, &IID_IDispatchEx, FALSE);
1474
1476 V_VT(&dummy) = VT_ERROR;
1478
1479 hr = IXMLHttpRequest_put_onreadystatechange(xhr, NULL);
1480 ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
1481
1482 hr = IXMLHttpRequest_abort(xhr);
1483 ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
1484
1485 V_VT(&varbody) = VT_I2;
1486 V_I2(&varbody) = 1;
1487 hr = IXMLHttpRequest_get_responseBody(xhr, &varbody);
1488 ok(hr == E_PENDING, "Unexpected hr %#lx.\n", hr);
1489 ok(V_VT(&varbody) == VT_EMPTY, "got type %d\n", V_VT(&varbody));
1490
1491 V_VT(&varbody) = VT_I2;
1492 V_I2(&varbody) = 1;
1493 hr = IXMLHttpRequest_get_responseStream(xhr, &varbody);
1494 ok(hr == E_PENDING, "Unexpected hr %#lx.\n", hr);
1495 ok(V_VT(&varbody) == VT_EMPTY, "got type %d\n", V_VT(&varbody));
1496
1497 /* send before open */
1498 hr = IXMLHttpRequest_send(xhr, dummy);
1499 ok(hr == E_FAIL || broken(hr == E_UNEXPECTED) /* win2k */, "Unexpected hr %#lx.\n", hr);
1500
1501 /* initial status code */
1502 hr = IXMLHttpRequest_get_status(xhr, NULL);
1503 ok(hr == E_POINTER || broken(hr == E_INVALIDARG) /* <win8 */, "Unexpected hr %#lx.\n", hr);
1504
1505 status = 0xdeadbeef;
1506 hr = IXMLHttpRequest_get_status(xhr, &status);
1507 ok(hr == E_FAIL || broken(hr == E_UNEXPECTED) /* win2k */, "Unexpected hr %#lx.\n", hr);
1508 ok(status == READYSTATE_UNINITIALIZED || broken(status == 0xdeadbeef) /* <win8 */, "Unexpected state %ld.\n", status);
1509
1510 hr = IXMLHttpRequest_get_statusText(xhr, &str);
1511 ok(hr == E_FAIL, "Unexpected hr %#lx.\n", hr);
1512
1513 /* invalid parameters */
1515 test_open(xhr, "POST", NULL, E_INVALIDARG);
1516 test_open(xhr, NULL, urlA, E_INVALIDARG);
1517
1518 hr = IXMLHttpRequest_setRequestHeader(xhr, NULL, NULL);
1519 ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
1520
1521 hr = IXMLHttpRequest_setRequestHeader(xhr, _bstr_("header1"), NULL);
1522 ok(hr == E_FAIL || broken(hr == E_UNEXPECTED) /* win2k */, "Unexpected hr %#lx.\n", hr);
1523
1524 hr = IXMLHttpRequest_setRequestHeader(xhr, NULL, _bstr_("value1"));
1525 ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
1526
1527 hr = IXMLHttpRequest_setRequestHeader(xhr, _bstr_("header1"), _bstr_("value1"));
1528 ok(hr == E_FAIL || broken(hr == E_UNEXPECTED) /* win2k */, "Unexpected hr %#lx.\n", hr);
1529
1530 hr = IXMLHttpRequest_get_readyState(xhr, NULL);
1531 ok(hr == E_POINTER || broken(hr == E_INVALIDARG) /* <win8 */, "Unexpected hr %#lx.\n", hr);
1532
1533 state = -1;
1534 hr = IXMLHttpRequest_get_readyState(xhr, &state);
1535 ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
1536 ok(state == READYSTATE_UNINITIALIZED, "Unexpected state %ld.\n", state);
1537
1538 httpreq = xhr;
1539 event = create_dispevent();
1540
1541 EXPECT_REF(event, 1);
1542 hr = IXMLHttpRequest_put_onreadystatechange(xhr, event);
1543 ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
1544 EXPECT_REF(event, 2);
1545
1547
1548 test_open(xhr, "POST", urlA, S_OK);
1549
1550 ok(g_unexpectedcall == 0, "unexpected disp event call\n");
1551 ok(g_expectedcall == 1 || broken(g_expectedcall == 0) /* win2k */, "no expected disp event call\n");
1552
1553 /* status code after ::open() */
1554 status = 0xdeadbeef;
1555 hr = IXMLHttpRequest_get_status(xhr, &status);
1556 ok(hr == E_FAIL || broken(hr == E_UNEXPECTED) /* win2k */, "Unexpected hr %#lx.\n", hr);
1557 ok(status == READYSTATE_UNINITIALIZED || broken(status == 0xdeadbeef) /* <win8 */, "Unexpected state %ld.\n", status);
1558
1559 state = -1;
1560 hr = IXMLHttpRequest_get_readyState(xhr, &state);
1561 ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
1562 ok(state == READYSTATE_LOADING, "Unexpected state %ld.\n", state);
1563
1564 hr = IXMLHttpRequest_abort(xhr);
1565 ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
1566
1567 state = -1;
1568 hr = IXMLHttpRequest_get_readyState(xhr, &state);
1569 ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
1570 ok(state == READYSTATE_UNINITIALIZED || broken(state == READYSTATE_LOADING) /* win2k */,
1571 "Unexpected state %ld.\n", state);
1572
1573 test_open(xhr, "POST", urlA, S_OK);
1574
1575 hr = IXMLHttpRequest_setRequestHeader(xhr, _bstr_("header1"), _bstr_("value1"));
1576 ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
1577
1578 hr = IXMLHttpRequest_setRequestHeader(xhr, NULL, _bstr_("value1"));
1579 ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
1580
1581 hr = IXMLHttpRequest_setRequestHeader(xhr, _bstr_(""), _bstr_("value1"));
1582 ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
1583
1584 V_VT(&varbody) = VT_BSTR;
1585 V_BSTR(&varbody) = _bstr_(bodyA);
1586
1587 hr = IXMLHttpRequest_send(xhr, varbody);
1589 {
1590 skip("No connection could be made with test.winehq.org\n");
1591 IXMLHttpRequest_Release(xhr);
1592 return;
1593 }
1594 ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
1595
1596 /* response headers */
1597 hr = IXMLHttpRequest_getAllResponseHeaders(xhr, NULL);
1598 ok(hr == E_POINTER || broken(hr == E_INVALIDARG) /* <win8 */, "Unexpected hr %#lx.\n", hr);
1599 hr = IXMLHttpRequest_getAllResponseHeaders(xhr, &str);
1600 ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
1601 /* status line is stripped already */
1602 ok(memcmp(str, L"HTTP", 4*sizeof(WCHAR)), "got response headers %s\n", wine_dbgstr_w(str));
1603 ok(*str, "got empty headers\n");
1604 hr = IXMLHttpRequest_getAllResponseHeaders(xhr, &str1);
1605 ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
1606 ok(str1 != str, "got %p\n", str1);
1607 SysFreeString(str1);
1609
1610 hr = IXMLHttpRequest_getResponseHeader(xhr, NULL, NULL);
1611 ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
1612 hr = IXMLHttpRequest_getResponseHeader(xhr, _bstr_("Date"), NULL);
1613 ok(hr == E_POINTER || broken(hr == E_INVALIDARG) /* <win8 */, "Unexpected hr %#lx.\n", hr);
1614 hr = IXMLHttpRequest_getResponseHeader(xhr, _bstr_("Date"), &str);
1615 ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
1616 ok(*str != ' ', "got leading space in header %s\n", wine_dbgstr_w(str));
1618
1619 /* status code after ::send() */
1620 status = 0;
1621 hr = IXMLHttpRequest_get_status(xhr, &status);
1622 ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
1623 ok(status == 200, "Unexpected status %ld.\n", status);
1624
1625 hr = IXMLHttpRequest_get_statusText(xhr, NULL);
1626 ok(hr == E_POINTER || broken(hr == E_INVALIDARG) /* <win8 */, "Unexpected hr %#lx.\n", hr);
1627
1628 hr = IXMLHttpRequest_get_statusText(xhr, &str);
1629 ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
1630 ok(!lstrcmpW(str, L"OK"), "got status %s\n", wine_dbgstr_w(str));
1632
1633 /* another ::send() after completed request */
1634 V_VT(&varbody) = VT_BSTR;
1635 V_BSTR(&varbody) = _bstr_(bodyA);
1636
1637 hr = IXMLHttpRequest_send(xhr, varbody);
1638 ok(hr == E_FAIL || broken(hr == E_UNEXPECTED) /* win2k */, "Unexpected hr %#lx.\n", hr);
1639
1640 hr = IXMLHttpRequest_get_responseText(xhr, &bstrResponse);
1641 ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
1642 /* the server currently returns "FAILED" because the Content-Type header is
1643 * not what the server expects */
1644 if(hr == S_OK)
1645 {
1646 ok(!memcmp(bstrResponse, L"FAILED", 7 * sizeof(WCHAR)), "Unexpected response %s.\n", wine_dbgstr_w(bstrResponse));
1647 SysFreeString(bstrResponse);
1648 }
1649
1650 /* POST: VT_VARIANT body */
1651 /* VT_VARIANT|VT_BYREF fails on Windows 10 */
1652 test_open(xhr, "POST", urlA, S_OK);
1653
1654 hr = IXMLHttpRequest_send(xhr, varbody);
1655 ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
1656
1657 /* GET request */
1658 test_open(xhr, "GET", xmltestA, S_OK);
1659
1660 V_VT(&varbody) = VT_EMPTY;
1661
1662 hr = IXMLHttpRequest_send(xhr, varbody);
1664 {
1665 skip("No connection could be made with test.winehq.org\n");
1666 IXMLHttpRequest_Release(xhr);
1667 return;
1668 }
1669 ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
1670
1671 hr = IXMLHttpRequest_get_responseText(xhr, NULL);
1672 ok(hr == E_POINTER || broken(hr == E_INVALIDARG) /* <win8 */, "Unexpected hr %#lx.\n", hr);
1673
1674 hr = IXMLHttpRequest_get_responseText(xhr, &bstrResponse);
1675 ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
1676 ok(!memcmp(bstrResponse, _bstr_(xmltestbodyA), sizeof(xmltestbodyA)*sizeof(WCHAR)),
1677 "expected %s, got %s\n", xmltestbodyA, wine_dbgstr_w(bstrResponse));
1678 SysFreeString(bstrResponse);
1679
1680 hr = IXMLHttpRequest_get_responseBody(xhr, NULL);
1681 ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
1682
1683 V_VT(&varbody) = VT_EMPTY;
1684 hr = IXMLHttpRequest_get_responseBody(xhr, &varbody);
1685 ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
1686 ok(V_VT(&varbody) == (VT_ARRAY|VT_UI1), "got type %d, expected %d\n", V_VT(&varbody), VT_ARRAY|VT_UI1);
1687 ok(SafeArrayGetDim(V_ARRAY(&varbody)) == 1, "got %d, expected one dimension\n", SafeArrayGetDim(V_ARRAY(&varbody)));
1688
1689 bound = -1;
1690 hr = SafeArrayGetLBound(V_ARRAY(&varbody), 1, &bound);
1691 ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
1692 ok(!bound, "Unexpected bound %ld.\n", bound);
1693
1694 hr = SafeArrayAccessData(V_ARRAY(&varbody), &ptr);
1695 ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
1696 ok(memcmp(ptr, xmltestbodyA, sizeof(xmltestbodyA)-1) == 0, "got wrong body data\n");
1697 SafeArrayUnaccessData(V_ARRAY(&varbody));
1698
1699 VariantClear(&varbody);
1700
1701 /* get_responseStream */
1702 hr = IXMLHttpRequest_get_responseStream(xhr, NULL);
1703 ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
1704
1705 V_VT(&varbody) = VT_EMPTY;
1706 hr = IXMLHttpRequest_get_responseStream(xhr, &varbody);
1707 ok(V_VT(&varbody) == VT_UNKNOWN, "got type %d\n", V_VT(&varbody));
1708 ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
1709 EXPECT_REF(V_UNKNOWN(&varbody), 1);
1710
1711 g = NULL;
1712 hr = GetHGlobalFromStream((IStream*)V_UNKNOWN(&varbody), &g);
1713 ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
1714 ok(g != NULL, "got %p\n", g);
1715 VariantClear(&varbody);
1716
1717 IDispatch_Release(event);
1718
1719 /* test if referrer header is sent */
1720 test_open(xhr, "GET", referertesturl, S_OK);
1721
1722 V_VT(&varbody) = VT_EMPTY;
1723 hr = IXMLHttpRequest_send(xhr, varbody);
1724 ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
1725 hr = IXMLHttpRequest_get_responseText(xhr, &str);
1726 ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
1727 ok(!lstrcmpW(str, L"no referer set"), "got response text %s\n", wine_dbgstr_w(str));
1729
1730 /* interaction with object site */
1731 hr = IXMLHttpRequest_QueryInterface(xhr, &IID_IObjectWithSite, (void**)&obj_site);
1732 ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
1733
1734 hr = IObjectWithSite_SetSite(obj_site, NULL);
1735 ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
1736
1737 hr = IXMLHttpRequest_QueryInterface(xhr, &IID_IObjectWithSite, (void**)&obj_site2);
1738 ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
1739 ok(obj_site == obj_site2 || broken(obj_site != obj_site2), "got new instance\n");
1740 IObjectWithSite_Release(obj_site2);
1741
1743
1744 test_open(xhr, "GET", "tests/referer.php", S_OK);
1745 str1 = SysAllocString(L"http://test.winehq.org/");
1746
1747 V_VT(&varbody) = VT_EMPTY;
1748 hr = IXMLHttpRequest_send(xhr, varbody);
1749 ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
1750
1751 hr = IXMLHttpRequest_get_responseText(xhr, &str);
1752 ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
1753 ok(!lstrcmpW(str, str1), "got response text %s, expected %s\n", wine_dbgstr_w(str), wine_dbgstr_w(str1));
1755 SysFreeString(str1);
1756
1757 /* try to set site another time */
1758 hr = IObjectWithSite_SetSite(obj_site, &testsite);
1759 ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
1760
1761 IObjectWithSite_Release(obj_site);
1762
1763 /* HEAD request */
1764 hr = IXMLHttpRequest_put_onreadystatechange(xhr, NULL);
1765 ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
1766
1767 test_open(xhr, "HEAD", xmltestA, S_OK);
1768
1769 V_VT(&varbody) = VT_EMPTY;
1770 hr = IXMLHttpRequest_send(xhr, varbody);
1771 ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
1772
1773 str = NULL;
1774 hr = IXMLHttpRequest_get_responseText(xhr, &str);
1775 ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
1776 ok(!*str, "Unexpected text %s.\n", wine_dbgstr_w(str));
1778
1779 hr = IXMLHttpRequest_getAllResponseHeaders(xhr, &str);
1780 ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
1781 ok(str && *str, "Expected response headers.\n");
1783
1784 IXMLHttpRequest_Release(xhr);
1785
1786 /* invalid host */
1787 xhr = create_xhr();
1788
1789 test_open(xhr, "GET", "http://invalid.host.test.winehq.org/test/path", S_OK);
1790
1791 V_VT(&varbody) = VT_EMPTY;
1792 hr = IXMLHttpRequest_send(xhr, varbody);
1793 todo_wine
1794 ok(hr == INET_E_RESOURCE_NOT_FOUND, "Unexpected hr %#lx.\n", hr);
1795
1796 IXMLHttpRequest_Release(xhr);
1797 free_bstrs();
1798}
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
Definition: utclib.c:112
#define broken(x)
Definition: atltest.h:178
#define E_INVALIDARG
Definition: ddrawi.h:101
#define E_PENDING
Definition: dinput.h:172
@ VT_BSTR
Definition: compat.h:2303
@ VT_UNKNOWN
Definition: compat.h:2308
@ VT_ERROR
Definition: compat.h:2305
@ VT_ARRAY
Definition: compat.h:2341
@ VT_I2
Definition: compat.h:2297
@ VT_UI1
Definition: compat.h:2311
HRESULT WINAPI GetHGlobalFromStream(IStream *pstm, HGLOBAL *phglobal)
HRESULT WINAPI SafeArrayAccessData(SAFEARRAY *psa, void **ppvData)
Definition: safearray.c:1137
HRESULT WINAPI SafeArrayUnaccessData(SAFEARRAY *psa)
Definition: safearray.c:1168
UINT WINAPI SafeArrayGetDim(SAFEARRAY *psa)
Definition: safearray.c:1094
HRESULT WINAPI SafeArrayGetLBound(SAFEARRAY *psa, UINT nDim, LONG *plLbound)
Definition: safearray.c:1066
GLboolean GLboolean g
Definition: glext.h:6204
static IDispatch * create_dispevent(void)
Definition: httpreq.c:1326
#define check_interface(a, b, c)
Definition: httpreq.c:49
static PVOID ptr
Definition: dispmode.c:27
#define V_ERROR(A)
Definition: oleauto.h:241
#define V_ARRAY(A)
Definition: oleauto.h:222
#define V_UNKNOWN(A)
Definition: oleauto.h:281
#define V_BSTR(A)
Definition: oleauto.h:226
#define V_I2(A)
Definition: oleauto.h:245
Definition: ps.c:97
HRESULT WINAPI DECLSPEC_HOTPATCH VariantClear(VARIANTARG *pVarg)
Definition: variant.c:648
void WINAPI VariantInit(VARIANTARG *pVarg)
Definition: variant.c:568
#define DISP_E_MEMBERNOTFOUND
Definition: winerror.h:3615
#define E_UNEXPECTED
Definition: winerror.h:3528
#define E_POINTER
Definition: winerror.h:3480

Referenced by START_TEST().

Variable Documentation

◆ alloced_bstrs

BSTR alloced_bstrs[256]
static

Definition at line 123 of file httpreq.c.

Referenced by _bstr_(), and free_bstrs().

◆ alloced_bstrs_count

int alloced_bstrs_count
static

Definition at line 124 of file httpreq.c.

Referenced by _bstr_(), and free_bstrs().

◆ dispeventVtbl

const IDispatchVtbl dispeventVtbl
static
Initial value:
=
{
}
static HRESULT WINAPI dispevent_GetTypeInfo(IDispatch *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
Definition: httpreq.c:1264
static HRESULT WINAPI dispevent_Invoke(IDispatch *iface, DISPID member, REFIID riid, LCID lcid, WORD flags, DISPPARAMS *params, VARIANT *result, EXCEPINFO *excepInfo, UINT *argErr)
Definition: httpreq.c:1278
static ULONG WINAPI dispevent_AddRef(IDispatch *iface)
Definition: httpreq.c:1240
static HRESULT WINAPI dispevent_QueryInterface(IDispatch *iface, REFIID riid, void **ppvObject)
Definition: httpreq.c:1223
static HRESULT WINAPI dispevent_GetTypeInfoCount(IDispatch *iface, UINT *pctinfo)
Definition: httpreq.c:1257
static HRESULT WINAPI dispevent_GetIDsOfNames(IDispatch *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
Definition: httpreq.c:1271
static ULONG WINAPI dispevent_Release(IDispatch *iface)
Definition: httpreq.c:1246

Definition at line 1315 of file httpreq.c.

Referenced by create_dispevent().

◆ g_enablecallchecks

BOOL g_enablecallchecks
static

Definition at line 70 of file httpreq.c.

Referenced by set_xhr_site().

◆ g_expectedcall

int g_expectedcall
static

Definition at line 106 of file httpreq.c.

Referenced by dispevent_Invoke(), and test_XMLHTTP().

◆ g_unexpectedcall

int g_unexpectedcall
static

◆ htmldoc2

IHTMLDocument2 htmldoc2 = { &TestHTMLDocumentVtbl }
static

Definition at line 1080 of file httpreq.c.

Referenced by sp_QueryService().

◆ htmlecoll

IHTMLElementCollection htmlecoll = { &TestHTMLECollectionVtbl }
static

Definition at line 244 of file httpreq.c.

Referenced by htmldoc2_get_all().

◆ httpreq

IXMLHttpRequest* httpreq
static

Definition at line 1216 of file httpreq.c.

Referenced by dispevent_Invoke(), and test_XMLHTTP().

◆ TestHTMLDocumentVtbl

const IHTMLDocument2Vtbl TestHTMLDocumentVtbl
static

Definition at line 961 of file httpreq.c.

◆ TestHTMLECollectionVtbl

const IHTMLElementCollectionVtbl TestHTMLECollectionVtbl
static
Initial value:
= {
}
static HRESULT WINAPI htmlecoll_item(IHTMLElementCollection *iface, VARIANT name, VARIANT index, IDispatch **pdisp)
Definition: httpreq.c:216
static HRESULT WINAPI htmlecoll_GetTypeInfoCount(IHTMLElementCollection *iface, UINT *pctinfo)
Definition: httpreq.c:163
static HRESULT WINAPI htmlecoll_put_length(IHTMLElementCollection *iface, LONG v)
Definition: httpreq.c:198
static HRESULT WINAPI htmlecoll_get__newEnum(IHTMLElementCollection *iface, IUnknown **p)
Definition: httpreq.c:210
static ULONG WINAPI htmlecoll_AddRef(IHTMLElementCollection *iface)
Definition: httpreq.c:153
static HRESULT WINAPI htmlecoll_tags(IHTMLElementCollection *iface, VARIANT tagName, IDispatch **pdisp)
Definition: httpreq.c:222
static HRESULT WINAPI htmlecoll_get_length(IHTMLElementCollection *iface, LONG *v)
Definition: httpreq.c:204
static HRESULT WINAPI htmlecoll_Invoke(IHTMLElementCollection *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
Definition: httpreq.c:184
static ULONG WINAPI htmlecoll_Release(IHTMLElementCollection *iface)
Definition: httpreq.c:158
static HRESULT WINAPI htmlecoll_GetTypeInfo(IHTMLElementCollection *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
Definition: httpreq.c:169
static HRESULT WINAPI htmlecoll_toString(IHTMLElementCollection *iface, BSTR *String)
Definition: httpreq.c:192
static HRESULT WINAPI htmlecoll_QueryInterface(IHTMLElementCollection *iface, REFIID riid, void **ppvObject)
Definition: httpreq.c:146
static HRESULT WINAPI htmlecoll_GetIDsOfNames(IHTMLElementCollection *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
Definition: httpreq.c:176

Definition at line 228 of file httpreq.c.

◆ testprov

IServiceProvider testprov = { &testprovVtbl }
static

Definition at line 1166 of file httpreq.c.

Referenced by site_QueryInterface().

◆ testprovVtbl

const IServiceProviderVtbl testprovVtbl
static
Initial value:
=
{
}
static HRESULT WINAPI sp_QueryInterface(IServiceProvider *iface, REFIID riid, void **ppvObject)
Definition: httpreq.c:1082
static ULONG WINAPI sp_AddRef(IServiceProvider *iface)
Definition: httpreq.c:1099
static ULONG WINAPI sp_Release(IServiceProvider *iface)
Definition: httpreq.c:1104
static HRESULT WINAPI sp_QueryService(IServiceProvider *iface, REFGUID service, REFIID riid, void **obj)
Definition: httpreq.c:1109

Definition at line 1158 of file httpreq.c.

◆ testsite

IUnknown testsite = { &testsiteVtbl }
static

Definition at line 1208 of file httpreq.c.

Referenced by set_xhr_site(), test_secure_connection(), and test_XMLHTTP().

◆ testsiteVtbl

const IUnknownVtbl testsiteVtbl
static
Initial value:
=
{
}
static HRESULT WINAPI site_QueryInterface(IUnknown *iface, REFIID riid, void **ppvObject)
Definition: httpreq.c:1168
static ULONG WINAPI site_AddRef(IUnknown *iface)
Definition: httpreq.c:1191
static ULONG WINAPI site_Release(IUnknown *iface)
Definition: httpreq.c:1196

Definition at line 1201 of file httpreq.c.

◆ xmltestA

const char xmltestA[] = "http://test.winehq.org/tests/xmltest.xml"
static

Definition at line 64 of file httpreq.c.

Referenced by test_server_xhr(), and test_XMLHTTP().

◆ xmltestbodyA

const CHAR xmltestbodyA[] = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<a>TEST</a>\n"
static

Definition at line 65 of file httpreq.c.

Referenced by test_server_xhr(), and test_XMLHTTP().