ieframe: Moved intshcut.c tests to ieframe.

This commit is contained in:
Jacek Caban 2011-08-03 12:45:42 +02:00 committed by Alexandre Julliard
parent 7891fc45d3
commit ecc270869c
4 changed files with 7 additions and 27 deletions

View File

@ -3,6 +3,7 @@ IMPORTS = ole32 oleaut32 user32 gdi32
C_SRCS = \ C_SRCS = \
ie.c \ ie.c \
intshcut.c \
webbrowser.c webbrowser.c
@MAKE_TEST_RULES@ @MAKE_TEST_RULES@

View File

@ -29,7 +29,6 @@
#include "winreg.h" #include "winreg.h"
#include "winerror.h" #include "winerror.h"
#include "initguid.h"
#include "shlobj.h" #include "shlobj.h"
#include "shobjidl.h" #include "shobjidl.h"
#include "shlguid.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) static void test_ReadAndWriteProperties(void)
{ {
int iconIndex = 7; int iconIndex = 7;
@ -217,6 +202,7 @@ static void test_ReadAndWriteProperties(void)
lstrcatW(fileNameW, shortcutW); lstrcatW(fileNameW, shortcutW);
hr = CoCreateInstance(&CLSID_InternetShortcut, NULL, CLSCTX_ALL, &IID_IUniformResourceLocatorA, (void**)&urlA); 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) if (hr == S_OK)
{ {
IPersistFile *pf; IPersistFile *pf;
@ -257,10 +243,9 @@ static void test_ReadAndWriteProperties(void)
urlA->lpVtbl->Release(urlA); urlA->lpVtbl->Release(urlA);
IPropertySetStorage_Release(pPropSetStg); 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); 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) if (hr == S_OK)
{ {
IPropertySetStorage *pPropSetStg; IPropertySetStorage *pPropSetStg;
@ -306,8 +291,6 @@ static void test_ReadAndWriteProperties(void)
urlAFromFile->lpVtbl->Release(urlAFromFile); urlAFromFile->lpVtbl->Release(urlAFromFile);
DeleteFileW(fileNameW); DeleteFileW(fileNameW);
} }
else
skip("could not create a CLSID_InternetShortcut for property tests, hr=0x%x\n", hr);
} }
static void test_NullURLs(void) static void test_NullURLs(void)
@ -409,10 +392,9 @@ static void test_InternetShortcut(void)
HRESULT hres; HRESULT hres;
hres = CoCreateInstance(&CLSID_InternetShortcut, NULL, CLSCTX_ALL, &IID_IUniformResourceLocatorA, (void**)&url); hres = CoCreateInstance(&CLSID_InternetShortcut, NULL, CLSCTX_ALL, &IID_IUniformResourceLocatorA, (void**)&url);
if(FAILED(hres)) { ok(hres == S_OK, "Could not create CLSID_InternetShortcut instance: %08x\n", hres);
win_skip("Could not create CLSID_InternetShortcut instance: %08x\n", hres); if(FAILED(hres))
return; return;
}
test_Aggregability(); test_Aggregability();
test_QueryInterface(); test_QueryInterface();
@ -426,10 +408,7 @@ START_TEST(intshcut)
{ {
OleInitialize(NULL); OleInitialize(NULL);
if(check_ie()) test_InternetShortcut();
test_InternetShortcut();
else
win_skip("Too old IE\n");
OleUninitialize(); OleUninitialize();
} }

View File

@ -2,7 +2,6 @@ TESTDLL = shdocvw.dll
IMPORTS = shell32 ole32 oleaut32 advapi32 IMPORTS = shell32 ole32 oleaut32 advapi32
C_SRCS = \ C_SRCS = \
intshcut.c \
shdocvw.c \ shdocvw.c \
shortcut.c shortcut.c

View File

@ -40,6 +40,7 @@
#include "winbase.h" #include "winbase.h"
#include "winreg.h" #include "winreg.h"
#include "initguid.h"
#include "shlobj.h" #include "shlobj.h"
#include "shobjidl.h" #include "shobjidl.h"
#include "shlguid.h" #include "shlguid.h"