Commit 493a3172 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

urlmon: Skip tests on very old IEs as soon as possible.

parent f493e7e9
...@@ -317,10 +317,6 @@ static void test_CoInternetParseUrl(void) ...@@ -317,10 +317,6 @@ static void test_CoInternetParseUrl(void)
static WCHAR buf[4096]; static WCHAR buf[4096];
if (!pCoInternetParseUrl) {
return;
}
memset(buf, 0xf0, sizeof(buf)); memset(buf, 0xf0, sizeof(buf));
hres = pCoInternetParseUrl(parse_tests[0].url, PARSE_SCHEMA, 0, buf, hres = pCoInternetParseUrl(parse_tests[0].url, PARSE_SCHEMA, 0, buf,
3, &size, 0); 3, &size, 0);
...@@ -380,10 +376,6 @@ static void test_CoInternetCompareUrl(void) ...@@ -380,10 +376,6 @@ static void test_CoInternetCompareUrl(void)
{ {
HRESULT hres; HRESULT hres;
if (!pCoInternetCompareUrl) {
return;
}
hres = pCoInternetCompareUrl(url1, url1, 0); hres = pCoInternetCompareUrl(url1, url1, 0);
ok(hres == S_OK, "CoInternetCompareUrl failed: %08x\n", hres); ok(hres == S_OK, "CoInternetCompareUrl failed: %08x\n", hres);
...@@ -414,10 +406,6 @@ static void test_CoInternetQueryInfo(void) ...@@ -414,10 +406,6 @@ static void test_CoInternetQueryInfo(void)
DWORD cb, i; DWORD cb, i;
HRESULT hres; HRESULT hres;
if (!pCoInternetQueryInfo) {
return;
}
for(i=0; i < sizeof(query_info_tests)/sizeof(query_info_tests[0]); i++) { for(i=0; i < sizeof(query_info_tests)/sizeof(query_info_tests[0]); i++) {
cb = 0xdeadbeef; cb = 0xdeadbeef;
memset(buf, '?', sizeof(buf)); memset(buf, '?', sizeof(buf));
...@@ -665,10 +653,6 @@ static void test_FindMimeFromData(void) ...@@ -665,10 +653,6 @@ static void test_FindMimeFromData(void)
LPWSTR mime; LPWSTR mime;
int i; int i;
if (!pFindMimeFromData) {
return;
}
for(i=0; i<sizeof(mime_tests)/sizeof(mime_tests[0]); i++) { for(i=0; i<sizeof(mime_tests)/sizeof(mime_tests[0]); i++) {
mime = (LPWSTR)0xf0f0f0f0; mime = (LPWSTR)0xf0f0f0f0;
hres = pFindMimeFromData(NULL, mime_tests[i].url, NULL, 0, NULL, 0, &mime, 0); hres = pFindMimeFromData(NULL, mime_tests[i].url, NULL, 0, NULL, 0, &mime, 0);
...@@ -770,10 +754,6 @@ static void register_protocols(void) ...@@ -770,10 +754,6 @@ static void register_protocols(void)
static const WCHAR wszAbout[] = {'a','b','o','u','t',0}; static const WCHAR wszAbout[] = {'a','b','o','u','t',0};
if (!pCoInternetGetSession) {
return;
}
hres = pCoInternetGetSession(0, &session, 0); hres = pCoInternetGetSession(0, &session, 0);
ok(hres == S_OK, "CoInternetGetSession failed: %08x\n", hres); ok(hres == S_OK, "CoInternetGetSession failed: %08x\n", hres);
if(FAILED(hres)) if(FAILED(hres))
...@@ -947,10 +927,6 @@ static void test_NameSpace(void) ...@@ -947,10 +927,6 @@ static void test_NameSpace(void)
static const WCHAR wszTest[] = {'t','e','s','t',0}; static const WCHAR wszTest[] = {'t','e','s','t',0};
if (!pCoInternetGetSession || !pCoInternetParseUrl) {
return;
}
hres = pCoInternetGetSession(0, &session, 0); hres = pCoInternetGetSession(0, &session, 0);
ok(hres == S_OK, "CoInternetGetSession failed: %08x\n", hres); ok(hres == S_OK, "CoInternetGetSession failed: %08x\n", hres);
if(FAILED(hres)) if(FAILED(hres))
...@@ -1105,10 +1081,6 @@ static void test_MimeFilter(void) ...@@ -1105,10 +1081,6 @@ static void test_MimeFilter(void)
static const WCHAR mimeW[] = {'t','e','s','t','/','m','i','m','e',0}; static const WCHAR mimeW[] = {'t','e','s','t','/','m','i','m','e',0};
if (!pCoInternetGetSession) {
return;
}
hres = pCoInternetGetSession(0, &session, 0); hres = pCoInternetGetSession(0, &session, 0);
ok(hres == S_OK, "CoInternetGetSession failed: %08x\n", hres); ok(hres == S_OK, "CoInternetGetSession failed: %08x\n", hres);
if(FAILED(hres)) if(FAILED(hres))
...@@ -1146,10 +1118,6 @@ static void test_ReleaseBindInfo(void) ...@@ -1146,10 +1118,6 @@ static void test_ReleaseBindInfo(void)
BINDINFO bi; BINDINFO bi;
IUnknown unk = { &unk_vtbl }; IUnknown unk = { &unk_vtbl };
if (!pReleaseBindInfo) {
return;
}
pReleaseBindInfo(NULL); /* shouldn't crash */ pReleaseBindInfo(NULL); /* shouldn't crash */
memset(&bi, 0, sizeof(bi)); memset(&bi, 0, sizeof(bi));
...@@ -1183,11 +1151,6 @@ static void test_CopyStgMedium(void) ...@@ -1183,11 +1151,6 @@ static void test_CopyStgMedium(void)
static WCHAR fileW[] = {'f','i','l','e',0}; static WCHAR fileW[] = {'f','i','l','e',0};
if (!pCopyStgMedium) {
return;
}
memset(&src, 0xf0, sizeof(src)); memset(&src, 0xf0, sizeof(src));
memset(&dst, 0xe0, sizeof(dst)); memset(&dst, 0xe0, sizeof(dst));
memset(&empty, 0xf0, sizeof(empty)); memset(&empty, 0xf0, sizeof(empty));
...@@ -1231,11 +1194,6 @@ static void test_UrlMkGetSessionOption(void) ...@@ -1231,11 +1194,6 @@ static void test_UrlMkGetSessionOption(void)
DWORD encoding, size; DWORD encoding, size;
HRESULT hres; HRESULT hres;
if (!pUrlMkGetSessionOption) {
return;
}
size = encoding = 0xdeadbeef; size = encoding = 0xdeadbeef;
hres = pUrlMkGetSessionOption(URLMON_OPTION_URL_ENCODING, &encoding, hres = pUrlMkGetSessionOption(URLMON_OPTION_URL_ENCODING, &encoding,
sizeof(encoding), &size, 0); sizeof(encoding), &size, 0);
...@@ -1281,10 +1239,6 @@ static void test_user_agent(void) ...@@ -1281,10 +1239,6 @@ static void test_user_agent(void)
HRESULT hres; HRESULT hres;
DWORD size, saved; DWORD size, saved;
if (!pObtainUserAgentString || !pUrlMkGetSessionOption) {
return;
}
hres = pObtainUserAgentString(0, NULL, NULL); hres = pObtainUserAgentString(0, NULL, NULL);
ok(hres == E_INVALIDARG, "ObtainUserAgentString failed: %08x\n", hres); ok(hres == E_INVALIDARG, "ObtainUserAgentString failed: %08x\n", hres);
...@@ -1507,8 +1461,6 @@ START_TEST(misc) ...@@ -1507,8 +1461,6 @@ START_TEST(misc)
{ {
HMODULE hurlmon; HMODULE hurlmon;
OleInitialize(NULL);
hurlmon = GetModuleHandle("urlmon.dll"); hurlmon = GetModuleHandle("urlmon.dll");
pCoInternetCompareUrl = (void *) GetProcAddress(hurlmon, "CoInternetCompareUrl"); pCoInternetCompareUrl = (void *) GetProcAddress(hurlmon, "CoInternetCompareUrl");
pCoInternetGetSecurityUrl = (void*) GetProcAddress(hurlmon, "CoInternetGetSecurityUrl"); pCoInternetGetSecurityUrl = (void*) GetProcAddress(hurlmon, "CoInternetGetSecurityUrl");
...@@ -1524,8 +1476,11 @@ START_TEST(misc) ...@@ -1524,8 +1476,11 @@ START_TEST(misc)
if (!pCoInternetCompareUrl || !pCoInternetGetSecurityUrl || if (!pCoInternetCompareUrl || !pCoInternetGetSecurityUrl ||
!pCoInternetGetSession || !pCoInternetParseUrl) { !pCoInternetGetSession || !pCoInternetParseUrl) {
win_skip("Various needed functions not present in IE 4.0\n"); win_skip("Various needed functions not present in IE 4.0\n");
return;
} }
OleInitialize(NULL);
register_protocols(); register_protocols();
test_CreateFormatEnum(); test_CreateFormatEnum();
......
...@@ -349,10 +349,6 @@ static void test_polices(void) ...@@ -349,10 +349,6 @@ static void test_polices(void)
IInternetSecurityManager *secmgr = NULL; IInternetSecurityManager *secmgr = NULL;
HRESULT hres; HRESULT hres;
if(!pCoInternetCreateSecurityManager || !pCoInternetCreateZoneManager) {
return;
}
hres = pCoInternetCreateSecurityManager(NULL, &secmgr, 0); hres = pCoInternetCreateSecurityManager(NULL, &secmgr, 0);
ok(hres == S_OK, "CoInternetCreateSecurityManager failed: %08x\n", hres); ok(hres == S_OK, "CoInternetCreateSecurityManager failed: %08x\n", hres);
hres = pCoInternetCreateZoneManager(NULL, &zonemgr, 0); hres = pCoInternetCreateZoneManager(NULL, &zonemgr, 0);
...@@ -379,10 +375,6 @@ static void test_CoInternetCreateZoneManager(void) ...@@ -379,10 +375,6 @@ static void test_CoInternetCreateZoneManager(void)
IUnknown *punk = NULL; IUnknown *punk = NULL;
HRESULT hr; HRESULT hr;
if(!pCoInternetCreateZoneManager) {
return;
}
hr = pCoInternetCreateZoneManager(NULL, &zonemgr, 0); hr = pCoInternetCreateZoneManager(NULL, &zonemgr, 0);
ok(hr == S_OK, "CoInternetCreateZoneManager result: 0x%x\n", hr); ok(hr == S_OK, "CoInternetCreateZoneManager result: 0x%x\n", hr);
if (FAILED(hr)) if (FAILED(hr))
...@@ -427,10 +419,6 @@ static void test_CreateZoneEnumerator(void) ...@@ -427,10 +419,6 @@ static void test_CreateZoneEnumerator(void)
DWORD dwCount; DWORD dwCount;
DWORD dwCount2; DWORD dwCount2;
if (!pCoInternetCreateZoneManager) {
return;
}
hr = pCoInternetCreateZoneManager(NULL, &zonemgr, 0); hr = pCoInternetCreateZoneManager(NULL, &zonemgr, 0);
ok(hr == S_OK, "CoInternetCreateZoneManager result: 0x%x\n", hr); ok(hr == S_OK, "CoInternetCreateZoneManager result: 0x%x\n", hr);
if (FAILED(hr)) if (FAILED(hr))
...@@ -641,10 +629,6 @@ static void test_InternetSecurityMarshalling(void) ...@@ -641,10 +629,6 @@ static void test_InternetSecurityMarshalling(void)
IStream *stream; IStream *stream;
HRESULT hres; HRESULT hres;
if(!pCoInternetCreateSecurityManager) {
return;
}
hres = pCoInternetCreateSecurityManager(NULL, &secmgr, 0); hres = pCoInternetCreateSecurityManager(NULL, &secmgr, 0);
ok(hres == S_OK, "CoInternetCreateSecurityManager failed: %08x\n", hres); ok(hres == S_OK, "CoInternetCreateSecurityManager failed: %08x\n", hres);
if(FAILED(hres)) if(FAILED(hres))
...@@ -680,10 +664,6 @@ static void test_InternetGetSecurityUrl(void) ...@@ -680,10 +664,6 @@ static void test_InternetGetSecurityUrl(void)
DWORD i; DWORD i;
HRESULT hres; HRESULT hres;
if (!pCoInternetGetSecurityUrl) {
return;
}
for(i=0; i<sizeof(in)/sizeof(WCHAR*); i++) { for(i=0; i<sizeof(in)/sizeof(WCHAR*); i++) {
hres = pCoInternetGetSecurityUrl(in[i], &sec, PSU_DEFAULT, 0); hres = pCoInternetGetSecurityUrl(in[i], &sec, PSU_DEFAULT, 0);
ok(hres == S_OK, "(%d) CoInternetGetSecurityUrl returned: %08x\n", i, hres); ok(hres == S_OK, "(%d) CoInternetGetSecurityUrl returned: %08x\n", i, hres);
...@@ -708,8 +688,6 @@ START_TEST(sec_mgr) ...@@ -708,8 +688,6 @@ START_TEST(sec_mgr)
{ {
HMODULE hurlmon; HMODULE hurlmon;
OleInitialize(NULL);
hurlmon = GetModuleHandle("urlmon.dll"); hurlmon = GetModuleHandle("urlmon.dll");
pCoInternetCreateSecurityManager = (void*) GetProcAddress(hurlmon, "CoInternetCreateSecurityManager"); pCoInternetCreateSecurityManager = (void*) GetProcAddress(hurlmon, "CoInternetCreateSecurityManager");
pCoInternetCreateZoneManager = (void*) GetProcAddress(hurlmon, "CoInternetCreateZoneManager"); pCoInternetCreateZoneManager = (void*) GetProcAddress(hurlmon, "CoInternetCreateZoneManager");
...@@ -718,8 +696,11 @@ START_TEST(sec_mgr) ...@@ -718,8 +696,11 @@ START_TEST(sec_mgr)
if (!pCoInternetCreateSecurityManager || !pCoInternetCreateZoneManager || if (!pCoInternetCreateSecurityManager || !pCoInternetCreateZoneManager ||
!pCoInternetGetSecurityUrl) { !pCoInternetGetSecurityUrl) {
win_skip("Various CoInternet* functions not present in IE 4.0\n"); win_skip("Various CoInternet* functions not present in IE 4.0\n");
return;
} }
OleInitialize(NULL);
test_InternetGetSecurityUrl(); test_InternetGetSecurityUrl();
test_SecurityManager(); test_SecurityManager();
test_polices(); test_polices();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment