Author: akhaldi
Date: Sat Sep 14 20:07:14 2013
New Revision: 60118
URL:
http://svn.reactos.org/svn/reactos?rev=60118&view=rev
Log:
[COMCTL32_WINETEST]
* Sync with Wine 1.7.1.
Modified:
trunk/rostests/winetests/comctl32/CMakeLists.txt
trunk/rostests/winetests/comctl32/comboex.c
trunk/rostests/winetests/comctl32/datetime.c
trunk/rostests/winetests/comctl32/header.c
trunk/rostests/winetests/comctl32/imagelist.c
trunk/rostests/winetests/comctl32/listview.c
trunk/rostests/winetests/comctl32/misc.c
trunk/rostests/winetests/comctl32/monthcal.c
trunk/rostests/winetests/comctl32/pager.c
trunk/rostests/winetests/comctl32/progress.c
trunk/rostests/winetests/comctl32/propsheet.c
trunk/rostests/winetests/comctl32/rebar.c
trunk/rostests/winetests/comctl32/trackbar.c
Modified: trunk/rostests/winetests/comctl32/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/comctl32/CMakeL…
==============================================================================
--- trunk/rostests/winetests/comctl32/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/rostests/winetests/comctl32/CMakeLists.txt [iso-8859-1] Sat Sep 14 20:07:14
2013
@@ -29,18 +29,13 @@
updown.c
testlist.c)
-add_executable(comctl32_winetest
- ${SOURCE}
- rsrc.rc)
-
-target_link_libraries(comctl32_winetest wine)
+add_executable(comctl32_winetest ${SOURCE} rsrc.rc)
+set_module_type(comctl32_winetest win32cui)
+add_importlibs(comctl32_winetest comctl32 ole32 user32 gdi32 advapi32 msvcrt kernel32)
+add_cd_file(TARGET comctl32_winetest DESTINATION reactos/bin FOR all)
if(NOT MSVC)
# FIXME:
http://www.cmake.org/Bug/view.php?id=12998
#add_target_compile_flags(comctl32_winetest "-Wno-format")
set_source_files_properties(${SOURCE} PROPERTIES COMPILE_FLAGS
"-Wno-format")
endif()
-
-set_module_type(comctl32_winetest win32cui)
-add_importlibs(comctl32_winetest comctl32 ole32 user32 gdi32 advapi32 msvcrt kernel32
ntdll)
-add_cd_file(TARGET comctl32_winetest DESTINATION reactos/bin FOR all)
Modified: trunk/rostests/winetests/comctl32/comboex.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/comctl32/comboe…
==============================================================================
--- trunk/rostests/winetests/comctl32/comboex.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/comctl32/comboex.c [iso-8859-1] Sat Sep 14 20:07:14 2013
@@ -280,8 +280,6 @@
GetLastError());
hList = cbInfo.hwndList;
- trace("hWnd=%p, hComboEx=%p, hCombo=%p, hList=%p, hEdit=%p\n",
- hComboExParentWnd, hComboEx, hCombo, hList, hEdit);
ok(GetFocus() == hComboExParentWnd,
"Focus not on Main Window, instead on %p\n", GetFocus());
Modified: trunk/rostests/winetests/comctl32/datetime.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/comctl32/dateti…
==============================================================================
--- trunk/rostests/winetests/comctl32/datetime.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/comctl32/datetime.c [iso-8859-1] Sat Sep 14 20:07:14 2013
@@ -145,8 +145,6 @@
LRESULT ret;
struct message msg;
- trace("datetime: %p, %04x, %08lx, %08lx\n", hwnd, message, wParam,
lParam);
-
msg.message = message;
msg.flags = sent|wparam|lparam;
if (defwndproc_counter) msg.flags |= defwinproc;
Modified: trunk/rostests/winetests/comctl32/header.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/comctl32/header…
==============================================================================
--- trunk/rostests/winetests/comctl32/header.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/comctl32/header.c [iso-8859-1] Sat Sep 14 20:07:14 2013
@@ -412,7 +412,6 @@
LRESULT ret;
struct message msg;
- trace("header: %p, %04x, %08lx, %08lx\n", hwnd, message, wParam, lParam);
msg.message = message;
msg.flags = sent|wparam|lparam;
if (defwndproc_counter) msg.flags |= defwinproc;
@@ -444,8 +443,6 @@
message != WM_DEVICECHANGE)
{
- trace("parent: %p, %04x, %08lx, %08lx\n", hwnd, message, wParam,
lParam);
-
msg.message = message;
msg.flags = sent|wparam|lparam;
if (defwndproc_counter) msg.flags |= defwinproc;
Modified: trunk/rostests/winetests/comctl32/imagelist.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/comctl32/imagel…
==============================================================================
--- trunk/rostests/winetests/comctl32/imagelist.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/comctl32/imagelist.c [iso-8859-1] Sat Sep 14 20:07:14 2013
@@ -30,7 +30,6 @@
//#include <stdarg.h>
#include <stdio.h>
-#include <assert.h>
#include <windef.h>
#include <winbase.h>
@@ -655,26 +654,26 @@
static HRESULT STDMETHODCALLTYPE Test_Stream_QueryInterface(IStream *iface, REFIID riid,
void **ppvObject)
{
- assert(0);
+ ok(0, "unexpected call\n");
return E_NOTIMPL;
}
static ULONG STDMETHODCALLTYPE Test_Stream_AddRef(IStream *iface)
{
- assert(0);
+ ok(0, "unexpected call\n");
return 2;
}
static ULONG STDMETHODCALLTYPE Test_Stream_Release(IStream *iface)
{
- assert(0);
+ ok(0, "unexpected call\n");
return 1;
}
static HRESULT STDMETHODCALLTYPE Test_Stream_Read(IStream *iface, void *pv, ULONG cb,
ULONG *pcbRead)
{
- assert(0);
+ ok(0, "unexpected call\n");
return E_NOTIMPL;
}
@@ -707,13 +706,13 @@
static HRESULT STDMETHODCALLTYPE Test_Stream_Seek(IStream *iface, LARGE_INTEGER
dlibMove,
DWORD dwOrigin, ULARGE_INTEGER
*plibNewPosition)
{
- assert(0);
+ ok(0, "unexpected call\n");
return E_NOTIMPL;
}
static HRESULT STDMETHODCALLTYPE Test_Stream_SetSize(IStream *iface, ULARGE_INTEGER
libNewSize)
{
- assert(0);
+ ok(0, "unexpected call\n");
return E_NOTIMPL;
}
@@ -721,46 +720,46 @@
ULARGE_INTEGER cb, ULARGE_INTEGER
*pcbRead,
ULARGE_INTEGER *pcbWritten)
{
- assert(0);
+ ok(0, "unexpected call\n");
return E_NOTIMPL;
}
static HRESULT STDMETHODCALLTYPE Test_Stream_Commit(IStream *iface, DWORD
grfCommitFlags)
{
- assert(0);
+ ok(0, "unexpected call\n");
return E_NOTIMPL;
}
static HRESULT STDMETHODCALLTYPE Test_Stream_Revert(IStream *iface)
{
- assert(0);
+ ok(0, "unexpected call\n");
return E_NOTIMPL;
}
static HRESULT STDMETHODCALLTYPE Test_Stream_LockRegion(IStream *iface, ULARGE_INTEGER
libOffset,
ULARGE_INTEGER cb, DWORD
dwLockType)
{
- assert(0);
+ ok(0, "unexpected call\n");
return E_NOTIMPL;
}
static HRESULT STDMETHODCALLTYPE Test_Stream_UnlockRegion(IStream *iface, ULARGE_INTEGER
libOffset,
ULARGE_INTEGER cb, DWORD
dwLockType)
{
- assert(0);
+ ok(0, "unexpected call\n");
return E_NOTIMPL;
}
static HRESULT STDMETHODCALLTYPE Test_Stream_Stat(IStream *iface, STATSTG *pstatstg,
DWORD grfStatFlag)
{
- assert(0);
+ ok(0, "unexpected call\n");
return E_NOTIMPL;
}
static HRESULT STDMETHODCALLTYPE Test_Stream_Clone(IStream *iface, IStream **ppstm)
{
- assert(0);
+ ok(0, "unexpected call\n");
return E_NOTIMPL;
}
Modified: trunk/rostests/winetests/comctl32/listview.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/comctl32/listvi…
==============================================================================
--- trunk/rostests/winetests/comctl32/listview.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/comctl32/listview.c [iso-8859-1] Sat Sep 14 20:07:14 2013
@@ -398,8 +398,6 @@
message != WM_GETICON &&
message != WM_DEVICECHANGE)
{
- trace("parent: %p, %04x, %08lx, %08lx\n", hwnd, message, wParam,
lParam);
-
add_message(sequences, PARENT_SEQ_INDEX, &msg);
add_message(sequences, COMBINED_SEQ_INDEX, &msg);
}
@@ -586,8 +584,6 @@
LRESULT ret;
struct message msg;
- trace("listview: %p, %04x, %08lx, %08lx\n", hwnd, message, wParam,
lParam);
-
/* some debug output for style changing */
if ((message == WM_STYLECHANGING ||
message == WM_STYLECHANGED) && lParam)
@@ -663,8 +659,6 @@
static LONG defwndproc_counter = 0;
LRESULT ret;
struct message msg;
-
- trace("header: %p, %04x, %08lx, %08lx\n", hwnd, message, wParam, lParam);
msg.message = message;
msg.flags = sent|wparam|lparam;
@@ -1757,8 +1751,8 @@
if(msg == WM_NOTIFY) {
NMHDR *nmhdr = (PVOID)lp;
if(nmhdr->code == NM_CUSTOMDRAW) {
- NMLVCUSTOMDRAW *nmlvcd = (PVOID)nmhdr;
- trace("NMCUSTOMDRAW (0x%.8x)\n", nmlvcd->nmcd.dwDrawStage);
+ NMLVCUSTOMDRAW *nmlvcd = (NMLVCUSTOMDRAW*)nmhdr;
+
switch(nmlvcd->nmcd.dwDrawStage) {
case CDDS_PREPAINT:
SetBkColor(nmlvcd->nmcd.hdc, c0ffee);
Modified: trunk/rostests/winetests/comctl32/misc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/comctl32/misc.c…
==============================================================================
--- trunk/rostests/winetests/comctl32/misc.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/comctl32/misc.c [iso-8859-1] Sat Sep 14 20:07:14 2013
@@ -22,6 +22,7 @@
//#include <windows.h>
#include <wine/test.h>
+#include "v6util.h"
static PVOID (WINAPI * pAlloc)(LONG);
static PVOID (WINAPI * pReAlloc)(PVOID, LONG);
@@ -186,13 +187,39 @@
ok(res == TRUE, "Expected TRUE, got %d\n", res);
}
+static void test_TaskDialogIndirect(void)
+{
+ HINSTANCE hinst;
+ void *ptr, *ptr2;
+
+ hinst = LoadLibraryA("comctl32.dll");
+
+ ptr = GetProcAddress(hinst, "TaskDialogIndirect");
+ if (!ptr)
+ {
+ win_skip("TaskDialogIndirect not exported by name\n");
+ return;
+ }
+
+ ptr2 = GetProcAddress(hinst, (const CHAR*)345);
+ ok(ptr == ptr2, "got wrong pointer for ordinal 345, %p expected %p\n",
ptr2, ptr);
+}
+
START_TEST(misc)
{
+ ULONG_PTR ctx_cookie;
+ HANDLE hCtx;
+
if(!InitFunctionPtrs())
return;
test_GetPtrAW();
test_Alloc();
- FreeLibrary(hComctl32);
-}
+ if (!load_v6_module(&ctx_cookie, &hCtx))
+ return;
+
+ test_TaskDialogIndirect();
+
+ unload_v6_module(ctx_cookie, hCtx);
+}
Modified: trunk/rostests/winetests/comctl32/monthcal.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/comctl32/monthc…
==============================================================================
--- trunk/rostests/winetests/comctl32/monthcal.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/comctl32/monthcal.c [iso-8859-1] Sat Sep 14 20:07:14 2013
@@ -461,8 +461,6 @@
message != WM_GETICON &&
message != WM_DEVICECHANGE)
{
- trace("parent: %p, %04x, %08lx, %08lx\n", hwnd, message, wParam,
lParam);
-
msg.message = message;
msg.flags = sent|wparam|lparam;
if (defwndproc_counter) msg.flags |= defwinproc;
@@ -883,7 +881,6 @@
/* check for locale first day */
if(GetLocaleInfoA(lcid, LOCALE_IFIRSTDAYOFWEEK, b, 128)){
fday = atoi(b);
- trace("fday: %d\n", fday);
res = SendMessage(hwnd, MCM_GETFIRSTDAYOFWEEK, 0, 0);
expect(fday, res);
prev = fday;
@@ -1329,6 +1326,9 @@
HWND hwnd;
hwnd = create_monthcal_control(0);
+
+ res = SendMessage(hwnd, MCM_GETMONTHDELTA, 0, 0);
+ expect(2, res);
flush_sequences(sequences, NUM_MSG_SEQUENCES);
@@ -1977,7 +1977,6 @@
for(i = 0; i < sizeof styles / sizeof styles[0]; i++)
{
- trace("%s\n", styles[i].name);
hwnd = create_monthcal_control(styles[i].val);
SetWindowLongPtr(hwnd, GWLP_ID, SEL_NOTIFY_TEST_ID);
assert(hwnd);
Modified: trunk/rostests/winetests/comctl32/pager.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/comctl32/pager.…
==============================================================================
--- trunk/rostests/winetests/comctl32/pager.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/comctl32/pager.c [iso-8859-1] Sat Sep 14 20:07:14 2013
@@ -77,8 +77,6 @@
message != WM_GETICON &&
message != WM_DEVICECHANGE)
{
- trace("parent: %p, %04x, %08lx, %08lx\n", hwnd, message, wParam,
lParam);
-
msg.message = message;
msg.flags = sent|wparam|lparam|parent;
if (defwndproc_counter) msg.flags |= defwinproc;
@@ -127,8 +125,6 @@
WNDPROC oldproc = (WNDPROC)GetWindowLongPtrA(hwnd, GWLP_USERDATA);
struct message msg;
- trace("pager: %p, %04x, %08lx, %08lx\n", hwnd, message, wParam, lParam);
-
msg.message = message;
msg.flags = sent|wparam|lparam;
msg.wParam = wParam;
Modified: trunk/rostests/winetests/comctl32/progress.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/comctl32/progre…
==============================================================================
--- trunk/rostests/winetests/comctl32/progress.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/comctl32/progress.c [iso-8859-1] Sat Sep 14 20:07:14 2013
@@ -32,6 +32,11 @@
static HWND hProgressParentWnd, hProgressWnd;
static const char progressTestClass[] = "ProgressBarTestClass";
+static HWND create_progress(DWORD style)
+{
+ return CreateWindowExA(0, PROGRESS_CLASSA, "", WS_VISIBLE | style,
+ 0, 0, 100, 20, NULL, NULL, GetModuleHandleA(NULL), 0);
+}
/* try to make sure pending X events have been processed before continuing */
static void flush_events(void)
@@ -224,12 +229,40 @@
ok(erased, "Progress bar should have erased the background\n");
}
+static void test_setcolors(void)
+{
+ HWND progress;
+ COLORREF clr;
+
+ progress = create_progress(PBS_SMOOTH);
+
+ clr = SendMessageA(progress, PBM_SETBARCOLOR, 0, 0);
+ ok(clr == CLR_DEFAULT, "got %x\n", clr);
+
+ clr = SendMessageA(progress, PBM_SETBARCOLOR, 0, RGB(0, 255, 0));
+ ok(clr == 0, "got %x\n", clr);
+
+ clr = SendMessageA(progress, PBM_SETBARCOLOR, 0, CLR_DEFAULT);
+ ok(clr == RGB(0, 255, 0), "got %x\n", clr);
+
+ clr = SendMessageA(progress, PBM_SETBKCOLOR, 0, 0);
+ ok(clr == CLR_DEFAULT, "got %x\n", clr);
+
+ clr = SendMessageA(progress, PBM_SETBKCOLOR, 0, RGB(255, 0, 0));
+ ok(clr == 0, "got %x\n", clr);
+
+ clr = SendMessageA(progress, PBM_SETBKCOLOR, 0, CLR_DEFAULT);
+ ok(clr == RGB(255, 0, 0), "got %x\n", clr);
+
+ DestroyWindow(progress);
+}
START_TEST(progress)
{
init();
test_redraw();
-
+ test_setcolors();
+
cleanup();
}
Modified: trunk/rostests/winetests/comctl32/propsheet.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/comctl32/propsh…
==============================================================================
--- trunk/rostests/winetests/comctl32/propsheet.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/comctl32/propsheet.c [iso-8859-1] Sat Sep 14 20:07:14 2013
@@ -669,8 +669,6 @@
(message < WM_MOUSEFIRST || message > WM_MOUSEHWHEEL) &&
message != 0x90)
{
- /*trace("check_message: %04x, %04x\n", message, receiver);*/
-
msg.message = message;
msg.flags = sent|wparam|lparam|id;
msg.wParam = wParam;
Modified: trunk/rostests/winetests/comctl32/rebar.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/comctl32/rebar.…
==============================================================================
--- trunk/rostests/winetests/comctl32/rebar.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/comctl32/rebar.c [iso-8859-1] Sat Sep 14 20:07:14 2013
@@ -126,7 +126,9 @@
return hToolbar;
}
-static LRESULT CALLBACK MyWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
+static int g_parent_measureitem;
+
+static LRESULT CALLBACK parent_wndproc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM
lParam)
{
switch (msg)
{
@@ -136,6 +138,9 @@
if (lpnm->code == RBN_HEIGHTCHANGE)
GetClientRect(lpnm->hwndFrom, &height_change_notify_rect);
}
+ break;
+ case WM_MEASUREITEM:
+ g_parent_measureitem++;
break;
}
return DefWindowProcA(hWnd, msg, wParam, lParam);
@@ -1058,7 +1063,7 @@
wc.hbrBackground = GetSysColorBrush(COLOR_WINDOW);
wc.lpszMenuName = NULL;
wc.lpszClassName = "MyTestWnd";
- wc.lpfnWndProc = MyWndProc;
+ wc.lpfnWndProc = parent_wndproc;
return RegisterClassA(&wc);
}
@@ -1108,6 +1113,20 @@
DestroyWindow(hRebar);
}
+static void test_notification(void)
+{
+ MEASUREITEMSTRUCT mis;
+ HWND rebar;
+
+ rebar = create_rebar_control();
+
+ g_parent_measureitem = 0;
+ SendMessageA(rebar, WM_MEASUREITEM, 0, (LPARAM)&mis);
+ ok(g_parent_measureitem == 1, "got %d\n", g_parent_measureitem);
+
+ DestroyWindow(rebar);
+}
+
START_TEST(rebar)
{
HMODULE hComctl32;
@@ -1134,6 +1153,7 @@
test_bandinfo();
test_colors();
test_showband();
+ test_notification();
if(!is_font_installed("System") || !is_font_installed("Tahoma"))
{
Modified: trunk/rostests/winetests/comctl32/trackbar.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/comctl32/trackb…
==============================================================================
--- trunk/rostests/winetests/comctl32/trackbar.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/comctl32/trackbar.c [iso-8859-1] Sat Sep 14 20:07:14 2013
@@ -394,6 +394,7 @@
if (defwndproc_counter) msg.flags |= defwinproc;
msg.wParam = wParam;
msg.lParam = lParam;
+ msg.id = 0;
add_message(sequences, PARENT_SEQ_INDEX, &msg);
}