34#define DEFINE_EXPECT(func) \
35 static BOOL expect_ ## func = FALSE, called_ ## func = FALSE
37#define SET_EXPECT(func) \
38 expect_ ## func = TRUE
40#define CHECK_EXPECT(func) \
42 ok(expect_ ##func, "unexpected call " #func "\n"); \
43 expect_ ## func = FALSE; \
44 called_ ## func = TRUE; \
47#define CHECK_EXPECT2(func) \
49 ok(expect_ ##func, "unexpected call " #func "\n"); \
50 called_ ## func = TRUE; \
53#define CHECK_CALLED(func) \
55 ok(called_ ## func, "expected " #func "\n"); \
56 expect_ ## func = called_ ## func = FALSE; \
70 "MIME-Version: 1.0\r\n"
71 "Content-Type: multipart/mixed;\r\n"
72 " boundary=\"------------1.5.0.6\";\r\n"
73 " stuff=\"du;nno\";\r\n"
74 " morestuff=\"so\\\\me\\\"thing\\\"\"\r\n"
76 "From: Huw Davies <huw@codeweavers.com>\r\n"
77 "From: Me <xxx@codeweavers.com>\r\n"
78 "To: wine-patches <wine-patches@winehq.org>\r\n"
79 "Cc: Huw Davies <huw@codeweavers.com>,\r\n"
80 " \"Fred Bloggs\" <fred@bloggs.com>\r\n"
84 "This is a multi-part message in MIME format.\r\n"
85 "--------------1.5.0.6\r\n"
86 "Content-Type: text/plain; format=fixed; charset=UTF-8\r\n"
87 "Content-Transfer-Encoding: 8bit\r\n"
90 "--------------1.5.0.6\r\n"
91 "Content-Type: text/plain; charset=\"us-ascii\"\r\n"
92 "Content-Transfer-Encoding: 7bit\r\n"
95 "--------------1.5.0.6--\r\n";
98 "MIME-Version: 1.0\r\n"
99 "Content-Type: multipart/related; type:=\"text/html\"; boundary=\"----=_NextPart_000_00\"\r\n"
101 "------=_NextPart_000_00\r\n"
102 "Content-Type: text/html; charset=\"Windows-1252\"\r\n"
103 "Content-Transfer-Encoding: quoted-printable\r\n"
106 "------=_NextPart_000_00\r\n"
107 "Content-Type: Image/Jpeg\r\n"
108 "Content-Transfer-Encoding: base64\r\n"
109 "Content-Location: http://winehq.org/mhtmltest.html\r\n"
110 "\r\n\t\t\t\tVGVzdA==\r\n\r\n"
111 "------=_NextPart_000_00--";
121 IStream_Release(pstm);
132 IMimeSecurity_Release(sec);
154#define test_current_encoding(a,b) _test_current_encoding(__LINE__,a,b)
157 ENCODINGTYPE current_encoding;
160 hres = IMimeBody_GetCurrentEncoding(mime_body, ¤t_encoding);
162 ok_(__FILE__,
line)(current_encoding == encoding,
"encoding = %d, expected %d\n", current_encoding, encoding);
169 HBODY
handle = (
void *)0xdeadbeef;
174 MIMEPARAMINFO *param_info;
175 IMimeAllocator *
alloc;
190 ok(
hr == MIME_E_NO_DATA,
"ret %08lx\n",
hr);
196 hr = IMimeBody_InitNew(
body);
204 IStream_Seek(
in, off, STREAM_SEEK_CUR, &
pos);
205 ok(
pos.LowPart == 359,
"pos %lu\n",
pos.LowPart);
207 hr = IMimeBody_IsContentType(
body,
"multipart",
"mixed");
209 hr = IMimeBody_IsContentType(
body,
"text",
"plain");
211 hr = IMimeBody_IsContentType(
body,
NULL,
"mixed");
213 hr = IMimeBody_IsType(
body, IBT_EMPTY);
216 hr = IMimeBody_SetData(
body, IET_8BIT,
"text",
"plain", &IID_IStream,
in);
218 hr = IMimeBody_IsContentType(
body,
"text",
"plain");
225 ok(
hr == MIME_E_NO_DATA,
"ret %08lx\n",
hr);
231 hr = IMimeBody_IsType(
body, IBT_EMPTY);
237 hr = IMimeBody_GetParameters(
body,
"nothere", &
count, ¶m_info);
238 ok(
hr == MIME_E_NOT_FOUND,
"ret %08lx\n",
hr);
240 ok(!param_info,
"got %p\n", param_info);
242 hr = IMimeBody_GetParameters(
body,
"bar", &
count, ¶m_info);
245 ok(!param_info,
"got %p\n", param_info);
247 hr = IMimeBody_GetParameters(
body,
"Content-Type", &
count, ¶m_info);
251 ok(param_info !=
NULL,
"got %p\n", param_info);
256 if(!
strcmp(param_info[
i].pszName,
"morestuff"))
259 ok(!
strcmp(param_info[
i].pszData,
"so\\me\"thing\""),
260 "got %s\n", param_info[
i].pszData);
262 else if(!
strcmp(param_info[
i].pszName,
"stuff"))
265 ok(!
strcmp(param_info[
i].pszData,
"du;nno"),
266 "got %s\n", param_info[
i].pszData);
269 ok(found_param == 2,
"matched %ld params\n", found_param);
273 IMimeAllocator_Release(
alloc);
276 IMimeBody_Release(
body);
327 for(
i = 0;
i <
cb;
i++)
328 output[
i] =
'0' +
This->pos++;
335 ok(0,
"unexpected call\n");
346 if(dwOrigin == STREAM_SEEK_END) {
357 ok(dwOrigin == STREAM_SEEK_SET,
"dwOrigin = %ld\n", dwOrigin);
366 ok(0,
"unexpected call\n");
373 ok(0,
"unexpected call\n");
379 ok(0,
"unexpected call\n");
385 ok(0,
"unexpected call\n");
392 ok(0,
"unexpected call\n");
399 ok(0,
"unexpected call\n");
406 ok(dwStatFlag == STATFLAG_NONAME,
"dwStatFlag = %lx\n", dwStatFlag);
412 ok(0,
"unexpected call\n");
443#define test_stream_read(a,b,c,d) _test_stream_read(__LINE__,a,b,c,d)
451 read_size =
sizeof(
buf)-1;
454 ok_(__FILE__,
line)(
hres == exhres,
"Read returned %08lx, expected %08lx\n",
hres, exhres);
455 ok_(__FILE__,
line)(
read == exread,
"unexpected read size %lu, expected %lu\n",
read, exread);
470 hr = IMimeBody_InitNew(
body);
479 hr = IMimeBody_SetData(
body, IET_BINARY,
"text",
"plain", &IID_IStream,
test_stream);
482 hr = IMimeBody_IsContentType(
body,
"text",
"plain");
504 hr = IMimeBody_GetData(
body, IET_BINARY, &stream2);
508 ok(stream2 !=
stream,
"unexpected stream\n");
524 IStream_Release(stream2);
528 hr = IMimeBody_SetData(
body, IET_BASE64,
"text",
"plain", &IID_IStream,
stream);
530 ok(
hr ==
S_OK,
"SetData failed: %08lx\n",
hr);
549 hr = IMimeBody_SetData(
body, IET_QP,
"text",
"plain", &IID_IStream,
stream);
551 ok(
hr ==
S_OK,
"SetData failed: %08lx\n",
hr);
562 IMimeBody_Release(
body);
568 IMimeAllocator *
alloc;
572 IMimeAllocator_Release(
alloc);
585 FINDBODY find_struct;
589 char text[] =
"text";
592 static const char att_pritype[] =
"att:pri-content-type";
610 hr = IMimeMessage_BindToObject(
msg, HBODY_ROOT, &IID_IMimeBody, (
void**)&
body);
618 IMimeBody_Release(
body);
620 hr = IMimeMessage_GetBody(
msg, IBL_ROOT,
NULL, &hbody);
630 hr = IMimeMessage_GetBody(
msg, IBL_PARENT, hbody,
NULL);
633 hbody2 = (HBODY)0xdeadbeef;
634 hr = IMimeMessage_GetBody(
msg, IBL_PARENT, hbody, &hbody2);
635 ok(
hr == MIME_E_NOT_FOUND,
"ret %08lx\n",
hr);
636 ok(hbody2 ==
NULL,
"hbody2 %p\n", hbody2);
638 PropVariantInit(&prop);
639 hr = IMimeMessage_GetBodyProp(
msg, hbody, att_pritype, 0, &prop);
641 ok(prop.vt ==
VT_LPSTR,
"vt %08x\n", prop.vt);
642 ok(!
strcasecmp(prop.pszVal,
"multipart"),
"got %s\n", prop.pszVal);
645 hr = IMimeMessage_GetBody(
msg, IBL_FIRST, hbody, &hbody);
647 hr = IMimeMessage_BindToObject(
msg, hbody, &IID_IMimeBody, (
void**)&
body);
661 hr = IMimeBody_GetCharset(
body, &hcs);
665 ok(hcs !=
NULL,
"Expected non-NULL charset\n");
668 IMimeBody_Release(
body);
670 hr = IMimeMessage_GetBody(
msg, IBL_NEXT, hbody, &hbody);
672 hr = IMimeMessage_BindToObject(
msg, hbody, &IID_IMimeBody, (
void**)&
body);
685 IMimeBody_Release(
body);
687 find_struct.pszPriType =
text;
688 find_struct.pszSubType =
NULL;
690 hr = IMimeMessage_FindFirst(
msg, &find_struct, &hbody);
693 hr = IMimeMessage_FindNext(
msg, &find_struct, &hbody);
696 hr = IMimeMessage_FindNext(
msg, &find_struct, &hbody);
697 ok(
hr == MIME_E_NOT_FOUND,
"ret %08lx\n",
hr);
699 hr = IMimeMessage_GetAttachments(
msg, &
count, &body_list);
707 PropVariantInit(&prop);
709 hr = IMimeMessage_BindToObject(
msg, body_list[0], &IID_IMimeBody, (
void**)&
attachment);
718 hr = IMimeBody_GetProp(
attachment,
"Content-Transfer-Encoding", 0, &prop);
721 ok(prop.vt ==
VT_LPSTR,
"type %d\n", prop.vt);
722 ok(!
strcmp(prop.pszVal,
"8bit"),
"got %s\n", prop.pszVal);
730 hr = IMimeMessage_BindToObject(
msg, body_list[1], &IID_IMimeBody, (
void**)&
attachment);
739 hr = IMimeBody_GetProp(
attachment,
"Content-Transfer-Encoding", 0, &prop);
741 ok(prop.vt ==
VT_LPSTR,
"type %d\n", prop.vt);
742 ok(!
strcmp(prop.pszVal,
"7bit"),
"got %s\n", prop.pszVal);
752 hr = IMimeBody_GetCharset(
body, &hcs);
756 ok(hcs !=
NULL,
"Expected non-NULL charset\n");
759 IMimeMessage_Release(
msg);
783 hres = IMimeMessage_Load(mime_message,
stream);
787 hres = IMimeMessage_CountBodies(mime_message, HBODY_ROOT,
TRUE, &
count);
791 hres = IMimeMessage_GetAttachments(mime_message, &
count, &body_list);
795 hres = IMimeMessage_BindToObject(mime_message, body_list[0], &IID_IMimeBody, (
void**)&mime_body);
798 hres = IMimeBody_GetData(mime_body, IET_BINARY, &
stream);
805 IMimeBody_Release(mime_body);
807 hres = IMimeMessage_BindToObject(mime_message, body_list[1], &IID_IMimeBody, (
void**)&mime_body);
812 hres = IMimeBody_GetData(mime_body, IET_BINARY, &
stream);
817 IMimeBody_Release(mime_body);
821 IMimeMessage_Release(mime_message);
826 static const char topic[] =
"wine topic";
835 PropVariantInit(&prop);
837 hr = IMimeMessage_BindToObject(
msg, HBODY_ROOT, &IID_IMimeBody, (
void**)&
body);
843 hr = IMimeBody_SetProp(
body,
"Thread-Topic", 0,
NULL);
849 hr = IMimeBody_SetProp(
body,
"Thread-Topic", 0, &prop);
856 hr = IMimeBody_GetProp(
body,
"Thread-Topic", 0,
NULL);
859 hr = IMimeBody_GetProp(
body,
"Wine-Topic", 0, &prop);
860 ok(
hr == MIME_E_NOT_FOUND,
"ret %08lx\n",
hr);
863 hr = IMimeBody_GetProp(
body,
"Thread-Topic", 0, &prop);
867 ok(prop.vt ==
VT_LPSTR,
"type %d\n", prop.vt);
884 ok(prop.vt ==
VT_LPSTR,
"type %d\n", prop.vt);
891 hr = IMimeBody_GetProp(
body,
"Subject", 0, &prop);
895 ok(prop.vt ==
VT_LPSTR,
"type %d\n", prop.vt);
901 hr = IMimeBody_GetProp(
body,
"Subject", 0, &prop);
921 hr = IMimeBody_SetProp(
body, PIDTOSTR(124), 0, &prop);
922 ok(
hr == MIME_E_NOT_FOUND,
"ret %08lx\n",
hr);
925 IMimeBody_Release(
body);
926 IMimeMessage_Release(
msg);
931 static const char topic[] =
"wine topic";
932 static const char subject[] =
"wine testing";
942 PropVariantInit(&prop);
944 hr = IMimeMessage_BindToObject(
msg, HBODY_ROOT, &IID_IMimeBody, (
void**)&
body);
950 hr = IMimeBody_SetProp(
body,
"Thread-Topic", 0, &prop);
956 strcpy(prop.pszVal, subject);
962 info.dwMask = PIM_ENCODINGTYPE | PIM_FLAGS | PIM_PROPID;
967 info.dwMask = PIM_ENCODINGTYPE | PIM_FLAGS | PIM_PROPID;
968 hr = IMimeBody_GetPropInfo(
body,
"Subject",
NULL);
972 info.dwMask = PIM_ENCODINGTYPE | PIM_FLAGS | PIM_PROPID;
973 hr = IMimeBody_GetPropInfo(
body,
"Subject", &
info);
977 ok(
info.dwMask & (PIM_ENCODINGTYPE | PIM_FLAGS| PIM_PROPID),
"Invalid mask 0x%08lx\n",
info.dwFlags);
979 ok(
info.ietEncoding == 0,
"Invalid encoding %d\n",
info.ietEncoding);
981 ok(
info.cValues == 0xfefefefe,
"Invalid cValues %ld\n",
info.cValues);
986 hr = IMimeBody_GetPropInfo(
body,
"Subject", &
info);
990 ok(
info.dwMask == 0,
"Invalid mask 0x%08lx\n",
info.dwFlags);
991 ok(
info.dwFlags == 0xfefefefe,
"Invalid flags 0x%08lx\n",
info.dwFlags);
992 ok(
info.ietEncoding == -16843010,
"Invalid encoding %d\n",
info.ietEncoding);
993 ok(
info.dwPropId == -16843010,
"Invalid propid %ld\n",
info.dwPropId);
998 info.dwPropId = 1024;
999 info.ietEncoding = 99;
1000 hr = IMimeBody_GetPropInfo(
body,
"Subject", &
info);
1004 ok(
info.dwMask == 0,
"Invalid mask 0x%08lx\n",
info.dwFlags);
1005 ok(
info.dwFlags == 0xfefefefe,
"Invalid flags 0x%08lx\n",
info.dwFlags);
1006 ok(
info.ietEncoding == 99,
"Invalid encoding %d\n",
info.ietEncoding);
1007 ok(
info.dwPropId == 1024,
"Invalid propid %ld\n",
info.dwPropId);
1011 info.dwMask = PIM_ENCODINGTYPE | PIM_FLAGS | PIM_PROPID;
1012 hr = IMimeBody_GetPropInfo(
body,
"Invalid Property", &
info);
1013 ok(
hr == MIME_E_NOT_FOUND,
"ret %08lx\n",
hr);
1015 IMimeBody_Release(
body);
1016 IMimeMessage_Release(
msg);
1021 static const char string[] =
"XXXXX";
1022 static const char zero[] =
"0";
1030 PropVariantInit(&prop);
1033 prop.boolVal =
TRUE;
1034 hr = IMimeMessage_SetOption(
msg, OID_HIDE_TNEF_ATTACHMENTS, &prop);
1038 hr = IMimeMessage_GetOption(
msg, OID_HIDE_TNEF_ATTACHMENTS, &prop);
1041 todo_wine ok(prop.boolVal ==
TRUE,
"Hide Attachments got %d\n", prop.boolVal);
1046 strcpy(prop.pszVal,
string);
1047 hr = IMimeMessage_SetOption(
msg, OID_HIDE_TNEF_ATTACHMENTS, &prop);
1051 hr = IMimeMessage_GetOption(
msg, OID_HIDE_TNEF_ATTACHMENTS, &prop);
1054 todo_wine ok(prop.boolVal ==
TRUE,
"Hide Attachments got %d\n", prop.boolVal);
1061 hr = IMimeMessage_SetOption(
msg, OID_HIDE_TNEF_ATTACHMENTS, &prop);
1065 hr = IMimeMessage_GetOption(
msg, OID_HIDE_TNEF_ATTACHMENTS, &prop);
1068 todo_wine ok(prop.boolVal ==
TRUE,
"Hide Attachments got %d\n", prop.boolVal);
1073 prop.boolVal =
TRUE;
1074 hr = IMimeMessage_SetOption(
msg, 0xff00000a, &prop);
1075 ok(
hr == MIME_E_INVALID_OPTION_ID,
"ret %08lx\n",
hr);
1081 hr = IMimeMessage_SetOption(
msg, 0xff00000a, &prop);
1082 ok(
hr == MIME_E_INVALID_OPTION_ID,
"ret %08lx\n",
hr);
1085 IMimeMessage_Release(
msg);
1102 hr = IMimeMessage_BindToObject(
msg, HBODY_ROOT, &IID_IMimeBody, (
void**)&
body);
1104 IMimeBody_Release(
body);
1106 IMimeMessage_Release(
msg);
1111 static const char topic[] =
"wine topic";
1120 PropVariantInit(&prop);
1122 hr = IMimeMessage_BindToObject(
msg, HBODY_ROOT, &IID_IMimeBody, (
void**)&
body);
1125 hr = IMimeBody_DeleteProp(
body,
"Subject");
1126 ok(
hr == MIME_E_NOT_FOUND,
"ret %08lx\n",
hr);
1129 ok(
hr == MIME_E_NOT_FOUND,
"ret %08lx\n",
hr);
1134 hr = IMimeBody_SetProp(
body,
"Subject", 0, &prop);
1138 hr = IMimeBody_DeleteProp(
body,
"Subject");
1141 hr = IMimeBody_GetProp(
body,
"Subject", 0, &prop);
1142 ok(
hr == MIME_E_NOT_FOUND,
"ret %08lx\n",
hr);
1155 ok(
hr == MIME_E_NOT_FOUND,
"ret %08lx\n",
hr);
1157 IMimeBody_Release(
body);
1158 IMimeMessage_Release(
msg);
1169 IMimePropertySchema_Release(
schema);
1187 "mhtml:file://%s!http://winehq.org/mhtmltest.html",
1223 ok(grfBINDF !=
NULL,
"grfBINDF == NULL\n");
1224 ok(pbindinfo !=
NULL,
"pbindinfo == NULL\n");
1225 ok(pbindinfo->cbSize ==
sizeof(BINDINFO),
"wrong size of pbindinfo: %ld\n", pbindinfo->cbSize);
1227 *grfBINDF = BINDF_ASYNCHRONOUS | BINDF_ASYNCSTORAGE | BINDF_PULLDATA | BINDF_FROMURLMON | BINDF_NEEDFILE;
1234 ok(0,
"unexpected call\n");
1317 ok(0,
"unexpected call\n");
1322 const WCHAR *szStatusText)
1324 switch(ulStatusCode) {
1325 case BINDSTATUS_MIMETYPEAVAILABLE:
1329 case BINDSTATUS_CACHEFILENAMEAVAILABLE:
1333 ok(0,
"unexpected call %lu %s\n", ulStatusCode,
wine_dbgstr_w(szStatusText));
1340 ULONG ulProgressMax)
1348 ok(!ulProgress,
"ulProgress = %lu\n", ulProgress);
1349 ok(ulProgress == ulProgressMax,
"ulProgress != ulProgressMax\n");
1350 ok(grfBSCF == (BSCF_FIRSTDATANOTIFICATION | BSCF_INTERMEDIATEDATANOTIFICATION
1351 | BSCF_LASTDATANOTIFICATION | BSCF_DATAFULLYAVAILABLE | BSCF_AVAILABLEDATASIZEUNKNOWN),
1352 "grcf = %08lx\n", grfBSCF);
1368 ok(hrResult ==
S_OK,
"hrResult = %08lx\n", hrResult);
1369 ok(!dwError,
"dwError = %lu\n", dwError);
1412 ok(
hres ==
S_OK,
"Could not create protocol handler: %08lx\n",
hres);
1414 hres = IInternetProtocol_QueryInterface(
protocol, &IID_IInternetProtocolEx, (
void**)&unk);
1421 SET_EXPECT(ReportProgress_MIMETYPEAVAILABLE);
1422 SET_EXPECT(ReportProgress_CACHEFILENAMEAVAILABLE);
1433 IInternetProtocol_Release(
protocol);
1438static const struct {
1445 L"mhtml:file:///c:/dir/test.mht",
L"http://test.org",
1446 L"mhtml:file:///c:/dir/test.mht!x-usc:http://test.org"
1448 L"mhtml:file:///c:/dir/test.mht",
L"3D\"http://test.org\"",
1449 L"mhtml:file:///c:/dir/test.mht!x-usc:3D\"http://test.org\""
1451 L"mhtml:file:///c:/dir/test.mht",
L"123abc",
1452 L"mhtml:file:///c:/dir/test.mht!x-usc:123abc"
1454 L"mhtml:file:///c:/dir/test.mht!x-usc:http://test.org",
L"123abc",
1455 L"mhtml:file:///c:/dir/test.mht!x-usc:123abc"
1457 L"MhtMl:file:///c:/dir/test.mht!x-usc:http://test.org/dir/dir2/file.html",
L"../..",
1458 L"mhtml:file:///c:/dir/test.mht!x-usc:../.."
1460 L"mhtml:file:///c:/dir/test.mht!x-usc:file:///c:/dir/dir2/file.html",
L"../..",
1461 L"mhtml:file:///c:/dir/test.mht!x-usc:../.."
1463 L"mhtml:file:///c:/dir/test.mht!x-usc:http://test.org",
L"",
1464 L"mhtml:file:///c:/dir/test.mht"
1466 L"mhtml:file:///c:/dir/test.mht!x-usc:http://test.org",
L"mhtml:file:///d:/file.html",
1467 L"file:///d:/file.html",
TRUE
1469 L"mhtml:file:///c:/dir/test.mht!x-usc:http://test.org",
L"mhtml:file:///c:/dir2/test.mht!x-usc:http://test.org",
1470 L"mhtml:file:///c:/dir2/test.mht!x-usc:http://test.org",
TRUE
1472 L"mhtml:file:///c:/dir/test.mht!http://test.org",
L"123abc",
1473 L"mhtml:file:///c:/dir/test.mht!x-usc:123abc"
1475 L"mhtml:file:///c:/dir/test.mht!http://test.org",
L"",
1476 L"mhtml:file:///c:/dir/test.mht"
1490 ok(
hres ==
S_OK,
"Could not create protocol info: %08lx\n",
hres);
1493 combined_len = 0xdeadbeef;
1501 ok(combined_len == exlen,
"[%u] combined len is %lu, expected %u\n",
i, combined_len, exlen);
1505 combined_len = 0xdeadbeef;
1510 ok(!combined_len,
"[%u] combined_len = %lu\n",
i, combined_len);
1514 hres = IInternetProtocolInfo_CombineUrl(
protocol_info,
L"http://test.org",
L"http://test.org",
1524 ok(0,
"unexpected call\n");
1558 hres = IUnknown_QueryInterface(unk, &IID_IInternetProtocolInfo, (
void**)&unk2);
1562 ok(
hres ==
S_OK,
"Could not get IClassFactory iface: %08lx\n",
hres);
1563 IUnknown_Release(unk);
1567 hres = IUnknown_QueryInterface(unk, &IID_IInternetProtocol, (
void**)&unk2);
1568 ok(
hres ==
S_OK,
"Could not get IInternetProtocol iface: %08lx\n",
hres);
1569 IUnknown_Release(unk2);
1570 IUnknown_Release(unk);
1593 static const struct {
1595 const WCHAR *mhtml_url;
1597 {
L"file:///x:\\dir\\file.mht",
L"mhtml:file://x:\\dir\\file.mht"},
1598 {
L"file:///x:/dir/file.mht",
L"mhtml:file://x:\\dir\\file.mht"},
1599 {
L"http://www.winehq.org/index.html?query#hash",
L"mhtml:http://www.winehq.org/index.html?query#hash"},
1600 {
L"../test.mht",
L"mhtml:../test.mht"}
1612 IBindCtx_Release(bind_ctx);
1614 win_skip(
"Broken MHTML behaviour found. Skipping some tests.\n");
1619 hres = IMoniker_GetDisplayName(new_mon,
NULL,
NULL, &mhtml_url);
1624 IUnknown_Release(unk);
1625 IMoniker_Release(new_mon);
1626 IMoniker_Release(mon);
#define InterlockedIncrement
#define InterlockedDecrement
const GUID IID_IClassFactory
HRESULT WINAPI PropVariantClear(PROPVARIANT *pvar)
HRESULT WINAPI DECLSPEC_HOTPATCH CoGetClassObject(REFCLSID rclsid, DWORD clscontext, COSERVERINFO *server_info, REFIID riid, void **obj)
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, IUnknown *outer, DWORD cls_context, REFIID riid, void **obj)
HRESULT WINAPI CreateStreamOnHGlobal(HGLOBAL hGlobal, BOOL delete_on_release, IStream **stream)
void *WINAPI CoTaskMemAlloc(SIZE_T size)
void WINAPI CoTaskMemFree(void *ptr)
#define INVALID_HANDLE_VALUE
#define CreateFileA(a, b, c, d, e, f, g)
#define HeapFree(x, y, z)
#define FILE_ATTRIBUTE_NORMAL
#define MultiByteToWideChar
HRESULT WINAPI MimeOleGetPropertySchema(IMimePropertySchema **schema)
static sub_stream_t * impl_from_IStream(IStream *iface)
HRESULT WINAPI MimeOleObjectFromMoniker(BINDF bindf, IMoniker *moniker, IBindCtx *binding, REFIID riid, void **out, IMoniker **moniker_new)
HRESULT WINAPI MimeOleGetAllocator(IMimeAllocator **alloc)
HRESULT WINAPI MimeOleCreateVirtualStream(IStream **ppStream)
HRESULT WINAPI MimeOleCreateSecurity(IMimeSecurity **ppSecurity)
HRESULT WINAPI MimeOleCreateMessage(IUnknown *pUnkOuter, IMimeMessage **ppMessage)
BOOL WINAPI DeleteFileA(IN LPCSTR lpFileName)
BOOL WINAPI WriteFile(_In_ HANDLE hFile, _In_reads_bytes_opt_(nNumberOfBytesToWrite) LPCVOID lpBuffer, _In_ DWORD nNumberOfBytesToWrite, _Out_opt_ LPDWORD lpNumberOfBytesWritten, _Inout_opt_ LPOVERLAPPED lpOverlapped)
DWORD WINAPI GetCurrentDirectoryA(IN DWORD nBufferLength, OUT LPSTR lpBuffer)
int WINAPI lstrcmpW(LPCWSTR str1, LPCWSTR str2)
_ACRTIMP int __cdecl memcmp(const void *, const void *, size_t)
_ACRTIMP size_t __cdecl strlen(const char *)
_ACRTIMP int __cdecl strcmp(const char *, const char *)
HRESULT WINAPI DECLSPEC_HOTPATCH OleInitialize(LPVOID reserved)
void WINAPI DECLSPEC_HOTPATCH OleUninitialize(void)
static const FxOffsetAndName offsets[]
GLuint GLuint GLsizei count
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLenum GLuint GLenum GLsizei const GLchar * buf
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
#define todo_wine_if(is_todo)
static struct test_info tests[]
static HRESULT WINAPI ServiceProvider_QueryService(IServiceProvider *iface, REFGUID guidService, REFIID riid, void **ppv)
static ULONG WINAPI Stream_AddRef(IStream *iface)
const WCHAR * expected_result
static HRESULT WINAPI ProtocolSink_Switch(IInternetProtocolSink *iface, PROTOCOLDATA *pProtocolData)
static void test_MimeOleObjectFromMoniker(void)
static const IUnknownVtbl outer_vtbl
static ULONG WINAPI ServiceProvider_Release(IServiceProvider *iface)
static void test_mhtml_protocol_info(void)
static ULONG WINAPI BindInfo_Release(IInternetBindInfo *iface)
static HRESULT WINAPI Stream_SetSize(IStream *iface, ULARGE_INTEGER libNewSize)
static ULONG WINAPI outer_AddRef(IUnknown *iface)
static HRESULT WINAPI Stream_Revert(IStream *iface)
static HRESULT WINAPI Stream_Stat(IStream *iface, STATSTG *pstatstg, DWORD dwStatFlag)
#define test_stream_read(a, b, c, d)
static IInternetProtocolSinkVtbl InternetProtocolSinkVtbl
static void test_mhtml_message(void)
static HRESULT WINAPI Stream_CopyTo(IStream *iface, IStream *pstm, ULARGE_INTEGER cb, ULARGE_INTEGER *pcbRead, ULARGE_INTEGER *pcbWritten)
static void test_CreateSecurity(void)
static IInternetProtocol * current_binding_protocol
#define CHECK_EXPECT(func)
static ULONG WINAPI ProtocolSink_Release(IInternetProtocolSink *iface)
static BOOL broken_mhtml_resolver
#define DEFINE_EXPECT(func)
static void test_MessageGetPropInfo(void)
static HRESULT WINAPI Stream_LockRegion(IStream *iface, ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType)
static IServiceProvider service_provider
static HRESULT WINAPI Stream_QueryInterface(IStream *iface, REFIID riid, void **ppv)
static HRESULT WINAPI BindInfo_QueryInterface(IInternetBindInfo *iface, REFIID riid, void **ppv)
static HRESULT WINAPI Stream_Clone(IStream *iface, IStream **ppstm)
static const char mhtml_page1[]
static HRESULT WINAPI BindInfo_GetBindInfo(IInternetBindInfo *iface, DWORD *grfBINDF, BINDINFO *pbindinfo)
static HRESULT WINAPI ProtocolSink_QueryInterface(IInternetProtocolSink *iface, REFIID riid, void **ppv)
static IStream * create_stream_from_string(const char *data)
static void test_MessageSetProp(void)
static void test_MessageOptions(void)
static HRESULT WINAPI outer_QueryInterface(IUnknown *iface, REFIID riid, void **ppv)
static HRESULT WINAPI Stream_UnlockRegion(IStream *iface, ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType)
static void test_CreateVirtualStream(void)
static const mhtml_binding_test_t * current_binding_test
static void test_mhtml_protocol(void)
static IInternetProtocolSink protocol_sink
static DWORD expect_seek_pos
static const mhtml_binding_test_t binding_tests[]
static IStream * create_test_stream(void)
#define CHECK_CALLED(func)
static void test_MimeOleGetPropertySchema(void)
static HRESULT WINAPI ProtocolSink_ReportResult(IInternetProtocolSink *iface, HRESULT hrResult, DWORD dwError, LPCWSTR szResult)
const WCHAR * relative_url
static ULONG WINAPI Stream_Release(IStream *iface)
static const IStreamVtbl StreamVtbl
static HRESULT WINAPI Stream_Commit(IStream *iface, DWORD grfCommitFlags)
static HRESULT WINAPI Stream_Seek(IStream *iface, LARGE_INTEGER dlibMove, DWORD dwOrigin, ULARGE_INTEGER *plibNewPosition)
static HRESULT WINAPI Stream_Write(IStream *iface, const void *pv, ULONG cb, ULONG *pcbWritten)
static void test_mhtml_protocol_binding(const mhtml_binding_test_t *test)
static void test_BodyDeleteProp(void)
static void test_BindToObject(void)
static HRESULT WINAPI ProtocolSink_ReportData(IInternetProtocolSink *iface, DWORD grfBSCF, ULONG ulProgress, ULONG ulProgressMax)
static HRESULT WINAPI Stream_Read(IStream *iface, void *pv, ULONG cb, ULONG *pcbRead)
static HRESULT WINAPI ServiceProvider_QueryInterface(IServiceProvider *iface, REFIID riid, void **ppv)
#define test_current_encoding(a, b)
static const struct @1810 combine_tests[]
static HRESULT WINAPI ProtocolSink_ReportProgress(IInternetProtocolSink *iface, ULONG ulStatusCode, const WCHAR *szStatusText)
static ULONG WINAPI ServiceProvider_AddRef(IServiceProvider *iface)
static const IServiceProviderVtbl ServiceProviderVtbl
static IInternetBindInfoVtbl InternetBindInfoVtbl
static void test_CreateBody(void)
static HRESULT WINAPI BindInfo_GetBindString(IInternetBindInfo *iface, ULONG ulStringType, LPOLESTR *ppwzStr, ULONG cEl, ULONG *pcElFetched)
static void _test_current_encoding(unsigned line, IMimeBody *mime_body, ENCODINGTYPE encoding)
static ULONG WINAPI BindInfo_AddRef(IInternetBindInfo *iface)
static IInternetBindInfo bind_info
static void test_CreateMessage(void)
static void _test_stream_read(unsigned line, IStream *stream, HRESULT exhres, const char *exdata, unsigned read_size)
static void test_Allocator(void)
static ULONG WINAPI ProtocolSink_AddRef(IInternetProtocolSink *iface)
static ULONG WINAPI outer_Release(IUnknown *iface)
static void test_SetData(void)
const char * combined_url
static IInternetProtocolInfo protocol_info
static const char test_url[]
HRESULT WINAPI CreateBindCtx(DWORD reserved, IBindCtx **bind_context)
static const char topic[]
#define IsEqualGUID(rguid1, rguid2)
static __inline const char * wine_dbgstr_guid(const GUID *id)
static const void * body(MD5_CTX *ctx, const void *data, unsigned long size)
#define CONTAINING_RECORD(address, type, field)
HRESULT WINAPI CreateURLMoniker(IMoniker *pmkContext, LPCWSTR szURL, IMoniker **ppmk)
DWORD WINAPI GetLastError(void)
#define CLASS_E_NOAGGREGATION
#define INET_E_RESOURCE_NOT_FOUND
#define INTERNET_MAX_URL_LENGTH