Ge van Geldorp : urlmon/tests: Fix ftp protocol test on WinXP and higher.

Alexandre Julliard julliard at winehq.org
Mon Mar 30 12:08:46 CDT 2009


Module: wine
Branch: master
Commit: 6d238a6f5178fd470fd04a5a0f09bb1636de0ea3
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=6d238a6f5178fd470fd04a5a0f09bb1636de0ea3

Author: Ge van Geldorp <ge at gse.nl>
Date:   Mon Mar 30 00:41:54 2009 +0200

urlmon/tests: Fix ftp protocol test on WinXP and higher.

---

 dlls/urlmon/tests/protocol.c |   15 +++++++--------
 1 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/dlls/urlmon/tests/protocol.c b/dlls/urlmon/tests/protocol.c
index 9a488c0..c87c7fb 100644
--- a/dlls/urlmon/tests/protocol.c
+++ b/dlls/urlmon/tests/protocol.c
@@ -352,7 +352,10 @@ static HRESULT WINAPI ProtocolSink_Switch(IInternetProtocolSink *iface, PROTOCOL
 {
     HRESULT hres;
 
-    CHECK_EXPECT(Switch);
+    if(tested_protocol == FTP_TEST)
+      CHECK_EXPECT2(Switch);
+    else
+      CHECK_EXPECT(Switch);
     ok(pProtocolData != NULL, "pProtocolData == NULL\n");
 
     pdata = pProtocolData;
@@ -1835,23 +1838,19 @@ static void test_ftp_protocol(void)
        (hres == S_OK && cb==1), "Read failed: %08x (%d bytes)\n", hres, cb);
 
     WaitForSingleObject(event_complete, INFINITE);
-    CHECK_CALLED(Switch);
 
     while(1) {
-        SET_EXPECT(Switch);
 
         hres = IInternetProtocol_Read(async_protocol, buf, sizeof(buf), &cb);
-        if(hres == E_PENDING) {
+        if(hres == E_PENDING)
             WaitForSingleObject(event_complete, INFINITE);
-            CHECK_CALLED(Switch);
-        }else {
-            CHECK_NOT_CALLED(Switch);
+        else
             if(cb == 0) break;
-        }
     }
 
     ok(hres == S_FALSE, "Read failed: %08x\n", hres);
     CHECK_CALLED(ReportResult);
+    CHECK_CALLED(Switch);
 
     test_protocol_terminate(async_protocol);
 




More information about the wine-cvs mailing list