Author: akhaldi
Date: Tue Jul 12 10:49:51 2016
New Revision: 71900
URL:
http://svn.reactos.org/svn/reactos?rev=71900&view=rev
Log:
[SHELL32_WINETEST] Sync with Wine Staging 1.9.14.
Modified:
trunk/rostests/winetests/shell32/appbar.c
trunk/rostests/winetests/shell32/assoc.c
trunk/rostests/winetests/shell32/brsfolder.c
trunk/rostests/winetests/shell32/ebrowser.c
trunk/rostests/winetests/shell32/shlfolder.c
Modified: trunk/rostests/winetests/shell32/appbar.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/shell32/appbar.…
==============================================================================
--- trunk/rostests/winetests/shell32/appbar.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/shell32/appbar.c [iso-8859-1] Tue Jul 12 10:49:51 2016
@@ -196,9 +196,8 @@
#define test_window_rects(a, b) \
ok(!IntersectRect(&rc, &windows[a].allocated_rect,
&windows[b].allocated_rect), \
- "rectangles intersect (%i,%i,%i,%i)/(%i,%i,%i,%i)\n", \
- windows[a].allocated_rect.left, windows[a].allocated_rect.top,
windows[a].allocated_rect.right, windows[a].allocated_rect.bottom, \
- windows[b].allocated_rect.left, windows[b].allocated_rect.top,
windows[b].allocated_rect.right, windows[b].allocated_rect.bottom)
+ "rectangles intersect %s / %s\n",
wine_dbgstr_rect(&windows[a].allocated_rect), \
+ wine_dbgstr_rect(&windows[b].allocated_rect))
static void test_setpos(void)
{
Modified: trunk/rostests/winetests/shell32/assoc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/shell32/assoc.c…
==============================================================================
--- trunk/rostests/winetests/shell32/assoc.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/shell32/assoc.c [iso-8859-1] Tue Jul 12 10:49:51 2016
@@ -104,31 +104,36 @@
{
IQueryAssociations *assoc;
HRESULT hr;
- WCHAR *buffer;
+ WCHAR *buffer = NULL;
DWORD len;
hr = CoCreateInstance(&CLSID_QueryAssociations, NULL, CLSCTX_INPROC_SERVER,
&IID_IQueryAssociations, (void*)&assoc);
ok_(__FILE__, line)(hr == S_OK, "failed to create IQueryAssociations,
0x%x\n", hr);
- hr = IQueryAssociations_Init(assoc, 0, assocName, progIdKey, NULL);
+ hr = IQueryAssociations_Init(assoc, ASSOCF_NONE, assocName, progIdKey, NULL);
ok_(__FILE__, line)(hr == S_OK, "IQueryAssociations::Init failed, 0x%x\n",
hr);
- hr = IQueryAssociations_GetString(assoc, 0, str, NULL, NULL, &len);
- if (hr != S_FALSE) {
- if (expected_string) {
- ok_(__FILE__, line)(SUCCEEDED(hr), "GetString returned 0x%x, expected
success\n", hr);
- } else {
- ok_(__FILE__, line)(FAILED(hr), "GetString returned 0x%x, expected
failure\n", hr);
+ hr = IQueryAssociations_GetString(assoc, ASSOCF_NONE, str, NULL, NULL, &len);
+ if (expected_string) {
+ ok_(__FILE__, line)(hr == S_FALSE, "GetString returned 0x%x, expected
S_FALSE\n", hr);
+ if (hr != S_FALSE) {
+ /* don't try to allocate memory using uninitialized len */
+ IQueryAssociations_Release(assoc);
+ return;
}
- }
-
- buffer = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR));
- ok_(__FILE__, line)(buffer != NULL, "out of memory\n");
- hr = IQueryAssociations_GetString(assoc, 0, str, NULL, buffer, &len);
-
- if (expected_string) {
+
+ buffer = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR));
+ ok_(__FILE__, line)(buffer != NULL, "out of memory\n");
+ hr = IQueryAssociations_GetString(assoc, 0, str, NULL, buffer, &len);
+ ok_(__FILE__, line)(hr == S_OK, "GetString returned 0x%x, expected
S_OK\n", hr);
+
ok_(__FILE__, line)(lstrcmpW(buffer, expected_string) == 0, "GetString
returned %s, expected %s\n",
wine_dbgstr_w(buffer), wine_dbgstr_w(expected_string));
- }
+ } else {
+ ok_(__FILE__, line)(FAILED(hr), "GetString returned 0x%x, expected
failure\n", hr);
+ }
+
+ IQueryAssociations_Release(assoc);
+ HeapFree(GetProcessHeap(), 0, buffer);
}
static void test_IQueryAssociations_GetString(void)
@@ -176,17 +181,18 @@
getstring_test(test_progidW, NULL, ASSOCSTR_DEFAULTICON, test_iconW, __LINE__);
getstring_test(NULL, test_progid_key, ASSOCSTR_DEFAULTICON, test_iconW, __LINE__);
+ RegDeleteKeyW(test_progid_key, DefaultIconW);
+ RegDeleteKeyW(HKEY_CLASSES_ROOT, test_progidW);
RegDeleteKeyW(HKEY_CLASSES_ROOT, test_extensionW);
- RegDeleteKeyW(HKEY_CLASSES_ROOT, test_progidW);
hr = CoCreateInstance(&CLSID_QueryAssociations, NULL, CLSCTX_INPROC_SERVER,
&IID_IQueryAssociations, (void*)&assoc);
ok(hr == S_OK, "failed to create object, 0x%x\n", hr);
- hr = IQueryAssociations_Init(assoc, 0, httpW, NULL, NULL);
+ hr = IQueryAssociations_Init(assoc, ASSOCF_NONE, httpW, NULL, NULL);
ok(hr == S_OK, "Init failed, 0x%x\n", hr);
len = 0;
- hr = IQueryAssociations_GetString(assoc, 0, ASSOCSTR_EXECUTABLE, NULL, NULL,
&len);
+ hr = IQueryAssociations_GetString(assoc, ASSOCF_NONE, ASSOCSTR_EXECUTABLE, NULL,
NULL, &len);
ok(hr == S_FALSE, "got 0x%08x\n", hr);
ok(len > 0, "got wrong needed length, %d\n", len);
@@ -195,7 +201,7 @@
WCHAR buffW[MAX_PATH];
DWORD len;
- hr = IQueryAssociations_Init(assoc, 0, ptr->key, NULL, NULL);
+ hr = IQueryAssociations_Init(assoc, ASSOCF_NONE, ptr->key, NULL, NULL);
ok(hr == S_OK, "%d: Init failed, 0x%x\n", i, hr);
len = ptr->len;
@@ -232,17 +238,17 @@
hr = CoCreateInstance(&CLSID_QueryAssociations, NULL, CLSCTX_INPROC_SERVER,
&IID_IQueryAssociations, (void*)&assoc);
ok(hr == S_OK, "failed to create object, 0x%x\n", hr);
- hr = IQueryAssociations_Init(assoc, 0, NULL, NULL, NULL);
+ hr = IQueryAssociations_Init(assoc, ASSOCF_NONE, NULL, NULL, NULL);
ok(hr == E_INVALIDARG, "Init failed, 0x%08x\n", hr);
- hr = IQueryAssociations_Init(assoc, 0, httpW, NULL, NULL);
+ hr = IQueryAssociations_Init(assoc, ASSOCF_NONE, httpW, NULL, NULL);
ok(hr == S_OK, "Init failed, 0x%08x\n", hr);
- hr = IQueryAssociations_Init(assoc, 0, badW, NULL, NULL);
+ hr = IQueryAssociations_Init(assoc, ASSOCF_NONE, badW, NULL, NULL);
ok(hr == S_OK || broken(hr == S_FALSE) /* pre-vista */, "Init failed,
0x%08x\n", hr);
len = 0;
- hr = IQueryAssociations_GetString(assoc, 0, ASSOCSTR_EXECUTABLE, NULL, NULL,
&len);
+ hr = IQueryAssociations_GetString(assoc, ASSOCF_NONE, ASSOCSTR_EXECUTABLE, NULL,
NULL, &len);
ok(hr == HRESULT_FROM_WIN32(ERROR_NO_ASSOCIATION) || broken(hr == E_FAIL) /*
pre-vista */, "got 0x%08x\n", hr);
IQueryAssociations_Release(assoc);
Modified: trunk/rostests/winetests/shell32/brsfolder.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/shell32/brsfold…
==============================================================================
--- trunk/rostests/winetests/shell32/brsfolder.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/shell32/brsfolder.c [iso-8859-1] Tue Jul 12 10:49:51 2016
@@ -248,10 +248,8 @@
shfileop.fFlags = FOF_NOCONFIRMATION|FOF_NOERRORUI|FOF_SILENT;
SHFileOperationA(&shfileop);
- if (pidl)
- CoTaskMemFree(pidl);
- if (test_folder_pidl)
- CoTaskMemFree(test_folder_pidl);
+ CoTaskMemFree(pidl);
+ CoTaskMemFree(test_folder_pidl);
test_folder_object->lpVtbl->Release(test_folder_object);
CoUninitialize();
@@ -346,16 +344,12 @@
/* test without flags */
bi.ulFlags = 0;
pidl = SHBrowseForFolderA(&bi);
-
- if (pidl)
- CoTaskMemFree(pidl);
+ CoTaskMemFree(pidl);
/* test with flag */
bi.ulFlags = BIF_NEWDIALOGSTYLE;
pidl = SHBrowseForFolderA(&bi);
-
- if (pidl)
- CoTaskMemFree(pidl);
+ CoTaskMemFree(pidl);
IShellFolder_Release(desktop_object);
Modified: trunk/rostests/winetests/shell32/ebrowser.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/shell32/ebrowse…
==============================================================================
--- trunk/rostests/winetests/shell32/ebrowser.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/shell32/ebrowser.c [iso-8859-1] Tue Jul 12 10:49:51 2016
@@ -818,8 +818,7 @@
ok(hr == S_OK, "Got 0x%08x\n", hr);
GetClientRect(eb_hwnd, &eb_rc);
- ok(EqualRect(&eb_rc, &exp_rc), "Got client rect (%d, %d)-(%d,
%d)\n",
- eb_rc.left, eb_rc.top, eb_rc.right, eb_rc.bottom);
+ ok(EqualRect(&eb_rc, &exp_rc), "Got client rect %s\n",
wine_dbgstr_rect(&eb_rc));
GetWindowRect(eb_hwnd, &eb_rc);
ok(eb_rc.right - eb_rc.left == 50, "Got window width %d\n", eb_rc.right
- eb_rc.left);
@@ -1142,8 +1141,7 @@
GetClientRect(eb_hwnd, &eb_rc);
MapWindowPoints(eb_hwnd, hwnd, (POINT*)&eb_rc, 2);
- ok(EqualRect(&eb_rc, &exp_rc), "Got rect (%d, %d) - (%d,
%d)\n",
- eb_rc.left, eb_rc.top, eb_rc.right, eb_rc.bottom);
+ ok(EqualRect(&eb_rc, &exp_rc), "Got rect %s\n",
wine_dbgstr_rect(&eb_rc));
/* Try resizing with invalid hdwp */
rc.bottom = 25;
@@ -1152,16 +1150,14 @@
ok(hr == E_FAIL, "Got 0x%08x\n", hr);
GetClientRect(eb_hwnd, &eb_rc);
MapWindowPoints(eb_hwnd, hwnd, (POINT*)&eb_rc, 2);
- ok(EqualRect(&eb_rc, &exp_rc), "Got rect (%d, %d) - (%d,
%d)\n",
- eb_rc.left, eb_rc.top, eb_rc.right, eb_rc.bottom);
+ ok(EqualRect(&eb_rc, &exp_rc), "Got rect %s\n",
wine_dbgstr_rect(&eb_rc));
hdwp = NULL;
hr = IExplorerBrowser_SetRect(peb, &hdwp, rc);
ok(hr == S_OK, "Got 0x%08x\n", hr);
GetClientRect(eb_hwnd, &eb_rc);
MapWindowPoints(eb_hwnd, hwnd, (POINT*)&eb_rc, 2);
- ok(EqualRect(&eb_rc, &exp_rc2), "Got rect (%d, %d) - (%d,
%d)\n",
- eb_rc.left, eb_rc.top, eb_rc.right, eb_rc.bottom);
+ ok(EqualRect(&eb_rc, &exp_rc2), "Got rect %s\n",
wine_dbgstr_rect(&eb_rc));
IShellBrowser_Release(psb);
}
Modified: trunk/rostests/winetests/shell32/shlfolder.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/shell32/shlfold…
==============================================================================
--- trunk/rostests/winetests/shell32/shlfolder.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/shell32/shlfolder.c [iso-8859-1] Tue Jul 12 10:49:51 2016
@@ -3088,7 +3088,7 @@
punkimpl->ifaces = ifaces;
punkimpl->unknown = 0;
- hres = pSHGetIDListFromObject((IUnknown*)punkimpl, &pidl);
+ hres = pSHGetIDListFromObject(&punkimpl->IUnknown_iface, &pidl);
ok(hres == E_NOINTERFACE, "Got %x\n", hres);
ok(ifaces[0].count, "interface not requested.\n");
ok(ifaces[1].count, "interface not requested.\n");
@@ -3260,7 +3260,7 @@
punkimpl->unknown = 0;
/* The same as SHGetIDListFromObject */
- hres = pSHGetIDListFromObject((IUnknown*)punkimpl, &pidl);
+ hres = pSHGetIDListFromObject(&punkimpl->IUnknown_iface, &pidl);
ok(hres == E_NOINTERFACE, "Got %x\n", hres);
ok(ifaces[0].count, "interface not requested.\n");
ok(ifaces[1].count, "interface not requested.\n");