22#define NONAMELESSUNION
39#define DEFINE_EXPECT(func) \
40 static BOOL expect_ ## func = FALSE, called_ ## func = FALSE
42#define SET_EXPECT(func) \
43 expect_ ## func = TRUE
45#define CHECK_EXPECT(func) \
47 ok(expect_ ##func, "unexpected call " #func "\n"); \
48 expect_ ## func = FALSE; \
49 called_ ## func = TRUE; \
52#define CHECK_EXPECT2(func) \
54 ok(expect_ ##func, "unexpected call " #func "\n"); \
55 called_ ## func = TRUE; \
58#define CHECK_CALLED(func) \
60 ok(called_ ## func, "expected " #func "\n"); \
61 expect_ ## func = called_ ## func = FALSE; \
75 "MIME-Version: 1.0\r\n"
76 "Content-Type: multipart/mixed;\r\n"
77 " boundary=\"------------1.5.0.6\";\r\n"
78 " stuff=\"du;nno\";\r\n"
79 " morestuff=\"so\\\\me\\\"thing\\\"\"\r\n"
81 "From: Huw Davies <huw@codeweavers.com>\r\n"
82 "From: Me <xxx@codeweavers.com>\r\n"
83 "To: wine-patches <wine-patches@winehq.org>\r\n"
84 "Cc: Huw Davies <huw@codeweavers.com>,\r\n"
85 " \"Fred Bloggs\" <fred@bloggs.com>\r\n"
89 "This is a multi-part message in MIME format.\r\n"
90 "--------------1.5.0.6\r\n"
91 "Content-Type: text/plain; format=fixed; charset=UTF-8\r\n"
92 "Content-Transfer-Encoding: 8bit\r\n"
95 "--------------1.5.0.6\r\n"
96 "Content-Type: text/plain; charset=\"us-ascii\"\r\n"
97 "Content-Transfer-Encoding: 7bit\r\n"
100 "--------------1.5.0.6--\r\n";
103 "MIME-Version: 1.0\r\n"
104 "Content-Type: multipart/related; type:=\"text/html\"; boundary=\"----=_NextPart_000_00\"\r\n"
106 "------=_NextPart_000_00\r\n"
107 "Content-Type: text/html; charset=\"Windows-1252\"\r\n"
108 "Content-Transfer-Encoding: quoted-printable\r\n"
111 "------=_NextPart_000_00\r\n"
112 "Content-Type: Image/Jpeg\r\n"
113 "Content-Transfer-Encoding: base64\r\n"
114 "Content-Location: http://winehq.org/mhtmltest.html\r\n"
115 "\r\n\t\t\t\tVGVzdA==\r\n\r\n"
116 "------=_NextPart_000_00--";
147 IStream_Release(pstm);
158 IMimeSecurity_Release(sec);
180#define test_current_encoding(a,b) _test_current_encoding(__LINE__,a,b)
183 ENCODINGTYPE current_encoding;
186 hres = IMimeBody_GetCurrentEncoding(mime_body, ¤t_encoding);
195 HBODY
handle = (
void *)0xdeadbeef;
200 MIMEPARAMINFO *param_info;
201 IMimeAllocator *
alloc;
216 ok(
hr == MIME_E_NO_DATA,
"ret %08x\n",
hr);
222 hr = IMimeBody_InitNew(
body);
230 IStream_Seek(
in, off, STREAM_SEEK_CUR, &
pos);
231 ok(
pos.u.LowPart == 359,
"pos %u\n",
pos.u.LowPart);
233 hr = IMimeBody_IsContentType(
body,
"multipart",
"mixed");
235 hr = IMimeBody_IsContentType(
body,
"text",
"plain");
237 hr = IMimeBody_IsContentType(
body,
NULL,
"mixed");
239 hr = IMimeBody_IsType(
body, IBT_EMPTY);
242 hr = IMimeBody_SetData(
body, IET_8BIT,
"text",
"plain", &IID_IStream,
in);
244 hr = IMimeBody_IsContentType(
body,
"text",
"plain");
251 ok(
hr == MIME_E_NO_DATA,
"ret %08x\n",
hr);
257 hr = IMimeBody_IsType(
body, IBT_EMPTY);
263 hr = IMimeBody_GetParameters(
body,
"nothere", &
count, ¶m_info);
264 ok(
hr == MIME_E_NOT_FOUND,
"ret %08x\n",
hr);
266 ok(!param_info,
"got %p\n", param_info);
268 hr = IMimeBody_GetParameters(
body,
"bar", &
count, ¶m_info);
271 ok(!param_info,
"got %p\n", param_info);
273 hr = IMimeBody_GetParameters(
body,
"Content-Type", &
count, ¶m_info);
277 ok(param_info !=
NULL,
"got %p\n", param_info);
282 if(!
strcmp(param_info[
i].pszName,
"morestuff"))
285 ok(!
strcmp(param_info[
i].pszData,
"so\\me\"thing\""),
286 "got %s\n", param_info[
i].pszData);
288 else if(!
strcmp(param_info[
i].pszName,
"stuff"))
291 ok(!
strcmp(param_info[
i].pszData,
"du;nno"),
292 "got %s\n", param_info[
i].pszData);
295 ok(found_param == 2,
"matched %d params\n", found_param);
299 IMimeAllocator_Release(
alloc);
302 IMimeBody_Release(
body);
353 for(
i = 0;
i <
cb;
i++)
354 output[
i] =
'0' +
This->pos++;
361 ok(0,
"unexpected call\n");
372 if(dwOrigin == STREAM_SEEK_END) {
383 ok(dwOrigin == STREAM_SEEK_SET,
"dwOrigin = %d\n", dwOrigin);
392 ok(0,
"unexpected call\n");
399 ok(0,
"unexpected call\n");
405 ok(0,
"unexpected call\n");
411 ok(0,
"unexpected call\n");
418 ok(0,
"unexpected call\n");
425 ok(0,
"unexpected call\n");
432 ok(dwStatFlag == STATFLAG_NONAME,
"dwStatFlag = %x\n", dwStatFlag);
438 ok(0,
"unexpected call\n");
469#define test_stream_read(a,b,c,d) _test_stream_read(__LINE__,a,b,c,d)
477 read_size =
sizeof(
buf)-1;
480 ok_(__FILE__,
line)(
hres == exhres,
"Read returned %08x, expected %08x\n",
hres, exhres);
481 ok_(__FILE__,
line)(
read == exread,
"unexpected read size %u, expected %u\n",
read, exread);
496 hr = IMimeBody_InitNew(
body);
505 hr = IMimeBody_SetData(
body, IET_BINARY,
"text",
"plain", &IID_IStream,
test_stream);
508 hr = IMimeBody_IsContentType(
body,
"text",
"plain");
530 hr = IMimeBody_GetData(
body, IET_BINARY, &stream2);
534 ok(stream2 !=
stream,
"unexpected stream\n");
550 IStream_Release(stream2);
554 hr = IMimeBody_SetData(
body, IET_BASE64,
"text",
"plain", &IID_IStream,
stream);
575 hr = IMimeBody_SetData(
body, IET_QP,
"text",
"plain", &IID_IStream,
stream);
588 IMimeBody_Release(
body);
594 IMimeAllocator *
alloc;
598 IMimeAllocator_Release(
alloc);
611 FINDBODY find_struct;
615 char text[] =
"text";
618 static const char att_pritype[] =
"att:pri-content-type";
636 hr = IMimeMessage_BindToObject(
msg, HBODY_ROOT, &IID_IMimeBody, (
void**)&
body);
644 IMimeBody_Release(
body);
646 hr = IMimeMessage_GetBody(
msg, IBL_ROOT,
NULL, &hbody);
656 hr = IMimeMessage_GetBody(
msg, IBL_PARENT, hbody,
NULL);
659 hbody2 = (HBODY)0xdeadbeef;
660 hr = IMimeMessage_GetBody(
msg, IBL_PARENT, hbody, &hbody2);
661 ok(
hr == MIME_E_NOT_FOUND,
"ret %08x\n",
hr);
662 ok(hbody2 ==
NULL,
"hbody2 %p\n", hbody2);
664 PropVariantInit(&prop);
665 hr = IMimeMessage_GetBodyProp(
msg, hbody, att_pritype, 0, &prop);
667 ok(prop.vt ==
VT_LPSTR,
"vt %08x\n", prop.vt);
668 ok(!
strcasecmp(prop.u.pszVal,
"multipart"),
"got %s\n", prop.u.pszVal);
671 hr = IMimeMessage_GetBody(
msg, IBL_FIRST, hbody, &hbody);
673 hr = IMimeMessage_BindToObject(
msg, hbody, &IID_IMimeBody, (
void**)&
body);
687 hr = IMimeBody_GetCharset(
body, &hcs);
691 ok(hcs !=
NULL,
"Expected non-NULL charset\n");
694 IMimeBody_Release(
body);
696 hr = IMimeMessage_GetBody(
msg, IBL_NEXT, hbody, &hbody);
698 hr = IMimeMessage_BindToObject(
msg, hbody, &IID_IMimeBody, (
void**)&
body);
711 IMimeBody_Release(
body);
713 find_struct.pszPriType =
text;
714 find_struct.pszSubType =
NULL;
716 hr = IMimeMessage_FindFirst(
msg, &find_struct, &hbody);
719 hr = IMimeMessage_FindNext(
msg, &find_struct, &hbody);
722 hr = IMimeMessage_FindNext(
msg, &find_struct, &hbody);
723 ok(
hr == MIME_E_NOT_FOUND,
"ret %08x\n",
hr);
725 hr = IMimeMessage_GetAttachments(
msg, &
count, &body_list);
733 PropVariantInit(&prop);
735 hr = IMimeMessage_BindToObject(
msg, body_list[0], &IID_IMimeBody, (
void**)&
attachment);
744 hr = IMimeBody_GetProp(
attachment,
"Content-Transfer-Encoding", 0, &prop);
747 ok(prop.vt ==
VT_LPSTR,
"type %d\n", prop.vt);
748 ok(!
strcmp(prop.u.pszVal,
"8bit"),
"got %s\n", prop.u.pszVal);
756 hr = IMimeMessage_BindToObject(
msg, body_list[1], &IID_IMimeBody, (
void**)&
attachment);
765 hr = IMimeBody_GetProp(
attachment,
"Content-Transfer-Encoding", 0, &prop);
767 ok(prop.vt ==
VT_LPSTR,
"type %d\n", prop.vt);
768 ok(!
strcmp(prop.u.pszVal,
"7bit"),
"got %s\n", prop.u.pszVal);
778 hr = IMimeBody_GetCharset(
body, &hcs);
782 ok(hcs !=
NULL,
"Expected non-NULL charset\n");
785 IMimeMessage_Release(
msg);
809 hres = IMimeMessage_Load(mime_message,
stream);
813 hres = IMimeMessage_CountBodies(mime_message, HBODY_ROOT,
TRUE, &
count);
817 hres = IMimeMessage_GetAttachments(mime_message, &
count, &body_list);
821 hres = IMimeMessage_BindToObject(mime_message, body_list[0], &IID_IMimeBody, (
void**)&mime_body);
824 hres = IMimeBody_GetData(mime_body, IET_BINARY, &
stream);
831 IMimeBody_Release(mime_body);
833 hres = IMimeMessage_BindToObject(mime_message, body_list[1], &IID_IMimeBody, (
void**)&mime_body);
838 hres = IMimeBody_GetData(mime_body, IET_BINARY, &
stream);
843 IMimeBody_Release(mime_body);
847 IMimeMessage_Release(mime_message);
852 static const char topic[] =
"wine topic";
853 static const WCHAR topicW[] = {
'w',
'i',
'n',
'e',
' ',
't',
'o',
'p',
'i',
'c',0};
862 PropVariantInit(&prop);
864 hr = IMimeMessage_BindToObject(
msg, HBODY_ROOT, &IID_IMimeBody, (
void**)&
body);
870 hr = IMimeBody_SetProp(
body,
"Thread-Topic", 0,
NULL);
876 hr = IMimeBody_SetProp(
body,
"Thread-Topic", 0, &prop);
883 hr = IMimeBody_GetProp(
body,
"Thread-Topic", 0,
NULL);
886 hr = IMimeBody_GetProp(
body,
"Wine-Topic", 0, &prop);
887 ok(
hr == MIME_E_NOT_FOUND,
"ret %08x\n",
hr);
890 hr = IMimeBody_GetProp(
body,
"Thread-Topic", 0, &prop);
894 ok(prop.vt ==
VT_LPSTR,
"type %d\n", prop.vt);
895 ok(!
strcmp(prop.u.pszVal,
topic),
"got %s\n", prop.u.pszVal);
911 ok(prop.vt ==
VT_LPSTR,
"type %d\n", prop.vt);
912 ok(!
strcmp(prop.u.pszVal,
topic),
"got %s\n", prop.u.pszVal);
918 hr = IMimeBody_GetProp(
body,
"Subject", 0, &prop);
922 ok(prop.vt ==
VT_LPSTR,
"type %d\n", prop.vt);
923 ok(!
strcmp(prop.u.pszVal,
topic),
"got %s\n", prop.u.pszVal);
928 hr = IMimeBody_GetProp(
body,
"Subject", 0, &prop);
948 hr = IMimeBody_SetProp(
body, PIDTOSTR(124), 0, &prop);
949 ok(
hr == MIME_E_NOT_FOUND,
"ret %08x\n",
hr);
952 IMimeBody_Release(
body);
953 IMimeMessage_Release(
msg);
958 static const char topic[] =
"wine topic";
959 static const char subject[] =
"wine testing";
969 PropVariantInit(&prop);
971 hr = IMimeMessage_BindToObject(
msg, HBODY_ROOT, &IID_IMimeBody, (
void**)&
body);
977 hr = IMimeBody_SetProp(
body,
"Thread-Topic", 0, &prop);
983 strcpy(prop.u.pszVal, subject);
989 info.dwMask = PIM_ENCODINGTYPE | PIM_FLAGS | PIM_PROPID;
994 info.dwMask = PIM_ENCODINGTYPE | PIM_FLAGS | PIM_PROPID;
995 hr = IMimeBody_GetPropInfo(
body,
"Subject",
NULL);
999 info.dwMask = PIM_ENCODINGTYPE | PIM_FLAGS | PIM_PROPID;
1000 hr = IMimeBody_GetPropInfo(
body,
"Subject", &
info);
1004 ok(
info.dwMask & (PIM_ENCODINGTYPE | PIM_FLAGS| PIM_PROPID),
"Invalid mask 0x%08x\n",
info.dwFlags);
1006 ok(
info.ietEncoding == 0,
"Invalid encoding %d\n",
info.ietEncoding);
1008 ok(
info.cValues == 0xfefefefe,
"Invalid cValues %d\n",
info.cValues);
1013 hr = IMimeBody_GetPropInfo(
body,
"Subject", &
info);
1017 ok(
info.dwMask == 0,
"Invalid mask 0x%08x\n",
info.dwFlags);
1018 ok(
info.dwFlags == 0xfefefefe,
"Invalid flags 0x%08x\n",
info.dwFlags);
1019 ok(
info.ietEncoding == -16843010,
"Invalid encoding %d\n",
info.ietEncoding);
1020 ok(
info.dwPropId == -16843010,
"Invalid propid %d\n",
info.dwPropId);
1025 info.dwPropId = 1024;
1026 info.ietEncoding = 99;
1027 hr = IMimeBody_GetPropInfo(
body,
"Subject", &
info);
1031 ok(
info.dwMask == 0,
"Invalid mask 0x%08x\n",
info.dwFlags);
1032 ok(
info.dwFlags == 0xfefefefe,
"Invalid flags 0x%08x\n",
info.dwFlags);
1033 ok(
info.ietEncoding == 99,
"Invalid encoding %d\n",
info.ietEncoding);
1034 ok(
info.dwPropId == 1024,
"Invalid propid %d\n",
info.dwPropId);
1038 info.dwMask = PIM_ENCODINGTYPE | PIM_FLAGS | PIM_PROPID;
1039 hr = IMimeBody_GetPropInfo(
body,
"Invalid Property", &
info);
1040 ok(
hr == MIME_E_NOT_FOUND,
"ret %08x\n",
hr);
1042 IMimeBody_Release(
body);
1043 IMimeMessage_Release(
msg);
1048 static const char string[] =
"XXXXX";
1049 static const char zero[] =
"0";
1057 PropVariantInit(&prop);
1060 prop.u.boolVal =
TRUE;
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.u.boolVal ==
TRUE,
"Hide Attachments got %d\n", prop.u.boolVal);
1073 strcpy(prop.u.pszVal,
string);
1074 hr = IMimeMessage_SetOption(
msg, OID_HIDE_TNEF_ATTACHMENTS, &prop);
1078 hr = IMimeMessage_GetOption(
msg, OID_HIDE_TNEF_ATTACHMENTS, &prop);
1081 todo_wine ok(prop.u.boolVal ==
TRUE,
"Hide Attachments got %d\n", prop.u.boolVal);
1088 hr = IMimeMessage_SetOption(
msg, OID_HIDE_TNEF_ATTACHMENTS, &prop);
1092 hr = IMimeMessage_GetOption(
msg, OID_HIDE_TNEF_ATTACHMENTS, &prop);
1095 todo_wine ok(prop.u.boolVal ==
TRUE,
"Hide Attachments got %d\n", prop.u.boolVal);
1100 prop.u.boolVal =
TRUE;
1101 hr = IMimeMessage_SetOption(
msg, 0xff00000a, &prop);
1102 ok(
hr == MIME_E_INVALID_OPTION_ID,
"ret %08x\n",
hr);
1108 hr = IMimeMessage_SetOption(
msg, 0xff00000a, &prop);
1109 ok(
hr == MIME_E_INVALID_OPTION_ID,
"ret %08x\n",
hr);
1112 IMimeMessage_Release(
msg);
1129 hr = IMimeMessage_BindToObject(
msg, HBODY_ROOT, &IID_IMimeBody, (
void**)&
body);
1131 IMimeBody_Release(
body);
1133 IMimeMessage_Release(
msg);
1138 static const char topic[] =
"wine topic";
1147 PropVariantInit(&prop);
1149 hr = IMimeMessage_BindToObject(
msg, HBODY_ROOT, &IID_IMimeBody, (
void**)&
body);
1152 hr = IMimeBody_DeleteProp(
body,
"Subject");
1153 ok(
hr == MIME_E_NOT_FOUND,
"ret %08x\n",
hr);
1156 ok(
hr == MIME_E_NOT_FOUND,
"ret %08x\n",
hr);
1161 hr = IMimeBody_SetProp(
body,
"Subject", 0, &prop);
1165 hr = IMimeBody_DeleteProp(
body,
"Subject");
1168 hr = IMimeBody_GetProp(
body,
"Subject", 0, &prop);
1169 ok(
hr == MIME_E_NOT_FOUND,
"ret %08x\n",
hr);
1182 ok(
hr == MIME_E_NOT_FOUND,
"ret %08x\n",
hr);
1184 IMimeBody_Release(
body);
1185 IMimeMessage_Release(
msg);
1196 IMimePropertySchema_Release(
schema);
1214 "mhtml:file://%s!http://winehq.org/mhtmltest.html",
1250 ok(grfBINDF !=
NULL,
"grfBINDF == NULL\n");
1251 ok(pbindinfo !=
NULL,
"pbindinfo == NULL\n");
1252 ok(pbindinfo->cbSize ==
sizeof(BINDINFO),
"wrong size of pbindinfo: %d\n", pbindinfo->cbSize);
1254 *grfBINDF = BINDF_ASYNCHRONOUS | BINDF_ASYNCSTORAGE | BINDF_PULLDATA | BINDF_FROMURLMON | BINDF_NEEDFILE;
1261 ok(0,
"unexpected call\n");
1344 ok(0,
"unexpected call\n");
1349 const WCHAR *szStatusText)
1351 switch(ulStatusCode) {
1352 case BINDSTATUS_MIMETYPEAVAILABLE:
1356 case BINDSTATUS_CACHEFILENAMEAVAILABLE:
1360 ok(0,
"unexpected call %u %s\n", ulStatusCode,
wine_dbgstr_w(szStatusText));
1367 ULONG ulProgressMax)
1375 ok(!ulProgress,
"ulProgress = %u\n", ulProgress);
1376 ok(ulProgress == ulProgressMax,
"ulProgress != ulProgressMax\n");
1377 ok(grfBSCF == (BSCF_FIRSTDATANOTIFICATION | BSCF_INTERMEDIATEDATANOTIFICATION
1378 | BSCF_LASTDATANOTIFICATION | BSCF_DATAFULLYAVAILABLE | BSCF_AVAILABLEDATASIZEUNKNOWN),
1379 "grcf = %08x\n", grfBSCF);
1395 ok(hrResult ==
S_OK,
"hrResult = %08x\n", hrResult);
1396 ok(!dwError,
"dwError = %u\n", dwError);
1439 ok(
hres ==
S_OK,
"Could not create protocol handler: %08x\n",
hres);
1441 hres = IInternetProtocol_QueryInterface(
protocol, &IID_IInternetProtocolEx, (
void**)&unk);
1448 SET_EXPECT(ReportProgress_MIMETYPEAVAILABLE);
1449 SET_EXPECT(ReportProgress_CACHEFILENAMEAVAILABLE);
1460 IInternetProtocol_Release(
protocol);
1465static const struct {
1472 "mhtml:file:///c:/dir/test.mht",
"http://test.org",
1473 "mhtml:file:///c:/dir/test.mht!x-usc:http://test.org"
1475 "mhtml:file:///c:/dir/test.mht",
"3D\"http://test.org\"",
1476 "mhtml:file:///c:/dir/test.mht!x-usc:3D\"http://test.org\""
1478 "mhtml:file:///c:/dir/test.mht",
"123abc",
1479 "mhtml:file:///c:/dir/test.mht!x-usc:123abc"
1481 "mhtml:file:///c:/dir/test.mht!x-usc:http://test.org",
"123abc",
1482 "mhtml:file:///c:/dir/test.mht!x-usc:123abc"
1484 "MhtMl:file:///c:/dir/test.mht!x-usc:http://test.org/dir/dir2/file.html",
"../..",
1485 "mhtml:file:///c:/dir/test.mht!x-usc:../.."
1486 }, {
"mhtml:file:///c:/dir/test.mht!x-usc:file:///c:/dir/dir2/file.html",
"../..",
1487 "mhtml:file:///c:/dir/test.mht!x-usc:../.."
1489 "mhtml:file:///c:/dir/test.mht!x-usc:http://test.org",
"",
1490 "mhtml:file:///c:/dir/test.mht"
1492 "mhtml:file:///c:/dir/test.mht!x-usc:http://test.org",
"mhtml:file:///d:/file.html",
1493 "file:///d:/file.html",
TRUE
1495 "mhtml:file:///c:/dir/test.mht!x-usc:http://test.org",
"mhtml:file:///c:/dir2/test.mht!x-usc:http://test.org",
1496 "mhtml:file:///c:/dir2/test.mht!x-usc:http://test.org",
TRUE
1498 "mhtml:file:///c:/dir/test.mht!http://test.org",
"123abc",
1499 "mhtml:file:///c:/dir/test.mht!x-usc:123abc"
1501 "mhtml:file:///c:/dir/test.mht!http://test.org",
"",
1502 "mhtml:file:///c:/dir/test.mht"
1514 static const WCHAR http_url[] = {
'h',
't',
't',
'p',
':',
'/',
'/',
't',
'e',
's',
't',
'.',
'o',
'r',
'g',0};
1518 ok(
hres ==
S_OK,
"Could not create protocol info: %08x\n",
hres);
1524 combined_len = 0xdeadbeef;
1531 ok(combined_len == exlen,
"[%u] combined len is %u, expected %u\n",
i, combined_len, exlen);
1535 combined_len = 0xdeadbeef;
1539 ok(!combined_len,
"[%u] combined_len = %u\n",
i, combined_len);
1555 ok(0,
"unexpected call\n");
1589 hres = IUnknown_QueryInterface(unk, &IID_IInternetProtocolInfo, (
void**)&unk2);
1593 ok(
hres ==
S_OK,
"Could not get IClassFactory iface: %08x\n",
hres);
1594 IUnknown_Release(unk);
1598 hres = IUnknown_QueryInterface(unk, &IID_IInternetProtocol, (
void**)&unk2);
1599 ok(
hres ==
S_OK,
"Could not get IInternetProtocol iface: %08x\n",
hres);
1600 IUnknown_Release(unk2);
1601 IUnknown_Release(unk);
1624 static const struct {
1626 const char *mhtml_url;
1628 {
"file:///x:\\dir\\file.mht",
"mhtml:file://x:\\dir\\file.mht"},
1629 {
"file:///x:/dir/file.mht",
"mhtml:file://x:\\dir\\file.mht"},
1630 {
"http://www.winehq.org/index.html?query#hash",
"mhtml:http://www.winehq.org/index.html?query#hash"},
1631 {
"../test.mht",
"mhtml:../test.mht"}
1645 IBindCtx_Release(bind_ctx);
1646 if(
hres == INET_E_RESOURCE_NOT_FOUND) {
1647 win_skip(
"Broken MHTML behaviour found. Skipping some tests.\n");
1652 hres = IMoniker_GetDisplayName(new_mon,
NULL,
NULL, &mhtml_url);
1657 IUnknown_Release(unk);
1658 IMoniker_Release(new_mon);
1659 IMoniker_Release(mon);
int strcmp(const char *String1, const char *String2)
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
ACPI_SIZE strlen(const char *String)
char * strcpy(char *DstString, const char *SrcString)
#define InterlockedIncrement
#define InterlockedDecrement
const GUID IID_IClassFactory
#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 LPCVOID lpBuffer, IN DWORD nNumberOfBytesToWrite OPTIONAL, OUT LPDWORD lpNumberOfBytesWritten, IN LPOVERLAPPED lpOverlapped OPTIONAL)
DWORD WINAPI GetCurrentDirectoryA(IN DWORD nBufferLength, OUT LPSTR lpBuffer)
int WINAPI lstrcmpW(LPCWSTR str1, LPCWSTR str2)
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
HRESULT WINAPI DECLSPEC_HOTPATCH CoGetClassObject(REFCLSID rclsid, DWORD dwClsContext, COSERVERINFO *pServerInfo, REFIID iid, LPVOID *ppv)
HRESULT WINAPI CreateStreamOnHGlobal(HGLOBAL hGlobal, BOOL fDeleteOnRelease, LPSTREAM *ppstm)
HRESULT WINAPI DECLSPEC_HOTPATCH OleInitialize(LPVOID reserved)
HRESULT WINAPI PropVariantClear(PROPVARIANT *pvar)
void WINAPI DECLSPEC_HOTPATCH OleUninitialize(void)
#define INTERNET_MAX_URL_LENGTH
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
VOID WINAPI CoTaskMemFree(LPVOID ptr)
LPVOID WINAPI CoTaskMemAlloc(SIZE_T size)
static struct test_info tests[]
#define sprintf(buf, format,...)
static HRESULT WINAPI ServiceProvider_QueryService(IServiceProvider *iface, REFGUID guidService, REFIID riid, void **ppv)
const char * expected_result
static ULONG WINAPI Stream_AddRef(IStream *iface)
static HRESULT WINAPI ProtocolSink_Switch(IInternetProtocolSink *iface, PROTOCOLDATA *pProtocolData)
static const struct @1676 combine_tests[]
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)
const char * relative_url
static HRESULT WINAPI BindInfo_QueryInterface(IInternetBindInfo *iface, REFIID riid, void **ppv)
static HRESULT WINAPI Stream_Clone(IStream *iface, IStream **ppstm)
static int strcmp_wa(const WCHAR *strw, const char *stra)
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 WCHAR * a2w(const char *str)
static void test_MimeOleGetPropertySchema(void)
static HRESULT WINAPI ProtocolSink_ReportResult(IInternetProtocolSink *iface, HRESULT hrResult, DWORD dwError, LPCWSTR szResult)
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 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 const char * strw(LPCWSTR x)
static HMODULE MODULEINFO DWORD cb
#define todo_wine_if(is_todo)
static IInternetProtocolInfo protocol_info
static const char test_url[]
HRESULT WINAPI CreateBindCtx(DWORD reserved, LPBC *ppbc)
static const WCHAR topicW[]
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)
struct _LARGE_INTEGER::@2307 u
DWORD WINAPI GetLastError(void)
#define CLASS_E_NOAGGREGATION