winhttp/tests: Fix test error when run as non-administrator

Paul Vriens at
Tue Dec 8 01:10:20 CST 2009

On 12/08/2009 12:58 AM, Juan Lang wrote:
> -    ok(ret, "WinHttpSetDefaultProxyConfiguration failed: %d\n", GetLastError());
> +    ok(ret || GetLastError() == ERROR_ACCESS_DENIED,
> +       "WinHttpSetDefaultProxyConfiguration failed: %d\n", GetLastError());
> -    set_default_proxy_reg_value( saved_proxy_settings, len, type );
> +    if (ret)
> +        set_default_proxy_reg_value( saved_proxy_settings, len, type );
>   }

Hi Juan,

I'm not a big fan of this. In theory we can now mess up our 
implementation and return ERROR_ACCESS_DENIED without knowing that 
something is wrong as the tests will still succeed.

I agree that ERROR_ACCESS_DENIED is a valid return value but I'd rather 
have some win_skip() or at least a skip() in there. win_skip() will work 
fine right now but as soon as we implement access rights to the registry 
(and multi-user) it should probably be a skip().



More information about the wine-devel mailing list