From 7f5b4a4602ef6899b3ee23bfca8fb7fdec79c807 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Thu, 21 Sep 2006 11:45:32 +0200 Subject: [PATCH] urlmon/tests: Don't fail the tests if the network is unreachable. --- dlls/urlmon/tests/url.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/dlls/urlmon/tests/url.c b/dlls/urlmon/tests/url.c index d9ba6a6e180..282c311ed0e 100644 --- a/dlls/urlmon/tests/url.c +++ b/dlls/urlmon/tests/url.c @@ -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;