https://git.reactos.org/?p=reactos.git;a=commitdiff;h=4bdc74bf5d8937bd5bf20a...
commit 4bdc74bf5d8937bd5bf20aaade43a1ad03c394ce Author: Mark Jansen mark.jansen@reactos.org AuthorDate: Tue Nov 28 22:58:07 2017 +0100
[COM_APITEST] Add zipfldr tests. CORE-7684 #234 --- modules/rostests/apitests/com/CMakeLists.txt | 1 + modules/rostests/apitests/com/com_apitest.h | 8 ++ modules/rostests/apitests/com/testlist.c | 2 + modules/rostests/apitests/com/zipfldr.c | 110 +++++++++++++++++++++++++++ 4 files changed, 121 insertions(+)
diff --git a/modules/rostests/apitests/com/CMakeLists.txt b/modules/rostests/apitests/com/CMakeLists.txt index 76e6efef8c..73f0000b2c 100644 --- a/modules/rostests/apitests/com/CMakeLists.txt +++ b/modules/rostests/apitests/com/CMakeLists.txt @@ -9,6 +9,7 @@ list(APPEND SOURCE ole32.c shdocvw.c shell32.c + zipfldr.c com_apitest.c com_apitest.h)
diff --git a/modules/rostests/apitests/com/com_apitest.h b/modules/rostests/apitests/com/com_apitest.h index 715213a725..f1f4c73876 100644 --- a/modules/rostests/apitests/com/com_apitest.h +++ b/modules/rostests/apitests/com/com_apitest.h @@ -200,4 +200,12 @@ DEFINE_GUID(IID_CDefView, 0x4434ff80, 0xef4c, 0x11ce, 0xae, 0x6 DEFINE_GUID(IID_FolderItems2, 0xc94f0ad0, 0xf363, 0x11d2, 0xa3, 0x27, 0x00, 0xc0, 0x4f, 0x8e, 0xec, 0x7f); DEFINE_GUID(IID_FolderItems3, 0xeaa7c309, 0xbbec, 0x49d5, 0x82, 0x1d, 0x64, 0xd9, 0x66, 0xcb, 0x66, 0x7f);
+// zipfldr.dll +DEFINE_GUID(CLSID_ZipFolderStorageHandler, 0xe88dcce0, 0xb7b3, 0x11d1, 0xa9, 0xf0, 0x00, 0xaa, 0x00, 0x60, 0xfa, 0x31); +DEFINE_GUID(CLSID_ZipFolderSendTo, 0x888dca60, 0xfc0a, 0x11cf, 0x8f, 0x0f, 0x00, 0xc0, 0x4f, 0xd7, 0xd0, 0x62); +DEFINE_GUID(CLSID_ZipFolderContextMenu, 0xb8cdcb65, 0xb1bf, 0x4b42, 0x94, 0x28, 0x1d, 0xfd, 0xb7, 0xee, 0x92, 0xaf); +DEFINE_GUID(CLSID_ZipFolderRightDragHandler,0xbd472f60, 0x27fa, 0x11cf, 0xb8, 0xb4, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00); +DEFINE_GUID(CLSID_ZipFolderDropHandler, 0xed9d80b9, 0xd157, 0x457b, 0x91, 0x92, 0x0e, 0x72, 0x80, 0x31, 0x3b, 0xf0); + #endif /* _COM_APITEST_H_ */ + diff --git a/modules/rostests/apitests/com/testlist.c b/modules/rostests/apitests/com/testlist.c index 0311e254b6..020440467a 100644 --- a/modules/rostests/apitests/com/testlist.c +++ b/modules/rostests/apitests/com/testlist.c @@ -11,6 +11,7 @@ extern void func_netshell(void); extern void func_ole32(void); extern void func_shdocvw(void); extern void func_shell32(void); +extern void func_zipfldr(void);
const struct test winetest_testlist[] = { @@ -22,6 +23,7 @@ const struct test winetest_testlist[] = { "ole32", func_ole32 }, { "shdocvw", func_shdocvw }, { "shell32", func_shell32 }, + { "zipfldr", func_zipfldr },
{ 0, 0 } }; diff --git a/modules/rostests/apitests/com/zipfldr.c b/modules/rostests/apitests/com/zipfldr.c new file mode 100644 index 0000000000..e6bbbd548f --- /dev/null +++ b/modules/rostests/apitests/com/zipfldr.c @@ -0,0 +1,110 @@ +/* + * PROJECT: ReactOS API tests + * LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+) + * PURPOSE: COM interface test for zipfldr classes + * COPYRIGHT: Copyright 2017 Mark Jansen (mark.jansen@reactos.org) + */ + +#include "com_apitest.h" + +#define NDEBUG +#include <debug.h> + +/* +This is only tested on w10 & 2k3, so the defines might be wrong for the other versions. +CLSID_ZipFolderStorageHandler and CLSID_ZipFolderContextMenu seem to be the same. +*/ + + +static const CLASS_AND_INTERFACES ExpectedInterfaces[] = +{ + { + ID_NAME(CLSID_ZipFolderStorageHandler), + { + { 0x0, &IID_IShellFolder2 }, + { 0x0, &IID_IShellFolder }, + { 0x0, &IID_IUnknown }, + { 0x4, &IID_IStorage }, + { 0x8, &IID_IContextMenu }, + { 0xc, &IID_IShellExtInit }, +#if _WIN32_WINNT < 0x0a00 + { 0x10, &IID_IPersistFile }, + { 0x14, &IID_IPersistFolder2 }, + { 0x14, &IID_IPersistFolder }, + { 0x14, &IID_IPersist }, +#else + { 0x10, &IID_IPersistFolder2 }, + { 0x10, &IID_IPersistFolder }, + { 0x10, &IID_IPersist }, + { 0x14, &IID_IFolderType }, +#endif + }, + L"Apartment" + }, + { + ID_NAME(CLSID_ZipFolderSendTo), + { +#if _WIN32_WINNT >= 0x0a00 + { -0x8, &IID_IObjectWithSite }, +#endif + { 0x0, &IID_IDropTarget }, + { 0x0, &IID_IUnknown }, + { 0x4, &IID_IPersistFile }, + { 0x4, &IID_IPersist }, + }, + L"Apartment" + }, + { + ID_NAME(CLSID_ZipFolderContextMenu), + { + { 0x0, &IID_IShellFolder2 }, + { 0x0, &IID_IShellFolder }, + { 0x0, &IID_IUnknown }, + { 0x4, &IID_IStorage }, + { 0x8, &IID_IContextMenu }, + { 0xc, &IID_IShellExtInit }, +#if _WIN32_WINNT < 0x0a00 + { 0x10, &IID_IPersistFile }, + { 0x14, &IID_IPersistFolder2 }, + { 0x14, &IID_IPersistFolder }, + { 0x14, &IID_IPersist }, +#else + { 0x10, &IID_IPersistFolder2 }, + { 0x10, &IID_IPersistFolder }, + { 0x10, &IID_IPersist }, + { 0x14, &IID_IFolderType }, +#endif + }, + L"Apartment" + }, + { + ID_NAME(CLSID_ZipFolderRightDragHandler), + { + { -0x4, &IID_IContextMenu }, + { 0x0, &IID_IShellExtInit }, + { 0x0, &IID_IUnknown }, + }, + L"Apartment" + }, + { + ID_NAME(CLSID_ZipFolderDropHandler), + { +#if _WIN32_WINNT < 0x0a00 + { 0x0, &IID_IDropTarget }, + { 0x0, &IID_IUnknown }, + { 0x4, &IID_IPersistFile }, + { 0x4, &IID_IPersist }, +#else + { -0x4, &IID_IDropTarget }, + { 0x0, &IID_IUnknown }, +#endif + }, + L"Apartment" + }, +}; +static const INT ExpectedInterfaceCount = RTL_NUMBER_OF(ExpectedInterfaces); + +START_TEST(zipfldr) +{ + TestClasses(L"zipfldr", ExpectedInterfaces, ExpectedInterfaceCount); +}