[1/4] winhttp/tests: Accept Windows7 return value for WinHttpQueryOption(WINHTTP_OPTION_CONNECTION_INFO).

Dmitry Timoshkov dmitry at baikal.ru
Fri Dec 4 03:14:05 CST 2015


Windows7 doesn't include the size of info.cbSize field in the returned
'size' value.

Signed-off-by: Dmitry Timoshkov <dmitry at baikal.ru>
---
 dlls/winhttp/tests/winhttp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/winhttp/tests/winhttp.c b/dlls/winhttp/tests/winhttp.c
index bd6b47f..d6b4649 100644
--- a/dlls/winhttp/tests/winhttp.c
+++ b/dlls/winhttp/tests/winhttp.c
@@ -2903,7 +2903,7 @@ static void test_connection_info( int port )
     memset( &info, 0, sizeof(info) );
     ret = WinHttpQueryOption( req, WINHTTP_OPTION_CONNECTION_INFO, &info, &size );
     ok( ret, "failed to retrieve connection info %u\n", GetLastError() );
-    ok( info.cbSize == sizeof(info), "wrong size %u\n", info.cbSize );
+    ok( info.cbSize == sizeof(info) || info.cbSize == sizeof(info) - sizeof(info.cbSize) /* Win7 */, "wrong size %u\n", info.cbSize );
 
     ret = WinHttpReceiveResponse( req, NULL );
     ok( ret, "failed to receive response %u\n", GetLastError() );
@@ -2912,7 +2912,7 @@ static void test_connection_info( int port )
     memset( &info, 0, sizeof(info) );
     ret = WinHttpQueryOption( req, WINHTTP_OPTION_CONNECTION_INFO, &info, &size );
     ok( ret, "failed to retrieve connection info %u\n", GetLastError() );
-    ok( info.cbSize == sizeof(info), "wrong size %u\n", info.cbSize );
+    ok( info.cbSize == sizeof(info) || info.cbSize == sizeof(info) - sizeof(info.cbSize) /* Win7 */, "wrong size %u\n", info.cbSize );
 
     WinHttpCloseHandle( req );
     WinHttpCloseHandle( con );
-- 
2.6.3




More information about the wine-patches mailing list