From 1becda464de4a12e66cfc4128fffd6de9044cb0c Mon Sep 17 00:00:00 2001 From: Juan Lang Date: Tue, 8 Dec 2009 09:47:08 -0800 Subject: [PATCH] winhttp: Fix test error when run as non-administrator. --- dlls/winhttp/tests/winhttp.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/dlls/winhttp/tests/winhttp.c b/dlls/winhttp/tests/winhttp.c index fe9bb051d7..2810fbb2ce 100644 --- a/dlls/winhttp/tests/winhttp.c +++ b/dlls/winhttp/tests/winhttp.c @@ -1000,9 +1000,16 @@ static void test_set_default_proxy_config(void) info.lpszProxy = normalString; SetLastError(0xdeadbeef); ret = WinHttpSetDefaultProxyConfiguration(&info); - ok(ret, "WinHttpSetDefaultProxyConfiguration failed: %d\n", GetLastError()); - - set_default_proxy_reg_value( saved_proxy_settings, len, type ); + if (ret) + { + 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"); + else + ok(ret, "WinHttpSetDefaultProxyConfiguration failed: %d\n", + GetLastError()); } START_TEST (winhttp) -- 2.32.0.93.g670b81a890