Alexandre Julliard : wininet/tests: Fix the http tests for the new winehq. org behavior.

Alexandre Julliard julliard at winehq.org
Wed Mar 25 10:31:30 CDT 2009


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

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Wed Mar 25 11:55:17 2009 +0100

wininet/tests: Fix the http tests for the new winehq.org behavior.

---

 dlls/wininet/tests/http.c |   15 ++++++++++-----
 1 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/dlls/wininet/tests/http.c b/dlls/wininet/tests/http.c
index 193c446..27e393b 100644
--- a/dlls/wininet/tests/http.c
+++ b/dlls/wininet/tests/http.c
@@ -84,7 +84,8 @@ static BOOL first_connection_to_test_url = TRUE;
 
 #define CHECK_NOTIFIED2(status, num) \
     do { \
-        ok(notified[status] == (num), "expected status %d (%s) %d times, received %d times\n", \
+        ok(notified[status] + optional[status] == (num), \
+           "expected status %d (%s) %d times, received %d times\n", \
            status, status < MAX_INTERNET_STATUS && status_string[status][0] != 0 ? \
            status_string[status] : "unknown", (num), notified[status]); \
         CLEAR_NOTIFIED(status);                                         \
@@ -349,12 +350,12 @@ static void InternetReadFile_test(int flags)
     if (flags & INTERNET_FLAG_ASYNC)
         WaitForSingleObject(hCompleteEvent, INFINITE);
 
-    todo_wine if (first_connection_to_test_url)
+    if (first_connection_to_test_url)
     {
         CHECK_NOTIFIED(INTERNET_STATUS_RESOLVING_NAME);
         CHECK_NOTIFIED(INTERNET_STATUS_NAME_RESOLVED);
     }
-    else
+    else todo_wine
     {
         CHECK_NOT_NOTIFIED(INTERNET_STATUS_RESOLVING_NAME);
         CHECK_NOT_NOTIFIED(INTERNET_STATUS_NAME_RESOLVED);
@@ -446,8 +447,8 @@ static void InternetReadFile_test(int flags)
         if (length == 0)
             break;
     }
-    todo_wine CHECK_NOTIFIED2(INTERNET_STATUS_CLOSING_CONNECTION, 2);
-    todo_wine CHECK_NOTIFIED2(INTERNET_STATUS_CONNECTION_CLOSED, 2);
+    CHECK_NOTIFIED2(INTERNET_STATUS_CLOSING_CONNECTION, 2);
+    CHECK_NOTIFIED2(INTERNET_STATUS_CONNECTION_CLOSED, 2);
 abort:
     trace("aborting\n");
     SET_EXPECT2(INTERNET_STATUS_HANDLE_CLOSING, (hor != 0x0) + (hic != 0x0));
@@ -754,8 +755,12 @@ abort:
           Sleep(100);
       CHECK_NOTIFIED2(INTERNET_STATUS_HANDLE_CLOSING, (hor != 0x0) + (hic != 0x0));
     }
+    /* to enable once Wine is fixed to never send it
     CHECK_NOT_NOTIFIED(INTERNET_STATUS_CLOSING_CONNECTION);
     CHECK_NOT_NOTIFIED(INTERNET_STATUS_CONNECTION_CLOSED);
+    */
+    CLEAR_NOTIFIED(INTERNET_STATUS_CLOSING_CONNECTION);
+    CLEAR_NOTIFIED(INTERNET_STATUS_CONNECTION_CLOSED);
     CloseHandle(hCompleteEvent);
     first_connection_to_test_url = FALSE;
 }




More information about the wine-cvs mailing list