37#define DEFINE_EXPECT(func) \
38 static BOOL expect_ ## func = FALSE, called_ ## func = FALSE
40#define SET_EXPECT(func) \
41 expect_ ## func = TRUE
43#define CHECK_EXPECT2(func) \
45 ok(expect_ ##func, "unexpected call " #func "\n"); \
46 called_ ## func = TRUE; \
49#define CHECK_EXPECT(func) \
51 CHECK_EXPECT2(func); \
52 expect_ ## func = FALSE; \
55#define CHECK_CALLED(func) \
57 ok(called_ ## func, "expected " #func "\n"); \
58 expect_ ## func = called_ ## func = FALSE; \
61#define CHECK_NOT_CALLED(func) \
63 ok(!called_ ## func, "unexpected " #func "\n"); \
64 expect_ ## func = called_ ## func = FALSE; \
67#define CLEAR_CALLED(func) \
68 expect_ ## func = called_ ## func = FALSE
133static const WCHAR wszIndexHtml[] = {
'i',
'n',
'd',
'e',
'x',
'.',
'h',
't',
'm',
'l',0};
135 {
'f',
'i',
'l',
'e',
':',
'i',
'n',
'd',
'e',
'x',
'.',
'h',
't',
'm',
'l',0};
140static const WCHAR hostW[] = {
'w',
'w',
'w',
'.',
'w',
'i',
'n',
'e',
'h',
'q',
'.',
'o',
'r',
'g',0};
141static const WCHAR winehq_ipW[] = {
'2',
'0',
'9',
'.',
'4',
'6',
'.',
'2',
'5',
'.',
'1',
'3',
'4',0};
143static const WCHAR pjpegW[] = {
'i',
'm',
'a',
'g',
'e',
'/',
'p',
'j',
'p',
'e',
'g',0};
144static const WCHAR gifW[] = {
'i',
'm',
'a',
'g',
'e',
'/',
'g',
'i',
'f',0};
196 {
'h',
't',
't',
'p',
's',0},
204 {
'f',
'i',
'l',
'e',
':',
't',
'e',
's',
't',
'.',
'h',
't',
'm',
'l',0},
205 {
'h',
't',
't',
'p',
':',
'/',
'/',
'w',
'w',
'w',
'.',
'w',
'i',
'n',
'e',
'h',
'q',
'.',
206 'o',
'r',
'g',
'/',
's',
'i',
't',
'e',
'/',
'a',
'b',
'o',
'u',
't',0},
207 {
'h',
't',
't',
'p',
's',
':',
'/',
'/',
'w',
'w',
'w',
'.',
'c',
'o',
'd',
'e',
'w',
'e',
'a',
'v',
'e',
'r',
's',
208 '.',
'c',
'o',
'm',
'/',
't',
'e',
's',
't',
'.',
'h',
't',
'm',
'l',0},
209 {
'f',
't',
'p',
':',
'/',
'/',
'f',
't',
'p',
'.',
'w',
'i',
'n',
'e',
'h',
'q',
'.',
'o',
'r',
'g',
210 '/',
'p',
'u',
'b',
'/',
'o',
't',
'h',
'e',
'r',
211 '/',
'w',
'i',
'n',
'e',
'l',
'o',
'g',
'o',
'.',
'x',
'c',
'f',
'.',
't',
'a',
'r',
'.',
'b',
'z',
'2',0},
212 {
'm',
'k',
':',
't',
'e',
's',
't',0},
213 {
'i',
't',
's',
':',
't',
'e',
's',
't',
'.',
'c',
'h',
'm',
':',
':',
'/',
'b',
'l',
'a',
'n',
'k',
'.',
'h',
't',
'm',
'l',0},
214 {
't',
'e',
's',
't',
':',
'/',
'/',
'f',
'i',
'l',
'e',
'.',
'h',
't',
'm',
'l',0}
247 ok(0,
"unexpected call\n");
263 trace(
"HttpSecurity_GetWindow\n");
270 win_skip(
"Security problem: %u\n", dwProblem);
272 "Expected got %u security problem\n", dwProblem);
305 ok(0,
"unexpected call\n");
324 static const WCHAR wszHeaders[] =
325 {
'C',
'o',
'n',
't',
'e',
'n',
't',
'-',
'T',
'y',
'p',
'e',
':',
' ',
'a',
'p',
'p',
'l',
'i',
'c',
'a',
't',
326 'i',
'o',
'n',
'/',
'x',
'-',
'w',
'w',
'w',
'-',
'f',
'o',
'r',
'm',
'-',
'u',
'r',
'l',
'e',
'n',
'c',
'o',
327 'd',
'e',
'd',
'\r',
'\n',0};
336 ok(pszAdditionalHeaders !=
NULL,
"pszAdditionalHeaders == NULL\n");
337 if(pszAdditionalHeaders)
339 ok(*pszAdditionalHeaders ==
NULL,
"*pszAdditionalHeaders != NULL\n");
343 memcpy(addl_headers, wszHeaders,
sizeof(wszHeaders));
344 *pszAdditionalHeaders = addl_headers;
356 ok(dwResponseCode == 200,
"dwResponseCode=%d, expected 200\n", dwResponseCode);
357 ok(szResponseHeaders !=
NULL,
"szResponseHeaders == NULL\n");
358 ok(szRequestHeaders ==
NULL,
"szRequestHeaders != NULL\n");
359 ok(pszAdditionalRequestHeaders ==
NULL,
"pszAdditionalHeaders != NULL\n");
367 static const BYTE sec_id[] = {
'h',
't',
't',
'p',
':',
't',
'e',
's',
't',1,0,0,0};
372 ok(pbSecurityId !=
NULL,
"pbSecurityId == NULL\n");
373 ok(pcbSecurityId !=
NULL,
"pcbSecurityId == NULL\n");
376 ok(*pcbSecurityId == 512,
"*pcbSecurityId=%d, expected 512\n", *pcbSecurityId);
377 *pcbSecurityId =
sizeof(sec_id);
381 memcpy(pbSecurityId, sec_id,
sizeof(sec_id));
417 *cancel = VARIANT_FALSE;
455 if(
IsEqualGUID(&IID_IInternetProtocol, guidService)) {
467 if(
IsEqualGUID(&IID_IBindCallbackRedirect, guidService)) {
474 if(
IsEqualGUID(&IID_IGetBindHandle, guidService)) {
475 trace(
"QueryService(IID_IGetBindHandle)\n");
480 if(
IsEqualGUID(&IID_IWindowForBindingUI, guidService)) {
481 trace(
"QueryService(IID_IWindowForBindingUI)\n");
501 static const IID IID_strm_unknown = {0x2f68429a,0x199a,0x4043,{0x93,0x11,0xf2,0xfe,0x7c,0x13,0xcc,0xb9}};
527 ok(pv !=
NULL,
"pv == NULL\n");
529 ok(pcbRead !=
NULL,
"pcbRead == NULL\n");
544 ok(0,
"unexpected call\n");
554 ok(dwOrigin == STREAM_SEEK_SET,
"dwOrigin = %d\n", dwOrigin);
555 ok(!plibNewPosition,
"plibNewPosition == NULL\n");
562 ok(0,
"unexpected call\n");
569 ok(0,
"unexpected call\n");
575 ok(0,
"unexpected call\n");
581 ok(0,
"unexpected call\n");
588 ok(0,
"unexpected call\n");
595 ok(0,
"unexpected call\n");
602 ok(0,
"unexpected call\n");
608 ok(0,
"unexpected call\n");
683 if(
bindf & BINDF_NEEDFILE)
684 SET_EXPECT(ReportProgress_CACHEFILENAMEAVAILABLE);
717 if(
bindf & BINDF_NEEDFILE)
738 ok(pProtocolData !=
NULL,
"pProtocolData == NULL\n");
740 ok(pProtocolData != &
protocoldata,
"pProtocolData == &protocoldata\n");
741 ok(pProtocolData->grfFlags ==
protocoldata.grfFlags,
"grfFlags wrong %x/%x\n",
743 ok(pProtocolData->dwState ==
protocoldata.dwState,
"dwState wrong %x/%x\n",
745 ok(pProtocolData->pData ==
protocoldata.pData,
"pData wrong %p/%p\n",
747 ok(pProtocolData->cbData ==
protocoldata.cbData,
"cbData wrong %x/%x\n",
751 pdata = pProtocolData;
778 "BEGINDOWNLOADCOMPONENTS",
779 "INSTALLINGCOMPONENTS",
780 "ENDDOWNLOADCOMPONENTS",
785 "CACHEFILENAMEAVAILABLE",
786 "BEGINSYNCOPERATION",
793 "VERIFIEDMIMETYPEAVAILABLE",
794 "CLASSINSTALLLOCATION",
796 "LOADINGMIMEHANDLER",
797 "CONTENTDISPOSITIONATTACH",
798 "FILTERREPORTMIMETYPE",
799 "CLSIDCANINSTANTIATE",
806 "COMPACT_POLICY_RECEIVED",
808 "COOKIE_STATE_UNKNOWN",
809 "COOKIE_STATE_ACCEPT",
810 "COOKIE_STATE_REJECT",
811 "COOKIE_STATE_PROMPT",
812 "COOKIE_STATE_LEASH",
813 "COOKIE_STATE_DOWNGRADE",
816 "SESSION_COOKIE_RECEIVED",
817 "PERSISTENT_COOKIE_RECEIVED",
818 "SESSION_COOKIES_ALLOWED",
820 "CONTENTDISPOSITIONFILENAME",
821 "MIMETEXTPLAINMISMATCH",
822 "PUBLISHERAVAILABLE",
823 "DISPLAYNAMEAVAILABLE"
829 static const WCHAR null_guid[] = {
'{',
'0',
'0',
'0',
'0',
'0',
'0',
'0',
'0',
'-',
'0',
'0',
'0',
'0',
'-',
830 '0',
'0',
'0',
'0',
'-',
'0',
'0',
'0',
'0',
'-',
'0',
'0',
'0',
'0',
'0',
'0',
'0',
'0',
'0',
'0',
'0',
'0',
'}',0};
831 static const WCHAR text_plain[] = {
't',
'e',
'x',
't',
'/',
'p',
'l',
'a',
'i',
'n',0};
841 switch(ulStatusCode) {
842 case BINDSTATUS_MIMETYPEAVAILABLE:
850 ok(szStatusText !=
NULL,
"szStatusText == NULL\n");
857 "szStatusText != text/plain\n");
864 "szStatusText != image/gif\n");
868 "szStatusText != text/html\n");
871 case BINDSTATUS_DIRECTBIND:
873 ok(szStatusText ==
NULL,
"szStatusText != NULL\n");
875 case BINDSTATUS_RAWMIMETYPE:
877 ok(szStatusText !=
NULL,
"szStatusText == NULL\n");
881 "szStatusText != text/html\n");
883 case BINDSTATUS_CACHEFILENAMEAVAILABLE:
885 ok(szStatusText !=
NULL,
"szStatusText == NULL\n");
892 ok(szStatusText !=
NULL,
"szStatusText == NULL\n");
895 case BINDSTATUS_FINDINGRESOURCE:
897 ok(szStatusText !=
NULL,
"szStatusText == NULL\n");
899 case BINDSTATUS_CONNECTING:
901 ok(szStatusText !=
NULL,
"szStatusText == NULL\n");
903 case BINDSTATUS_SENDINGREQUEST:
906 ok(szStatusText !=
NULL,
"szStatusText == NULL\n");
908 ok(!*szStatusText,
"wrong szStatusText\n");
911 case BINDSTATUS_VERIFIEDMIMETYPEAVAILABLE:
913 ok(szStatusText !=
NULL,
"szStatusText == NULL\n");
915 ok(!
strcmp_wa(szStatusText,
"text/html"),
"szStatusText != text/html\n");
917 case BINDSTATUS_PROTOCOLCLASSID:
919 ok(szStatusText !=
NULL,
"szStatusText == NULL\n");
922 case BINDSTATUS_COOKIE_SENT:
924 ok(szStatusText ==
NULL,
"szStatusText != NULL\n");
926 case BINDSTATUS_REDIRECTING:
929 ok(!
strcmp_wa(szStatusText,
"http://test.winehq.org/tests/hello.html"),
"szStatusText = %s\n",
wine_dbgstr_w(szStatusText));
933 case BINDSTATUS_ENCODING:
937 case BINDSTATUS_ACCEPTRANGES:
941 case BINDSTATUS_PROXYDETECTING:
942 if(!called_ReportProgress_PROXYDETECTING)
947 case BINDSTATUS_LOADINGMIMEHANDLER:
951 case BINDSTATUS_DECODING:
955 case BINDSTATUS_RESERVED_7:
956 trace(
"BINDSTATUS_RESERVED_7\n");
958 case BINDSTATUS_RESERVED_8:
959 trace(
"BINDSTATUS_RESERVED_8\n");
962 ok(0,
"Unexpected status %d (%d)\n", ulStatusCode, ulStatusCode-BINDSTATUS_LAST);
975 static const WCHAR connectionW[] = {
'c',
'o',
'n',
'n',
'e',
'c',
't',
'i',
'o',
'n',0};
977 hres = IInternetProtocol_QueryInterface(
protocol, &IID_IWinInetHttpInfo, (
void**)&
info);
978 ok(
hres ==
S_OK,
"Could not get IWinInterHttpInfo iface: %08x\n",
hres);
991 memcpy(
buf, connectionW,
sizeof(connectionW));
998 IWinInetHttpInfo_Release(
info);
1006 static int rec_depth;
1012 ok(ulProgress == ulProgressMax,
"ulProgress (%d) != ulProgressMax (%d)\n",
1013 ulProgress, ulProgressMax);
1015 ok(ulProgressMax == 13,
"ulProgressMax=%d, expected 13\n", ulProgressMax);
1018 ok((grfBSCF == (BSCF_FIRSTDATANOTIFICATION | BSCF_LASTDATANOTIFICATION)) ||
1019 (grfBSCF == (BSCF_FIRSTDATANOTIFICATION | BSCF_LASTDATANOTIFICATION | BSCF_SKIPDRAINDATAFORFILEURLS)),
1020 "grcfBSCF = %08x\n", grfBSCF);
1022 ok(grfBSCF == (BSCF_FIRSTDATANOTIFICATION | BSCF_DATAFULLYAVAILABLE),
"grcfBSCF = %08x\n", grfBSCF);
1026 ok(grfBSCF == (BSCF_LASTDATANOTIFICATION|BSCF_DATAFULLYAVAILABLE),
"grcfBSCF = %08x\n", grfBSCF);
1027 ok(ulProgress == 1000,
"ulProgress = %u\n", ulProgress);
1028 ok(!ulProgressMax,
"ulProgressMax = %u\n", ulProgressMax);
1034 BOOL reported_all_data = called_ReportData2;
1039 ok(grfBSCF == (BSCF_FIRSTDATANOTIFICATION|BSCF_LASTDATANOTIFICATION|BSCF_DATAFULLYAVAILABLE)
1040 || grfBSCF == BSCF_FIRSTDATANOTIFICATION,
1041 "grcfBSCF = %08x\n", grfBSCF);
1045 ok(grfBSCF == BSCF_FIRSTDATANOTIFICATION,
"grcfBSCF = %08x\n", grfBSCF);
1047 }
else if(reported_all_data) {
1048 ok(grfBSCF == (BSCF_LASTDATANOTIFICATION|BSCF_INTERMEDIATEDATANOTIFICATION),
1049 "grcfBSCF = %08x\n", grfBSCF);
1051 ok(grfBSCF == BSCF_INTERMEDIATEDATANOTIFICATION,
"grcfBSCF = %08x\n", grfBSCF);
1067 if(reported_all_data)
1073 if(!reported_all_data && called_ReportData2) {
1077 reported_all_data =
TRUE;
1089 ok(grfBSCF & BSCF_LASTDATANOTIFICATION,
"grfBSCF = %08x\n", grfBSCF);
1104 else if(!(grfBSCF & BSCF_LASTDATANOTIFICATION) || (grfBSCF & BSCF_DATAFULLYAVAILABLE))
1107 ok(ulProgress == 13,
"Read %u bytes instead of 13\n", ulProgress);
1110 ok(!ulProgress,
"ulProgress = %d\n", ulProgress);
1111 ok(!ulProgressMax,
"ulProgressMax = %d\n", ulProgressMax);
1113 ok(ulProgress,
"ulProgress == 0\n");
1117 ok(grfBSCF == (BSCF_FIRSTDATANOTIFICATION|BSCF_LASTDATANOTIFICATION),
1118 "grcfBSCF = %08x\n", grfBSCF);
1121 ok(grfBSCF == BSCF_FIRSTDATANOTIFICATION
1122 || grfBSCF == (BSCF_LASTDATANOTIFICATION|BSCF_DATAFULLYAVAILABLE),
1123 "grcfBSCF = %08x\n", grfBSCF);
1126 ok(grfBSCF == BSCF_INTERMEDIATEDATANOTIFICATION
1127 || grfBSCF == (BSCF_LASTDATANOTIFICATION|BSCF_INTERMEDIATEDATANOTIFICATION)
1128 ||
broken(grfBSCF == (BSCF_FIRSTDATANOTIFICATION|BSCF_LASTDATANOTIFICATION)),
1129 "grcfBSCF = %08x\n", grfBSCF);
1132 if((grfBSCF & BSCF_FIRSTDATANOTIFICATION) && !
binding_test)
1135 if(!(
bindf & BINDF_FROMURLMON) &&
1136 !(grfBSCF & BSCF_LASTDATANOTIFICATION)) {
1160 else if(rec_depth > 1)
1167 else if(rec_depth > 1)
1188 ok(hrResult ==
E_PENDING || hrResult ==
S_OK,
"hrResult = %08x, expected E_PENDING or S_OK\n", hrResult);
1194 skip(
"CORE-10360/ROSTESTS-192: Test might hang, skipping the rest!\n");
1199 ok(dwError ==
ERROR_SUCCESS,
"dwError = %d, expected ERROR_SUCCESS\n", dwError);
1203 "dwError == ERROR_SUCCESS\n");
1205 if(hrResult == INET_E_REDIRECT_FAILED)
1236 ok(0,
"unexpected call\n");
1267 switch(ulStatusCode) {
1268 case BINDSTATUS_LOADINGMIMEHANDLER:
1275 ok(!szStatusText,
"szStatusText = %s\n",
wine_dbgstr_w(szStatusText));
1278 ok(0,
"Unexpected status code %d\n", ulStatusCode);
1303 SET_EXPECT(ReportProgress_MIMETYPEAVAILABLE);
1308 SET_EXPECT(ReportProgress_MIMETYPEAVAILABLE);
1321 SET_EXPECT(ReportProgress_MIMETYPEAVAILABLE);
1326 hres = IInternetProtocolSink_ReportData(
filtered_sink, grfBSCF, ulProgress, ulProgressMax);
1350 ok(hrResult ==
S_OK,
"hrResult = %08x\n", hrResult);
1355 hres = IInternetProtocolSink_ReportResult(
filtered_sink, hrResult, dwError, szResult);
1376 static const IID IID_undocumented = {0x58DFC7D0,0x5381,0x43E5,{0x9D,0x72,0x4C,0xDD,0xE4,0xCB,0x0F,0x1A}};
1377 static const IID IID_undocumentedIE10 = {0xc28722e5,0xbc1a,0x4c55,{0xa6,0x8d,0x33,0x21,0x9f,0x69,0x89,0x10}};
1427 ok(grfBINDF !=
NULL,
"grfBINDF == NULL\n");
1428 ok(pbindinfo !=
NULL,
"pbindinfo == NULL\n");
1429 ok(pbindinfo->cbSize ==
sizeof(BINDINFO),
"wrong size of pbindinfo: %d\n", pbindinfo->cbSize);
1433 *grfBINDF |= BINDF_FROMURLMON;
1434 cbSize = pbindinfo->cbSize;
1435 memset(pbindinfo, 0, cbSize);
1436 pbindinfo->cbSize = cbSize;
1441 pbindinfo->cbstgmedData =
sizeof(
post_data)-1;
1442 pbindinfo->dwBindVerb = BINDVERB_POST;
1451 U(pbindinfo->stgmedData).hGlobal =
data;
1453 U(pbindinfo->stgmedData).pstm = &
Stream;
1463 ok(ppwzStr !=
NULL,
"ppwzStr == NULL\n");
1464 ok(pcElFetched !=
NULL,
"pcElFetched == NULL\n");
1466 switch(ulStringType) {
1467 case BINDSTRING_ACCEPT_MIMES:
1469 ok(cEl == 256,
"cEl=%d, expected 256\n", cEl);
1471 ok(*pcElFetched == 256,
"*pcElFetched=%d, expected 256\n", *pcElFetched);
1479 case BINDSTRING_USER_AGENT:
1481 ok(cEl == 1,
"cEl=%d, expected 1\n", cEl);
1483 ok(*pcElFetched == 0,
"*pcElFetch=%d, expected 0\n", *pcElFetched);
1491 case BINDSTRING_POST_COOKIE:
1493 ok(cEl == 1,
"cEl=%d, expected 1\n", cEl);
1495 ok(*pcElFetched == 0,
"*pcElFetch=%d, expected 0\n", *pcElFetched);
1497 case BINDSTRING_URL: {
1501 ok(cEl == 1,
"cEl=%d, expected 1\n", cEl);
1502 ok(*pcElFetched == 0,
"*pcElFetch=%d, expected 0\n", *pcElFetched);
1510 case BINDSTRING_ROOTDOC_URL:
1512 ok(cEl == 1,
"cEl=%d, expected 1\n", cEl);
1514 case BINDSTRING_ENTERPRISE_ID:
1515 ok(cEl == 1,
"cEl=%d, expected 1\n", cEl);
1518 ok(0,
"unexpected ulStringType %d\n", ulStringType);
1542 ok(0,
"unexpected call\n");
1552 return IUnknown_AddRef(
This->outer);
1554 return IUnknown_AddRef(&
This->IUnknown_inner);
1563 return IUnknown_Release(
This->outer);
1565 return IUnknown_Release(&
This->IUnknown_inner);
1577 ok(0,
"unexpected call\n");
1617 ok(0,
"unexpected call\n");
1623 ok(0,
"unexpected call\n");
1630 ok(0,
"unexpected call\n");
1643 static const IID unknown_iid = {0x7daf9908,0x8415,0x4005,{0x95,0xae, 0xbd,0x27,0xf6,0xe3,0xdc,0x00}};
1644 static const IID unknown_iid2 = {0x5b7ebc0c,0xf630,0x4cea,{0x89,0xd3,0x5a,0xf0,0x38,0xed,0x05,0x5c}};
1647 *
ppv = &
This->IInternetProtocolEx_iface;
1648 IInternetProtocolEx_AddRef(&
This->IInternetProtocolEx_iface);
1654 *
ppv = &
This->IInternetPriority_iface;
1655 IInternetPriority_AddRef(&
This->IInternetPriority_iface);
1670 return IUnknown_AddRef(
This->outer);
1672 return IUnknown_AddRef(&
This->IUnknown_inner);
1681 return IUnknown_Release(
This->outer);
1683 return IUnknown_Release(&
This->IUnknown_inner);
1698 BINDSTATUS_FINDINGRESOURCE,
hostW);
1710 BINDSTATUS_SENDINGREQUEST,
NULL);
1775 BINDINFO bindinfo, exp_bindinfo;
1779 ok(pOIProtSink !=
NULL,
"pOIProtSink == NULL\n");
1780 ok(pOIBindInfo !=
NULL,
"pOIBindInfo == NULL\n");
1782 ok(pOIBindInfo != &
bind_info,
"unexpected pOIBindInfo\n");
1783 ok(!
pi,
"pi = %x\n",
pi);
1786 ok(pOIProtSink ==
binding_sink,
"pOIProtSink != binding_sink\n");
1788 memset(&bindinfo, 0,
sizeof(bindinfo));
1789 bindinfo.cbSize =
sizeof(bindinfo);
1790 memcpy(&exp_bindinfo, &bindinfo,
sizeof(bindinfo));
1795 SET_EXPECT(QueryService_IBindCallbackRedirect);
1796 hres = IInternetBindInfo_GetBindInfo(pOIBindInfo, &cbindf, &bindinfo);
1801 ok(cbindf == (
bindf|BINDF_FROMURLMON),
"bindf = %x, expected %x\n",
1802 cbindf, (
bindf|BINDF_FROMURLMON));
1803 ok(!
memcmp(&exp_bindinfo, &bindinfo,
sizeof(bindinfo)),
"unexpected bindinfo\n");
1804 pReleaseBindInfo(&bindinfo);
1807 hres = IInternetProtocolSink_ReportProgress(pOIProtSink, BINDSTATUS_SENDINGREQUEST,
emptyW);
1808 ok(
hres ==
S_OK,
"ReportProgress(BINDSTATUS_SENDINGREQUEST) failed: %08x\n",
hres);
1822 hres = IInternetBindInfo_GetBindString(pOIBindInfo, BINDSTRING_USER_AGENT,
1825 ok(
hres ==
S_OK,
"GetBindString(BINDSTRING_USER_AGETNT) failed: %08x\n",
hres);
1826 ok(fetched == 1,
"fetched = %d, expected 254\n", fetched);
1827 ok(ua !=
NULL,
"ua = %p\n", ua);
1833 hres = IInternetBindInfo_GetBindString(pOIBindInfo, BINDSTRING_ACCEPT_MIMES,
1834 accept_mimes, 256, &fetched);
1838 "GetBindString(BINDSTRING_ACCEPT_MIMES) failed: %08x\n",
hres);
1839 ok(fetched == 1,
"fetched = %d, expected 1\n", fetched);
1843 hres = IInternetBindInfo_QueryInterface(pOIBindInfo, &IID_IServiceProvider,
1855 NULL, 0, &additional_headers);
1859 ok(additional_headers ==
NULL,
"additional_headers=%p\n", additional_headers);
1863 &IID_IHttpNegotiate2, (
void**)&http_negotiate2);
1869 hres = IHttpNegotiate2_GetRootSecurityId(http_negotiate2, sec_id, &
size, 0);
1871 IHttpNegotiate2_Release(http_negotiate2);
1872 ok(
hres ==
E_FAIL,
"GetRootSecurityId failed: %08x, expected E_FAIL\n",
hres);
1882 SET_EXPECT(ReportProgress_CACHEFILENAMEAVAILABLE);
1883 hres = IInternetProtocolSink_ReportProgress(pOIProtSink,
1885 ok(
hres ==
S_OK,
"ReportProgress(BINDSTATUS_CACHEFILENAMEAVAILABLE) failed: %08x\n",
hres);
1891 SET_EXPECT(ReportProgress_LOADINGMIMEHANDLER);
1893 SET_EXPECT(ReportProgress_MIMETYPEAVAILABLE);
1894 hres = IInternetProtocolSink_ReportProgress(pOIProtSink, BINDSTATUS_VERIFIEDMIMETYPEAVAILABLE,
1897 "ReportProgress(BINDSTATUS_VERIFIEDMIMETYPEAVAILABLE) failed: %08x\n",
hres);
1911 hres = IInternetProtocolSink_ReportData(pOIProtSink,
1912 BSCF_FIRSTDATANOTIFICATION | (
tested_protocol ==
ITS_TEST ? BSCF_DATAFULLYAVAILABLE : BSCF_LASTDATANOTIFICATION),
1922 hres = IInternetProtocolSink_ReportProgress(pOIProtSink, BINDSTATUS_BEGINDOWNLOADDATA,
NULL);
1923 ok(
hres ==
S_OK,
"ReportProgress(BINDSTATUS_BEGINDOWNLOADDATA) failed: %08x\n",
hres);
1936 hres = IInternetProtocolSink_ReportResult(pOIProtSink,
S_OK, 0,
NULL);
1956 PROTOCOLDATA *pProtocolData)
1963 ok(pProtocolData !=
NULL,
"pProtocolData == NULL\n");
1967 ok(pProtocolData != &
protocoldata,
"pProtocolData == &protocoldata\n");
1968 ok(pProtocolData->grfFlags ==
protocoldata.grfFlags,
"grfFlags wrong %x/%x\n",
1970 ok(pProtocolData->dwState ==
protocoldata.dwState,
"dwState wrong %x/%x\n",
1972 ok(pProtocolData->pData ==
protocoldata.pData,
"pData wrong %p/%p\n",
1974 ok(pProtocolData->cbData ==
protocoldata.cbData,
"cbData wrong %x/%x\n",
1983 static const WCHAR redirect_urlW[] = {
'h',
't',
't',
'p',
':',
'/',
'/',
't',
'e',
's',
't',
'.',
'w',
'i',
'n',
'e',
'h',
'q',
'.',
'o',
'r',
'g',
1984 '/',
't',
'e',
's',
't',
's',
'/',
'h',
'e',
'l',
'l',
'o',
'.',
'h',
't',
'm',
'l',0};
2016 hres = IInternetProtocolSink_QueryInterface(
binding_sink, &IID_IServiceProvider,
2018 ok(
hres ==
S_OK,
"Could not get IServiceProvicder\n");
2025 ok(
hres ==
S_OK,
"Could not get IHttpNegotiate\n");
2037 SET_EXPECT(ReportProgress_LOADINGMIMEHANDLER);
2038 }
else if(!(
pi & PI_MIMEVERIFICATION)) {
2039 SET_EXPECT(ReportProgress_MIMETYPEAVAILABLE);
2047 }
else if(!(
pi & PI_MIMEVERIFICATION)) {
2051 "ReportProgress(BINDSTATUS_MIMETYPEAVAILABLE) failed: %08x\n",
hres);
2053 bscf |= BSCF_FIRSTDATANOTIFICATION;
2058 bscf = BSCF_INTERMEDIATEDATANOTIFICATION;
2072 SET_EXPECT(ReportProgress_MIMETYPEAVAILABLE);
2085 }
else if(
pi & PI_MIMEVERIFICATION) {
2118 }
else if((
pi & PI_MIMEVERIFICATION)) {
2127 ok(
cb == 700,
"cb=%d\n",
cb);
2136 ok(
cb == 1000,
"cb=%d\n",
cb);
2137 ok(!*pcbRead,
"*pcbRead = %d\n", *pcbRead);
2139 ok(pcbRead !=
NULL,
"pcbRead == NULL\n");
2148 SET_EXPECT(ReportProgress_MIMETYPEAVAILABLE);
2156 BSCF_LASTDATANOTIFICATION|BSCF_INTERMEDIATEDATANOTIFICATION, 0, 0);
2254 static const IID IID_undocumentedIE10 = {0x7daf9908,0x8415,0x4005,{0x95,0xae,0xbd,0x27,0xf6,0xe3,0xdc,0x00}};
2258 trace(
"QI(IUnknown)\n");
2261 trace(
"QI(InternetProtocol)\n");
2262 *
ppv = &
This->IInternetProtocolEx_iface;
2264 trace(
"QI(InternetProtocolEx)\n");
2269 *
ppv = &
This->IInternetProtocolEx_iface;
2271 trace(
"QI(InternetPriority)\n");
2272 *
ppv = &
This->IInternetPriority_iface;
2274 trace(
"QI(IWinInetInfo)\n");
2279 trace(
"QI(IWinInetHttpInfo)\n");
2300 return ++
This->inner_ref;
2312 "outer_ref = %d\n",
This->outer_ref);
2314 trace(
"outer_ref %d\n",
This->outer_ref);
2358 ok(grfPI == (PI_FILTER_MODE|PI_FORCE_ASYNC),
"grfPI=%x, expected PI_FILTER_MODE|PI_FORCE_ASYNC\n", grfPI);
2360 ok(pOIProtSink !=
NULL,
"pOIProtSink == NULL\n");
2361 ok(pOIBindInfo !=
NULL,
"pOIBindInfo == NULL\n");
2364 ok(pOIProtSink !=
binding_sink,
"pOIProtSink == protocol_sink\n");
2368 ok(pOIBindInfo == &
bind_info,
"pOIBindInfo != bind_info\n");
2372 ok(
data->cbSize ==
sizeof(*
data),
"data->cbSize = %d\n",
data->cbSize);
2373 ok(!
data->pProtocolSink,
"data->pProtocolSink != NULL\n");
2374 ok(
data->pProtocol !=
NULL,
"data->pProtocol == NULL\n");
2375 ok(!
data->pUnk,
"data->pUnk != NULL\n");
2376 ok(!
data->dwFilterFlags,
"data->dwProtocolFlags = %x\n",
data->dwFilterFlags);
2380 IInternetProtocol_QueryInterface(
data->pProtocol, &IID_IInternetProtocolSink, (
void**)&prot_sink);
2381 ok(prot_sink == pOIProtSink,
"QI(data->pProtocol, IID_IInternetProtocolSink) != pOIProtSink\n");
2382 IInternetProtocolSink_Release(prot_sink);
2391 IInternetProtocol_QueryInterface(
data->pProtocol, &IID_IInternetProtocol, (
void**)&prot);
2392 ok(prot ==
async_protocol,
"QI(data->pProtocol, IID_IInternetProtocol) != async_protocol\n");
2393 IInternetProtocol_Release(prot);
2401 hres = IInternetProtocolSink_ReportProgress(pOIProtSink, BINDSTATUS_DECODING,
pjpegW);
2402 ok(
hres ==
S_OK,
"ReportProgress(BINDSTATUS_DECODING) failed: %08x\n",
hres);
2406 memset(&bindinfo, 0,
sizeof(bindinfo));
2407 bindinfo.cbSize =
sizeof(bindinfo);
2408 hres = IInternetBindInfo_GetBindInfo(pOIBindInfo, &cbindf, &bindinfo);
2410 ok(cbindf == (
bindf|BINDF_FROMURLMON),
"cbindf = %x, expected %x\n", cbindf,
bindf);
2414 hres = IInternetBindInfo_GetBindString(pOIBindInfo, BINDSTRING_URL, &url_str, 1, &fetched);
2415 ok(
hres ==
S_OK,
"GetBindString(BINDSTRING_URL) failed: %08x\n",
hres);
2416 ok(fetched == 1,
"fetched = %d\n", fetched);
2425 PROTOCOLDATA *pProtocolData)
2456 ok(pv !=
NULL,
"pv == NULL\n");
2457 ok(
cb != 0,
"cb == 0\n");
2458 ok(pcbRead !=
NULL,
"pcbRead == NULL\n");
2472 ok(*pcbRead == 0,
"*pcbRead=%d, expected 0\n", *pcbRead);
2530 ok(0,
"unexpected call\n");
2548 ok(0,
"unexpected call %d\n", ParseAction);
2556 ok(0,
"unexpected call\n");
2563 ok(0,
"unexpected call\n");
2571 ok(0,
"unexpected call\n");
2632 ret->outer = pOuter;
2638 *
ppv = &
ret->IInternetProtocolEx_iface;
2640 *
ppv = &
ret->IUnknown_inner;
2646 ok(0,
"unexpected call\n");
2664 ok(!outer,
"outer = %p\n", outer);
2681#define TEST_BINDING 0x0001
2682#define TEST_FILTER 0x0002
2683#define TEST_FIRST_HTTP 0x0004
2684#define TEST_DIRECT_READ 0x0008
2685#define TEST_POST 0x0010
2686#define TEST_EMULATEPROT 0x0020
2687#define TEST_SHORT_READ 0x0040
2688#define TEST_REDIRECT 0x0080
2689#define TEST_ABORT 0x0100
2690#define TEST_ASYNCREQ 0x0200
2691#define TEST_USEIURI 0x0400
2692#define TEST_IMPLPROTEX 0x0800
2693#define TEST_EMPTY 0x1000
2694#define TEST_NOMIME 0x2000
2695#define TEST_FROMCACHE 0x4000
2696#define TEST_DISABLEAUTOREDIRECT 0x8000
2718 IInternetSession_Release(
session);
2770 hres = IInternetProtocol_QueryInterface(
protocol, &IID_IInternetPriority,
2772 ok(
hres ==
S_OK,
"QueryInterface(IID_IInternetPriority) failed: %08x\n",
hres);
2778 ok(pr == 0,
"pr=%d, expected 0\n", pr);
2785 ok(pr == 1,
"pr=%d, expected 1\n", pr);
2787 IInternetPriority_Release(
priority);
2796 &IID_IInternetProtocol, (
void**)&
protocol);
2805 IInternetProtocol_Release(
protocol);
2814 if(!(
bindf & BINDF_FROMURLMON))
2818 SET_EXPECT(ReportProgress_CACHEFILENAMEAVAILABLE);
2819 if(
bindf & BINDF_FROMURLMON)
2820 SET_EXPECT(ReportProgress_VERIFIEDMIMETYPEAVAILABLE);
2822 SET_EXPECT(ReportProgress_MIMETYPEAVAILABLE);
2835 if(
hres == INET_E_RESOURCE_NOT_FOUND) {
2843 if(!(
bindf & BINDF_FROMURLMON))
2848 if(
bindf & BINDF_FROMURLMON)
2849 CHECK_CALLED(ReportProgress_VERIFIEDMIMETYPEAVAILABLE);
2876 hres = IUnknown_QueryInterface(unk, &IID_IInternetProtocolInfo, (
void**)&
protocol_info);
2878 "Could not get IInternetProtocolInfo interface: %08x, expected E_NOINTERFACE\n",
hres);
2881 ok(
hres ==
S_OK,
"Could not get IClassFactory interface\n");
2882 IUnknown_Release(unk);
2887 ok(
hres ==
S_OK,
"Could not get IInternetProtocol: %08x\n",
hres);
2893 ok(
cb == 2,
"cb=%u expected 2\n",
cb);
2900 ok(
cb == 0,
"cb=%u expected 0\n",
cb);
2914 IInternetProtocol_Release(
protocol);
2918 ok(
hres ==
S_OK,
"Could not get IInternetProtocol: %08x\n",
hres);
2936 IInternetProtocol_Release(
protocol);
2940 ok(
hres ==
S_OK,
"Could not get IInternetProtocol: %08x\n",
hres);
2947 ok(
cb == 2,
"cb=%u expected 2\n",
cb);
2950 IInternetProtocol_Release(
protocol);
2957 hres = pCreateUri(
url, Uri_CREATE_FILE_USE_DOS_PATH, 0, &
uri);
2960 hres = IClassFactory_CreateInstance(
factory,
NULL, &IID_IInternetProtocolEx, (
void**)&protocolex);
2961 ok(
hres ==
S_OK,
"Could not get IInternetProtocolEx: %08x\n",
hres);
2964 hres = IInternetProtocolEx_Read(protocolex,
buf, 2, &
cb);
2966 hres = IInternetProtocolEx_LockRequest(protocolex, 0);
2968 hres = IInternetProtocolEx_UnlockRequest(protocolex);
2973 IInternetProtocolEx_Release(protocolex);
2978 hres = IClassFactory_CreateInstance(
factory,
NULL, &IID_IInternetProtocolEx, (
void**)&protocolex);
2979 ok(
hres ==
S_OK,
"Could not get IInternetProtocolEx: %08x\n",
hres);
2982 hres = IInternetProtocolEx_Read(protocolex,
buf, 2, &
cb);
2984 hres = IInternetProtocolEx_LockRequest(protocolex, 0);
2986 hres = IInternetProtocolEx_UnlockRequest(protocolex);
2991 IInternetProtocolEx_Release(protocolex);
2993 win_skip(
"Skipping file protocol StartEx tests\n");
2996 IClassFactory_Release(
factory);
3004 static const WCHAR index_url2[] =
3005 {
'f',
'i',
'l',
'e',
':',
'/',
'/',
'i',
'n',
'd',
'e',
'x',
'.',
'h',
't',
'm',
'l',0};
3008 &IID_IInternetProtocol, (
void**)&
protocol);
3018 "Start failed: %08x, expected MK_E_SYNTAX or E_INVALIDARG\n",
hres);
3022 if(!(
bindf & BINDF_FROMURLMON))
3028 ok(
hres == INET_E_RESOURCE_NOT_FOUND,
3029 "Start failed: %08x expected INET_E_RESOURCE_NOT_FOUND\n",
hres);
3031 if(!(
bindf & BINDF_FROMURLMON))
3036 IInternetProtocol_Release(
protocol);
3039 &IID_IInternetProtocol, (
void**)&
protocol);
3045 if(!(
bindf & BINDF_FROMURLMON))
3052 ok(
hres == INET_E_RESOURCE_NOT_FOUND,
3053 "Start failed: %08x, expected INET_E_RESOURCE_NOT_FOUND\n",
hres);
3055 if(!(
bindf & BINDF_FROMURLMON))
3070 IInternetProtocol_Release(
protocol);
3079 static const WCHAR wszFile[] = {
'f',
'i',
'l',
'e',
':',0};
3080 static const WCHAR wszFile2[] = {
'f',
'i',
'l',
'e',
':',
'/',
'/',0};
3081 static const WCHAR wszFile3[] = {
'f',
'i',
'l',
'e',
':',
'/',
'/',
'/',0};
3082 static const WCHAR wszFile4[] = {
'f',
'i',
'l',
'e',
':',
'\\',
'\\',0};
3083 static const char html_doc[] =
"<HTML></HTML>";
3084 static const WCHAR fragmentW[] = {
'#',
'f',
'r',
'a',
'g',0};
3086 trace(
"Testing file protocol...\n");
3101 bindf = BINDF_FROMURLMON;
3103 bindf = BINDF_FROMURLMON | BINDF_NEEDFILE;
3115 bindf = BINDF_FROMURLMON;
3118 memcpy(
buf, wszFile2,
sizeof(wszFile2));
3120 file_name_buf[
len++] =
'\\';
3126 bindf = BINDF_FROMURLMON;
3132 memcpy(
buf, wszFile3,
sizeof(wszFile3));
3141 bindf = BINDF_FROMURLMON;
3144 memcpy(
buf, wszFile4,
sizeof(wszFile4));
3146 file_name_buf[
len++] =
'\\';
3152 bindf = BINDF_FROMURLMON;
3170 file_name_buf[
len] = 0;
3180 bindf = BINDF_FROMURLMON;
3196 BYTE cache_headers[] =
"HTTP/1.1 200 OK\r\n\r\n";
3198 trace(
"Testing cache read...\n");
3206 li.
u.HighPart =
now.dwHighDateTime;
3207 li.
u.LowPart =
now.dwLowDateTime;
3225 cache_headers,
sizeof(cache_headers)-1,
"", 0);
3235 if(use_iuri && pCreateUri) {
3241 if (!(
bindf & BINDF_FROMURLMON))
3257 SET_EXPECT(ReportProgress_MIMETYPEAVAILABLE);
3264 hres = IInternetProtocol_QueryInterface(
async_protocol, &IID_IInternetProtocolEx, (
void**)&protocolex);
3265 ok(
hres ==
S_OK,
"Could not get IInternetProtocolEx iface: %08x\n",
hres);
3270 IInternetProtocolEx_Release(protocolex);
3280 if (!(
bindf & BINDF_FROMURLMON))
3282 if (!got_user_agent)
3285 got_user_agent =
TRUE;
3357 hres = IUnknown_QueryInterface(unk, &IID_IInternetProtocolInfo, (
void**)&
protocol_info);
3359 "Could not get IInternetProtocolInfo interface: %08x, expected E_NOINTERFACE\n",
3363 ok(
hres ==
S_OK,
"Could not get IClassFactory interface\n");
3364 IUnknown_Release(unk);
3368 hres = IClassFactory_CreateInstance(
factory,
NULL, &IID_IInternetProtocol,
3370 ok(
hres ==
S_OK,
"Could not get IInternetProtocol: %08x\n",
hres);
3388 SET_EXPECT(ReportProgress_CACHEFILENAMEAVAILABLE);
3391 if(!(
bindf & BINDF_FROMURLMON)) {
3442 if(
bindf & BINDF_FROMURLMON)
3450 if(
bindf & BINDF_FROMURLMON)
3460 if(
bindf & BINDF_FROMURLMON)
3478 if(
bindf & BINDF_FROMURLMON)
3508 IClassFactory_Release(
factory);
3520 static const WCHAR posttest_url[] =
3521 {
'h',
't',
't',
'p',
':',
'/',
'/',
't',
'e',
's',
't',
'.',
'w',
'i',
'n',
'e',
'h',
'q',
'.',
'o',
'r',
'g',
'/',
3522 't',
'e',
's',
't',
's',
'/',
'p',
'o',
's',
't',
'.',
'p',
'h',
'p',0};
3523 static const WCHAR redirect_url[] =
3524 {
'h',
't',
't',
'p',
':',
'/',
'/',
't',
'e',
's',
't',
'.',
'w',
'i',
'n',
'e',
'h',
'q',
'.',
'o',
'r',
'g',
'/',
3525 't',
'e',
's',
't',
's',
'/',
'r',
'e',
'd',
'i',
'r',
'e',
'c',
't',0};
3526 static const WCHAR winetest_url[] =
3527 {
'h',
't',
't',
'p',
':',
'/',
'/',
't',
'e',
's',
't',
'.',
'w',
'i',
'n',
'e',
'h',
'q',
'.',
'o',
'r',
'g',
'/',
3528 't',
'e',
's',
't',
's',
'/',
'd',
'a',
't',
'a',
'.',
'p',
'h',
'p',0};
3529 static const WCHAR empty_url[] =
3530 {
'h',
't',
't',
'p',
':',
'/',
'/',
't',
'e',
's',
't',
'.',
'w',
'i',
'n',
'e',
'h',
'q',
'.',
'o',
'r',
'g',
'/',
3531 't',
'e',
's',
't',
's',
'/',
'e',
'm',
'p',
't',
'y',
'.',
'j',
's',0};
3532 static const WCHAR cache_only_url[] =
3533 {
'h',
't',
't',
'p',
':',
'/',
'/',
't',
'e',
's',
't',
'.',
'w',
'i',
'n',
'e',
'h',
'q',
'.',
'o',
'r',
'g',
'/',
3534 't',
'e',
's',
't',
's',
'/',
'c',
'a',
'c',
'h',
'e',
'-',
'o',
'n',
'l',
'y',0};
3537 trace(
"Testing http protocol (not from urlmon)...\n");
3538 bindf = BINDF_ASYNCHRONOUS | BINDF_ASYNCSTORAGE | BINDF_PULLDATA;
3541 trace(
"Testing http protocol (from urlmon)...\n");
3542 bindf = BINDF_ASYNCHRONOUS | BINDF_ASYNCSTORAGE | BINDF_PULLDATA | BINDF_FROMURLMON;
3545 trace(
"Testing http protocol (to file)...\n");
3546 bindf = BINDF_ASYNCHRONOUS | BINDF_ASYNCSTORAGE | BINDF_PULLDATA | BINDF_FROMURLMON | BINDF_NEEDFILE;
3549 trace(
"Testing http protocol (post data)...\n");
3550 bindf = BINDF_ASYNCHRONOUS | BINDF_ASYNCSTORAGE | BINDF_PULLDATA | BINDF_FROMURLMON;
3553 trace(
"Testing http protocol (post data stream)...\n");
3556 trace(
"Testing http protocol (direct read)...\n");
3557 bindf = BINDF_ASYNCHRONOUS | BINDF_ASYNCSTORAGE | BINDF_PULLDATA | BINDF_FROMURLMON;
3560 trace(
"Testing http protocol (redirected)...\n");
3561 bindf = BINDF_ASYNCHRONOUS | BINDF_ASYNCSTORAGE | BINDF_PULLDATA | BINDF_FROMURLMON | BINDF_NOWRITECACHE;
3564 trace(
"Testing http protocol (redirected, disable auto redirect)...\n");
3565 bindf = BINDF_ASYNCHRONOUS | BINDF_ASYNCSTORAGE | BINDF_PULLDATA | BINDF_FROMURLMON | BINDF_NOWRITECACHE;
3568 trace(
"Testing http protocol empty file...\n");
3569 bindf = BINDF_ASYNCHRONOUS | BINDF_ASYNCSTORAGE | BINDF_PULLDATA | BINDF_FROMURLMON | BINDF_NOWRITECACHE;
3578 trace(
"Testing http protocol (from cache)...\n");
3579 bindf = BINDF_ASYNCHRONOUS | BINDF_ASYNCSTORAGE | BINDF_PULLDATA | BINDF_FROMURLMON;
3583 trace(
"Testing http protocol abort...\n");
3584 bindf = BINDF_ASYNCHRONOUS | BINDF_ASYNCSTORAGE | BINDF_PULLDATA | BINDF_FROMURLMON | BINDF_NOWRITECACHE;
3593 static const WCHAR https_winehq_url[] =
3594 {
'h',
't',
't',
'p',
's',
':',
'/',
'/',
't',
'e',
's',
't',
'.',
'w',
'i',
'n',
'e',
'h',
'q',
'.',
'o',
'r',
'g',
'/',
3595 't',
'e',
's',
't',
's',
'/',
'h',
'e',
'l',
'l',
'o',
'.',
'h',
't',
'm',
'l',0};
3597 trace(
"Testing https protocol (from urlmon)...\n");
3598 bindf = BINDF_ASYNCHRONOUS | BINDF_ASYNCSTORAGE | BINDF_PULLDATA | BINDF_FROMURLMON | BINDF_NOWRITECACHE;
3613 static const WCHAR ftp_urlW[] = {
'f',
't',
'p',
':',
'/',
'/',
'f',
't',
'p',
'.',
'w',
'i',
'n',
'e',
'h',
'q',
'.',
'o',
'r',
'g',
3614 '/',
'p',
'u',
'b',
'/',
'o',
't',
'h',
'e',
'r',
'/',
3615 'w',
'i',
'n',
'e',
'l',
'o',
'g',
'o',
'.',
'x',
'c',
'f',
'.',
't',
'a',
'r',
'.',
'b',
'z',
'2',0};
3617 trace(
"Testing ftp protocol...\n");
3621 bindf = BINDF_ASYNCHRONOUS | BINDF_ASYNCSTORAGE | BINDF_PULLDATA | BINDF_FROMURLMON | BINDF_NOWRITECACHE;
3630 hres = IUnknown_QueryInterface(unk, &IID_IInternetProtocolInfo, (
void**)&
protocol_info);
3631 ok(
hres ==
E_NOINTERFACE,
"Could not get IInternetProtocolInfo interface: %08x, expected E_NOINTERFACE\n",
hres);
3634 ok(
hres ==
S_OK,
"Could not get IClassFactory interface\n");
3635 IUnknown_Release(unk);
3639 hres = IClassFactory_CreateInstance(
factory,
NULL, &IID_IInternetProtocol,
3641 IClassFactory_Release(
factory);
3642 ok(
hres ==
S_OK,
"Could not get IInternetProtocol: %08x\n",
hres);
3685 hres = IInternetProtocol_QueryInterface(
async_protocol, &IID_IInternetProtocolEx, (
void**)&protocolex);
3686 ok(
hres ==
S_OK,
"Could not get IInternetProtocolEx iface: %08x\n",
hres);
3687 IInternetProtocolEx_Release(protocolex);
3703 trace(
"Testing gopher protocol...\n");
3708 "CoGetClassObject failed: %08x\n",
hres);
3712 hres = IUnknown_QueryInterface(unk, &IID_IInternetProtocolInfo, (
void**)&
protocol_info);
3713 ok(
hres ==
E_NOINTERFACE,
"Could not get IInternetProtocolInfo interface: %08x, expected E_NOINTERFACE\n",
hres);
3716 ok(
hres ==
S_OK,
"Could not get IClassFactory interface\n");
3717 IUnknown_Release(unk);
3721 hres = IClassFactory_CreateInstance(
factory,
NULL, &IID_IInternetProtocol,
3723 IClassFactory_Release(
factory);
3724 ok(
hres ==
S_OK,
"Could not get IInternetProtocol: %08x\n",
hres);
3741 static const WCHAR wrong_url1[] = {
't',
'e',
's',
't',
':',
'@',
'M',
'S',
'I',
'T',
'S',
't',
'o',
'r',
'e',
3742 ':',
':',
'/',
't',
'e',
's',
't',
'.',
'h',
't',
'm',
'l',0};
3743 static const WCHAR wrong_url2[] = {
'm',
'k',
':',
'/',
't',
'e',
's',
't',
'.',
'h',
't',
'm',
'l',0};
3745 trace(
"Testing mk protocol...\n");
3752 hres = IUnknown_QueryInterface(unk, &IID_IInternetProtocolInfo, (
void**)&
protocol_info);
3754 "Could not get IInternetProtocolInfo interface: %08x, expected E_NOINTERFACE\n",
3758 ok(
hres ==
S_OK,
"Could not get IClassFactory interface\n");
3759 IUnknown_Release(unk);
3763 hres = IClassFactory_CreateInstance(
factory,
NULL, &IID_IInternetProtocol,
3765 IClassFactory_Release(
factory);
3766 ok(
hres ==
S_OK,
"Could not get IInternetProtocol: %08x\n",
hres);
3771 "Start failed: %08x, expected MK_E_SYNTAX or INET_E_INVALID_URL\n",
hres);
3777 SET_EXPECT(ReportProgress_MIMETYPEAVAILABLE);
3782 ok(
hres == INET_E_RESOURCE_NOT_FOUND ||
3783 hres == INET_E_INVALID_URL,
3784 "Start failed: %08x, expected INET_E_RESOURCE_NOT_FOUND or INET_E_INVALID_URL\n",
hres);
3786 if (
hres == INET_E_RESOURCE_NOT_FOUND) {
3800 IInternetProtocol_Release(
protocol);
3816 {
't',
'e',
's',
't',
':',
'/',
'/',
'f',
'i',
'l',
'e',
'.',
'h',
't',
'm',
'l',0};
3817 static const WCHAR wsz_test[] = {
't',
'e',
's',
't',0};
3834 ok(
hres ==
S_OK,
"QueryInterface(IID_IInternetBindInfo) failed: %08x\n",
hres);
3837 ok(
hres ==
S_OK,
"Could not get IInternetProtocolSink: %08x\n",
hres);
3847 ok(
hres ==
S_OK,
"QueryInterface(IID_IInternetPriority) failed: %08x\n",
hres);
3852 ok(!
p,
"p=%d\n",
p);
3861 ok(
p == 100,
"p=%d\n",
p);
3863 hres = IInternetProtocol_QueryInterface(
protocol, &IID_IWinInetInfo, (
void**)&inet_info);
3910 hres = IInternetProtocol_QueryInterface(
protocol, &IID_IWinInetInfo, (
void**)&inet_info);
3917 hres = IInternetProtocol_QueryInterface(
protocol, &IID_IWinInetInfo, (
void**)&inet_info);
3924 hres = IInternetProtocol_QueryInterface(
protocol, &IID_IWinInetHttpInfo, (
void**)&http_info);
3946 ok(
p == 100,
"p=%d\n",
p);
3960 hres = IInternetProtocol_Terminate(
protocol, 0xdeadbeef);
3990 ok(
hres ==
S_OK,
"ReportProgress(BINDSTATUS_CACHEFILENAMEAVAILABLE) failed: %08x\n",
hres);
3999 IInternetPriority_Release(
priority);
4005 IInternetProtocol_Release(
protocol);
4018 IInternetProtocol_Release(
protocol);
4032 IInternetProtocol_Release(
protocol);
4034 IInternetSession_Release(
session);
4064 ok(
hres ==
S_OK,
"QueryInterface(IID_IInternetBindInfo) failed: %08x\n",
hres);
4067 ok(
hres ==
S_OK,
"QueryInterface(IID_IInternetProtocolSink) failed: %08x\n",
hres);
4070 hres = IInternetProtocol_QueryInterface(
protocol, &IID_IInternetProtocolEx, (
void**)&protocolex);
4071 ok(
hres ==
S_OK,
"Could not get IInternetProtocolEx iface: %08x\n",
hres);
4107 IInternetProtocolEx_Release(protocolex);
4181 ok(!
ref,
"ref=%u, expected 0\n",
ref);
4189 IInternetSession_Release(
session);
4192static const IID outer_test_iid = {0xabcabc00,0,0,{0,0,0,0,0,0,0,0x66}};
4234 hres = IUnknown_QueryInterface(unk, &IID_IInternetProtocol, (
void**)&unk2);
4240 ok(
hres ==
S_OK,
"Could not get IInternetProtocol iface: %08x\n",
hres);
4241 ok(unk3 == (
IUnknown*)0xdeadbeef,
"unexpected unk2\n");
4243 IUnknown_Release(unk2);
4244 IUnknown_Release(unk);
4246 unk = (
void*)0xdeadbeef;
4247 hres = IClassFactory_CreateInstance(
class_factory, &outer, &IID_IInternetProtocol, (
void**)&unk);
4249 ok(!unk,
"unk = %p\n", unk);
4259 pCoInternetGetSession = (
void*)
GetProcAddress(hurlmon,
"CoInternetGetSession");
4260 pReleaseBindInfo = (
void*)
GetProcAddress(hurlmon,
"ReleaseBindInfo");
4264 win_skip(
"Various needed functions not present, too old IE\n");
4269 win_skip(
"CreateUri not supported\n");
4284 win_skip(
"Skipping https tests on too old platform\n");
4293 bindf &= ~BINDF_FROMURLMON;
4294 trace(
"Testing file binding (mime verification, emulate prot)...\n");
4296 trace(
"Testing http binding (mime verification, emulate prot)...\n");
4298 trace(
"Testing its binding (mime verification, emulate prot)...\n");
4300 trace(
"Testing http binding (mime verification, emulate prot, short read, direct read)...\n");
4302 trace(
"Testing http binding (mime verification, redirect, emulate prot)...\n");
4304 trace(
"Testing http binding (mime verification, redirect, disable auto redirect, emulate prot)...\n");
4306 trace(
"Testing file binding (mime verification, emulate prot, mime filter)...\n");
4308 trace(
"Testing http binding (mime verification, emulate prot, mime filter)...\n");
4310 trace(
"Testing http binding (mime verification, emulate prot, mime filter, no mime)...\n");
4312 trace(
"Testing http binding (mime verification, emulate prot, direct read)...\n");
4314 trace(
"Testing http binding (mime verification, emulate prot, abort)...\n");
4317 trace(
"Testing file binding (use IUri, mime verification, emulate prot)...\n");
4319 trace(
"Testing file binding (use IUri, impl StartEx, mime verification, emulate prot)...\n");
4321 trace(
"Testing file binding (impl StartEx, mime verification, emulate prot)...\n");
int strcmp(const char *String1, const char *String2)
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
ACPI_SIZE strlen(const char *String)
static void * heap_alloc(size_t len)
static BOOL heap_free(void *mem)
const GUID IID_IClassFactory
#define GetCurrentDirectoryW(x, y)
#define GetProcAddress(x, y)
#define INVALID_HANDLE_VALUE
#define CreateFileA(a, b, c, d, e, f, g)
#define FILE_ATTRIBUTE_NORMAL
#define WideCharToMultiByte
static MimeHtmlProtocol * impl_from_IUnknown(IUnknown *iface)
BOOL WINAPI DeleteFileW(IN LPCWSTR lpFileName)
BOOL WINAPI WriteFile(IN HANDLE hFile, IN LPCVOID lpBuffer, IN DWORD nNumberOfBytesToWrite OPTIONAL, OUT LPDWORD lpNumberOfBytesWritten, IN LPOVERLAPPED lpOverlapped OPTIONAL)
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateThread(IN LPSECURITY_ATTRIBUTES lpThreadAttributes, IN DWORD dwStackSize, IN LPTHREAD_START_ROUTINE lpStartAddress, IN LPVOID lpParameter, IN DWORD dwCreationFlags, OUT LPDWORD lpThreadId)
VOID WINAPI GetSystemTimeAsFileTime(OUT PFILETIME lpFileTime)
int WINAPI lstrcmpW(LPCWSTR str1, LPCWSTR str2)
int WINAPI lstrcmpA(LPCSTR str1, LPCSTR str2)
static HRESULT WINAPI ClassFactory_LockServer(IClassFactory *iface, BOOL dolock)
static ULONG WINAPI ClassFactory_Release(IClassFactory *iface)
static HRESULT WINAPI InternetProtocolInfo_CompareUrl(IInternetProtocolInfo *iface, LPCWSTR pwzUrl1, LPCWSTR pwzUrl2, DWORD dwCompareFlags)
static HRESULT WINAPI InternetProtocolInfo_CombineUrl(IInternetProtocolInfo *iface, LPCWSTR pwzBaseUrl, LPCWSTR pwzRelativeUrl, DWORD dwCombineFlags, LPWSTR pwzResult, DWORD cchResult, DWORD *pcchResult, DWORD dwReserved)
static ULONG WINAPI InternetProtocolInfo_AddRef(IInternetProtocolInfo *iface)
static HRESULT WINAPI ClassFactory_QueryInterface(IClassFactory *iface, REFIID riid, void **ppv)
static ULONG WINAPI ClassFactory_AddRef(IClassFactory *iface)
static ULONG WINAPI InternetProtocolInfo_Release(IInternetProtocolInfo *iface)
static HRESULT WINAPI InternetProtocolInfo_QueryInterface(IInternetProtocolInfo *iface, REFIID riid, void **ppv)
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 DECLSPEC_HOTPATCH OleInitialize(LPVOID reserved)
void WINAPI DECLSPEC_HOTPATCH OleUninitialize(void)
#define INTERNET_MAX_URL_LENGTH
BOOL WINAPI CreateUrlCacheEntryA(LPCSTR lpszUrlName, DWORD dwExpectedFileSize, LPCSTR lpszFileExtension, LPSTR lpszFileName, DWORD dwReserved)
BOOL WINAPI CommitUrlCacheEntryA(LPCSTR lpszUrlName, LPCSTR lpszLocalFileName, FILETIME ExpireTime, FILETIME LastModifiedTime, DWORD CacheEntryType, LPBYTE lpHeaderInfo, DWORD dwHeaderSize, LPCSTR lpszFileExtension, LPCSTR lpszOriginalUrl)
BOOL WINAPI DeleteUrlCacheEntryW(LPCWSTR lpszUrlName)
PVOID LockRequest(PIRP Irp, PIO_STACK_LOCATION IrpSp, BOOLEAN Output, KPROCESSOR_MODE *LockMode)
VOID UnlockRequest(PIRP Irp, PIO_STACK_LOCATION IrpSp)
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
HGLOBAL NTAPI GlobalAlloc(UINT uFlags, SIZE_T dwBytes)
VOID WINAPI CoTaskMemFree(LPVOID ptr)
LPVOID WINAPI CoTaskMemAlloc(SIZE_T size)
static CInternetFolder * CreateInstance(void)
LPWSTR WINAPI lstrcatW(LPWSTR lpString1, LPCWSTR lpString2)
#define memcpy(s1, s2, n)
static IInternetProtocolSink protocol_sink
static IInternetBindInfo bind_info
static HRESULT WINAPI ProtocolSink_ReportProgress(IInternetProtocolSink *iface, ULONG ulStatusCode, LPCWSTR szStatusText)
static HRESULT WINAPI ProtocolSink_Switch(IInternetProtocolSink *iface, PROTOCOLDATA *pProtocolData)
static int strcmp_wa(const WCHAR *str1, const char *str2)
static const IUnknownVtbl outer_vtbl
static ULONG WINAPI BindInfo_Release(IInternetBindInfo *iface)
static IInternetBindInfoVtbl bind_info_vtbl
static IInternetProtocolSinkVtbl protocol_sink_vtbl
static ULONG WINAPI outer_AddRef(IUnknown *iface)
#define CHECK_EXPECT(func)
static ULONG WINAPI ProtocolSink_Release(IInternetProtocolSink *iface)
#define DEFINE_EXPECT(func)
static const IID outer_test_iid
static HRESULT WINAPI BindInfo_QueryInterface(IInternetBindInfo *iface, REFIID riid, void **ppv)
static HRESULT WINAPI BindInfo_GetBindInfo(IInternetBindInfo *iface, DWORD *grfBINDF, BINDINFO *pbindinfo)
static HRESULT WINAPI ProtocolSink_QueryInterface(IInternetProtocolSink *iface, REFIID riid, void **ppv)
static void test_mk_protocol(void)
#define protocol_start(p, u, e)
static HRESULT WINAPI outer_QueryInterface(IUnknown *iface, REFIID riid, void **ppv)
static HRESULT expect_hrResult
static void test_com_aggregation(const CLSID *clsid)
#define CHECK_CALLED(func)
static HRESULT WINAPI ProtocolSink_ReportResult(IInternetProtocolSink *iface, HRESULT hrResult, DWORD dwError, LPCWSTR szResult)
static HRESULT WINAPI ProtocolSink_ReportData(IInternetProtocolSink *iface, DWORD grfBSCF, ULONG ulProgress, ULONG ulProgressMax)
static HRESULT WINAPI BindInfo_GetBindString(IInternetBindInfo *iface, ULONG ulStringType, LPOLESTR *ppwzStr, ULONG cEl, ULONG *pcElFetched)
static ULONG WINAPI BindInfo_AddRef(IInternetBindInfo *iface)
static ULONG WINAPI ProtocolSink_AddRef(IInternetProtocolSink *iface)
static ULONG WINAPI outer_Release(IUnknown *iface)
static const char * strw(LPCWSTR x)
static HMODULE MODULEINFO DWORD cb
#define todo_wine_if(is_todo)
IHTMLDocument2 * html_doc
static IInternetProtocolInfo protocol_info
static void test_file_protocol(void)
static HRESULT WINAPI ServiceProvider_QueryService(IServiceProvider *iface, REFGUID guidService, REFIID riid, void **ppv)
static void test_protocol_terminate(IInternetProtocol *protocol)
static const WCHAR pjpegW[]
static LPCWSTR expect_wsz
static HRESULT WINAPI ProtocolEmul_Continue(IInternetProtocolEx *iface, PROTOCOLDATA *pProtocolData)
static ULONG WINAPI Stream_AddRef(IStream *iface)
#define CLEAR_CALLED(func)
static void test_file_protocol_fail(void)
static const CHAR post_data[]
static const WCHAR protocol_names[][10]
static HRESULT WINAPI InternetPriority_QueryInterface(IInternetPriority *iface, REFIID riid, void **ppv)
static ULONG WINAPI ProtocolUnk_AddRef(IUnknown *iface)
static void register_filter(BOOL do_register)
static PROTOCOLDATA protocoldata
static HRESULT WINAPI ProtocolEmul_UnlockRequest(IInternetProtocolEx *iface)
static HRESULT WINAPI MimeProtocol_Start(IInternetProtocolEx *iface, LPCWSTR szUrl, IInternetProtocolSink *pOIProtSink, IInternetBindInfo *pOIBindInfo, DWORD grfPI, HANDLE_PTR dwReserved)
static HRESULT WINAPI MimeProtocol_Read(IInternetProtocolEx *iface, void *pv, ULONG cb, ULONG *pcbRead)
static ULONG WINAPI ServiceProvider_Release(IServiceProvider *iface)
static BOOL test_async_req
static BOOL async_read_pending
static HRESULT WINAPI HttpNegotiate_OnResponse(IHttpNegotiate2 *iface, DWORD dwResponseCode, LPCWSTR szResponseHeaders, LPCWSTR szRequestHeaders, LPWSTR *pszAdditionalRequestHeaders)
static HRESULT WINAPI MimeProtocol_LockRequest(IInternetProtocolEx *iface, DWORD dwOptions)
static ULONG WINAPI Protocol_AddRef(IInternetProtocolEx *iface)
static const IInternetProtocolExVtbl MimeProtocolVtbl
static HRESULT WINAPI InternetPriority_SetPriority(IInternetPriority *iface, LONG nPriority)
static void test_http_protocol_url(LPCWSTR url, int prot, DWORD flags, DWORD tymed)
static HRESULT WINAPI ClassFactory_CreateInstance(IClassFactory *iface, IUnknown *pOuter, REFIID riid, void **ppv)
static HRESULT WINAPI HttpSecurity_QueryInterface(IHttpSecurity *iface, REFIID riid, void **ppv)
static BOOL wait_for_switch
static HRESULT WINAPI Stream_SetSize(IStream *iface, ULARGE_INTEGER libNewSize)
static void test_http_protocol(void)
static HRESULT WINAPI Protocol_Abort(IInternetProtocolEx *iface, HRESULT hrReason, DWORD dwOptions)
static BOOL bind_from_cache
static IInternetProtocolEx MimeProtocol
static HRESULT WINAPI InternetPriority_GetPriority(IInternetPriority *iface, LONG *pnPriority)
static void create_cache_entry(const WCHAR *urlw)
static IInternetProtocol * binding_protocol
static HRESULT WINAPI InternetProtocolInfo_QueryInfo(IInternetProtocolInfo *iface, LPCWSTR pwzUrl, QUERYOPTION OueryOption, DWORD dwQueryFlags, LPVOID pBuffer, DWORD cbBuffer, DWORD *pcbBuf, DWORD dwReserved)
static const IClassFactoryVtbl ClassFactoryVtbl
static HRESULT WINAPI Stream_Revert(IStream *iface)
static ULONG WINAPI InternetPriority_Release(IInternetPriority *iface)
static IHttpSecurity http_security
static ULONG WINAPI HttpNegotiate_Release(IHttpNegotiate2 *iface)
static const WCHAR binding_urls[][130]
static const WCHAR text_htmlW[]
static HRESULT WINAPI Stream_Stat(IStream *iface, STATSTG *pstatstg, DWORD dwStatFlag)
static HRESULT WINAPI HttpSecurity_GetWindow(IHttpSecurity *iface, REFGUID rguidReason, HWND *phwnd)
static HRESULT WINAPI ProtocolUnk_QueryInterface(IUnknown *iface, REFIID riid, void **ppv)
static HRESULT WINAPI MimeProtocol_QueryInterface(IInternetProtocolEx *iface, REFIID riid, void **ppv)
static HRESULT WINAPI Stream_CopyTo(IStream *iface, IStream *pstm, ULARGE_INTEGER cb, ULARGE_INTEGER *pcbRead, ULARGE_INTEGER *pcbWritten)
static IClassFactory mimefilter_cf
static HRESULT QueryInterface(REFIID, void **)
static const char * w2a(LPCWSTR str)
static const IBindCallbackRedirectVtbl BindCallbackRedirectVtbl
static void test_binding(int prot, DWORD grf_pi, DWORD test_flags)
static HRESULT WINAPI ProtocolEmul_LockRequest(IInternetProtocolEx *iface, DWORD dwOptions)
static int post_stream_read
static const WCHAR acc_mimeW[]
static void call_continue(PROTOCOLDATA *protocol_data)
static HANDLE event_continue_done
static BOOL no_aggregation
static DWORD filter_state
static IInternetBindInfo * prot_bind_info
static void test_file_protocol_url(LPCWSTR url)
static HRESULT WINAPI Stream_LockRegion(IStream *iface, ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType)
static IHttpNegotiate2 http_negotiate
static BOOL file_with_hash
static IServiceProvider service_provider
static HRESULT WINAPI Stream_QueryInterface(IStream *iface, REFIID riid, void **ppv)
static const IClassFactoryVtbl MimeFilterCFVtbl
static const WCHAR wszIndexHtml[]
static IBindCallbackRedirect redirect_callback
static const WCHAR hostW[]
static HANDLE event_continue
static IInternetProtocolSink mime_protocol_sink
static IInternetProtocol * async_protocol
static IHttpNegotiate2Vtbl HttpNegotiateVtbl
static BOOL redirect_on_continue
static ULONG WINAPI HttpSecurity_Release(IHttpSecurity *iface)
static HRESULT WINAPI ProtocolEmul_StartEx(IInternetProtocolEx *iface, IUri *pUri, IInternetProtocolSink *pOIProtSink, IInternetBindInfo *pOIBindInfo, DWORD grfPI, HANDLE *dwReserved)
static HRESULT WINAPI Stream_Clone(IStream *iface, IStream **ppstm)
static HRESULT WINAPI BindCallbackRedirect_QueryInterface(IBindCallbackRedirect *iface, REFIID riid, void **ppv)
static IHttpSecurityVtbl HttpSecurityVtbl
static HRESULT WINAPI ProtocolEmul_Terminate(IInternetProtocolEx *iface, DWORD dwOptions)
static HRESULT WINAPI HttpSecurity_OnSecurityProblem(IHttpSecurity *iface, DWORD dwProblem)
static DWORD http_post_test
static DWORD WINAPI thread_proc(PVOID arg)
static void test_CreateBinding(void)
static ULONG WINAPI BindCallbackRedirect_Release(IBindCallbackRedirect *iface)
static PROTOCOLDATA continue_protdata
static PROTOCOLDATA * pdata
static HRESULT WINAPI HttpNegotiate_GetRootSecurityId(IHttpNegotiate2 *iface, BYTE *pbSecurityId, DWORD *pcbSecurityId, DWORD_PTR dwReserved)
static HRESULT WINAPI Stream_UnlockRegion(IStream *iface, ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType)
static HRESULT WINAPI Protocol_Resume(IInternetProtocolEx *iface)
static void test_ftp_protocol(void)
#define CHECK_EXPECT2(func)
static HRESULT WINAPI HttpNegotiate_BeginningTransaction(IHttpNegotiate2 *iface, LPCWSTR szURL, LPCWSTR szHeaders, DWORD dwReserved, LPWSTR *pszAdditionalHeaders)
static ULONG WINAPI BindCallbackRedirect_AddRef(IBindCallbackRedirect *iface)
static BOOL http_protocol_start(LPCWSTR url, BOOL use_iuri)
#define TEST_DISABLEAUTOREDIRECT
static ULONG WINAPI ProtocolUnk_Release(IUnknown *iface)
static HRESULT WINAPI MimeFilter_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv)
static const WCHAR emptyW[]
static int read_report_data
static enum @1755 tested_protocol
static BOOL http_is_first
static ULONG WINAPI Protocol_Release(IInternetProtocolEx *iface)
static void test_early_abort(const CLSID *clsid)
static ULONG WINAPI MimeProtocolSink_AddRef(IInternetProtocolSink *iface)
static HRESULT WINAPI ProtocolEmul_QueryInterface(IInternetProtocolEx *iface, REFIID riid, void **ppv)
static HRESULT WINAPI MimeProtocolSink_Switch(IInternetProtocolSink *iface, PROTOCOLDATA *pProtocolData)
static DWORD bindinfo_options
static const IUnknownVtbl ProtocolUnkVtbl
static void test_https_protocol(void)
static BOOL first_data_notif
static const WCHAR winehq_ipW[]
static void test_gopher_protocol(void)
static BOOL reuse_protocol_thread
static const IInternetProtocolExVtbl ProtocolVtbl
static BOOL security_problem
static const WCHAR user_agentW[]
static ULONG WINAPI HttpNegotiate_AddRef(IHttpNegotiate2 *iface)
static Protocol * protocol_emul
static const char * status_names[]
static ULONG WINAPI Stream_Release(IStream *iface)
static const IStreamVtbl StreamVtbl
static void test_http_info(IInternetProtocol *protocol)
static HRESULT WINAPI Protocol_Suspend(IInternetProtocolEx *iface)
static ULONG WINAPI ProtocolEmul_AddRef(IInternetProtocolEx *iface)
static BOOL mimefilter_test
static HRESULT WINAPI Stream_Commit(IStream *iface, DWORD grfCommitFlags)
static const IInternetPriorityVtbl InternetPriorityVtbl
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 HRESULT WINAPI MimeProtocolSink_ReportData(IInternetProtocolSink *iface, DWORD grfBSCF, ULONG ulProgress, ULONG ulProgressMax)
static HANDLE event_complete
static HRESULT WINAPI InternetProtocolInfo_ParseUrl(IInternetProtocolInfo *iface, LPCWSTR pwzUrl, PARSEACTION ParseAction, DWORD dwParseFlags, LPWSTR pwzResult, DWORD cchResult, DWORD *pcchResult, DWORD dwReserved)
static HRESULT WINAPI HttpNegotiate_QueryInterface(IHttpNegotiate2 *iface, REFIID riid, void **ppv)
static HRESULT WINAPI Stream_Read(IStream *iface, void *pv, ULONG cb, ULONG *pcbRead)
static HRESULT WINAPI MimeProtocolSink_ReportResult(IInternetProtocolSink *iface, HRESULT hrResult, DWORD dwError, LPCWSTR szResult)
static ULONG WINAPI InternetPriority_AddRef(IInternetPriority *iface)
static HRESULT WINAPI Protocol_Seek(IInternetProtocolEx *iface, LARGE_INTEGER dlibMove, DWORD dwOrigin, ULARGE_INTEGER *plibNewPosition)
static HRESULT WINAPI ServiceProvider_QueryInterface(IServiceProvider *iface, REFIID riid, void **ppv)
static HRESULT WINAPI Protocol_Continue(IInternetProtocolEx *iface, PROTOCOLDATA *pProtocolData)
static ULONG WINAPI MimeProtocolSink_Release(IInternetProtocolSink *iface)
static ULONG WINAPI ServiceProvider_AddRef(IServiceProvider *iface)
#define CHECK_NOT_CALLED(func)
static const IServiceProviderVtbl ServiceProviderVtbl
static BOOL file_protocol_start(IInternetProtocol *protocol, LPCWSTR url, IInternetProtocolEx *protocolex, IUri *uri, BOOL is_first)
static Protocol * impl_from_IInternetProtocolEx(IInternetProtocolEx *iface)
static const WCHAR gifW[]
static IInternetProtocolSink * binding_sink
static BOOL test_redirect
static const WCHAR index_url[]
static HRESULT WINAPI ProtocolEmul_Read(IInternetProtocolEx *iface, void *pv, ULONG cb, ULONG *pcbRead)
static Protocol * impl_from_IInternetPriority(IInternetPriority *iface)
static ULONG WINAPI ProtocolEmul_Release(IInternetProtocolEx *iface)
static HRESULT WINAPI ProtocolEmul_Start(IInternetProtocolEx *iface, LPCWSTR szUrl, IInternetProtocolSink *pOIProtSink, IInternetBindInfo *pOIBindInfo, DWORD grfPI, HANDLE_PTR dwReserved)
static HRESULT WINAPI MimeProtocolSink_ReportProgress(IInternetProtocolSink *iface, ULONG ulStatusCode, LPCWSTR szStatusText)
static HRESULT WINAPI MimeProtocolSink_QueryInterface(IInternetProtocolSink *iface, REFIID riid, void **ppv)
static HANDLE event_complete2
static HRESULT WINAPI MimeProtocol_Terminate(IInternetProtocolEx *iface, DWORD dwOptions)
static HRESULT WINAPI BindCallbackRedirect_Redirect(IBindCallbackRedirect *iface, const WCHAR *url, VARIANT_BOOL *cancel)
static ULONG WINAPI HttpSecurity_AddRef(IHttpSecurity *iface)
static IInternetProtocolSink * filtered_sink
static HRESULT WINAPI MimeProtocol_UnlockRequest(IInternetProtocolEx *iface)
static LONG obj_refcount(void *obj)
static IInternetProtocolSinkVtbl mime_protocol_sink_vtbl
static const IInternetProtocolInfoVtbl InternetProtocolInfoVtbl
static IInternetProtocol * filtered_protocol
static const char test_url[]
static void test_priority(void)
_In_ HANDLE _In_ DWORD _In_ DWORD _Inout_opt_ LPOVERLAPPED _In_opt_ LPTRANSMIT_FILE_BUFFERS _In_ DWORD dwReserved
#define IsEqualGUID(rguid1, rguid2)
static __inline const char * wine_dbgstr_guid(const GUID *id)
static void init_test(void)
TCHAR file_path[MAX_PATH]
IInternetPriority IInternetPriority_iface
IInternetProtocolEx IInternetProtocolEx_iface
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
VOID WINAPI DECLSPEC_HOTPATCH Sleep(IN DWORD dwMilliseconds)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateEventW(IN LPSECURITY_ATTRIBUTES lpEventAttributes OPTIONAL, IN BOOL bManualReset, IN BOOL bInitialState, IN LPCWSTR lpName OPTIONAL)
BOOL WINAPI DECLSPEC_HOTPATCH SetEvent(IN HANDLE hEvent)
BOOL WINAPI DECLSPEC_HOTPATCH ResetEvent(IN HANDLE hEvent)
#define CONTAINING_RECORD(address, type, field)
struct _LARGE_INTEGER::@2379 u
static const WCHAR wszFile[]
DWORD WINAPI GetLastError(void)
DWORD WINAPI GetCurrentThreadId(void)
#define REGDB_E_CLASSNOTREG
#define CLASS_E_NOAGGREGATION
#define CLASS_E_CLASSNOTAVAILABLE
#define ERROR_INTERNET_INVALID_CA
#define NORMAL_CACHE_ENTRY
#define HTTP_QUERY_CUSTOM
#define ERROR_INTERNET_SEC_CERT_REV_FAILED