Author: akhaldi Date: Thu Aug 18 09:39:10 2016 New Revision: 72261
URL: http://svn.reactos.org/svn/reactos?rev=72261&view=rev Log: [SHELL32_WINETEST] Sync with Wine Staging 1.9.16. CORE-11866
Modified: trunk/rostests/winetests/shell32/appbar.c trunk/rostests/winetests/shell32/shelldispatch.c trunk/rostests/winetests/shell32/shelllink.c trunk/rostests/winetests/shell32/shellole.c
Modified: trunk/rostests/winetests/shell32/appbar.c URL: http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/shell32/appbar.c... ============================================================================== --- trunk/rostests/winetests/shell32/appbar.c [iso-8859-1] (original) +++ trunk/rostests/winetests/shell32/appbar.c [iso-8859-1] Thu Aug 18 09:39:10 2016 @@ -424,7 +424,9 @@ }
if (0) /* crashes on native */ +{ hr = pGetCurrentProcessExplicitAppUserModelID(NULL); +}
appid = (void*)0xdeadbeef; hr = pGetCurrentProcessExplicitAppUserModelID(&appid);
Modified: trunk/rostests/winetests/shell32/shelldispatch.c URL: http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/shell32/shelldis... ============================================================================== --- trunk/rostests/winetests/shell32/shelldispatch.c [iso-8859-1] (original) +++ trunk/rostests/winetests/shell32/shelldispatch.c [iso-8859-1] Thu Aug 18 09:39:10 2016 @@ -30,6 +30,8 @@ #define EXPECT_HR(hr,hr_exp) \ ok(hr == hr_exp, "got 0x%08x, expected 0x%08x\n", hr, hr_exp)
+static const WCHAR winetestW[] = {'w','i','n','e','t','e','s','t',0}; + static HRESULT (WINAPI *pSHGetFolderPathW)(HWND, int, HANDLE, DWORD, LPWSTR); static HRESULT (WINAPI *pSHGetNameFromIDList)(PCIDLIST_ABSOLUTE,SIGDN,PWSTR*); static HRESULT (WINAPI *pSHGetSpecialFolderLocation)(HWND, int, LPITEMIDLIST *); @@ -50,7 +52,6 @@
static void test_namespace(void) { - static const WCHAR winetestW[] = {'w','i','n','e','t','e','s','t',0}; static const WCHAR backslashW[] = {'\',0}; static const WCHAR clsidW[] = { ':',':','{','6','4','5','F','F','0','4','0','-','5','0','8','1','-', @@ -306,6 +307,136 @@ IShellDispatch_Release(sd); }
+static void test_items(void) +{ + WCHAR wstr[MAX_PATH], orig_dir[MAX_PATH]; + HRESULT r; + IShellDispatch *sd = NULL; + Folder *folder = NULL; + FolderItems *items = NULL; + FolderItems2 *items2 = NULL; + FolderItems3 *items3 = NULL; + FolderItem *item = (FolderItem*)0xdeadbeef; + IDispatch *disp = NULL; + IUnknown *unk = NULL; + FolderItemVerbs *verbs = (FolderItemVerbs*)0xdeadbeef; + VARIANT var; + LONG lcount = -1; + + r = CoCreateInstance(&CLSID_Shell, NULL, CLSCTX_INPROC_SERVER, &IID_IShellDispatch, (void**)&sd); + ok(SUCCEEDED(r), "CoCreateInstance failed: %08x\n", r); + ok(!!sd, "sd is null\n"); + + GetTempPathW(MAX_PATH, wstr); + GetCurrentDirectoryW(MAX_PATH, orig_dir); + SetCurrentDirectoryW(wstr); + CreateDirectoryW(winetestW, NULL); + GetFullPathNameW(winetestW, MAX_PATH, wstr, NULL); + V_VT(&var) = VT_BSTR; + V_BSTR(&var) = SysAllocString(wstr); + r = IShellDispatch_NameSpace(sd, var, &folder); + ok(r == S_OK, "IShellDispatch::NameSpace failed: %08x\n", r); + ok(!!folder, "folder is null\n"); + SysFreeString(V_BSTR(&var)); + IShellDispatch_Release(sd); + SetCurrentDirectoryW(winetestW); + + r = Folder_Items(folder, &items); + ok(r == S_OK, "Folder::Items failed: %08x\n", r); + ok(!!items, "items is null\n"); + r = FolderItems_QueryInterface(items, &IID_FolderItems2, (void**)&items2); + ok(r == S_OK || broken(E_NOINTERFACE) /* xp and later */, "FolderItems::QueryInterface failed: %08x\n", r); + ok(!!items2 || broken(!items2) /* xp and later */, "items2 is null\n"); + r = FolderItems_QueryInterface(items, &IID_FolderItems3, (void**)&items3); + ok(r == S_OK, "FolderItems::QueryInterface failed: %08x\n", r); + ok(!!items3, "items3 is null\n"); + Folder_Release(folder); + + if (0) /* crashes on all versions of Windows */ + r = FolderItems_get_Count(items, NULL); + + r = FolderItems_get_Count(items, &lcount); +todo_wine + ok(r == S_OK, "FolderItems::get_Count failed: %08x\n", r); +todo_wine + ok(!lcount, "expected 0 files, got %d\n", lcount); + + V_VT(&var) = VT_I4; + V_I4(&var) = 0; + + if (0) /* crashes on all versions of Windows */ + r = FolderItems_Item(items, var, NULL); + + r = FolderItems_Item(items, var, &item); +todo_wine + ok(r == S_FALSE, "expected S_FALSE, got %08x\n", r); + ok(!item, "item is not null\n"); + + if (0) /* crashes on xp */ + { + r = FolderItems_get_Application(items, NULL); + ok(r == E_INVALIDARG, "expected E_INVALIDARG, got %08x\n", r); + } + + r = FolderItems_get_Application(items, &disp); +todo_wine + ok(r == S_OK, "FolderItems::get_Application failed: %08x\n", r); +todo_wine + ok(!!disp, "disp is null\n"); + if (disp) IDispatch_Release(disp); + + if (0) /* crashes on xp */ + { + r = FolderItems_get_Parent(items, NULL); + ok(r == E_NOTIMPL, "expected E_NOTIMPL, got %08x\n", r); + } + + disp = (IDispatch*)0xdeadbeef; + r = FolderItems_get_Parent(items, &disp); + ok(r == E_NOTIMPL, "expected E_NOTIMPL, got %08x\n", r); + ok(!disp, "disp is not null\n"); + + if (0) /* crashes on xp */ + { + r = FolderItems__NewEnum(items, NULL); + ok(r == E_INVALIDARG, "expected E_INVALIDARG, got %08x\n", r); + } + + r = FolderItems__NewEnum(items, &unk); +todo_wine + ok(r == S_OK, "FolderItems::_NewEnum failed: %08x\n", r); +todo_wine + ok(!!unk, "unk is null\n"); + if (unk) IUnknown_Release(unk); + + if (items3) + { + r = FolderItems3_Filter(items3, 0, NULL); +todo_wine + ok(r == S_OK, "expected S_OK, got %08x\n", r); + + if (0) /* crashes on xp */ + { + r = FolderItems3_get_Verbs(items3, NULL); + ok(r == E_INVALIDARG, "expected E_INVALIDARG, got %08x\n", r); + } + + r = FolderItems3_get_Verbs(items3, &verbs); +todo_wine + ok(r == S_FALSE, "expected S_FALSE, got %08x\n", r); + ok(!verbs, "verbs is not null\n"); + } + + GetTempPathW(MAX_PATH, wstr); + SetCurrentDirectoryW(wstr); + RemoveDirectoryW(winetestW); + SetCurrentDirectoryW(orig_dir); + + FolderItems_Release(items); + if (items2) FolderItems2_Release(items2); + if (items3) FolderItems3_Release(items3); +} + static void test_service(void) { static const WCHAR spooler[] = {'S','p','o','o','l','e','r',0}; @@ -597,7 +728,9 @@ todo_wine ok(hr == S_OK, "got 0x%08x\n", hr); if (hr == S_OK) +{ test_dispatch_typeinfo(doc, viewdual_riids); +}
IWebBrowser2_Release(wb);
@@ -879,6 +1012,7 @@
init_function_pointers(); test_namespace(); + test_items(); test_service(); test_ShellFolderViewDual(); test_ShellWindows();
Modified: trunk/rostests/winetests/shell32/shelllink.c URL: http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/shell32/shelllin... ============================================================================== --- trunk/rostests/winetests/shell32/shelllink.c [iso-8859-1] (original) +++ trunk/rostests/winetests/shell32/shelllink.c [iso-8859-1] Thu Aug 18 09:39:10 2016 @@ -248,7 +248,7 @@ strcpy(buffer,"garbage"); r = IShellLinkA_GetPath(sl, buffer, sizeof(buffer), NULL, SLGP_RAWPATH); ok(r==S_OK, "GetPath failed (0x%08x)\n", r); - ok(!strcmp(buffer, "C:\nonexistent\file") || + todo_wine ok(!strcmp(buffer, "C:\nonexistent\file") || broken(!strcmp(buffer, "C:\"c:\nonexistent\file"")), /* NT4 */ "case doesn't match\n");
Modified: trunk/rostests/winetests/shell32/shellole.c URL: http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/shell32/shellole... ============================================================================== --- trunk/rostests/winetests/shell32/shellole.c [iso-8859-1] (original) +++ trunk/rostests/winetests/shell32/shellole.c [iso-8859-1] Thu Aug 18 09:39:10 2016 @@ -871,7 +871,9 @@ }
if (0) /* crashes on native */ +{ hr = pSHCreateSessionKey(KEY_READ, NULL); +}
hkey = (HKEY)0xdeadbeef; hr = pSHCreateSessionKey(0, &hkey);