Hans Leidekker : winhttp/tests: Fix a test failure.

Alexandre Julliard julliard at winehq.org
Thu Jan 9 16:34:29 CST 2020


Module: wine
Branch: master
Commit: 30235c0d249262269ef61deea2a99ffb1b593189
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=30235c0d249262269ef61deea2a99ffb1b593189

Author: Hans Leidekker <hans at codeweavers.com>
Date:   Thu Jan  9 14:33:06 2020 +0100

winhttp/tests: Fix a test failure.

Signed-off-by: Hans Leidekker <hans at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/winhttp/tests/winhttp.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/dlls/winhttp/tests/winhttp.c b/dlls/winhttp/tests/winhttp.c
index 3e0e8baeb9..b73c57a41d 100644
--- a/dlls/winhttp/tests/winhttp.c
+++ b/dlls/winhttp/tests/winhttp.c
@@ -3564,7 +3564,7 @@ static void test_passport_auth( int port )
          'W','W','W','-','A','u','t','h','e','n','t','i','c','a','t','e',':',' ',
          'P','a','s','s','p','o','r','t','1','.','4','\r','\n','\r','\n',0};
     HINTERNET ses, con, req;
-    DWORD status, size, option;
+    DWORD status, size, option, err;
     WCHAR buf[128];
     BOOL ret;
 
@@ -3585,8 +3585,10 @@ static void test_passport_auth( int port )
     ok( ret, "got %u\n", GetLastError() );
 
     ret = WinHttpReceiveResponse( req, NULL );
-    ok( ret || broken(!ret && GetLastError() == ERROR_WINHTTP_LOGIN_FAILURE) /* winxp */, "got %u\n", GetLastError() );
-    if (!ret && GetLastError() == ERROR_WINHTTP_LOGIN_FAILURE)
+    err = GetLastError();
+    ok( ret || broken(!ret && err == ERROR_WINHTTP_LOGIN_FAILURE) /* winxp */
+            || broken(!ret && err == ERROR_WINHTTP_INVALID_SERVER_RESPONSE ), "got %u\n", err );
+    if (!ret)
     {
         win_skip("no support for Passport redirects\n");
         goto cleanup;




More information about the wine-cvs mailing list