winhttp/tests: Avoid crashes on some win2k systems.

This commit is contained in:
Hans Leidekker 2011-12-19 15:41:21 +01:00 committed by Alexandre Julliard
parent 969f3be73f
commit 3a204f50ae
1 changed files with 6 additions and 2 deletions

View File

@ -2524,12 +2524,14 @@ static void test_WinHttpDetectAutoProxyConfigUrl(void)
WCHAR *url;
DWORD error;
if (0) /* crashes on some win2k systems */
{
SetLastError(0xdeadbeef);
ret = WinHttpDetectAutoProxyConfigUrl( 0, NULL );
error = GetLastError();
ok( !ret, "expected failure\n" );
ok( error == ERROR_INVALID_PARAMETER, "got %u\n", error );
}
url = NULL;
SetLastError(0xdeadbeef);
ret = WinHttpDetectAutoProxyConfigUrl( 0, &url );
@ -2537,12 +2539,14 @@ static void test_WinHttpDetectAutoProxyConfigUrl(void)
ok( !ret, "expected failure\n" );
ok( error == ERROR_INVALID_PARAMETER, "got %u\n", error );
if (0) /* crashes on some win2k systems */
{
SetLastError(0xdeadbeef);
ret = WinHttpDetectAutoProxyConfigUrl( WINHTTP_AUTO_DETECT_TYPE_DNS_A, NULL );
error = GetLastError();
ok( !ret, "expected failure\n" );
ok( error == ERROR_INVALID_PARAMETER, "got %u\n", error );
}
url = NULL;
SetLastError(0xdeadbeef);
ret = WinHttpDetectAutoProxyConfigUrl( WINHTTP_AUTO_DETECT_TYPE_DNS_A, &url );