urlmon/tests: Don't fail the tests if the network is unreachable.

This commit is contained in:
Alexandre Julliard 2006-09-21 11:45:32 +02:00
parent b669fcaf7b
commit 7f5b4a4602
1 changed files with 12 additions and 2 deletions

View File

@ -26,6 +26,7 @@
#include "windef.h"
#include "winbase.h"
#include "urlmon.h"
#include "wininet.h"
#include "wine/test.h"
@ -430,8 +431,12 @@ static HRESULT WINAPI statusclb_OnStopBinding(IBindStatusCallback *iface, HRESUL
{
CHECK_EXPECT(OnStopBinding);
ok(SUCCEEDED(hresult), "Download failed: %08lx\n", hresult);
ok(szError == NULL, "szError should be NULL\n");
/* ignore DNS failure */
if (hresult != HRESULT_FROM_WIN32(ERROR_INTERNET_NAME_NOT_RESOLVED))
{
ok(SUCCEEDED(hresult), "Download failed: %08lx\n", hresult);
ok(szError == NULL, "szError should be NULL\n");
}
stopped_binding = TRUE;
return S_OK;
@ -659,6 +664,11 @@ static void test_BindToStorage(void)
}
hres = IMoniker_BindToStorage(mon, bctx, NULL, &IID_IStream, (void**)&unk);
if (test_protocol == HTTP_TEST && hres == HRESULT_FROM_WIN32(ERROR_INTERNET_NAME_NOT_RESOLVED))
{
trace( "Network unreachable, skipping tests\n" );
return;
}
ok(SUCCEEDED(hres), "IMoniker_BindToStorage failed: %08lx\n", hres);
if (!SUCCEEDED(hres)) return;