Module: wine Branch: master Commit: 1a5607b41518add5872c2a0e4f144dc85315f0e3 URL: http://source.winehq.org/git/wine.git/?a=commit;h=1a5607b41518add5872c2a0e4f...
Author: Andrew Bogott andrew@CodeWeavers.com Date: Wed Nov 10 23:52:01 2010 -0600
shdocvw: Skip some tests if a modern IE is not present.
---
dlls/shdocvw/tests/intshcut.c | 26 ++++++++++++++++++++++---- 1 files changed, 22 insertions(+), 4 deletions(-)
diff --git a/dlls/shdocvw/tests/intshcut.c b/dlls/shdocvw/tests/intshcut.c index cf0b225..af34614 100644 --- a/dlls/shdocvw/tests/intshcut.c +++ b/dlls/shdocvw/tests/intshcut.c @@ -32,6 +32,7 @@ #include "shobjidl.h" #include "shlguid.h" #include "ole2.h" +#include "mshtml.h" #include "initguid.h" #include "isguids.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) { HRESULT hr; @@ -210,10 +225,13 @@ static void test_SetURLFlags(void)
static void test_InternetShortcut(void) { - test_Aggregability(); - test_QueryInterface(); - test_NullURLs(); - test_SetURLFlags(); + if (check_ie()) + { + test_Aggregability(); + test_QueryInterface(); + test_NullURLs(); + test_SetURLFlags(); + } }
START_TEST(intshcut)