Commit 354f97df authored by Huw Davies's avatar Huw Davies Committed by Alexandre Julliard

wininet: Add tests for querying INTERNET_OPTION_MAX_CONNS_PER_SERVER and…

wininet: Add tests for querying INTERNET_OPTION_MAX_CONNS_PER_SERVER and INTERNET_OPTION_MAX_CONNS_PER_1_0_SERVER and fix typo in the implementation.
parent bee48efd
......@@ -2305,7 +2305,7 @@ DWORD INET_QueryOption(object_header_t *hdr, DWORD option, void *buffer, DWORD *
if (*size < sizeof(ULONG))
return ERROR_INSUFFICIENT_BUFFER;
*(ULONG*)size = 4;
*(ULONG*)buffer = 4;
*size = sizeof(ULONG);
return ERROR_SUCCESS;
......
......@@ -164,7 +164,7 @@ static void test_InternetCanonicalizeUrlA(void)
static void test_InternetQueryOptionA(void)
{
HINTERNET hinet,hurl;
DWORD len;
DWORD len, val;
DWORD err;
static const char useragent[] = {"Wininet Test"};
char *buffer;
......@@ -248,6 +248,19 @@ static void test_InternetQueryOptionA(void)
ok(err == ERROR_INSUFFICIENT_BUFFER, "Got wrong error code%d\n",err);
InternetCloseHandle(hinet);
len = sizeof(val);
retval = InternetQueryOptionA(NULL, INTERNET_OPTION_MAX_CONNS_PER_SERVER, &val, &len);
ok(retval == TRUE,"Got wrong return value %d\n", retval);
ok(len == sizeof(val), "got %d\n", len);
ok(val == 2, "got %d\n", val);
len = sizeof(val);
retval = InternetQueryOptionA(NULL, INTERNET_OPTION_MAX_CONNS_PER_1_0_SERVER, &val, &len);
ok(retval == TRUE,"Got wrong return value %d\n", retval);
ok(len == sizeof(val), "got %d\n", len);
ok(val == 4, "got %d\n", val);
}
static void test_get_cookie(void)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment