Juan Lang : wininet: Fix tests when running behind a proxy server.

Alexandre Julliard julliard at winehq.org
Fri Jul 10 08:52:03 CDT 2009


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

Author: Juan Lang <juan.lang at gmail.com>
Date:   Thu Jul  9 10:19:00 2009 -0700

wininet: Fix tests when running behind a proxy server.

---

 dlls/wininet/tests/http.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/dlls/wininet/tests/http.c b/dlls/wininet/tests/http.c
index bf6ca02..b11cb2c 100644
--- a/dlls/wininet/tests/http.c
+++ b/dlls/wininet/tests/http.c
@@ -1788,7 +1788,12 @@ static void test_proxy_indirect(int port)
 
     sz = sizeof buffer;
     r = HttpQueryInfo(hr, HTTP_QUERY_PROXY_AUTHENTICATE, buffer, &sz, NULL);
-    ok(r, "HttpQueryInfo failed\n");
+    ok(r || GetLastError() == ERROR_HTTP_HEADER_NOT_FOUND, "HttpQueryInfo failed: %d\n", GetLastError());
+    if (!r)
+    {
+        skip("missing proxy header, not testing remaining proxy headers\n");
+        goto out;
+    }
     ok(!strcmp(buffer, "Basic realm=\"placebo\""), "proxy auth info wrong\n");
 
     sz = sizeof buffer;
@@ -1821,6 +1826,7 @@ static void test_proxy_indirect(int port)
     ok(GetLastError() == ERROR_HTTP_HEADER_NOT_FOUND, "HttpQueryInfo should fail\n");
     ok(r == FALSE, "HttpQueryInfo failed\n");
 
+out:
     InternetCloseHandle(hr);
     InternetCloseHandle(hc);
     InternetCloseHandle(hi);




More information about the wine-cvs mailing list