[PATCH] wininet/tests: Fix an InternetQueryOptionA/W mixup in test_secure_connection().

Francois Gouget fgouget at codeweavers.com
Sun Jun 6 08:37:25 CDT 2021


The point of the test is to prove that InternetQueryOptionW() can be
called on a request obtained with HttpOpenRequestA() and still returns 
ANSI strings.

Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
---
The validity of this test is a bit questionable due to failures on
Windows 10 1709+. But these failures are caused by interference from
urlmon:url so it cannot be dismissed outright (see bug 51227).
https://bugs.winehq.org/show_bug.cgi?id=51227
---
 dlls/wininet/tests/http.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/wininet/tests/http.c b/dlls/wininet/tests/http.c
index a5f5215f584..d4845188d39 100644
--- a/dlls/wininet/tests/http.c
+++ b/dlls/wininet/tests/http.c
@@ -6734,7 +6734,7 @@ static void test_secure_connection(void)
     test_cert_struct(req, &test_winehq_org_cert);
 
     /* Querying the same option through InternetQueryOptionW still results in
-     * ASCII strings being returned.
+     * ANSI strings being returned.
      */
     size = 0;
     ret = InternetQueryOptionW(req, INTERNET_OPTION_SECURITY_CERTIFICATE_STRUCT,
@@ -6742,7 +6742,7 @@ static void test_secure_connection(void)
     ok(ret || GetLastError() == ERROR_INSUFFICIENT_BUFFER, "InternetQueryOption failed: %d\n", GetLastError());
     ok(size == sizeof(INTERNET_CERTIFICATE_INFOW), "size = %d\n", size);
     certificate_structW = HeapAlloc(GetProcessHeap(), 0, size);
-    ret = InternetQueryOptionA(req, INTERNET_OPTION_SECURITY_CERTIFICATE_STRUCT,
+    ret = InternetQueryOptionW(req, INTERNET_OPTION_SECURITY_CERTIFICATE_STRUCT,
                               certificate_structW, &size);
     certificate_structA = (INTERNET_CERTIFICATE_INFOA *)certificate_structW;
     ok(ret, "InternetQueryOption failed: %d\n", GetLastError());
-- 
2.20.1



More information about the wine-devel mailing list