winhttp/tests: Add some tests for WinHttpDetectAutoProxyConfigUrl.

This commit is contained in:
Hans Leidekker 2013-06-25 12:46:55 +02:00 committed by Alexandre Julliard
parent 725797249c
commit d285629cf4
1 changed files with 19 additions and 1 deletions

View File

@ -2679,12 +2679,30 @@ if (0) /* crashes on some win2k systems */
ok( !ret, "expected failure\n" );
ok( error == ERROR_INVALID_PARAMETER, "got %u\n", error );
}
url = NULL;
url = (WCHAR *)0xdeadbeef;
SetLastError(0xdeadbeef);
ret = WinHttpDetectAutoProxyConfigUrl( WINHTTP_AUTO_DETECT_TYPE_DNS_A, &url );
error = GetLastError();
if (!ret)
{
ok( error == ERROR_WINHTTP_AUTODETECTION_FAILED, "got %u\n", error );
ok( url == (WCHAR *)0xdeadbeef, "got %p\n", url );
}
else
{
trace("%s\n", wine_dbgstr_w(url));
GlobalFree( url );
}
url = (WCHAR *)0xdeadbeef;
SetLastError(0xdeadbeef);
ret = WinHttpDetectAutoProxyConfigUrl( WINHTTP_AUTO_DETECT_TYPE_DHCP, &url );
error = GetLastError();
if (!ret)
{
ok( error == ERROR_WINHTTP_AUTODETECTION_FAILED, "got %u\n", error );
ok( url == (WCHAR *)0xdeadbeef, "got %p\n", url );
}
else
{
trace("%s\n", wine_dbgstr_w(url));