Author: akhaldi
Date: Sun Sep 17 12:33:06 2017
New Revision: 75863
URL:
http://svn.reactos.org/svn/reactos?rev=75863&view=rev
Log:
[COMCTL32_WINETEST] Sync with Wine Staging 2.16. CORE-13762
Modified:
trunk/rostests/winetests/comctl32/rsrc.rc
trunk/rostests/winetests/comctl32/taskdialog.c
trunk/rostests/winetests/comctl32/toolbar.c
Modified: trunk/rostests/winetests/comctl32/rsrc.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/comctl32/rsrc.r…
==============================================================================
--- trunk/rostests/winetests/comctl32/rsrc.rc [iso-8859-1] (original)
+++ trunk/rostests/winetests/comctl32/rsrc.rc [iso-8859-1] Sun Sep 17 12:33:06 2017
@@ -98,6 +98,6 @@
STYLE WS_CHILD | WS_DISABLED
FONT 8, "MS Shell Dlg"
{
- COMBOBOX IDC_PS_COMBO1, 16, 68, 140, 14, CBS_DROPDOWN | WS_VSCROLL |
WS_TABSTOP
+ COMBOBOX IDC_PS_COMBO1, 16, 68, 140, 60, CBS_DROPDOWN | WS_VSCROLL |
WS_TABSTOP
PUSHBUTTON "Add", IDC_PS_PUSHBUTTON1, 164, 68, 40, 13
}
Modified: trunk/rostests/winetests/comctl32/taskdialog.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/comctl32/taskdi…
==============================================================================
--- trunk/rostests/winetests/comctl32/taskdialog.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/comctl32/taskdialog.c [iso-8859-1] Sun Sep 17 12:33:06 2017
@@ -28,6 +28,8 @@
#include "v6util.h"
static HRESULT (WINAPI *pTaskDialogIndirect)(const TASKDIALOGCONFIG *, int *, int *, BOOL
*);
+static HRESULT (WINAPI *pTaskDialog)(HWND, HINSTANCE, const WCHAR *, const WCHAR *, const
WCHAR *,
+ TASKDIALOG_COMMON_BUTTON_FLAGS, const WCHAR *, int *);
START_TEST(taskdialog)
{
@@ -50,6 +52,12 @@
return;
}
+ pTaskDialog = (void *)GetProcAddress(hinst, "TaskDialog");
+
+ ptr_ordinal = GetProcAddress(hinst, (const char *)344);
+ ok(pTaskDialog == ptr_ordinal, "got wrong pointer for ordinal 344, %p expected
%p\n",
+ ptr_ordinal, pTaskDialog);
+
ptr_ordinal = GetProcAddress(hinst, (const char *)345);
ok(pTaskDialogIndirect == ptr_ordinal, "got wrong pointer for ordinal 345, %p
expected %p\n",
ptr_ordinal, pTaskDialogIndirect);
Modified: trunk/rostests/winetests/comctl32/toolbar.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/comctl32/toolba…
==============================================================================
--- trunk/rostests/winetests/comctl32/toolbar.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/comctl32/toolbar.c [iso-8859-1] Sun Sep 17 12:33:06 2017
@@ -490,13 +490,81 @@
static void test_add_bitmap(void)
{
+ TBADDBITMAP stdsmall, std;
HWND hToolbar = NULL;
TBADDBITMAP bmp128;
TBADDBITMAP bmp80;
- TBADDBITMAP stdsmall;
TBADDBITMAP addbmp;
HIMAGELIST himl;
- INT ret;
+ INT ret, id;
+
+ /* Test default bitmaps range */
+ for (id = IDB_STD_SMALL_COLOR; id < IDB_HIST_LARGE_COLOR; id++)
+ {
+ HIMAGELIST himl;
+ int cx, cy, count;
+
+ rebuild_toolbar(&hToolbar);
+
+ std.hInst = HINST_COMMCTRL;
+ std.nID = id;
+
+ ret = SendMessageA(hToolbar, TB_ADDBITMAP, 0, (LPARAM)&std);
+ ok(ret == 0, "Got %d\n", ret);
+
+ himl = (HIMAGELIST)SendMessageA(hToolbar, TB_GETIMAGELIST, 0, 0);
+ ok(himl != NULL, "Got %p\n", himl);
+
+ ret = ImageList_GetIconSize(himl, &cx, &cy);
+ ok(ret, "Got %d\n", ret);
+ ok(cx == cy, "Got %d x %d\n", cx, cy);
+
+ count = ImageList_GetImageCount(himl);
+
+ /* Image count */
+ switch (id)
+ {
+ case IDB_STD_SMALL_COLOR:
+ case IDB_STD_LARGE_COLOR:
+ case 2:
+ case 3:
+ ok(count == 15, "got count %d\n", count);
+ break;
+ case IDB_VIEW_SMALL_COLOR:
+ case IDB_VIEW_LARGE_COLOR:
+ case 6:
+ case 7:
+ ok(count == 12, "got count %d\n", count);
+ break;
+ case IDB_HIST_SMALL_COLOR:
+ case IDB_HIST_LARGE_COLOR:
+ ok(count == 5, "got count %d\n", count);
+ break;
+ default:
+ ok(0, "id %d, count %d\n", id, count);
+ }
+
+ /* Image sizes */
+ switch (id)
+ {
+ case IDB_STD_SMALL_COLOR:
+ case 2:
+ case IDB_VIEW_SMALL_COLOR:
+ case 6:
+ case IDB_HIST_SMALL_COLOR:
+ ok(cx == 16, "got size %d\n", cx);
+ break;
+ case IDB_STD_LARGE_COLOR:
+ case 3:
+ case IDB_VIEW_LARGE_COLOR:
+ case 7:
+ case IDB_HIST_LARGE_COLOR:
+ ok(cx == 24, "got size %d\n", cx);
+ break;
+ default:
+ ok(0, "id %d, size %d\n", id, cx);
+ }
+ }
/* empty 128x15 bitmap */
bmp128.hInst = GetModuleHandleA(NULL);
@@ -2409,6 +2477,26 @@
DestroyWindow(hwnd);
}
+static void test_imagelist(void)
+{
+ HIMAGELIST imagelist;
+ HWND hwnd = NULL;
+ int ret;
+
+ rebuild_toolbar(&hwnd);
+
+ imagelist = (HIMAGELIST)SendMessageA(hwnd, TB_GETIMAGELIST, 0, 0);
+ ok(imagelist == NULL, "got %p\n", imagelist);
+
+ ret = SendMessageA(hwnd, TB_SETBITMAPSIZE, 0, MAKELONG(16, 16));
+ ok(ret, "got %d\n", ret);
+
+ imagelist = (HIMAGELIST)SendMessageA(hwnd, TB_GETIMAGELIST, 0, 0);
+ ok(imagelist == NULL, "got %p\n", imagelist);
+
+ DestroyWindow(hwnd);
+}
+
START_TEST(toolbar)
{
WNDCLASSA wc;
@@ -2454,6 +2542,7 @@
test_noresize();
test_save();
test_drawtext_flags();
+ test_imagelist();
PostQuitMessage(0);
while(GetMessageA(&msg,0,0,0)) {