Module: wine Branch: master Commit: 63b53ff5865359e53bf348dee32be9a67880d847 URL: http://source.winehq.org/git/wine.git/?a=commit;h=63b53ff5865359e53bf348dee3...
Author: Detlef Riekenberg wine.dev@web.de Date: Thu Apr 22 00:28:54 2010 +0200
urlmon/tests: Skip protocol tests on IE 4.0.
Register the filters is not possible due to the missing functions. No tests left, so skip all of them (winetestbot W95B).
---
dlls/urlmon/tests/protocol.c | 23 +++++++++++++++++++---- 1 files changed, 19 insertions(+), 4 deletions(-)
diff --git a/dlls/urlmon/tests/protocol.c b/dlls/urlmon/tests/protocol.c index ba0c32c..19e1e98 100644 --- a/dlls/urlmon/tests/protocol.c +++ b/dlls/urlmon/tests/protocol.c @@ -29,6 +29,9 @@ #include "urlmon.h" #include "wininet.h"
+static HRESULT (WINAPI *pCoInternetGetSession)(DWORD, IInternetSession **, DWORD); +static HRESULT (WINAPI *pReleaseBindInfo)(BINDINFO*); + #define DEFINE_EXPECT(func) \ static BOOL expect_ ## func = FALSE, called_ ## func = FALSE
@@ -1318,7 +1321,7 @@ static HRESULT WINAPI ProtocolEmul_Start(IInternetProtocol *iface, LPCWSTR szUrl ok(cbindf == (bindf|BINDF_FROMURLMON), "bindf = %x, expected %x\n", cbindf, (bindf|BINDF_FROMURLMON)); ok(!memcmp(&exp_bindinfo, &bindinfo, sizeof(bindinfo)), "unexpected bindinfo\n"); - ReleaseBindInfo(&bindinfo); + pReleaseBindInfo(&bindinfo);
SET_EXPECT(ReportProgress_SENDINGREQUEST); hres = IInternetProtocolSink_ReportProgress(pOIProtSink, BINDSTATUS_SENDINGREQUEST, emptyW); @@ -2793,7 +2796,7 @@ static void test_CreateBinding(void) trace("Testing CreateBinding...\n"); init_test(BIND_TEST, TEST_BINDING);
- hres = CoInternetGetSession(0, &session, 0); + hres = pCoInternetGetSession(0, &session, 0); ok(hres == S_OK, "CoInternetGetSession failed: %08x\n", hres);
hres = IInternetSession_RegisterNameSpace(session, &ClassFactory, &IID_NULL, wsz_test, 0, NULL, 0); @@ -2932,7 +2935,7 @@ static void test_binding(int prot, DWORD grf_pi, DWORD test_flags)
init_test(prot, test_flags|TEST_BINDING);
- hres = CoInternetGetSession(0, &session, 0); + hres = pCoInternetGetSession(0, &session, 0); ok(hres == S_OK, "CoInternetGetSession failed: %08x\n", hres);
if(test_flags & TEST_EMULATEPROT) { @@ -3042,7 +3045,8 @@ static void register_filter(void)
static const WCHAR gzipW[] = {'g','z','i','p',0};
- CoInternetGetSession(0, &session, 0); + hres = pCoInternetGetSession(0, &session, 0); + ok(hres == S_OK, "CoInternetGetSession failed: %08x\n", hres);
hres = IInternetSession_RegisterMimeFilter(session, &mimefilter_cf, &IID_IInternetProtocol, gzipW); ok(hres == S_OK, "RegisterMimeFilter failed: %08x\n", hres); @@ -3052,6 +3056,17 @@ static void register_filter(void)
START_TEST(protocol) { + HMODULE hurlmon; + + hurlmon = GetModuleHandle("urlmon.dll"); + pCoInternetGetSession = (void*) GetProcAddress(hurlmon, "CoInternetGetSession"); + pReleaseBindInfo = (void*) GetProcAddress(hurlmon, "ReleaseBindInfo"); + + if (!pCoInternetGetSession || !pReleaseBindInfo) { + win_skip("Various needed functions not present in IE 4.0\n"); + return; + } + OleInitialize(NULL);
event_complete = CreateEvent(NULL, FALSE, FALSE, NULL);