Module: wine Branch: master Commit: ecc270869c13d581e5b4a9637a74599b28d082cf URL: http://source.winehq.org/git/wine.git/?a=commit;h=ecc270869c13d581e5b4a9637a...
Author: Jacek Caban jacek@codeweavers.com Date: Wed Aug 3 12:45:42 2011 +0200
ieframe: Moved intshcut.c tests to ieframe.
---
dlls/ieframe/tests/Makefile.in | 1 + dlls/{shdocvw => ieframe}/tests/intshcut.c | 31 ++++----------------------- dlls/shdocvw/tests/Makefile.in | 1 - dlls/shdocvw/tests/shortcut.c | 1 + 4 files changed, 7 insertions(+), 27 deletions(-)
diff --git a/dlls/ieframe/tests/Makefile.in b/dlls/ieframe/tests/Makefile.in index fe4b1dd..f2c0716 100644 --- a/dlls/ieframe/tests/Makefile.in +++ b/dlls/ieframe/tests/Makefile.in @@ -3,6 +3,7 @@ IMPORTS = ole32 oleaut32 user32 gdi32
C_SRCS = \ ie.c \ + intshcut.c \ webbrowser.c
@MAKE_TEST_RULES@ diff --git a/dlls/shdocvw/tests/intshcut.c b/dlls/ieframe/tests/intshcut.c similarity index 94% rename from dlls/shdocvw/tests/intshcut.c rename to dlls/ieframe/tests/intshcut.c index 205419b..63c595f 100644 --- a/dlls/shdocvw/tests/intshcut.c +++ b/dlls/ieframe/tests/intshcut.c @@ -29,7 +29,6 @@ #include "winreg.h" #include "winerror.h"
-#include "initguid.h" #include "shlobj.h" #include "shobjidl.h" #include "shlguid.h" @@ -180,20 +179,6 @@ static void _check_string_transform(unsigned line, IUniformResourceLocatorA *url } }
-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_ReadAndWriteProperties(void) { int iconIndex = 7; @@ -217,6 +202,7 @@ static void test_ReadAndWriteProperties(void) lstrcatW(fileNameW, shortcutW);
hr = CoCreateInstance(&CLSID_InternetShortcut, NULL, CLSCTX_ALL, &IID_IUniformResourceLocatorA, (void**)&urlA); + ok(hr == S_OK, "Could not create CLSID_InternetShortcut instance: %08x\n", hr); if (hr == S_OK) { IPersistFile *pf; @@ -257,10 +243,9 @@ static void test_ReadAndWriteProperties(void) urlA->lpVtbl->Release(urlA); IPropertySetStorage_Release(pPropSetStg); } - else - skip("could not create a CLSID_InternetShortcut for property tests, hr=0x%x\n", hr);
hr = CoCreateInstance(&CLSID_InternetShortcut, NULL, CLSCTX_ALL, &IID_IUniformResourceLocatorA, (void**)&urlAFromFile); + ok(hr == S_OK, "Could not create CLSID_InternetShortcut instance: %08x\n", hr); if (hr == S_OK) { IPropertySetStorage *pPropSetStg; @@ -306,8 +291,6 @@ static void test_ReadAndWriteProperties(void) urlAFromFile->lpVtbl->Release(urlAFromFile); DeleteFileW(fileNameW); } - else - skip("could not create a CLSID_InternetShortcut for property tests, hr=0x%x\n", hr); }
static void test_NullURLs(void) @@ -409,10 +392,9 @@ static void test_InternetShortcut(void) HRESULT hres;
hres = CoCreateInstance(&CLSID_InternetShortcut, NULL, CLSCTX_ALL, &IID_IUniformResourceLocatorA, (void**)&url); - if(FAILED(hres)) { - win_skip("Could not create CLSID_InternetShortcut instance: %08x\n", hres); + ok(hres == S_OK, "Could not create CLSID_InternetShortcut instance: %08x\n", hres); + if(FAILED(hres)) return; - }
test_Aggregability(); test_QueryInterface(); @@ -426,10 +408,7 @@ START_TEST(intshcut) { OleInitialize(NULL);
- if(check_ie()) - test_InternetShortcut(); - else - win_skip("Too old IE\n"); + test_InternetShortcut();
OleUninitialize(); } diff --git a/dlls/shdocvw/tests/Makefile.in b/dlls/shdocvw/tests/Makefile.in index e4cf689..d01c005 100644 --- a/dlls/shdocvw/tests/Makefile.in +++ b/dlls/shdocvw/tests/Makefile.in @@ -2,7 +2,6 @@ TESTDLL = shdocvw.dll IMPORTS = shell32 ole32 oleaut32 advapi32
C_SRCS = \ - intshcut.c \ shdocvw.c \ shortcut.c
diff --git a/dlls/shdocvw/tests/shortcut.c b/dlls/shdocvw/tests/shortcut.c index f38ae2b..4ed5f24 100644 --- a/dlls/shdocvw/tests/shortcut.c +++ b/dlls/shdocvw/tests/shortcut.c @@ -40,6 +40,7 @@ #include "winbase.h" #include "winreg.h"
+#include "initguid.h" #include "shlobj.h" #include "shobjidl.h" #include "shlguid.h"