winhttp/tests: Make sure proxy settings are restored.
Hans Leidekker
hans at codeweavers.com
Fri Dec 21 06:55:41 CST 2012
---
dlls/winhttp/tests/winhttp.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/dlls/winhttp/tests/winhttp.c b/dlls/winhttp/tests/winhttp.c
index 5fcdef6..05e7804 100644
--- a/dlls/winhttp/tests/winhttp.c
+++ b/dlls/winhttp/tests/winhttp.c
@@ -1070,23 +1070,23 @@ static void test_set_default_proxy_config(void)
info.lpszProxy = wideString;
SetLastError(0xdeadbeef);
ret = WinHttpSetDefaultProxyConfiguration(&info);
- ok((!ret && GetLastError() == ERROR_INVALID_PARAMETER) ||
- broken(ret), /* Earlier winhttp versions on W2K/XP */
- "expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
+ if (!ret && GetLastError() == ERROR_ACCESS_DENIED)
+ skip("couldn't set default proxy configuration: access denied\n");
+ else
+ ok((!ret && GetLastError() == ERROR_INVALID_PARAMETER) ||
+ broken(ret), /* Earlier winhttp versions on W2K/XP */
+ "expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
info.lpszProxy = normalString;
SetLastError(0xdeadbeef);
ret = WinHttpSetDefaultProxyConfiguration(&info);
- if (ret)
- {
- ok(ret, "always true\n");
- set_default_proxy_reg_value( saved_proxy_settings, len, type );
- }
- else if (GetLastError() == ERROR_ACCESS_DENIED)
+ if (!ret && GetLastError() == ERROR_ACCESS_DENIED)
skip("couldn't set default proxy configuration: access denied\n");
else
ok(ret, "WinHttpSetDefaultProxyConfiguration failed: %d\n",
GetLastError());
+
+ set_default_proxy_reg_value( saved_proxy_settings, len, type );
}
static void test_Timeouts (void)
--
1.7.10.4
More information about the wine-patches
mailing list