From 722d054541aba8750a30d3b7cc86e22d4698d265 Mon Sep 17 00:00:00 2001 From: Amine Khaldi Date: Tue, 22 Nov 2016 12:11:38 +0000 Subject: [PATCH] [COMCTL32_WINETEST] Sync with Wine Staging 1.9.23. CORE-12409 svn path=/trunk/; revision=73336 --- rostests/winetests/comctl32/listview.c | 3 +++ rostests/winetests/comctl32/status.c | 2 +- rostests/winetests/comctl32/syslink.c | 6 ++++++ rostests/winetests/comctl32/toolbar.c | 5 +---- rostests/winetests/comctl32/tooltips.c | 5 ++++- rostests/winetests/comctl32/treeview.c | 25 +++++++++++++++++++++++++ 6 files changed, 40 insertions(+), 6 deletions(-) diff --git a/rostests/winetests/comctl32/listview.c b/rostests/winetests/comctl32/listview.c index fddce6e5a1e..85c45cfce67 100644 --- a/rostests/winetests/comctl32/listview.c +++ b/rostests/winetests/comctl32/listview.c @@ -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) diff --git a/rostests/winetests/comctl32/status.c b/rostests/winetests/comctl32/status.c index 13d68f84afe..6db6bf52fad 100644 --- a/rostests/winetests/comctl32/status.c +++ b/rostests/winetests/comctl32/status.c @@ -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)); diff --git a/rostests/winetests/comctl32/syslink.c b/rostests/winetests/comctl32/syslink.c index a65283aa79d..0e523b9b080 100644 --- a/rostests/winetests/comctl32/syslink.c +++ b/rostests/winetests/comctl32/syslink.c @@ -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); } diff --git a/rostests/winetests/comctl32/toolbar.c b/rostests/winetests/comctl32/toolbar.c index efad00aef0a..7dcdadb9a74 100644 --- a/rostests/winetests/comctl32/toolbar.c +++ b/rostests/winetests/comctl32/toolbar.c @@ -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++; \ diff --git a/rostests/winetests/comctl32/tooltips.c b/rostests/winetests/comctl32/tooltips.c index 48d0cbd8ebd..a6d5a2c637f 100644 --- a/rostests/winetests/comctl32/tooltips.c +++ b/rostests/winetests/comctl32/tooltips.c @@ -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"; diff --git a/rostests/winetests/comctl32/treeview.c b/rostests/winetests/comctl32/treeview.c index f1c227e869a..59036b6bcc6 100644 --- a/rostests/winetests/comctl32/treeview.c +++ b/rostests/winetests/comctl32/treeview.c @@ -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)) {