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.
This commit is contained in:
parent
bee48efdce
commit
354f97dff8
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue