Commit 628a8743 authored by Huw Davies's avatar Huw Davies Committed by Alexandre Julliard

ole32/tests: Fix tests on systems without IE installed.

parent 82f175e9
...@@ -253,6 +253,13 @@ static void test_CoCreateInstance(void) ...@@ -253,6 +253,13 @@ static void test_CoCreateInstance(void)
OleInitialize(NULL); OleInitialize(NULL);
hr = CoCreateInstance(rclsid, NULL, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void **)&pUnk); hr = CoCreateInstance(rclsid, NULL, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void **)&pUnk);
if(hr == REGDB_E_CLASSNOTREG)
{
skip("IE not installed so can't test CoCreateInstance\n");
OleUninitialize();
return;
}
ok_ole_success(hr, "CoCreateInstance"); ok_ole_success(hr, "CoCreateInstance");
if(pUnk) IUnknown_Release(pUnk); if(pUnk) IUnknown_Release(pUnk);
OleUninitialize(); OleUninitialize();
...@@ -325,8 +332,13 @@ static void test_CoGetClassObject(void) ...@@ -325,8 +332,13 @@ static void test_CoGetClassObject(void)
pUnk = (IUnknown *)0xdeadbeef; pUnk = (IUnknown *)0xdeadbeef;
hr = CoGetClassObject(rclsid, CLSCTX_INPROC_SERVER, NULL, &IID_IUnknown, (void **)&pUnk); hr = CoGetClassObject(rclsid, CLSCTX_INPROC_SERVER, NULL, &IID_IUnknown, (void **)&pUnk);
ok(hr == S_OK, "CoGetClassObject should have returned S_OK instead of 0x%08x\n", hr); if(hr == REGDB_E_CLASSNOTREG)
if (pUnk) IUnknown_Release(pUnk); skip("IE not installed so can't test CoGetClassObject\n");
else
{
ok(hr == S_OK, "CoGetClassObject should have returned S_OK instead of 0x%08x\n", hr);
if (pUnk) IUnknown_Release(pUnk);
}
SetEvent(info.stop); SetEvent(info.stop);
WaitForSingleObject(thread, INFINITE); WaitForSingleObject(thread, INFINITE);
...@@ -1030,7 +1042,7 @@ static void test_CoFreeUnusedLibraries(void) ...@@ -1030,7 +1042,7 @@ static void test_CoFreeUnusedLibraries(void)
hr = CoCreateInstance(&CLSID_FileProtocol, NULL, CLSCTX_INPROC_SERVER, &IID_IInternetProtocol, (void **)&pUnk); hr = CoCreateInstance(&CLSID_FileProtocol, NULL, CLSCTX_INPROC_SERVER, &IID_IInternetProtocol, (void **)&pUnk);
if (hr == REGDB_E_CLASSNOTREG) if (hr == REGDB_E_CLASSNOTREG)
{ {
trace("IE not installed so can't run CoFreeUnusedLibraries test\n"); skip("IE not installed so can't run CoFreeUnusedLibraries test\n");
CoUninitialize(); CoUninitialize();
return; return;
} }
......
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