ReactOS 0.4.16-dev-1946-g52006dd
httpreq.c
Go to the documentation of this file.
1/*
2 * XML test
3 *
4 * Copyright 2010-2012 Nikolay Sivov for CodeWeavers
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 */
20
21
22#define COBJMACROS
23#define CONST_VTABLE
24
25#include <stdio.h>
26#include <assert.h>
27
28#include "windows.h"
29
30#include "msxml2.h"
31#include "msxml2did.h"
32#include "dispex.h"
33
34#include "initguid.h"
35#include "objsafe.h"
36#include "mshtml.h"
37
38#include "wine/test.h"
39
40#define EXPECT_REF(node,ref) _expect_ref((IUnknown*)node, ref, __LINE__)
41static void _expect_ref(IUnknown* obj, ULONG ref, int line)
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}
48
49#define check_interface(a, b, c) check_interface_(__LINE__, a, b, c)
50static void check_interface_(unsigned int line, void *iface_ptr, REFIID iid, BOOL supported)
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}
63
64static const char xmltestA[] = "http://test.winehq.org/tests/xmltest.xml";
65static const CHAR xmltestbodyA[] = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<a>TEST</a>\n";
66
67DEFINE_GUID(SID_SContainerDispatch, 0xb722be00, 0x4e68, 0x101b, 0xa2, 0xbc, 0x00, 0xaa, 0x00, 0x40, 0x47, 0x70);
68DEFINE_GUID(SID_UnknownSID, 0x75dd09cb, 0x6c40, 0x11d5, 0x85, 0x43, 0x00, 0xc0, 0x4f, 0xa0, 0xfb, 0xa3);
69
71
72#define DEFINE_EXPECT(func) \
73 static BOOL expect_ ## func = FALSE, called_ ## func = FALSE
74
75#define SET_EXPECT(func) \
76 expect_ ## func = TRUE
77
78#define CHECK_EXPECT2(func) \
79 do { \
80 if (g_enablecallchecks) \
81 ok(expect_ ##func, "unexpected call " #func "\n"); \
82 called_ ## func = TRUE; \
83 }while(0)
84
85#define CHECK_CALLED(func) \
86 do { \
87 ok(called_ ## func, "expected " #func "\n"); \
88 expect_ ## func = called_ ## func = FALSE; \
89 }while(0)
90
91/* object site */
92DEFINE_EXPECT(site_qi_IServiceProvider);
93DEFINE_EXPECT(site_qi_IXMLDOMDocument);
94DEFINE_EXPECT(site_qi_IOleClientSite);
95
96DEFINE_EXPECT(sp_queryservice_SID_SBindHost);
97DEFINE_EXPECT(sp_queryservice_SID_SContainerDispatch_htmldoc2);
98DEFINE_EXPECT(sp_queryservice_SID_secmgr_htmldoc2);
99DEFINE_EXPECT(sp_queryservice_SID_secmgr_xmldomdoc);
100DEFINE_EXPECT(sp_queryservice_SID_secmgr_secmgr);
101
103DEFINE_EXPECT(htmldoc2_get_url);
104DEFINE_EXPECT(collection_get_length);
105
107
108static int strcmp_wa(const WCHAR *strw, const char *stra)
109{
110 WCHAR buf[512];
112 return lstrcmpW(strw, buf);
113}
114
115static BSTR alloc_str_from_narrow(const char *str)
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}
122
123static BSTR alloced_bstrs[256];
125
126static BSTR _bstr_(const char *str)
127{
128 if(!str)
129 return NULL;
130
134}
135
136static void free_bstrs(void)
137{
138 int i;
139 for (i = 0; i < alloced_bstrs_count; i++)
142}
143
144
145/* test IHTMLElementCollection */
146static HRESULT WINAPI htmlecoll_QueryInterface(IHTMLElementCollection *iface, REFIID riid, void **ppvObject)
147{
148 ok(0, "unexpected call\n");
149 *ppvObject = NULL;
150 return E_NOINTERFACE;
151}
152
153static ULONG WINAPI htmlecoll_AddRef(IHTMLElementCollection *iface)
154{
155 return 2;
156}
157
158static ULONG WINAPI htmlecoll_Release(IHTMLElementCollection *iface)
159{
160 return 1;
161}
162
163static HRESULT WINAPI htmlecoll_GetTypeInfoCount(IHTMLElementCollection *iface, UINT *pctinfo)
164{
165 ok(0, "unexpected call\n");
166 return E_NOTIMPL;
167}
168
169static HRESULT WINAPI htmlecoll_GetTypeInfo(IHTMLElementCollection *iface, UINT iTInfo,
170 LCID lcid, ITypeInfo **ppTInfo)
171{
172 ok(0, "unexpected call\n");
173 return E_NOTIMPL;
174}
175
176static HRESULT WINAPI htmlecoll_GetIDsOfNames(IHTMLElementCollection *iface, REFIID riid,
177 LPOLESTR *rgszNames, UINT cNames,
178 LCID lcid, DISPID *rgDispId)
179{
180 ok(0, "unexpected call\n");
181 return E_NOTIMPL;
182}
183
184static HRESULT WINAPI htmlecoll_Invoke(IHTMLElementCollection *iface, DISPID dispIdMember,
185 REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
186 VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
187{
188 ok(0, "unexpected call\n");
189 return E_NOTIMPL;
190}
191
192static HRESULT WINAPI htmlecoll_toString(IHTMLElementCollection *iface, BSTR *String)
193{
194 ok(0, "unexpected call\n");
195 return E_NOTIMPL;
196}
197
198static HRESULT WINAPI htmlecoll_put_length(IHTMLElementCollection *iface, LONG v)
199{
200 ok(0, "unexpected call\n");
201 return E_NOTIMPL;
202}
203
204static HRESULT WINAPI htmlecoll_get_length(IHTMLElementCollection *iface, LONG *v)
205{
206 CHECK_EXPECT2(collection_get_length);
207 return E_NOTIMPL;
208}
209
210static HRESULT WINAPI htmlecoll_get__newEnum(IHTMLElementCollection *iface, IUnknown **p)
211{
212 ok(0, "unexpected call\n");
213 return E_NOTIMPL;
214}
215
216static HRESULT WINAPI htmlecoll_item(IHTMLElementCollection *iface, VARIANT name, VARIANT index, IDispatch **pdisp)
217{
218 ok(0, "unexpected call\n");
219 return E_NOTIMPL;
220}
221
222static HRESULT WINAPI htmlecoll_tags(IHTMLElementCollection *iface, VARIANT tagName, IDispatch **pdisp)
223{
224 ok(0, "unexpected call\n");
225 return E_NOTIMPL;
226}
227
228static const IHTMLElementCollectionVtbl TestHTMLECollectionVtbl = {
242};
243
244static IHTMLElementCollection htmlecoll = { &TestHTMLECollectionVtbl };
245
246/* test IHTMLDocument2 */
247static HRESULT WINAPI htmldoc2_QueryInterface(IHTMLDocument2 *iface, REFIID riid, void **ppvObject)
248{
249 *ppvObject = NULL;
250 return E_NOINTERFACE;
251}
252
253static ULONG WINAPI htmldoc2_AddRef(IHTMLDocument2 *iface)
254{
255 return 2;
256}
257
258static ULONG WINAPI htmldoc2_Release(IHTMLDocument2 *iface)
259{
260 return 1;
261}
262
263static HRESULT WINAPI htmldoc2_GetTypeInfoCount(IHTMLDocument2 *iface, UINT *pctinfo)
264{
265 ok(0, "unexpected call\n");
266 return E_NOTIMPL;
267}
268
269static HRESULT WINAPI htmldoc2_GetTypeInfo(IHTMLDocument2 *iface, UINT iTInfo,
270 LCID lcid, ITypeInfo **ppTInfo)
271{
272 ok(0, "unexpected call\n");
273 return E_NOTIMPL;
274}
275
276static HRESULT WINAPI htmldoc2_GetIDsOfNames(IHTMLDocument2 *iface, REFIID riid,
277 LPOLESTR *rgszNames, UINT cNames,
278 LCID lcid, DISPID *rgDispId)
279{
280 ok(0, "unexpected call\n");
281 return E_NOTIMPL;
282}
283
284static HRESULT WINAPI htmldoc2_Invoke(IHTMLDocument2 *iface, DISPID dispIdMember,
285 REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
286 VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
287{
288 ok(0, "unexpected call\n");
289 return E_NOTIMPL;
290}
291
292static HRESULT WINAPI htmldoc2_get_Script(IHTMLDocument2 *iface, IDispatch **p)
293{
294 ok(0, "unexpected call\n");
295 return E_NOTIMPL;
296}
297
298static HRESULT WINAPI htmldoc2_get_all(IHTMLDocument2 *iface, IHTMLElementCollection **p)
299{
301 *p = &htmlecoll;
302 return S_OK;
303}
304
305static HRESULT WINAPI htmldoc2_get_body(IHTMLDocument2 *iface, IHTMLElement **p)
306{
307 ok(0, "unexpected call\n");
308 return E_NOTIMPL;
309}
310
311static HRESULT WINAPI htmldoc2_get_activeElement(IHTMLDocument2 *iface, IHTMLElement **p)
312{
313 ok(0, "unexpected call\n");
314 return E_NOTIMPL;
315}
316
317static HRESULT WINAPI htmldoc2_get_images(IHTMLDocument2 *iface, IHTMLElementCollection **p)
318{
319 ok(0, "unexpected call\n");
320 return E_NOTIMPL;
321}
322
323static HRESULT WINAPI htmldoc2_get_applets(IHTMLDocument2 *iface, IHTMLElementCollection **p)
324{
325 ok(0, "unexpected call\n");
326 return E_NOTIMPL;
327}
328
329static HRESULT WINAPI htmldoc2_get_links(IHTMLDocument2 *iface, IHTMLElementCollection **p)
330{
331 ok(0, "unexpected call\n");
332 return E_NOTIMPL;
333}
334
335static HRESULT WINAPI htmldoc2_get_forms(IHTMLDocument2 *iface, IHTMLElementCollection **p)
336{
337 ok(0, "unexpected call\n");
338 return E_NOTIMPL;
339}
340
341static HRESULT WINAPI htmldoc2_get_anchors(IHTMLDocument2 *iface, IHTMLElementCollection **p)
342{
343 ok(0, "unexpected call\n");
344 return E_NOTIMPL;
345}
346
347static HRESULT WINAPI htmldoc2_put_title(IHTMLDocument2 *iface, BSTR v)
348{
349 ok(0, "unexpected call\n");
350 return E_NOTIMPL;
351}
352
353static HRESULT WINAPI htmldoc2_get_title(IHTMLDocument2 *iface, BSTR *p)
354{
355 ok(0, "unexpected call\n");
356 return E_NOTIMPL;
357}
358
359static HRESULT WINAPI htmldoc2_get_scripts(IHTMLDocument2 *iface, IHTMLElementCollection **p)
360{
361 ok(0, "unexpected call\n");
362 return E_NOTIMPL;
363}
364
365static HRESULT WINAPI htmldoc2_put_designMode(IHTMLDocument2 *iface, BSTR v)
366{
367 ok(0, "unexpected call\n");
368 return E_NOTIMPL;
369}
370
371static HRESULT WINAPI htmldoc2_get_designMode(IHTMLDocument2 *iface, BSTR *p)
372{
373 ok(0, "unexpected call\n");
374 return E_NOTIMPL;
375}
376
377static HRESULT WINAPI htmldoc2_get_selection(IHTMLDocument2 *iface, IHTMLSelectionObject **p)
378{
379 ok(0, "unexpected call\n");
380 return E_NOTIMPL;
381}
382
383static HRESULT WINAPI htmldoc2_get_readyState(IHTMLDocument2 *iface, BSTR *p)
384{
385 ok(0, "unexpected call\n");
386 return E_NOTIMPL;
387}
388
389static HRESULT WINAPI htmldoc2_get_frames(IHTMLDocument2 *iface, IHTMLFramesCollection2 **p)
390{
391 ok(0, "unexpected call\n");
392 return E_NOTIMPL;
393}
394
395static HRESULT WINAPI htmldoc2_get_embeds(IHTMLDocument2 *iface, IHTMLElementCollection **p)
396{
397 ok(0, "unexpected call\n");
398 return E_NOTIMPL;
399}
400
401static HRESULT WINAPI htmldoc2_get_plugins(IHTMLDocument2 *iface, IHTMLElementCollection **p)
402{
403 ok(0, "unexpected call\n");
404 return E_NOTIMPL;
405}
406
407static HRESULT WINAPI htmldoc2_put_alinkColor(IHTMLDocument2 *iface, VARIANT v)
408{
409 ok(0, "unexpected call\n");
410 return E_NOTIMPL;
411}
412
413static HRESULT WINAPI htmldoc2_get_alinkColor(IHTMLDocument2 *iface, VARIANT *p)
414{
415 ok(0, "unexpected call\n");
416 return E_NOTIMPL;
417}
418
419static HRESULT WINAPI htmldoc2_put_bgColor(IHTMLDocument2 *iface, VARIANT v)
420{
421 ok(0, "unexpected call\n");
422 return E_NOTIMPL;
423}
424
425static HRESULT WINAPI htmldoc2_get_bgColor(IHTMLDocument2 *iface, VARIANT *p)
426{
427 ok(0, "unexpected call\n");
428 return E_NOTIMPL;
429}
430
431static HRESULT WINAPI htmldoc2_put_fgColor(IHTMLDocument2 *iface, VARIANT v)
432{
433 ok(0, "unexpected call\n");
434 return E_NOTIMPL;
435}
436
437static HRESULT WINAPI htmldoc2_get_fgColor(IHTMLDocument2 *iface, VARIANT *p)
438{
439 ok(0, "unexpected call\n");
440 return E_NOTIMPL;
441}
442
443static HRESULT WINAPI htmldoc2_put_linkColor(IHTMLDocument2 *iface, VARIANT v)
444{
445 ok(0, "unexpected call\n");
446 return E_NOTIMPL;
447}
448
449static HRESULT WINAPI htmldoc2_get_linkColor(IHTMLDocument2 *iface, VARIANT *p)
450{
451 ok(0, "unexpected call\n");
452 return E_NOTIMPL;
453}
454
455static HRESULT WINAPI htmldoc2_put_vlinkColor(IHTMLDocument2 *iface, VARIANT v)
456{
457 ok(0, "unexpected call\n");
458 return E_NOTIMPL;
459}
460
461static HRESULT WINAPI htmldoc2_get_vlinkColor(IHTMLDocument2 *iface, VARIANT *p)
462{
463 ok(0, "unexpected call\n");
464 return E_NOTIMPL;
465}
466
467static HRESULT WINAPI htmldoc2_get_referrer(IHTMLDocument2 *iface, BSTR *p)
468{
469 ok(0, "unexpected call\n");
470 return E_NOTIMPL;
471}
472
473static HRESULT WINAPI htmldoc2_get_location(IHTMLDocument2 *iface, IHTMLLocation **p)
474{
475 ok(0, "unexpected call\n");
476 return E_NOTIMPL;
477}
478
479static HRESULT WINAPI htmldoc2_get_lastModified(IHTMLDocument2 *iface, BSTR *p)
480{
481 ok(0, "unexpected call\n");
482 return E_NOTIMPL;
483}
484
485static HRESULT WINAPI htmldoc2_put_URL(IHTMLDocument2 *iface, BSTR v)
486{
487 ok(0, "unexpected call\n");
488 return E_NOTIMPL;
489}
490
491static HRESULT WINAPI htmldoc2_get_URL(IHTMLDocument2 *iface, BSTR *p)
492{
493 CHECK_EXPECT2(htmldoc2_get_url);
494 *p = SysAllocString(L"http://test.winehq.org/");
495 return S_OK;
496}
497
498static HRESULT WINAPI htmldoc2_put_domain(IHTMLDocument2 *iface, BSTR v)
499{
500 ok(0, "unexpected call\n");
501 return E_NOTIMPL;
502}
503
504static HRESULT WINAPI htmldoc2_get_domain(IHTMLDocument2 *iface, BSTR *p)
505{
506 ok(0, "unexpected call\n");
507 return E_NOTIMPL;
508}
509
510static HRESULT WINAPI htmldoc2_put_cookie(IHTMLDocument2 *iface, BSTR v)
511{
512 ok(0, "unexpected call\n");
513 return E_NOTIMPL;
514}
515
516static HRESULT WINAPI htmldoc2_get_cookie(IHTMLDocument2 *iface, BSTR *p)
517{
518 ok(0, "unexpected call\n");
519 return E_NOTIMPL;
520}
521
522static HRESULT WINAPI htmldoc2_put_expando(IHTMLDocument2 *iface, VARIANT_BOOL v)
523{
524 ok(0, "unexpected call\n");
525 return E_NOTIMPL;
526}
527
528static HRESULT WINAPI htmldoc2_get_expando(IHTMLDocument2 *iface, VARIANT_BOOL *p)
529{
530 ok(0, "unexpected call\n");
531 return E_NOTIMPL;
532}
533
534static HRESULT WINAPI htmldoc2_put_charset(IHTMLDocument2 *iface, BSTR v)
535{
536 ok(0, "unexpected call\n");
537 return E_NOTIMPL;
538}
539
540static HRESULT WINAPI htmldoc2_get_charset(IHTMLDocument2 *iface, BSTR *p)
541{
542 ok(0, "unexpected call\n");
543 return E_NOTIMPL;
544}
545
546static HRESULT WINAPI htmldoc2_put_defaultCharset(IHTMLDocument2 *iface, BSTR v)
547{
548 ok(0, "unexpected call\n");
549 return E_NOTIMPL;
550}
551
552static HRESULT WINAPI htmldoc2_get_defaultCharset(IHTMLDocument2 *iface, BSTR *p)
553{
554 ok(0, "unexpected call\n");
555 return E_NOTIMPL;
556}
557
558static HRESULT WINAPI htmldoc2_get_mimeType(IHTMLDocument2 *iface, BSTR *p)
559{
560 ok(0, "unexpected call\n");
561 return E_NOTIMPL;
562}
563
564static HRESULT WINAPI htmldoc2_get_fileSize(IHTMLDocument2 *iface, BSTR *p)
565{
566 ok(0, "unexpected call\n");
567 return E_NOTIMPL;
568}
569
570static HRESULT WINAPI htmldoc2_get_fileCreatedDate(IHTMLDocument2 *iface, BSTR *p)
571{
572 ok(0, "unexpected call\n");
573 return E_NOTIMPL;
574}
575
576static HRESULT WINAPI htmldoc2_get_fileModifiedDate(IHTMLDocument2 *iface, BSTR *p)
577{
578 ok(0, "unexpected call\n");
579 return E_NOTIMPL;
580}
581
582static HRESULT WINAPI htmldoc2_get_fileUpdatedDate(IHTMLDocument2 *iface, BSTR *p)
583{
584 ok(0, "unexpected call\n");
585 return E_NOTIMPL;
586}
587
588static HRESULT WINAPI htmldoc2_get_security(IHTMLDocument2 *iface, BSTR *p)
589{
590 ok(0, "unexpected call\n");
591 return E_NOTIMPL;
592}
593
594static HRESULT WINAPI htmldoc2_get_protocol(IHTMLDocument2 *iface, BSTR *p)
595{
596 ok(0, "unexpected call\n");
597 return E_NOTIMPL;
598}
599
600static HRESULT WINAPI htmldoc2_get_nameProp(IHTMLDocument2 *iface, BSTR *p)
601{
602 ok(0, "unexpected call\n");
603 return E_NOTIMPL;
604}
605
606static HRESULT WINAPI htmldoc2_write(IHTMLDocument2 *iface, SAFEARRAY *psarray)
607{
608 ok(0, "unexpected call\n");
609 return E_NOTIMPL;
610}
611
612static HRESULT WINAPI htmldoc2_writeln(IHTMLDocument2 *iface, SAFEARRAY *psarray)
613{
614 ok(0, "unexpected call\n");
615 return E_NOTIMPL;
616}
617
618static HRESULT WINAPI htmldoc2_open(IHTMLDocument2 *iface, BSTR url, VARIANT name,
619 VARIANT features, VARIANT replace, IDispatch **pomWindowResult)
620{
621 ok(0, "unexpected call\n");
622 return E_NOTIMPL;
623}
624
625static HRESULT WINAPI htmldoc2_close(IHTMLDocument2 *iface)
626{
627 ok(0, "unexpected call\n");
628 return E_NOTIMPL;
629}
630
631static HRESULT WINAPI htmldoc2_clear(IHTMLDocument2 *iface)
632{
633 ok(0, "unexpected call\n");
634 return E_NOTIMPL;
635}
636
637static HRESULT WINAPI htmldoc2_queryCommandSupported(IHTMLDocument2 *iface, BSTR cmdID,
638 VARIANT_BOOL *pfRet)
639{
640 ok(0, "unexpected call\n");
641 return E_NOTIMPL;
642}
643
644static HRESULT WINAPI htmldoc2_queryCommandEnabled(IHTMLDocument2 *iface, BSTR cmdID,
645 VARIANT_BOOL *pfRet)
646{
647 ok(0, "unexpected call\n");
648 return E_NOTIMPL;
649}
650
651static HRESULT WINAPI htmldoc2_queryCommandState(IHTMLDocument2 *iface, BSTR cmdID,
652 VARIANT_BOOL *pfRet)
653{
654 ok(0, "unexpected call\n");
655 return E_NOTIMPL;
656}
657
658static HRESULT WINAPI htmldoc2_queryCommandIndeterm(IHTMLDocument2 *iface, BSTR cmdID,
659 VARIANT_BOOL *pfRet)
660{
661 ok(0, "unexpected call\n");
662 return E_NOTIMPL;
663}
664
665static HRESULT WINAPI htmldoc2_queryCommandText(IHTMLDocument2 *iface, BSTR cmdID,
666 BSTR *pfRet)
667{
668 ok(0, "unexpected call\n");
669 return E_NOTIMPL;
670}
671
672static HRESULT WINAPI htmldoc2_queryCommandValue(IHTMLDocument2 *iface, BSTR cmdID,
673 VARIANT *pfRet)
674{
675 ok(0, "unexpected call\n");
676 return E_NOTIMPL;
677}
678
679static HRESULT WINAPI htmldoc2_execCommand(IHTMLDocument2 *iface, BSTR cmdID,
680 VARIANT_BOOL showUI, VARIANT value, VARIANT_BOOL *pfRet)
681{
682 ok(0, "unexpected call\n");
683 return E_NOTIMPL;
684}
685
686static HRESULT WINAPI htmldoc2_execCommandShowHelp(IHTMLDocument2 *iface, BSTR cmdID,
687 VARIANT_BOOL *pfRet)
688{
689 ok(0, "unexpected call\n");
690 return E_NOTIMPL;
691}
692
693static HRESULT WINAPI htmldoc2_createElement(IHTMLDocument2 *iface, BSTR eTag,
694 IHTMLElement **newElem)
695{
696 ok(0, "unexpected call\n");
697 return E_NOTIMPL;
698}
699
700static HRESULT WINAPI htmldoc2_put_onhelp(IHTMLDocument2 *iface, VARIANT v)
701{
702 ok(0, "unexpected call\n");
703 return E_NOTIMPL;
704}
705
706static HRESULT WINAPI htmldoc2_get_onhelp(IHTMLDocument2 *iface, VARIANT *p)
707{
708 ok(0, "unexpected call\n");
709 return E_NOTIMPL;
710}
711
712static HRESULT WINAPI htmldoc2_put_onclick(IHTMLDocument2 *iface, VARIANT v)
713{
714 ok(0, "unexpected call\n");
715 return E_NOTIMPL;
716}
717
718static HRESULT WINAPI htmldoc2_get_onclick(IHTMLDocument2 *iface, VARIANT *p)
719{
720 ok(0, "unexpected call\n");
721 return E_NOTIMPL;
722}
723
724static HRESULT WINAPI htmldoc2_put_ondblclick(IHTMLDocument2 *iface, VARIANT v)
725{
726 ok(0, "unexpected call\n");
727 return E_NOTIMPL;
728}
729
730static HRESULT WINAPI htmldoc2_get_ondblclick(IHTMLDocument2 *iface, VARIANT *p)
731{
732 ok(0, "unexpected call\n");
733 return E_NOTIMPL;
734}
735
736static HRESULT WINAPI htmldoc2_put_onkeyup(IHTMLDocument2 *iface, VARIANT v)
737{
738 ok(0, "unexpected call\n");
739 return E_NOTIMPL;
740}
741
742static HRESULT WINAPI htmldoc2_get_onkeyup(IHTMLDocument2 *iface, VARIANT *p)
743{
744 ok(0, "unexpected call\n");
745 return E_NOTIMPL;
746}
747
748static HRESULT WINAPI htmldoc2_put_onkeydown(IHTMLDocument2 *iface, VARIANT v)
749{
750 ok(0, "unexpected call\n");
751 return E_NOTIMPL;
752}
753
754static HRESULT WINAPI htmldoc2_get_onkeydown(IHTMLDocument2 *iface, VARIANT *p)
755{
756 ok(0, "unexpected call\n");
757 return E_NOTIMPL;
758}
759
760static HRESULT WINAPI htmldoc2_put_onkeypress(IHTMLDocument2 *iface, VARIANT v)
761{
762 ok(0, "unexpected call\n");
763 return E_NOTIMPL;
764}
765
766static HRESULT WINAPI htmldoc2_get_onkeypress(IHTMLDocument2 *iface, VARIANT *p)
767{
768 ok(0, "unexpected call\n");
769 return E_NOTIMPL;
770}
771
772static HRESULT WINAPI htmldoc2_put_onmouseup(IHTMLDocument2 *iface, VARIANT v)
773{
774 ok(0, "unexpected call\n");
775 return E_NOTIMPL;
776}
777
778static HRESULT WINAPI htmldoc2_get_onmouseup(IHTMLDocument2 *iface, VARIANT *p)
779{
780 ok(0, "unexpected call\n");
781 return E_NOTIMPL;
782}
783
784static HRESULT WINAPI htmldoc2_put_onmousedown(IHTMLDocument2 *iface, VARIANT v)
785{
786 ok(0, "unexpected call\n");
787 return E_NOTIMPL;
788}
789
790static HRESULT WINAPI htmldoc2_get_onmousedown(IHTMLDocument2 *iface, VARIANT *p)
791{
792 ok(0, "unexpected call\n");
793 return E_NOTIMPL;
794}
795
796static HRESULT WINAPI htmldoc2_put_onmousemove(IHTMLDocument2 *iface, VARIANT v)
797{
798 ok(0, "unexpected call\n");
799 return E_NOTIMPL;
800}
801
802static HRESULT WINAPI htmldoc2_get_onmousemove(IHTMLDocument2 *iface, VARIANT *p)
803{
804 ok(0, "unexpected call\n");
805 return E_NOTIMPL;
806}
807
808static HRESULT WINAPI htmldoc2_put_onmouseout(IHTMLDocument2 *iface, VARIANT v)
809{
810 ok(0, "unexpected call\n");
811 return E_NOTIMPL;
812}
813
814static HRESULT WINAPI htmldoc2_get_onmouseout(IHTMLDocument2 *iface, VARIANT *p)
815{
816 ok(0, "unexpected call\n");
817 return E_NOTIMPL;
818}
819
820static HRESULT WINAPI htmldoc2_put_onmouseover(IHTMLDocument2 *iface, VARIANT v)
821{
822 ok(0, "unexpected call\n");
823 return E_NOTIMPL;
824}
825
826static HRESULT WINAPI htmldoc2_get_onmouseover(IHTMLDocument2 *iface, VARIANT *p)
827{
828 ok(0, "unexpected call\n");
829 return E_NOTIMPL;
830}
831
833{
834 ok(0, "unexpected call\n");
835 return E_NOTIMPL;
836}
837
839{
840 ok(0, "unexpected call\n");
841 return E_NOTIMPL;
842}
843
844static HRESULT WINAPI htmldoc2_put_onafterupdate(IHTMLDocument2 *iface, VARIANT v)
845{
846 ok(0, "unexpected call\n");
847 return E_NOTIMPL;
848}
849
850static HRESULT WINAPI htmldoc2_get_onafterupdate(IHTMLDocument2 *iface, VARIANT *p)
851{
852 ok(0, "unexpected call\n");
853 return E_NOTIMPL;
854}
855
856static HRESULT WINAPI htmldoc2_put_onrowexit(IHTMLDocument2 *iface, VARIANT v)
857{
858 ok(0, "unexpected call\n");
859 return E_NOTIMPL;
860}
861
862static HRESULT WINAPI htmldoc2_get_onrowexit(IHTMLDocument2 *iface, VARIANT *p)
863{
864 ok(0, "unexpected call\n");
865 return E_NOTIMPL;
866}
867
868static HRESULT WINAPI htmldoc2_put_onrowenter(IHTMLDocument2 *iface, VARIANT v)
869{
870 ok(0, "unexpected call\n");
871 return E_NOTIMPL;
872}
873
874static HRESULT WINAPI htmldoc2_get_onrowenter(IHTMLDocument2 *iface, VARIANT *p)
875{
876 ok(0, "unexpected call\n");
877 return E_NOTIMPL;
878}
879
880static HRESULT WINAPI htmldoc2_put_ondragstart(IHTMLDocument2 *iface, VARIANT v)
881{
882 ok(0, "unexpected call\n");
883 return E_NOTIMPL;
884}
885
886static HRESULT WINAPI htmldoc2_get_ondragstart(IHTMLDocument2 *iface, VARIANT *p)
887{
888 ok(0, "unexpected call\n");
889 return E_NOTIMPL;
890}
891
892static HRESULT WINAPI htmldoc2_put_onselectstart(IHTMLDocument2 *iface, VARIANT v)
893{
894 ok(0, "unexpected call\n");
895 return E_NOTIMPL;
896}
897
898static HRESULT WINAPI htmldoc2_get_onselectstart(IHTMLDocument2 *iface, VARIANT *p)
899{
900 ok(0, "unexpected call\n");
901 return E_NOTIMPL;
902}
903
904static HRESULT WINAPI htmldoc2_elementFromPoint(IHTMLDocument2 *iface, LONG x, LONG y,
905 IHTMLElement **elementHit)
906{
907 ok(0, "unexpected call\n");
908 return E_NOTIMPL;
909}
910
911static HRESULT WINAPI htmldoc2_get_parentWindow(IHTMLDocument2 *iface, IHTMLWindow2 **p)
912{
913 ok(0, "unexpected call\n");
914 return E_NOTIMPL;
915}
916
917static HRESULT WINAPI htmldoc2_get_styleSheets(IHTMLDocument2 *iface,
918 IHTMLStyleSheetsCollection **p)
919{
920 ok(0, "unexpected call\n");
921 return E_NOTIMPL;
922}
923
924static HRESULT WINAPI htmldoc2_put_onbeforeupdate(IHTMLDocument2 *iface, VARIANT v)
925{
926 ok(0, "unexpected call\n");
927 return E_NOTIMPL;
928}
929
930static HRESULT WINAPI htmldoc2_get_onbeforeupdate(IHTMLDocument2 *iface, VARIANT *p)
931{
932 ok(0, "unexpected call\n");
933 return E_NOTIMPL;
934}
935
936static HRESULT WINAPI htmldoc2_put_onerrorupdate(IHTMLDocument2 *iface, VARIANT v)
937{
938 ok(0, "unexpected call\n");
939 return E_NOTIMPL;
940}
941
942static HRESULT WINAPI htmldoc2_get_onerrorupdate(IHTMLDocument2 *iface, VARIANT *p)
943{
944 ok(0, "unexpected call\n");
945 return E_NOTIMPL;
946}
947
948static HRESULT WINAPI htmldoc2_toString(IHTMLDocument2 *iface, BSTR *String)
949{
950 ok(0, "unexpected call\n");
951 return E_NOTIMPL;
952}
953
954static HRESULT WINAPI htmldoc2_createStyleSheet(IHTMLDocument2 *iface, BSTR bstrHref,
955 LONG lIndex, IHTMLStyleSheet **ppnewStyleSheet)
956{
957 ok(0, "unexpected call\n");
958 return E_NOTIMPL;
959}
960
961static const IHTMLDocument2Vtbl TestHTMLDocumentVtbl = {
1078};
1079
1080static IHTMLDocument2 htmldoc2 = { &TestHTMLDocumentVtbl };
1081
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}
1098
1100{
1101 return 2;
1102}
1103
1105{
1106 return 1;
1107}
1108
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}
1157
1158static const IServiceProviderVtbl testprovVtbl =
1159{
1161 sp_AddRef,
1162 sp_Release,
1164};
1165
1167
1168static HRESULT WINAPI site_QueryInterface(IUnknown *iface, REFIID riid, void **ppvObject)
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}
1190
1192{
1193 return 2;
1194}
1195
1197{
1198 return 1;
1199}
1200
1201static const IUnknownVtbl testsiteVtbl =
1202{
1206};
1207
1209
1210typedef struct
1211{
1212 IDispatch IDispatch_iface;
1213 LONG ref;
1214} dispevent;
1215
1217
1219{
1220 return CONTAINING_RECORD(iface, dispevent, IDispatch_iface);
1221}
1222
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}
1239
1241{
1243 return InterlockedIncrement( &This->ref );
1244}
1245
1247{
1250
1251 if (ref == 0)
1252 free(This);
1253
1254 return ref;
1255}
1256
1258{
1260 *pctinfo = 0;
1261 return S_OK;
1262}
1263
1265 LCID lcid, ITypeInfo **ppTInfo)
1266{
1268 return S_OK;
1269}
1270
1272 LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
1273{
1275 return S_OK;
1276}
1277
1279 LCID lcid, WORD flags, DISPPARAMS *params, VARIANT *result,
1280 EXCEPINFO *excepInfo, UINT *argErr)
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}
1314
1315static const IDispatchVtbl dispeventVtbl =
1316{
1324};
1325
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}
1335
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}
1346
1347static IServerXMLHTTPRequest *create_server_xhr(void)
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}
1356
1357static void set_safety_opt(IUnknown *unk, DWORD mask, DWORD opts)
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}
1370
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}
1423
1424#define test_open(a,b,c,d) _test_open(__LINE__,a,b,c,d)
1425static void _test_open(unsigned line, IXMLHttpRequest *xhr, const char *method, const char *url, HRESULT exhres)
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}
1437
1438#define test_server_open(a,b,c,d) _test_server_open(__LINE__,a,b,c,d)
1439static void _test_server_open(unsigned line, IServerXMLHTTPRequest *xhr, const char *method, const char *url, HRESULT exhres)
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}
1451
1452static void test_XMLHTTP(void)
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}
1799
1800static void test_server_xhr(void)
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}
1843
1844static void test_safe_httpreq(void)
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}
1863
1864static void test_supporterrorinfo(void)
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}
1906
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}
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
Definition: utclib.c:112
static int state
Definition: maze.c:121
#define InterlockedIncrement
Definition: armddk.h:53
#define InterlockedDecrement
Definition: armddk.h:52
#define ok(value,...)
Definition: atltest.h:57
#define skip(...)
Definition: atltest.h:64
#define broken(x)
Definition: atltest.h:178
#define START_TEST(x)
Definition: atltest.h:75
#define ok_(x1, x2)
Definition: atltest.h:61
#define ARRAY_SIZE(A)
Definition: main.h:20
const GUID IID_IUnknown
#define E_INVALIDARG
Definition: ddrawi.h:101
#define E_NOTIMPL
Definition: ddrawi.h:99
#define E_FAIL
Definition: ddrawi.h:102
#define free
Definition: debug_ros.c:5
#define malloc
Definition: debug_ros.c:4
#define E_PENDING
Definition: dinput.h:172
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
static const WCHAR empty[]
Definition: main.c:47
#define CP_ACP
Definition: compat.h:109
OLECHAR * BSTR
Definition: compat.h:2293
short VARIANT_BOOL
Definition: compat.h:2290
#define MultiByteToWideChar
Definition: compat.h:110
@ 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_BOOL
Definition: compat.h:2306
@ VT_I2
Definition: compat.h:2297
@ VT_EMPTY
Definition: compat.h:2295
@ VT_UI1
Definition: compat.h:2311
int WINAPI lstrcmpW(LPCWSTR str1, LPCWSTR str2)
Definition: locale.c:4246
LCID lcid
Definition: locale.c:5656
const WCHAR * text
Definition: package.c:1794
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
Definition: compobj.c:3325
HRESULT WINAPI CoInitialize(LPVOID lpReserved)
Definition: compobj.c:1964
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
Definition: compobj.c:2067
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
#define assert(x)
Definition: debug.h:53
method
Definition: dragdrop.c:54
return ret
Definition: mutex.c:146
#define L(x)
Definition: resources.c:13
unsigned short WORD
Definition: ntddk_ex.h:93
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
const GLdouble * v
Definition: gl.h:2040
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
struct _cl_event * event
Definition: glext.h:7739
GLuint index
Definition: glext.h:6031
GLenum GLint GLuint mask
Definition: glext.h:6028
GLenum const GLfloat * params
Definition: glext.h:5645
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
GLbitfield flags
Definition: glext.h:7161
GLboolean GLboolean g
Definition: glext.h:6204
GLuint64EXT * result
Definition: glext.h:11304
GLfloat GLfloat p
Definition: glext.h:8902
GLenum GLsizei len
Definition: glext.h:6722
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
static HRESULT WINAPI htmldoc2_get_linkColor(IHTMLDocument2 *iface, VARIANT *p)
Definition: httpreq.c:449
static HRESULT WINAPI htmldoc2_get_selection(IHTMLDocument2 *iface, IHTMLSelectionObject **p)
Definition: httpreq.c:377
#define SET_EXPECT(func)
Definition: httpreq.c:75
static HRESULT WINAPI htmldoc2_put_defaultCharset(IHTMLDocument2 *iface, BSTR v)
Definition: httpreq.c:546
static int g_expectedcall
Definition: httpreq.c:106
static HRESULT WINAPI htmldoc2_toString(IHTMLDocument2 *iface, BSTR *String)
Definition: httpreq.c:948
static HRESULT WINAPI htmldoc2_close(IHTMLDocument2 *iface)
Definition: httpreq.c:625
static HRESULT WINAPI htmlecoll_item(IHTMLElementCollection *iface, VARIANT name, VARIANT index, IDispatch **pdisp)
Definition: httpreq.c:216
static BSTR _bstr_(const char *str)
Definition: httpreq.c:126
static HRESULT WINAPI htmlecoll_GetTypeInfoCount(IHTMLElementCollection *iface, UINT *pctinfo)
Definition: httpreq.c:163
static HRESULT WINAPI htmldoc2_get_onkeydown(IHTMLDocument2 *iface, VARIANT *p)
Definition: httpreq.c:754
static HRESULT WINAPI htmldoc2_get_onclick(IHTMLDocument2 *iface, VARIANT *p)
Definition: httpreq.c:718
static HRESULT WINAPI htmldoc2_get_nameProp(IHTMLDocument2 *iface, BSTR *p)
Definition: httpreq.c:600
static HRESULT WINAPI sp_QueryInterface(IServiceProvider *iface, REFIID riid, void **ppvObject)
Definition: httpreq.c:1082
static HRESULT WINAPI htmldoc2_elementFromPoint(IHTMLDocument2 *iface, LONG x, LONG y, IHTMLElement **elementHit)
Definition: httpreq.c:904
static HRESULT WINAPI htmldoc2_put_onclick(IHTMLDocument2 *iface, VARIANT v)
Definition: httpreq.c:712
static HRESULT WINAPI htmldoc2_get_activeElement(IHTMLDocument2 *iface, IHTMLElement **p)
Definition: httpreq.c:311
static HRESULT WINAPI htmldoc2_GetTypeInfoCount(IHTMLDocument2 *iface, UINT *pctinfo)
Definition: httpreq.c:263
static HRESULT WINAPI htmlecoll_put_length(IHTMLElementCollection *iface, LONG v)
Definition: httpreq.c:198
static IUnknown testsite
Definition: httpreq.c:1208
static HRESULT WINAPI htmldoc2_open(IHTMLDocument2 *iface, BSTR url, VARIANT name, VARIANT features, VARIANT replace, IDispatch **pomWindowResult)
Definition: httpreq.c:618
static IXMLHttpRequest * httpreq
Definition: httpreq.c:1216
static int g_unexpectedcall
Definition: httpreq.c:106
static HRESULT WINAPI htmldoc2_put_expando(IHTMLDocument2 *iface, VARIANT_BOOL v)
Definition: httpreq.c:522
static HRESULT WINAPI htmldoc2_put_vlinkColor(IHTMLDocument2 *iface, VARIANT v)
Definition: httpreq.c:455
static BSTR alloced_bstrs[256]
Definition: httpreq.c:123
static ULONG WINAPI sp_AddRef(IServiceProvider *iface)
Definition: httpreq.c:1099
static HRESULT WINAPI htmldoc2_createStyleSheet(IHTMLDocument2 *iface, BSTR bstrHref, LONG lIndex, IHTMLStyleSheet **ppnewStyleSheet)
Definition: httpreq.c:954
static HRESULT WINAPI htmlecoll_get__newEnum(IHTMLElementCollection *iface, IUnknown **p)
Definition: httpreq.c:210
static HRESULT WINAPI htmldoc2_get_readyState(IHTMLDocument2 *iface, BSTR *p)
Definition: httpreq.c:383
static HRESULT WINAPI htmldoc2_get_fileUpdatedDate(IHTMLDocument2 *iface, BSTR *p)
Definition: httpreq.c:582
static HRESULT WINAPI htmldoc2_get_plugins(IHTMLDocument2 *iface, IHTMLElementCollection **p)
Definition: httpreq.c:401
static HRESULT WINAPI htmldoc2_get_designMode(IHTMLDocument2 *iface, BSTR *p)
Definition: httpreq.c:371
static HRESULT WINAPI htmldoc2_get_mimeType(IHTMLDocument2 *iface, BSTR *p)
Definition: httpreq.c:558
static HRESULT WINAPI htmldoc2_createElement(IHTMLDocument2 *iface, BSTR eTag, IHTMLElement **newElem)
Definition: httpreq.c:693
static HRESULT WINAPI htmldoc2_get_URL(IHTMLDocument2 *iface, BSTR *p)
Definition: httpreq.c:491
static dispevent * impl_from_IDispatch(IDispatch *iface)
Definition: httpreq.c:1218
static void check_interface_(unsigned int line, void *iface_ptr, REFIID iid, BOOL supported)
Definition: httpreq.c:50
static HRESULT WINAPI htmldoc2_get_title(IHTMLDocument2 *iface, BSTR *p)
Definition: httpreq.c:353
static HRESULT WINAPI htmldoc2_get_Script(IHTMLDocument2 *iface, IDispatch **p)
Definition: httpreq.c:292
static HRESULT WINAPI htmldoc2_put_linkColor(IHTMLDocument2 *iface, VARIANT v)
Definition: httpreq.c:443
static ULONG WINAPI htmlecoll_AddRef(IHTMLElementCollection *iface)
Definition: httpreq.c:153
static HRESULT WINAPI dispevent_GetTypeInfo(IDispatch *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
Definition: httpreq.c:1264
#define test_open(a, b, c, d)
Definition: httpreq.c:1424
static ULONG WINAPI sp_Release(IServiceProvider *iface)
Definition: httpreq.c:1104
static HRESULT WINAPI htmldoc2_put_onhelp(IHTMLDocument2 *iface, VARIANT v)
Definition: httpreq.c:700
static const char xmltestA[]
Definition: httpreq.c:64
static IServiceProvider testprov
Definition: httpreq.c:1166
static HRESULT WINAPI htmldoc2_put_designMode(IHTMLDocument2 *iface, BSTR v)
Definition: httpreq.c:365
static void test_XMLHTTP(void)
Definition: httpreq.c:1452
static BSTR alloc_str_from_narrow(const char *str)
Definition: httpreq.c:115
static HRESULT WINAPI htmldoc2_get_scripts(IHTMLDocument2 *iface, IHTMLElementCollection **p)
Definition: httpreq.c:359
static HRESULT WINAPI htmldoc2_get_expando(IHTMLDocument2 *iface, VARIANT_BOOL *p)
Definition: httpreq.c:528
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 HRESULT WINAPI htmldoc2_get_onmousemove(IHTMLDocument2 *iface, VARIANT *p)
Definition: httpreq.c:802
static void _test_open(unsigned line, IXMLHttpRequest *xhr, const char *method, const char *url, HRESULT exhres)
Definition: httpreq.c:1425
static HRESULT WINAPI site_QueryInterface(IUnknown *iface, REFIID riid, void **ppvObject)
Definition: httpreq.c:1168
static HRESULT WINAPI htmldoc2_get_parentWindow(IHTMLDocument2 *iface, IHTMLWindow2 **p)
Definition: httpreq.c:911
static HRESULT WINAPI htmldoc2_put_onerrorupdate(IHTMLDocument2 *iface, VARIANT v)
Definition: httpreq.c:936
static HRESULT WINAPI htmldoc2_get_fileCreatedDate(IHTMLDocument2 *iface, BSTR *p)
Definition: httpreq.c:570
#define EXPECT_REF(node, ref)
Definition: httpreq.c:40
static const IServiceProviderVtbl testprovVtbl
Definition: httpreq.c:1158
static const IHTMLDocument2Vtbl TestHTMLDocumentVtbl
Definition: httpreq.c:961
static HRESULT WINAPI htmldoc2_get_onerrorupdate(IHTMLDocument2 *iface, VARIANT *p)
Definition: httpreq.c:942
static HRESULT WINAPI htmldoc2_GetIDsOfNames(IHTMLDocument2 *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
Definition: httpreq.c:276
static ULONG WINAPI site_AddRef(IUnknown *iface)
Definition: httpreq.c:1191
static void test_server_xhr(void)
Definition: httpreq.c:1800
static void test_safe_httpreq(void)
Definition: httpreq.c:1844
static void _expect_ref(IUnknown *obj, ULONG ref, int line)
Definition: httpreq.c:41
static HRESULT WINAPI htmldoc2_put_charset(IHTMLDocument2 *iface, BSTR v)
Definition: httpreq.c:534
#define DEFINE_EXPECT(func)
Definition: httpreq.c:72
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 ULONG WINAPI site_Release(IUnknown *iface)
Definition: httpreq.c:1196
static HRESULT WINAPI htmldoc2_get_defaultCharset(IHTMLDocument2 *iface, BSTR *p)
Definition: httpreq.c:552
static HRESULT WINAPI htmldoc2_get_onkeypress(IHTMLDocument2 *iface, VARIANT *p)
Definition: httpreq.c:766
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 HRESULT WINAPI htmldoc2_put_onmouseover(IHTMLDocument2 *iface, VARIANT v)
Definition: httpreq.c:820
static HRESULT WINAPI htmldoc2_get_onmouseover(IHTMLDocument2 *iface, VARIANT *p)
Definition: httpreq.c:826
static int alloced_bstrs_count
Definition: httpreq.c:124
static ULONG WINAPI htmlecoll_Release(IHTMLElementCollection *iface)
Definition: httpreq.c:158
static HRESULT WINAPI htmldoc2_put_alinkColor(IHTMLDocument2 *iface, VARIANT v)
Definition: httpreq.c:407
#define test_server_open(a, b, c, d)
Definition: httpreq.c:1438
static ULONG WINAPI dispevent_AddRef(IDispatch *iface)
Definition: httpreq.c:1240
static HRESULT WINAPI htmldoc2_get_links(IHTMLDocument2 *iface, IHTMLElementCollection **p)
Definition: httpreq.c:329
static HRESULT WINAPI dispevent_QueryInterface(IDispatch *iface, REFIID riid, void **ppvObject)
Definition: httpreq.c:1223
static void free_bstrs(void)
Definition: httpreq.c:136
static HRESULT WINAPI htmldoc2_get_protocol(IHTMLDocument2 *iface, BSTR *p)
Definition: httpreq.c:594
static IHTMLDocument2 htmldoc2
Definition: httpreq.c:1080
static HRESULT WINAPI htmldoc2_get_onbeforeupdate(IHTMLDocument2 *iface, VARIANT *p)
Definition: httpreq.c:930
static void test_supporterrorinfo(void)
Definition: httpreq.c:1864
static IServerXMLHTTPRequest * create_server_xhr(void)
Definition: httpreq.c:1347
static HRESULT WINAPI htmldoc2_put_onselectstart(IHTMLDocument2 *iface, VARIANT v)
Definition: httpreq.c:892
static HRESULT WINAPI htmldoc2_put_title(IHTMLDocument2 *iface, BSTR v)
Definition: httpreq.c:347
static int strcmp_wa(const WCHAR *strw, const char *stra)
Definition: httpreq.c:108
static HRESULT WINAPI htmldoc2_put_fgColor(IHTMLDocument2 *iface, VARIANT v)
Definition: httpreq.c:431
static HRESULT WINAPI htmldoc2_put_bgColor(IHTMLDocument2 *iface, VARIANT v)
Definition: httpreq.c:419
static HRESULT WINAPI htmldoc2_get_fgColor(IHTMLDocument2 *iface, VARIANT *p)
Definition: httpreq.c:437
static void _test_server_open(unsigned line, IServerXMLHTTPRequest *xhr, const char *method, const char *url, HRESULT exhres)
Definition: httpreq.c:1439
static HRESULT WINAPI htmldoc2_write(IHTMLDocument2 *iface, SAFEARRAY *psarray)
Definition: httpreq.c:606
static HRESULT WINAPI htmldoc2_get_images(IHTMLDocument2 *iface, IHTMLElementCollection **p)
Definition: httpreq.c:317
static HRESULT WINAPI dispevent_GetTypeInfoCount(IDispatch *iface, UINT *pctinfo)
Definition: httpreq.c:1257
static ULONG WINAPI htmldoc2_AddRef(IHTMLDocument2 *iface)
Definition: httpreq.c:253
static HRESULT WINAPI htmldoc2_get_ondblclick(IHTMLDocument2 *iface, VARIANT *p)
Definition: httpreq.c:730
static HRESULT WINAPI htmldoc2_get_onselectstart(IHTMLDocument2 *iface, VARIANT *p)
Definition: httpreq.c:898
static HRESULT WINAPI htmldoc2_get_alinkColor(IHTMLDocument2 *iface, VARIANT *p)
Definition: httpreq.c:413
static HRESULT WINAPI htmldoc2_get_domain(IHTMLDocument2 *iface, BSTR *p)
Definition: httpreq.c:504
static HRESULT WINAPI htmldoc2_queryCommandIndeterm(IHTMLDocument2 *iface, BSTR cmdID, VARIANT_BOOL *pfRet)
Definition: httpreq.c:658
static HRESULT WINAPI htmldoc2_get_forms(IHTMLDocument2 *iface, IHTMLElementCollection **p)
Definition: httpreq.c:335
static IDispatch * create_dispevent(void)
Definition: httpreq.c:1326
static HRESULT WINAPI htmldoc2_get_fileSize(IHTMLDocument2 *iface, BSTR *p)
Definition: httpreq.c:564
static HRESULT WINAPI htmldoc2_put_onreadystatechange(IHTMLDocument2 *iface, VARIANT v)
Definition: httpreq.c:832
static HRESULT WINAPI htmldoc2_put_onkeyup(IHTMLDocument2 *iface, VARIANT v)
Definition: httpreq.c:736
#define CHECK_EXPECT2(func)
Definition: httpreq.c:78
static HRESULT WINAPI htmldoc2_QueryInterface(IHTMLDocument2 *iface, REFIID riid, void **ppvObject)
Definition: httpreq.c:247
static HRESULT WINAPI htmldoc2_writeln(IHTMLDocument2 *iface, SAFEARRAY *psarray)
Definition: httpreq.c:612
static HRESULT WINAPI htmlecoll_GetTypeInfo(IHTMLElementCollection *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
Definition: httpreq.c:169
static HRESULT WINAPI dispevent_GetIDsOfNames(IDispatch *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
Definition: httpreq.c:1271
static HRESULT WINAPI htmldoc2_queryCommandEnabled(IHTMLDocument2 *iface, BSTR cmdID, VARIANT_BOOL *pfRet)
Definition: httpreq.c:644
static HRESULT WINAPI htmldoc2_get_ondragstart(IHTMLDocument2 *iface, VARIANT *p)
Definition: httpreq.c:886
static ULONG WINAPI dispevent_Release(IDispatch *iface)
Definition: httpreq.c:1246
static HRESULT WINAPI htmldoc2_put_onbeforeupdate(IHTMLDocument2 *iface, VARIANT v)
Definition: httpreq.c:924
static HRESULT WINAPI htmldoc2_get_onhelp(IHTMLDocument2 *iface, VARIANT *p)
Definition: httpreq.c:706
static HRESULT WINAPI htmldoc2_queryCommandText(IHTMLDocument2 *iface, BSTR cmdID, BSTR *pfRet)
Definition: httpreq.c:665
static HRESULT WINAPI htmldoc2_queryCommandState(IHTMLDocument2 *iface, BSTR cmdID, VARIANT_BOOL *pfRet)
Definition: httpreq.c:651
static HRESULT WINAPI htmldoc2_put_domain(IHTMLDocument2 *iface, BSTR v)
Definition: httpreq.c:498
static HRESULT WINAPI htmldoc2_put_onrowenter(IHTMLDocument2 *iface, VARIANT v)
Definition: httpreq.c:868
static HRESULT WINAPI htmldoc2_get_all(IHTMLDocument2 *iface, IHTMLElementCollection **p)
Definition: httpreq.c:298
static HRESULT WINAPI htmldoc2_put_onmousedown(IHTMLDocument2 *iface, VARIANT v)
Definition: httpreq.c:784
static HRESULT WINAPI htmlecoll_toString(IHTMLElementCollection *iface, BSTR *String)
Definition: httpreq.c:192
static HRESULT WINAPI htmldoc2_execCommandShowHelp(IHTMLDocument2 *iface, BSTR cmdID, VARIANT_BOOL *pfRet)
Definition: httpreq.c:686
static HRESULT WINAPI htmldoc2_get_fileModifiedDate(IHTMLDocument2 *iface, BSTR *p)
Definition: httpreq.c:576
static HRESULT WINAPI htmldoc2_put_onkeypress(IHTMLDocument2 *iface, VARIANT v)
Definition: httpreq.c:760
static HRESULT WINAPI htmldoc2_get_body(IHTMLDocument2 *iface, IHTMLElement **p)
Definition: httpreq.c:305
static HRESULT WINAPI htmldoc2_execCommand(IHTMLDocument2 *iface, BSTR cmdID, VARIANT_BOOL showUI, VARIANT value, VARIANT_BOOL *pfRet)
Definition: httpreq.c:679
static void set_xhr_site(IXMLHttpRequest *xhr)
Definition: httpreq.c:1371
static HRESULT WINAPI htmldoc2_get_styleSheets(IHTMLDocument2 *iface, IHTMLStyleSheetsCollection **p)
Definition: httpreq.c:917
static HRESULT WINAPI htmldoc2_get_embeds(IHTMLDocument2 *iface, IHTMLElementCollection **p)
Definition: httpreq.c:395
static HRESULT WINAPI htmldoc2_get_frames(IHTMLDocument2 *iface, IHTMLFramesCollection2 **p)
Definition: httpreq.c:389
#define CHECK_CALLED(func)
Definition: httpreq.c:85
static IHTMLElementCollection htmlecoll
Definition: httpreq.c:244
static HRESULT WINAPI htmldoc2_get_onafterupdate(IHTMLDocument2 *iface, VARIANT *p)
Definition: httpreq.c:850
static HRESULT WINAPI htmldoc2_get_applets(IHTMLDocument2 *iface, IHTMLElementCollection **p)
Definition: httpreq.c:323
static IXMLHttpRequest * create_xhr(void)
Definition: httpreq.c:1336
static HRESULT WINAPI htmldoc2_get_lastModified(IHTMLDocument2 *iface, BSTR *p)
Definition: httpreq.c:479
static HRESULT WINAPI htmldoc2_get_vlinkColor(IHTMLDocument2 *iface, VARIANT *p)
Definition: httpreq.c:461
static HRESULT WINAPI htmldoc2_get_onrowenter(IHTMLDocument2 *iface, VARIANT *p)
Definition: httpreq.c:874
static HRESULT WINAPI htmldoc2_get_cookie(IHTMLDocument2 *iface, BSTR *p)
Definition: httpreq.c:516
static HRESULT WINAPI htmldoc2_put_onkeydown(IHTMLDocument2 *iface, VARIANT v)
Definition: httpreq.c:748
#define check_interface(a, b, c)
Definition: httpreq.c:49
static HRESULT WINAPI htmldoc2_Invoke(IHTMLDocument2 *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
Definition: httpreq.c:284
static HRESULT WINAPI htmldoc2_get_bgColor(IHTMLDocument2 *iface, VARIANT *p)
Definition: httpreq.c:425
static const IHTMLElementCollectionVtbl TestHTMLECollectionVtbl
Definition: httpreq.c:228
static HRESULT WINAPI htmlecoll_QueryInterface(IHTMLElementCollection *iface, REFIID riid, void **ppvObject)
Definition: httpreq.c:146
static HRESULT WINAPI htmldoc2_queryCommandSupported(IHTMLDocument2 *iface, BSTR cmdID, VARIANT_BOOL *pfRet)
Definition: httpreq.c:637
static HRESULT WINAPI htmldoc2_put_cookie(IHTMLDocument2 *iface, BSTR v)
Definition: httpreq.c:510
static HRESULT WINAPI htmldoc2_get_onmousedown(IHTMLDocument2 *iface, VARIANT *p)
Definition: httpreq.c:790
static HRESULT WINAPI htmlecoll_GetIDsOfNames(IHTMLElementCollection *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
Definition: httpreq.c:176
static HRESULT WINAPI htmldoc2_get_anchors(IHTMLDocument2 *iface, IHTMLElementCollection **p)
Definition: httpreq.c:341
static HRESULT WINAPI htmldoc2_get_onreadystatechange(IHTMLDocument2 *iface, VARIANT *p)
Definition: httpreq.c:838
static HRESULT WINAPI htmldoc2_put_onmouseout(IHTMLDocument2 *iface, VARIANT v)
Definition: httpreq.c:808
static void set_safety_opt(IUnknown *unk, DWORD mask, DWORD opts)
Definition: httpreq.c:1357
static HRESULT WINAPI htmldoc2_get_security(IHTMLDocument2 *iface, BSTR *p)
Definition: httpreq.c:588
static HRESULT WINAPI htmldoc2_queryCommandValue(IHTMLDocument2 *iface, BSTR cmdID, VARIANT *pfRet)
Definition: httpreq.c:672
static HRESULT WINAPI htmldoc2_put_onmousemove(IHTMLDocument2 *iface, VARIANT v)
Definition: httpreq.c:796
static HRESULT WINAPI htmldoc2_put_onmouseup(IHTMLDocument2 *iface, VARIANT v)
Definition: httpreq.c:772
static HRESULT WINAPI htmldoc2_put_onafterupdate(IHTMLDocument2 *iface, VARIANT v)
Definition: httpreq.c:844
static HRESULT WINAPI htmldoc2_get_location(IHTMLDocument2 *iface, IHTMLLocation **p)
Definition: httpreq.c:473
static BOOL g_enablecallchecks
Definition: httpreq.c:70
static HRESULT WINAPI htmldoc2_GetTypeInfo(IHTMLDocument2 *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
Definition: httpreq.c:269
static HRESULT WINAPI htmldoc2_put_ondragstart(IHTMLDocument2 *iface, VARIANT v)
Definition: httpreq.c:880
static HRESULT WINAPI htmldoc2_get_onkeyup(IHTMLDocument2 *iface, VARIANT *p)
Definition: httpreq.c:742
static HRESULT WINAPI htmldoc2_get_referrer(IHTMLDocument2 *iface, BSTR *p)
Definition: httpreq.c:467
static HRESULT WINAPI htmldoc2_get_onrowexit(IHTMLDocument2 *iface, VARIANT *p)
Definition: httpreq.c:862
static HRESULT WINAPI htmldoc2_put_URL(IHTMLDocument2 *iface, BSTR v)
Definition: httpreq.c:485
static HRESULT WINAPI htmldoc2_put_ondblclick(IHTMLDocument2 *iface, VARIANT v)
Definition: httpreq.c:724
static const CHAR xmltestbodyA[]
Definition: httpreq.c:65
static const IUnknownVtbl testsiteVtbl
Definition: httpreq.c:1201
static ULONG WINAPI htmldoc2_Release(IHTMLDocument2 *iface)
Definition: httpreq.c:258
static HRESULT WINAPI htmldoc2_get_onmouseup(IHTMLDocument2 *iface, VARIANT *p)
Definition: httpreq.c:778
static HRESULT WINAPI htmldoc2_get_onmouseout(IHTMLDocument2 *iface, VARIANT *p)
Definition: httpreq.c:814
static HRESULT WINAPI sp_QueryService(IServiceProvider *iface, REFGUID service, REFIID riid, void **obj)
Definition: httpreq.c:1109
static HRESULT WINAPI htmldoc2_clear(IHTMLDocument2 *iface)
Definition: httpreq.c:631
static const IDispatchVtbl dispeventVtbl
Definition: httpreq.c:1315
static HRESULT WINAPI htmldoc2_put_onrowexit(IHTMLDocument2 *iface, VARIANT v)
Definition: httpreq.c:856
static HRESULT WINAPI htmldoc2_get_charset(IHTMLDocument2 *iface, BSTR *p)
Definition: httpreq.c:540
REFIID riid
Definition: atlbase.h:39
#define S_OK
Definition: intsafe.h:52
#define SUCCEEDED(hr)
Definition: intsafe.h:50
#define wine_dbgstr_w
Definition: kernel32.h:34
#define win_skip
Definition: minitest.h:67
#define todo_wine
Definition: minitest.h:80
static PVOID ptr
Definition: dispmode.c:27
const IID IID_IObjectWithSite
static const WCHAR url[]
Definition: encode.c:1384
static const char * strw(LPCWSTR x)
Definition: actctx.c:49
static IHTMLXMLHttpRequest * xhr
static LPOLESTR
Definition: stg_prop.c:27
static VARIANTARG static DISPID
Definition: ordinal.c:49
interface IHTMLWindow2 IHTMLWindow2
Definition: mshtmhst.idl:64
const struct _GUID CLSID_XMLHTTPRequest
unsigned int UINT
Definition: ndis.h:50
#define LOCALE_SYSTEM_DEFAULT
BSTR WINAPI SysAllocString(LPCOLESTR str)
Definition: oleaut.c:238
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
Definition: oleaut.c:271
BSTR WINAPI SysAllocStringLen(const OLECHAR *str, unsigned int len)
Definition: oleaut.c:339
#define V_ERROR(A)
Definition: oleauto.h:241
#define V_BOOL(A)
Definition: oleauto.h:224
#define V_ARRAY(A)
Definition: oleauto.h:222
#define V_UNKNOWN(A)
Definition: oleauto.h:281
#define DISPATCH_METHOD
Definition: oleauto.h:1006
#define V_VT(A)
Definition: oleauto.h:211
#define V_BSTR(A)
Definition: oleauto.h:226
#define V_I2(A)
Definition: oleauto.h:245
const GUID IID_IOleClientSite
const GUID IID_IDispatch
long LONG
Definition: pedump.c:60
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8)
Definition: guiddef.h:68
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
#define REFIID
Definition: guiddef.h:118
INT replace(TCHAR source[MAX_PATH], TCHAR dest[MAX_PATH], DWORD dwFlags, BOOL *doMore)
Definition: replace.c:38
const WCHAR * str
DWORD LCID
Definition: nls.h:13
static __inline const char * wine_dbgstr_guid(const GUID *id)
Definition: debug.h:197
static const void * body(MD5_CTX *ctx, const void *data, unsigned long size)
Definition: md5.c:100
HRESULT hr
Definition: shlfolder.c:183
Definition: scsiwmi.h:51
Definition: parser.c:49
Definition: name.c:39
Definition: send.c:48
Definition: ps.c:97
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260
uint32_t ULONG
Definition: typedefs.h:59
Definition: pdh_main.c:96
HRESULT WINAPI DECLSPEC_HOTPATCH VariantClear(VARIANTARG *pVarg)
Definition: variant.c:648
void WINAPI VariantInit(VARIANTARG *pVarg)
Definition: variant.c:568
_Must_inspect_result_ _In_ WDFDEVICE _In_ WDFSTRING String
Definition: wdfdevice.h:2439
WINBASEAPI _In_ DWORD _Out_ _In_ WORD wFlags
Definition: wincon_undoc.h:337
#define WINAPI
Definition: msvc.h:6
#define WININET_E_NAME_NOT_RESOLVED
Definition: winerror.h:4127
#define E_NOINTERFACE
Definition: winerror.h:3479
#define E_ACCESSDENIED
Definition: winerror.h:4116
#define DISP_E_MEMBERNOTFOUND
Definition: winerror.h:3615
#define E_UNEXPECTED
Definition: winerror.h:3528
#define INET_E_RESOURCE_NOT_FOUND
Definition: winerror.h:4655
#define E_POINTER
Definition: winerror.h:3480
__wchar_t WCHAR
Definition: xmlstorage.h:180
char CHAR
Definition: xmlstorage.h:175