shdocvw: Skip some tests if a modern IE is not present.

This commit is contained in:
Andrew Bogott 2010-11-10 23:52:01 -06:00 committed by Alexandre Julliard
parent 6ad5416f32
commit 1a5607b415
1 changed files with 22 additions and 4 deletions

View File

@ -32,6 +32,7 @@
#include "shobjidl.h" #include "shobjidl.h"
#include "shlguid.h" #include "shlguid.h"
#include "ole2.h" #include "ole2.h"
#include "mshtml.h"
#include "initguid.h" #include "initguid.h"
#include "isguids.h" #include "isguids.h"
#include "intshcut.h" #include "intshcut.h"
@ -158,6 +159,20 @@ static void check_string_transform(IUniformResourceLocatorA *urlA, LPCSTR input,
} }
} }
static BOOL check_ie(void)
{
IHTMLDocument5 *doc;
HRESULT hres;
hres = CoCreateInstance(&CLSID_HTMLDocument, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER,
&IID_IHTMLDocument5, (void**)&doc);
if(FAILED(hres))
return FALSE;
IHTMLDocument5_Release(doc);
return TRUE;
}
static void test_NullURLs(void) static void test_NullURLs(void)
{ {
HRESULT hr; HRESULT hr;
@ -209,12 +224,15 @@ static void test_SetURLFlags(void)
} }
static void test_InternetShortcut(void) static void test_InternetShortcut(void)
{
if (check_ie())
{ {
test_Aggregability(); test_Aggregability();
test_QueryInterface(); test_QueryInterface();
test_NullURLs(); test_NullURLs();
test_SetURLFlags(); test_SetURLFlags();
} }
}
START_TEST(intshcut) START_TEST(intshcut)
{ {