Module: wine Branch: master Commit: 7f5b4a4602ef6899b3ee23bfca8fb7fdec79c807 URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=7f5b4a4602ef6899b3ee23bf...
Author: Alexandre Julliard julliard@winehq.org Date: Thu Sep 21 11:45:32 2006 +0200
urlmon/tests: Don't fail the tests if the network is unreachable.
---
dlls/urlmon/tests/url.c | 14 ++++++++++++-- 1 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/dlls/urlmon/tests/url.c b/dlls/urlmon/tests/url.c index d9ba6a6..282c311 100644 --- a/dlls/urlmon/tests/url.c +++ b/dlls/urlmon/tests/url.c @@ -26,6 +26,7 @@ #define COBJMACROS #include "windef.h" #include "winbase.h" #include "urlmon.h" +#include "wininet.h"
#include "wine/test.h"
@@ -430,8 +431,12 @@ static HRESULT WINAPI statusclb_OnStopBi { 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;