[COMCTL32_WINETEST] Sync with Wine Staging 1.9.23. CORE-12409

svn path=/trunk/; revision=73336
This commit is contained in:
Amine Khaldi 2016-11-22 12:11:38 +00:00
parent fe25cf50e9
commit 722d054541
6 changed files with 40 additions and 6 deletions

View file

@ -5785,6 +5785,7 @@ static void test_oneclickactivate(void)
HWND hwnd, fg;
RECT rect;
INT r;
POINT orig_pos;
hwnd = CreateWindowExA(0, "SysListView32", "foo", WS_VISIBLE|WS_CHILD|LVS_LIST,
10, 10, 100, 200, hwndparent, NULL, NULL, NULL);
@ -5811,6 +5812,7 @@ static void test_oneclickactivate(void)
ok(r == 0, "should not fail\n");
GetWindowRect(hwnd, &rect);
GetCursorPos(&orig_pos);
SetCursorPos(rect.left+5, rect.top+5);
flush_events();
r = SendMessageA(hwnd, WM_MOUSEMOVE, MAKELONG(1, 1), 0);
@ -5830,6 +5832,7 @@ static void test_oneclickactivate(void)
expect(1, r);
DestroyWindow(hwnd);
SetCursorPos(orig_pos.x, orig_pos.y);
}
static void test_callback_mask(void)

View file

@ -291,7 +291,7 @@ static void test_status_control(void)
expect(5,LOWORD(r));
expect(SBT_POPOUT,HIWORD(r));
r = SendMessageW(hWndStatus, WM_GETTEXTLENGTH, 0, 0);
ok(r == 5 || broken(0x02000005 /* NT4 */), "Expected 5, got %d\n", r);
ok(r == 5, "Expected 5, got %d\n", r);
r = SendMessageA(hWndStatus, SB_GETTEXTLENGTHA, 1, 0);
expect(0,LOWORD(r));
expect(SBT_OWNERDRAW,HIWORD(r));

View file

@ -195,6 +195,7 @@ START_TEST(syslink)
BOOL rc;
HWND hWndSysLink;
LONG oldstyle;
POINT orig_pos;
if (!load_v6_module(&ctx_cookie, &hCtx))
return;
@ -217,6 +218,10 @@ START_TEST(syslink)
return;
}
/* Move the cursor off the parent window */
GetCursorPos(&orig_pos);
SetCursorPos(400, 400);
init_msg_sequences(sequences, NUM_MSG_SEQUENCE);
/* Create parent window */
@ -254,4 +259,5 @@ START_TEST(syslink)
DestroyWindow(hWndSysLink);
DestroyWindow(hWndParent);
unload_v6_module(ctx_cookie, hCtx);
SetCursorPos(orig_pos.x, orig_pos.y);
}

View file

@ -1235,11 +1235,8 @@ static DWORD tbsize_alt_numtests = 0;
EqualRect(&rc, &tbsize_alt_results[tbsize_alt_numtests].rcButton))) { \
win_skip("Alternate rect found\n"); \
tbsize_alt_numtests++; \
} else if (!(mask&1)) { \
} else todo_wine_if(mask&1) \
check_rect("button = %d, tbsize_numtests = %d", rc, res->prcButtons[i], i, tbsize_numtests); \
} else {\
todo_wine { check_rect("button = %d, tbsize_numtests = %d", rc, res->prcButtons[i], i, tbsize_numtests); } \
} \
mask >>= 1; \
} \
tbsize_numtests++; \

View file

@ -156,6 +156,7 @@ static void test_customdraw(void) {
DWORD iterationNumber;
WNDCLASSA wc;
LRESULT lResult;
POINT orig_pos;
/* Create a class to use the custom draw wndproc */
wc.style = CS_HREDRAW | CS_VREDRAW;
@ -170,6 +171,8 @@ static void test_customdraw(void) {
wc.lpfnWndProc = custom_draw_wnd_proc;
RegisterClassA(&wc);
GetCursorPos(&orig_pos);
for (iterationNumber = 0;
iterationNumber < sizeof(expectedResults)/sizeof(expectedResults[0]);
iterationNumber++) {
@ -242,7 +245,7 @@ static void test_customdraw(void) {
DestroyWindow(parent);
}
SetCursorPos(orig_pos.x, orig_pos.y);
}
static const CHAR testcallbackA[] = "callback";

View file

@ -2369,6 +2369,30 @@ static void test_WM_KEYDOWN(void)
DestroyWindow(hwnd);
}
static void test_TVS_FULLROWSELECT(void)
{
DWORD style;
HWND hwnd;
/* try to create both with TVS_HASLINES and TVS_FULLROWSELECT */
hwnd = create_treeview_control(TVS_FULLROWSELECT);
style = GetWindowLongA(hwnd, GWL_STYLE);
ok((style & (TVS_FULLROWSELECT | TVS_HASLINES)) == (TVS_FULLROWSELECT | TVS_HASLINES), "got style 0x%08x\n", style);
DestroyWindow(hwnd);
/* create just with TVS_HASLINES, try to enable TVS_FULLROWSELECT later */
hwnd = create_treeview_control(0);
style = GetWindowLongA(hwnd, GWL_STYLE);
SetWindowLongA(hwnd, GWL_STYLE, style | TVS_FULLROWSELECT);
style = GetWindowLongA(hwnd, GWL_STYLE);
ok(style & TVS_FULLROWSELECT, "got style 0x%08x\n", style);
DestroyWindow(hwnd);
}
START_TEST(treeview)
{
HMODULE hComctl32;
@ -2444,6 +2468,7 @@ START_TEST(treeview)
test_WM_GETDLGCODE();
test_customdraw();
test_WM_KEYDOWN();
test_TVS_FULLROWSELECT();
if (!load_v6_module(&ctx_cookie, &hCtx))
{