From 8d2ce074bbc75c9efab6070544f4eb831a3db339 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Wed, 25 Mar 2009 11:55:17 +0100 Subject: [PATCH] wininet/tests: Fix the http tests for the new winehq.org behavior. --- dlls/wininet/tests/http.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/dlls/wininet/tests/http.c b/dlls/wininet/tests/http.c index 193c446b818..27e393b2275 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; } -- 2.11.4.GIT