static HRESULT expect_hrResult;
static LPCWSTR file_name, http_url, expect_wsz;
static IInternetProtocol *async_protocol = NULL;
-static BOOL first_data_notif, http_is_first, http_post_test;
+static BOOL first_data_notif, http_is_first, http_post_test, test_redirect;
static int state = 0, prot_state, read_report_data;
static DWORD bindf, ex_priority , pi;
static IInternetProtocol *binding_protocol, *filtered_protocol;
{
HRESULT hres;
- if (!state) {
+ if(!state) {
if(tested_protocol == HTTP_TEST || tested_protocol == HTTPS_TEST)
CLEAR_CALLED(ReportProgress_COOKIE_SENT);
if(tested_protocol == HTTP_TEST || tested_protocol == HTTPS_TEST || tested_protocol == FTP_TEST) {
- if (http_is_first) {
+ if (http_is_first) {
CLEAR_CALLED(ReportProgress_FINDINGRESOURCE);
CLEAR_CALLED(ReportProgress_CONNECTING);
CLEAR_CALLED(ReportProgress_PROXYDETECTING);
- } else todo_wine {
- CHECK_NOT_CALLED(ReportProgress_FINDINGRESOURCE);
- /* IE7 does call this */
- CLEAR_CALLED(ReportProgress_CONNECTING);
- }
+ }else if(test_redirect) {
+ CHECK_CALLED(ReportProgress_FINDINGRESOURCE);
+ }else todo_wine {
+ CHECK_NOT_CALLED(ReportProgress_FINDINGRESOURCE);
+ /* IE7 does call this */
+ CLEAR_CALLED(ReportProgress_CONNECTING);
+ }
}
if(tested_protocol == FTP_TEST)
todo_wine CHECK_CALLED(ReportProgress_SENDINGREQUEST);
else if (tested_protocol != HTTPS_TEST)
- CHECK_CALLED(ReportProgress_SENDINGREQUEST);
+ CHECK_CALLED(ReportProgress_SENDINGREQUEST);
+ if(test_redirect)
+ CHECK_CALLED(ReportProgress_REDIRECTING);
if(tested_protocol == HTTP_TEST || tested_protocol == HTTPS_TEST) {
- SET_EXPECT(OnResponse);
- if(tested_protocol == HTTPS_TEST)
+ SET_EXPECT(OnResponse);
+ if(tested_protocol == HTTPS_TEST || test_redirect)
SET_EXPECT(ReportProgress_ACCEPTRANGES);
- SET_EXPECT(ReportProgress_MIMETYPEAVAILABLE);
- if(bindf & BINDF_NEEDFILE)
- SET_EXPECT(ReportProgress_CACHEFILENAMEAVAILABLE);
- }
+ SET_EXPECT(ReportProgress_MIMETYPEAVAILABLE);
+ if(bindf & BINDF_NEEDFILE)
+ SET_EXPECT(ReportProgress_CACHEFILENAMEAVAILABLE);
+ }
}
SET_EXPECT(ReportData);
if(tested_protocol == FTP_TEST)
CLEAR_CALLED(ReportData);
else if (! security_problem)
- CHECK_CALLED(ReportData);
+ CHECK_CALLED(ReportData);
if (!state) {
if (! security_problem)
{
- state = 1;
+ state = 1;
if(tested_protocol == HTTP_TEST || tested_protocol == HTTPS_TEST) {
- CHECK_CALLED(OnResponse);
+ CHECK_CALLED(OnResponse);
if(tested_protocol == HTTPS_TEST)
CHECK_CALLED(ReportProgress_ACCEPTRANGES);
- CHECK_CALLED(ReportProgress_MIMETYPEAVAILABLE);
- if(bindf & BINDF_NEEDFILE)
- CHECK_CALLED(ReportProgress_CACHEFILENAMEAVAILABLE);
- }
+ else if(test_redirect)
+ CLEAR_CALLED(ReportProgress_ACCEPTRANGES);
+ CHECK_CALLED(ReportProgress_MIMETYPEAVAILABLE);
+ if(bindf & BINDF_NEEDFILE)
+ CHECK_CALLED(ReportProgress_CACHEFILENAMEAVAILABLE);
+ }
}
else
{
pdata = pProtocolData;
if(binding_test) {
- SetEvent(event_complete);
+ SetEvent(event_complete);
WaitForSingleObject(event_complete2, INFINITE);
return S_OK;
}if(direct_read) {
break;
case BINDSTATUS_REDIRECTING:
CHECK_EXPECT(ReportProgress_REDIRECTING);
- ok(szStatusText == NULL, "szStatusText = %s\n", wine_dbgstr_w(szStatusText));
+ if(test_redirect)
+ ok(!strcmp_wa(szStatusText, "http://test.winehq.org/hello.html"), "szStatusText = %s\n", wine_dbgstr_w(szStatusText));
+ else
+ ok(szStatusText == NULL, "szStatusText = %s\n", wine_dbgstr_w(szStatusText));
break;
case BINDSTATUS_ENCODING:
CHECK_EXPECT(ReportProgress_ENCODING);
CHECK_EXPECT(ReportData);
if(tested_protocol != BIND_TEST) {
- do {
+ do {
if(mimefilter_test)
SET_EXPECT(MimeFilter_Read);
else if(rec_depth > 1)
SET_EXPECT(Read2);
else
- SET_EXPECT(Read);
- hres = IInternetProtocol_Read(binding_protocol, expect_pv=buf, sizeof(buf), &read);
+ SET_EXPECT(Read);
+ hres = IInternetProtocol_Read(binding_protocol, expect_pv=buf, sizeof(buf), &read);
if(mimefilter_test)
CHECK_CALLED(MimeFilter_Read);
else if(rec_depth > 1)
CHECK_CALLED(Read2);
else
- CHECK_CALLED(Read);
- }while(hres == S_OK);
- }
+ CHECK_CALLED(Read);
+ }while(hres == S_OK);
+ }
}
rec_depth--;
if(tested_protocol == FTP_TEST)
ok(hrResult == E_PENDING || hrResult == S_OK, "hrResult = %08x, expected E_PENDING or S_OK\n", hrResult);
else
- ok(hrResult == expect_hrResult, "hrResult = %08x, expected: %08x\n",
- hrResult, expect_hrResult);
+ ok(hrResult == expect_hrResult, "hrResult = %08x, expected: %08x\n",
+ hrResult, expect_hrResult);
if(SUCCEEDED(hrResult) || tested_protocol == FTP_TEST)
ok(dwError == ERROR_SUCCESS, "dwError = %d, expected ERROR_SUCCESS\n", dwError);
else
if(IsEqualGUID(&IID_IWinInetInfo, riid)) {
CHECK_EXPECT(QueryInterface_IWinInetInfo);
- *ppv = NULL;
- return E_NOINTERFACE;
-}
+ *ppv = NULL;
+ return E_NOINTERFACE;
+ }
if(IsEqualGUID(&IID_IWinInetHttpInfo, riid)) {
CHECK_EXPECT(QueryInterface_IWinInetHttpInfo);
*ppv = NULL;
return E_NOINTERFACE;
-}
+ }
ok(0, "unexpected riid %s\n", debugstr_guid(riid));
*ppv = NULL;
ok(hres == S_OK, "Switch failed: %08x\n", hres);
if(!short_read) {
- prot_state = 2;
+ prot_state = 2;
if(mimefilter_test)
SET_EXPECT(MimeFilter_Switch);
else
- SET_EXPECT(Switch);
- hres = IInternetProtocolSink_Switch(binding_sink, &protocoldata);
+ SET_EXPECT(Switch);
+ hres = IInternetProtocolSink_Switch(binding_sink, &protocoldata);
ok(hres == S_OK, "Switch failed: %08x\n", hres);
if(mimefilter_test)
CHECK_CALLED(MimeFilter_Switch);
else
- CHECK_CALLED(Switch);
+ CHECK_CALLED(Switch);
- prot_state = 2;
+ prot_state = 2;
if(mimefilter_test)
SET_EXPECT(MimeFilter_Switch);
else
- SET_EXPECT(Switch);
- hres = IInternetProtocolSink_Switch(binding_sink, &protocoldata);
+ SET_EXPECT(Switch);
+ hres = IInternetProtocolSink_Switch(binding_sink, &protocoldata);
ok(hres == S_OK, "Switch failed: %08x\n", hres);
if(mimefilter_test)
CHECK_CALLED(MimeFilter_Switch);
else
- CHECK_CALLED(Switch);
+ CHECK_CALLED(Switch);
- prot_state = 3;
+ prot_state = 3;
if(mimefilter_test)
SET_EXPECT(MimeFilter_Switch);
else
- SET_EXPECT(Switch);
- hres = IInternetProtocolSink_Switch(binding_sink, &protocoldata);
+ SET_EXPECT(Switch);
+ hres = IInternetProtocolSink_Switch(binding_sink, &protocoldata);
ok(hres == S_OK, "Switch failed: %08x\n", hres);
if(mimefilter_test)
CHECK_CALLED(MimeFilter_Switch);
else
- CHECK_CALLED(Switch);
+ CHECK_CALLED(Switch);
}
SetEvent(event_complete);
"GetBindString(BINDSTRING_ACCEPT_MIMES) failed: %08x\n", hres);
ok(fetched == 1, "fetched = %d, expected 1\n", fetched);
ok(!strcmp_ww(acc_mimeW, accept_mimes[0]), "unexpected mimes %s\n", wine_dbgstr_w(accept_mimes[0]));
+ CoTaskMemFree(accept_mimes[0]);
hres = IInternetBindInfo_QueryInterface(pOIBindInfo, &IID_IServiceProvider,
(void**)&service_provider);
CHECK_CALLED(ReportProgress_LOADINGMIMEHANDLER);
todo_wine CHECK_CALLED(ReportProgress_MIMETYPEAVAILABLE);
}else {
- CHECK_CALLED(ReportProgress_MIMETYPEAVAILABLE);
+ CHECK_CALLED(ReportProgress_MIMETYPEAVAILABLE);
}
if(mimefilter_test)
SET_EXPECT(MimeFilter_ReportData);
else
- SET_EXPECT(ReportData);
+ SET_EXPECT(ReportData);
hres = IInternetProtocolSink_ReportData(pOIProtSink,
BSCF_FIRSTDATANOTIFICATION | BSCF_LASTDATANOTIFICATION, 13, 13);
ok(hres == S_OK, "ReportData failed: %08x\n", hres);
if(mimefilter_test)
CHECK_CALLED(MimeFilter_ReportData);
else
- CHECK_CALLED(ReportData);
+ CHECK_CALLED(ReportData);
if(tested_protocol == BIND_TEST) {
hres = IInternetProtocol_Terminate(binding_protocol, 0);
if(mimefilter_test)
SET_EXPECT(MimeFilter_ReportResult);
else
- SET_EXPECT(ReportResult);
+ SET_EXPECT(ReportResult);
hres = IInternetProtocolSink_ReportResult(pOIProtSink, S_OK, 0, NULL);
ok(hres == S_OK, "ReportResult failed: %08x\n", hres);
if(mimefilter_test)
CHECK_CALLED(MimeFilter_ReportResult);
else
- CHECK_CALLED(ReportResult);
+ CHECK_CALLED(ReportResult);
return S_OK;
}
SET_EXPECT(MimeFilter_Start);
SET_EXPECT(ReportProgress_LOADINGMIMEHANDLER);
}else if(!(pi & PI_MIMEVERIFICATION)) {
- SET_EXPECT(ReportProgress_MIMETYPEAVAILABLE);
+ SET_EXPECT(ReportProgress_MIMETYPEAVAILABLE);
}
hres = IInternetProtocolSink_ReportProgress(binding_sink,
BINDSTATUS_MIMETYPEAVAILABLE, mimefilter_test ? gzipW : text_htmlW);
CHECK_CALLED(MimeFilter_Start);
CHECK_CALLED(ReportProgress_LOADINGMIMEHANDLER);
}else if(!(pi & PI_MIMEVERIFICATION)) {
- CHECK_CALLED(ReportProgress_MIMETYPEAVAILABLE);
+ CHECK_CALLED(ReportProgress_MIMETYPEAVAILABLE);
}
ok(hres == S_OK,
"ReportProgress(BINDSTATUS_MIMETYPEAVAILABLE) failed: %08x\n", hres);
SET_EXPECT(ReportProgress_MIMETYPEAVAILABLE);
}
if(pr >= 200)
- SET_EXPECT(ReportData);
+ SET_EXPECT(ReportData);
}else {
SET_EXPECT(ReportData);
}
ok(cb == 700, "cb=%d\n", cb);
}else {
ok(expect_pv <= pv && (BYTE*)pv < (BYTE*)expect_pv + cb, "pv != expect_pv\n");
-}
+ }
}else {
if(!read_report_data)
- CHECK_EXPECT(Read);
+ CHECK_EXPECT(Read);
- ok(pv == expect_pv, "pv != expect_pv\n");
- ok(cb == 1000, "cb=%d\n", cb);
+ ok(pv == expect_pv, "pv != expect_pv\n");
+ ok(cb == 1000, "cb=%d\n", cb);
ok(!*pcbRead, "*pcbRead = %d\n", *pcbRead);
}
ok(pcbRead != NULL, "pcbRead == NULL\n");
if(mimefilter_test)
SET_EXPECT(MimeFilter_ReportResult);
else
- SET_EXPECT(ReportResult);
+ SET_EXPECT(ReportResult);
hres = IInternetProtocolSink_ReportResult(binding_sink, S_OK, ERROR_SUCCESS, NULL);
ok(hres == S_OK, "ReportResult failed: %08x\n", hres);
if(mimefilter_test)
CHECK_CALLED(MimeFilter_ReportResult);
else
- CHECK_CALLED(ReportResult);
+ CHECK_CALLED(ReportResult);
memset(pv, 'x', 100);
prot_read += *pcbRead = 100;
#define TEST_POST 0x10
#define TEST_EMULATEPROT 0x20
#define TEST_SHORT_READ 0x40
+#define TEST_REDIRECT 0x80
static void init_test(int prot, DWORD flags)
{
emulate_prot = (flags & TEST_EMULATEPROT) != 0;
wait_for_switch = TRUE;
short_read = (flags & TEST_SHORT_READ) != 0;
+ test_redirect = (flags & TEST_REDIRECT) != 0;
}
static void test_priority(IInternetProtocol *protocol)
if(SUCCEEDED(hres)) {
if(file_protocol_start(protocol, url, TRUE)) {
- hres = IInternetProtocol_Read(protocol, buf, 2, &cb);
- ok(hres == S_OK, "Read failed: %08x\n", hres);
- ok(cb == 2, "cb=%u expected 2\n", cb);
- hres = IInternetProtocol_Read(protocol, buf, sizeof(buf), &cb);
- ok(hres == S_FALSE, "Read failed: %08x\n", hres);
- hres = IInternetProtocol_Read(protocol, buf, sizeof(buf), &cb);
- ok(hres == S_FALSE, "Read failed: %08x expected S_FALSE\n", hres);
- ok(cb == 0, "cb=%u expected 0\n", cb);
- hres = IInternetProtocol_UnlockRequest(protocol);
- ok(hres == S_OK, "UnlockRequest failed: %08x\n", hres);
+ hres = IInternetProtocol_Read(protocol, buf, 2, &cb);
+ ok(hres == S_OK, "Read failed: %08x\n", hres);
+ ok(cb == 2, "cb=%u expected 2\n", cb);
+ hres = IInternetProtocol_Read(protocol, buf, sizeof(buf), &cb);
+ ok(hres == S_FALSE, "Read failed: %08x\n", hres);
+ hres = IInternetProtocol_Read(protocol, buf, sizeof(buf), &cb);
+ ok(hres == S_FALSE, "Read failed: %08x expected S_FALSE\n", hres);
+ ok(cb == 0, "cb=%u expected 0\n", cb);
+ hres = IInternetProtocol_UnlockRequest(protocol);
+ ok(hres == S_OK, "UnlockRequest failed: %08x\n", hres);
}
if(file_protocol_start(protocol, url, FALSE)) {
- hres = IInternetProtocol_Read(protocol, buf, 2, &cb);
- ok(hres == S_FALSE, "Read failed: %08x\n", hres);
- hres = IInternetProtocol_LockRequest(protocol, 0);
- ok(hres == S_OK, "LockRequest failed: %08x\n", hres);
- hres = IInternetProtocol_UnlockRequest(protocol);
- ok(hres == S_OK, "UnlockRequest failed: %08x\n", hres);
+ hres = IInternetProtocol_Read(protocol, buf, 2, &cb);
+ ok(hres == S_FALSE, "Read failed: %08x\n", hres);
+ hres = IInternetProtocol_LockRequest(protocol, 0);
+ ok(hres == S_OK, "LockRequest failed: %08x\n", hres);
+ hres = IInternetProtocol_UnlockRequest(protocol);
+ ok(hres == S_OK, "UnlockRequest failed: %08x\n", hres);
}
IInternetProtocol_Release(protocol);
if(SUCCEEDED(hres)) {
if(file_protocol_start(protocol, url, TRUE)) {
- hres = IInternetProtocol_LockRequest(protocol, 0);
- ok(hres == S_OK, "LockRequest failed: %08x\n", hres);
- hres = IInternetProtocol_Terminate(protocol, 0);
- ok(hres == S_OK, "Terminate failed: %08x\n", hres);
- hres = IInternetProtocol_Read(protocol, buf, 2, &cb);
- ok(hres == S_OK, "Read failed: %08x\n\n", hres);
- hres = IInternetProtocol_UnlockRequest(protocol);
- ok(hres == S_OK, "UnlockRequest failed: %08x\n", hres);
- hres = IInternetProtocol_Read(protocol, buf, 2, &cb);
- ok(hres == S_OK, "Read failed: %08x\n", hres);
- hres = IInternetProtocol_Terminate(protocol, 0);
- ok(hres == S_OK, "Terminate failed: %08x\n", hres);
+ hres = IInternetProtocol_LockRequest(protocol, 0);
+ ok(hres == S_OK, "LockRequest failed: %08x\n", hres);
+ hres = IInternetProtocol_Terminate(protocol, 0);
+ ok(hres == S_OK, "Terminate failed: %08x\n", hres);
+ hres = IInternetProtocol_Read(protocol, buf, 2, &cb);
+ ok(hres == S_OK, "Read failed: %08x\n\n", hres);
+ hres = IInternetProtocol_UnlockRequest(protocol);
+ ok(hres == S_OK, "UnlockRequest failed: %08x\n", hres);
+ hres = IInternetProtocol_Read(protocol, buf, 2, &cb);
+ ok(hres == S_OK, "Read failed: %08x\n", hres);
+ hres = IInternetProtocol_Terminate(protocol, 0);
+ ok(hres == S_OK, "Terminate failed: %08x\n", hres);
}
IInternetProtocol_Release(protocol);
if(SUCCEEDED(hres)) {
if(file_protocol_start(protocol, url, TRUE)) {
- hres = IInternetProtocol_Terminate(protocol, 0);
- ok(hres == S_OK, "Terminate failed: %08x\n", hres);
- hres = IInternetProtocol_Read(protocol, buf, 2, &cb);
- ok(hres == S_OK, "Read failed: %08x\n", hres);
- ok(cb == 2, "cb=%u expected 2\n", cb);
+ hres = IInternetProtocol_Terminate(protocol, 0);
+ ok(hres == S_OK, "Terminate failed: %08x\n", hres);
+ hres = IInternetProtocol_Read(protocol, buf, 2, &cb);
+ ok(hres == S_OK, "Read failed: %08x\n", hres);
+ ok(cb == 2, "cb=%u expected 2\n", cb);
}
IInternetProtocol_Release(protocol);
if (!(bindf & BINDF_FROMURLMON))
SET_EXPECT(ReportProgress_DIRECTBIND);
if(!got_user_agent)
- SET_EXPECT(GetBindString_USER_AGENT);
+ SET_EXPECT(GetBindString_USER_AGENT);
SET_EXPECT(GetBindString_ACCEPT_MIMES);
SET_EXPECT(QueryService_HttpNegotiate);
SET_EXPECT(BeginningTransaction);
SET_EXPECT(ReportProgress_FINDINGRESOURCE);
SET_EXPECT(ReportProgress_CONNECTING);
SET_EXPECT(ReportProgress_SENDINGREQUEST);
+ if(test_redirect)
+ SET_EXPECT(ReportProgress_REDIRECTING);
SET_EXPECT(ReportProgress_PROXYDETECTING);
if(prot == HTTP_TEST)
SET_EXPECT(ReportProgress_CACHEFILENAMEAVAILABLE);
return;
if(!direct_read)
- SET_EXPECT(ReportResult);
+ SET_EXPECT(ReportResult);
expect_hrResult = S_OK;
if(direct_read) {
ok((hres == E_PENDING && cb==0) ||
(hres == S_OK && cb==1), "Read failed: %08x (%d bytes)\n", hres, cb);
- WaitForSingleObject(event_complete, INFINITE);
- if(bindf & BINDF_FROMURLMON)
- CHECK_CALLED(Switch);
- else
- CHECK_CALLED(ReportData);
+ WaitForSingleObject(event_complete, INFINITE);
+ if(bindf & BINDF_FROMURLMON)
+ CHECK_CALLED(Switch);
+ else
+ CHECK_CALLED(ReportData);
if(prot == HTTPS_TEST)
CLEAR_CALLED(QueryService_HttpSecurity);
- while(1) {
- if(bindf & BINDF_FROMURLMON)
- SET_EXPECT(Switch);
- else
- SET_EXPECT(ReportData);
+ while(1) {
+ if(bindf & BINDF_FROMURLMON)
+ SET_EXPECT(Switch);
+ else
+ SET_EXPECT(ReportData);
hres = IInternetProtocol_Read(async_protocol, buf, sizeof(buf), &cb);
- if(hres == E_PENDING) {
+ if(hres == E_PENDING) {
hres = IInternetProtocol_Read(async_protocol, buf, 1, &cb);
ok((hres == E_PENDING && cb==0) ||
(hres == S_OK && cb==1), "Read failed: %08x (%d bytes)\n", hres, cb);
- WaitForSingleObject(event_complete, INFINITE);
- if(bindf & BINDF_FROMURLMON)
- CHECK_CALLED(Switch);
- else
- CHECK_CALLED(ReportData);
- } else {
- if(bindf & BINDF_FROMURLMON)
- CHECK_NOT_CALLED(Switch);
- else
- CHECK_NOT_CALLED(ReportData);
- if(cb == 0) break;
+ WaitForSingleObject(event_complete, INFINITE);
+ if(bindf & BINDF_FROMURLMON)
+ CHECK_CALLED(Switch);
+ else
+ CHECK_CALLED(ReportData);
+ }else {
+ if(bindf & BINDF_FROMURLMON)
+ CHECK_NOT_CALLED(Switch);
+ else
+ CHECK_NOT_CALLED(ReportData);
+ if(cb == 0) break;
+ }
}
- }
- ok(hres == S_FALSE, "Read failed: %08x\n", hres);
- CHECK_CALLED(ReportResult);
+ ok(hres == S_FALSE, "Read failed: %08x\n", hres);
+ CHECK_CALLED(ReportResult);
}
if(prot == HTTPS_TEST)
CLEAR_CALLED(ReportProgress_SENDINGREQUEST);
{'h','t','t','p',':','/','/','c','r','o','s','s','o','v','e','r','.',
'c','o','d','e','w','e','a','v','e','r','s','.','c','o','m','/',
'p','o','s','t','t','e','s','t','.','p','h','p',0};
+ static const WCHAR redirect_url[] =
+ {'h','t','t','p',':','/','/','t','e','s','t','.','w','i','n','e','h','q','.','o','r','g','/',
+ 't','e','s','t','r','e','d','i','r','e','c','t',0};
trace("Testing http protocol (not from urlmon)...\n");
bindf = BINDF_ASYNCHRONOUS | BINDF_ASYNCSTORAGE | BINDF_PULLDATA;
trace("Testing http protocol (direct read)...\n");
bindf = BINDF_ASYNCHRONOUS | BINDF_ASYNCSTORAGE | BINDF_PULLDATA | BINDF_FROMURLMON;
test_http_protocol_url(winehq_url, HTTP_TEST, TEST_DIRECT_READ);
+
+ trace("Testing http protocol (redirected)...\n");
+ bindf = BINDF_ASYNCHRONOUS | BINDF_ASYNCSTORAGE | BINDF_PULLDATA | BINDF_FROMURLMON;
+ test_http_protocol_url(redirect_url, HTTP_TEST, TEST_REDIRECT);
}
static void test_https_protocol(void)
ok(hres == S_OK, "CoInternetGetSession failed: %08x\n", hres);
if(test_flags & TEST_EMULATEPROT) {
- hres = IInternetSession_RegisterNameSpace(session, &ClassFactory, &IID_NULL, protocol_names[prot], 0, NULL, 0);
- ok(hres == S_OK, "RegisterNameSpace failed: %08x\n", hres);
+ hres = IInternetSession_RegisterNameSpace(session, &ClassFactory, &IID_NULL, protocol_names[prot], 0, NULL, 0);
+ ok(hres == S_OK, "RegisterNameSpace failed: %08x\n", hres);
}
hres = IInternetSession_CreateBinding(session, NULL, binding_urls[prot], NULL, NULL, &protocol, 0);
while(prot_state < 4) {
WaitForSingleObject(event_complete, INFINITE);
if(mimefilter_test && filtered_protocol) {
- SET_EXPECT(Continue);
+ SET_EXPECT(Continue);
IInternetProtocol_Continue(filtered_protocol, pdata);
CHECK_CALLED(Continue);
}else {
SET_EXPECT(Continue);
- IInternetProtocol_Continue(protocol, pdata);
- CHECK_CALLED(Continue);
+ IInternetProtocol_Continue(protocol, pdata);
+ CHECK_CALLED(Continue);
}
SetEvent(event_complete2);
}
if(mimefilter_test)
SET_EXPECT(MimeFilter_LockRequest);
else
- SET_EXPECT(LockRequest);
+ SET_EXPECT(LockRequest);
hres = IInternetProtocol_LockRequest(protocol, 0);
ok(hres == S_OK, "LockRequest failed: %08x\n", hres);
if(mimefilter_test)
CHECK_CALLED(MimeFilter_LockRequest);
else
- CHECK_CALLED(LockRequest);
+ CHECK_CALLED(LockRequest);
if(mimefilter_test)
SET_EXPECT(MimeFilter_UnlockRequest);
else
- SET_EXPECT(UnlockRequest);
+ SET_EXPECT(UnlockRequest);
hres = IInternetProtocol_UnlockRequest(protocol);
ok(hres == S_OK, "UnlockRequest failed: %08x\n", hres);
if(mimefilter_test)
CHECK_CALLED(MimeFilter_UnlockRequest);
else
- CHECK_CALLED(UnlockRequest);
+ CHECK_CALLED(UnlockRequest);
}
if(mimefilter_test)
SET_EXPECT(MimeFilter_Terminate);
else
- SET_EXPECT(Terminate);
+ SET_EXPECT(Terminate);
hres = IInternetProtocol_Terminate(protocol, 0);
ok(hres == S_OK, "Terminate failed: %08x\n", hres);
if(mimefilter_test)
CLEAR_CALLED(MimeFilter_Terminate);
else
- CHECK_CALLED(Terminate);
+ CHECK_CALLED(Terminate);
if(filtered_protocol)
IInternetProtocol_Release(filtered_protocol);
if(test_flags & TEST_EMULATEPROT) {
hres = IInternetSession_UnregisterNameSpace(session, &ClassFactory, protocol_names[prot]);
ok(hres == S_OK, "UnregisterNameSpace failed: %08x\n", hres);
-}
+ }
IInternetSession_Release(session);
}