urlmon/tests: Fix ftp protocol test on WinXP and higher.
This commit is contained in:
parent
5d08f3b705
commit
6d238a6f51
|
@ -352,6 +352,9 @@ static HRESULT WINAPI ProtocolSink_Switch(IInternetProtocolSink *iface, PROTOCOL
|
||||||
{
|
{
|
||||||
HRESULT hres;
|
HRESULT hres;
|
||||||
|
|
||||||
|
if(tested_protocol == FTP_TEST)
|
||||||
|
CHECK_EXPECT2(Switch);
|
||||||
|
else
|
||||||
CHECK_EXPECT(Switch);
|
CHECK_EXPECT(Switch);
|
||||||
ok(pProtocolData != NULL, "pProtocolData == NULL\n");
|
ok(pProtocolData != NULL, "pProtocolData == NULL\n");
|
||||||
|
|
||||||
|
@ -1835,23 +1838,19 @@ static void test_ftp_protocol(void)
|
||||||
(hres == S_OK && cb==1), "Read failed: %08x (%d bytes)\n", hres, cb);
|
(hres == S_OK && cb==1), "Read failed: %08x (%d bytes)\n", hres, cb);
|
||||||
|
|
||||||
WaitForSingleObject(event_complete, INFINITE);
|
WaitForSingleObject(event_complete, INFINITE);
|
||||||
CHECK_CALLED(Switch);
|
|
||||||
|
|
||||||
while(1) {
|
while(1) {
|
||||||
SET_EXPECT(Switch);
|
|
||||||
|
|
||||||
hres = IInternetProtocol_Read(async_protocol, buf, sizeof(buf), &cb);
|
hres = IInternetProtocol_Read(async_protocol, buf, sizeof(buf), &cb);
|
||||||
if(hres == E_PENDING) {
|
if(hres == E_PENDING)
|
||||||
WaitForSingleObject(event_complete, INFINITE);
|
WaitForSingleObject(event_complete, INFINITE);
|
||||||
CHECK_CALLED(Switch);
|
else
|
||||||
}else {
|
|
||||||
CHECK_NOT_CALLED(Switch);
|
|
||||||
if(cb == 0) break;
|
if(cb == 0) break;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
ok(hres == S_FALSE, "Read failed: %08x\n", hres);
|
ok(hres == S_FALSE, "Read failed: %08x\n", hres);
|
||||||
CHECK_CALLED(ReportResult);
|
CHECK_CALLED(ReportResult);
|
||||||
|
CHECK_CALLED(Switch);
|
||||||
|
|
||||||
test_protocol_terminate(async_protocol);
|
test_protocol_terminate(async_protocol);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue