winhttp/tests: Make sure proxy settings are restored.
This commit is contained in:
parent
6e38d5beef
commit
ec1ae3b6e6
@ -1070,6 +1070,9 @@ static void test_set_default_proxy_config(void)
|
|||||||
info.lpszProxy = wideString;
|
info.lpszProxy = wideString;
|
||||||
SetLastError(0xdeadbeef);
|
SetLastError(0xdeadbeef);
|
||||||
ret = WinHttpSetDefaultProxyConfiguration(&info);
|
ret = WinHttpSetDefaultProxyConfiguration(&info);
|
||||||
|
if (!ret && GetLastError() == ERROR_ACCESS_DENIED)
|
||||||
|
skip("couldn't set default proxy configuration: access denied\n");
|
||||||
|
else
|
||||||
ok((!ret && GetLastError() == ERROR_INVALID_PARAMETER) ||
|
ok((!ret && GetLastError() == ERROR_INVALID_PARAMETER) ||
|
||||||
broken(ret), /* Earlier winhttp versions on W2K/XP */
|
broken(ret), /* Earlier winhttp versions on W2K/XP */
|
||||||
"expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
|
"expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
|
||||||
@ -1077,16 +1080,13 @@ static void test_set_default_proxy_config(void)
|
|||||||
info.lpszProxy = normalString;
|
info.lpszProxy = normalString;
|
||||||
SetLastError(0xdeadbeef);
|
SetLastError(0xdeadbeef);
|
||||||
ret = WinHttpSetDefaultProxyConfiguration(&info);
|
ret = WinHttpSetDefaultProxyConfiguration(&info);
|
||||||
if (ret)
|
if (!ret && GetLastError() == ERROR_ACCESS_DENIED)
|
||||||
{
|
|
||||||
ok(ret, "always true\n");
|
|
||||||
set_default_proxy_reg_value( saved_proxy_settings, len, type );
|
|
||||||
}
|
|
||||||
else if (GetLastError() == ERROR_ACCESS_DENIED)
|
|
||||||
skip("couldn't set default proxy configuration: access denied\n");
|
skip("couldn't set default proxy configuration: access denied\n");
|
||||||
else
|
else
|
||||||
ok(ret, "WinHttpSetDefaultProxyConfiguration failed: %d\n",
|
ok(ret, "WinHttpSetDefaultProxyConfiguration failed: %d\n",
|
||||||
GetLastError());
|
GetLastError());
|
||||||
|
|
||||||
|
set_default_proxy_reg_value( saved_proxy_settings, len, type );
|
||||||
}
|
}
|
||||||
|
|
||||||
static void test_Timeouts (void)
|
static void test_Timeouts (void)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user