Commit 29ea2075 authored by Detlef Riekenberg's avatar Detlef Riekenberg Committed by Alexandre Julliard

urlmon/tests: Skip some sec_mgr tests on IE 4.0.

CoInternetCreateSecurityManager, CoInternetCreateZoneManager, CoInternetGetSecurityUrl missing on IE 4.0 (winetestbot W95B).
parent 4bd87b9d
...@@ -35,6 +35,9 @@ ...@@ -35,6 +35,9 @@
#include "initguid.h" #include "initguid.h"
static HRESULT (WINAPI *pCoInternetCreateSecurityManager)(IServiceProvider *, IInternetSecurityManager**, DWORD);
static HRESULT (WINAPI *pCoInternetCreateZoneManager)(IServiceProvider *, IInternetZoneManager**, DWORD);
static HRESULT (WINAPI *pCoInternetGetSecurityUrl)(LPCWSTR, LPWSTR*, PSUACTION, DWORD); static HRESULT (WINAPI *pCoInternetGetSecurityUrl)(LPCWSTR, LPWSTR*, PSUACTION, DWORD);
static const WCHAR url1[] = {'r','e','s',':','/','/','m','s','h','t','m','l','.','d','l','l', static const WCHAR url1[] = {'r','e','s',':','/','/','m','s','h','t','m','l','.','d','l','l',
...@@ -109,7 +112,11 @@ static void test_SecurityManager(void) ...@@ -109,7 +112,11 @@ static void test_SecurityManager(void)
DWORD zone, size, policy; DWORD zone, size, policy;
HRESULT hres; HRESULT hres;
hres = CoInternetCreateSecurityManager(NULL, &secmgr, 0); if(!pCoInternetCreateSecurityManager) {
return;
}
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))
return; return;
...@@ -342,9 +349,13 @@ static void test_polices(void) ...@@ -342,9 +349,13 @@ static void test_polices(void)
IInternetSecurityManager *secmgr = NULL; IInternetSecurityManager *secmgr = NULL;
HRESULT hres; HRESULT hres;
hres = CoInternetCreateSecurityManager(NULL, &secmgr, 0); if(!pCoInternetCreateSecurityManager || !pCoInternetCreateZoneManager) {
return;
}
hres = pCoInternetCreateSecurityManager(NULL, &secmgr, 0);
ok(hres == S_OK, "CoInternetCreateSecurityManager failed: %08x\n", hres); ok(hres == S_OK, "CoInternetCreateSecurityManager failed: %08x\n", hres);
hres = CoInternetCreateZoneManager(NULL, &zonemgr, 0); hres = pCoInternetCreateZoneManager(NULL, &zonemgr, 0);
ok(hres == S_OK, "CoInternetCreateZoneManager failed: %08x\n", hres); ok(hres == S_OK, "CoInternetCreateZoneManager failed: %08x\n", hres);
test_url_action(secmgr, zonemgr, URLACTION_SCRIPT_RUN); test_url_action(secmgr, zonemgr, URLACTION_SCRIPT_RUN);
...@@ -368,7 +379,11 @@ static void test_CoInternetCreateZoneManager(void) ...@@ -368,7 +379,11 @@ static void test_CoInternetCreateZoneManager(void)
IUnknown *punk = NULL; IUnknown *punk = NULL;
HRESULT hr; HRESULT hr;
hr = CoInternetCreateZoneManager(NULL, &zonemgr, 0); if(!pCoInternetCreateZoneManager) {
return;
}
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))
return; return;
...@@ -412,7 +427,11 @@ static void test_CreateZoneEnumerator(void) ...@@ -412,7 +427,11 @@ static void test_CreateZoneEnumerator(void)
DWORD dwCount; DWORD dwCount;
DWORD dwCount2; DWORD dwCount2;
hr = CoInternetCreateZoneManager(NULL, &zonemgr, 0); if (!pCoInternetCreateZoneManager) {
return;
}
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))
return; return;
...@@ -478,7 +497,7 @@ static void test_GetZoneActionPolicy(void) ...@@ -478,7 +497,7 @@ static void test_GetZoneActionPolicy(void)
HRESULT hres; HRESULT hres;
DWORD action = URLACTION_CREDENTIALS_USE; /* Implemented on all IE versions */ DWORD action = URLACTION_CREDENTIALS_USE; /* Implemented on all IE versions */
hres = CoInternetCreateZoneManager(NULL, &zonemgr, 0); hres = pCoInternetCreateZoneManager(NULL, &zonemgr, 0);
ok(hres == S_OK, "CoInternetCreateZoneManager failed: %08x\n", hres); ok(hres == S_OK, "CoInternetCreateZoneManager failed: %08x\n", hres);
if(FAILED(hres)) if(FAILED(hres))
return; return;
...@@ -521,7 +540,7 @@ static void test_GetZoneAt(void) ...@@ -521,7 +540,7 @@ static void test_GetZoneAt(void)
DWORD dwZone; DWORD dwZone;
DWORD i; DWORD i;
hr = CoInternetCreateZoneManager(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))
return; return;
...@@ -569,7 +588,7 @@ static void test_GetZoneAttributes(void) ...@@ -569,7 +588,7 @@ static void test_GetZoneAttributes(void)
HRESULT hr; HRESULT hr;
DWORD i; DWORD i;
hr = CoInternetCreateZoneManager(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))
return; return;
...@@ -622,7 +641,12 @@ static void test_InternetSecurityMarshalling(void) ...@@ -622,7 +641,12 @@ static void test_InternetSecurityMarshalling(void)
IStream *stream; IStream *stream;
HRESULT hres; HRESULT hres;
hres = CoInternetCreateSecurityManager(NULL, &secmgr, 0); if(!pCoInternetCreateSecurityManager) {
return;
}
hres = pCoInternetCreateSecurityManager(NULL, &secmgr, 0);
ok(hres == S_OK, "CoInternetCreateSecurityManager failed: %08x\n", hres);
if(FAILED(hres)) if(FAILED(hres))
return; return;
...@@ -657,7 +681,6 @@ static void test_InternetGetSecurityUrl(void) ...@@ -657,7 +681,6 @@ static void test_InternetGetSecurityUrl(void)
HRESULT hres; HRESULT hres;
if (!pCoInternetGetSecurityUrl) { if (!pCoInternetGetSecurityUrl) {
win_skip("CoInternetGetSecurityUrl not found\n");
return; return;
} }
...@@ -688,8 +711,15 @@ START_TEST(sec_mgr) ...@@ -688,8 +711,15 @@ START_TEST(sec_mgr)
OleInitialize(NULL); OleInitialize(NULL);
hurlmon = GetModuleHandle("urlmon.dll"); hurlmon = GetModuleHandle("urlmon.dll");
pCoInternetCreateSecurityManager = (void*) GetProcAddress(hurlmon, "CoInternetCreateSecurityManager");
pCoInternetCreateZoneManager = (void*) GetProcAddress(hurlmon, "CoInternetCreateZoneManager");
pCoInternetGetSecurityUrl = (void*) GetProcAddress(hurlmon, "CoInternetGetSecurityUrl"); pCoInternetGetSecurityUrl = (void*) GetProcAddress(hurlmon, "CoInternetGetSecurityUrl");
if (!pCoInternetCreateSecurityManager || !pCoInternetCreateZoneManager ||
!pCoInternetGetSecurityUrl) {
win_skip("Various CoInternet* functions not present in IE 4.0\n");
}
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