From: Ivan Ivlev <iviv@etersoft.ru> Signed-off-by: Ivan Ivlev <iviv@etersoft.ru> --- dlls/user32/tests/edit.c | 41 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/dlls/user32/tests/edit.c b/dlls/user32/tests/edit.c index c71b46495aa..de37200b6f8 100644 --- a/dlls/user32/tests/edit.c +++ b/dlls/user32/tests/edit.c @@ -3518,6 +3518,46 @@ static void test_PASSWORDCHAR(void) DestroyWindow (hwEdit); } +static void test_WM_LBUTTONDOWN(void) +{ + HWND hwEdit; + + hwEdit = CreateWindowExA(0, "EDIT", "Test", ES_LEFT, + 0, 0, 100, 100, NULL, NULL, NULL, NULL); + + // test single WM_LBUTTONDOWN processing + todo_wine ok(SendMessageA(hwEdit, WM_LBUTTONDOWN, 1, 0), + "WM_LBUTTONDOWN was not processed. LastError=%ld\n", GetLastError()); + ok(GetFocus() == hwEdit, + "Focus is not on Edit Control, instead on %p\n", GetFocus()); + ok(GetCapture() == hwEdit, + "Capture not on Edit Control, instead on %p\n", GetCapture()); + + todo_wine ok(SendMessageA(hwEdit, WM_LBUTTONUP, 0, 0), + "WM_LBUTTONUP was not processed. LastError=%ld\n", GetLastError()); + ok(GetFocus() == hwEdit, + "Focus is not on Edit Control, instead on %p\n", GetFocus()); + ok(GetCapture() != hwEdit, + "Capture is on Edit Control %p, expected to be released\n", GetCapture()); + + // test double WM_LBUTTONDOWN processing + todo_wine ok(SendMessageA(hwEdit, WM_LBUTTONDOWN, 1, 0), + "1/2 WM_LBUTTONDOWN was not processed. LastError=%ld\n", GetLastError()); + todo_wine ok(SendMessageA(hwEdit, WM_LBUTTONDOWN, 1, 0), + "2/2 WM_LBUTTONDOWN was not processed. LastError=%ld\n", GetLastError()); + ok(GetCapture() == hwEdit, + "Capture is not on Edit Control, instead on %p\n", GetCapture()); + + todo_wine ok(SendMessageA(hwEdit, WM_LBUTTONUP, 0, 0), + "WM_LBUTTONUP was not processed. LastError=%ld\n", GetLastError()); + ok(GetFocus() == hwEdit, + "Focus is not on Edit Control, instead on %p\n", GetFocus()); + ok(GetCapture() != hwEdit, + "Capture is on Edit Control %p, expected to be released\n", GetCapture()); + + DestroyWindow(hwEdit); +} + START_TEST(edit) { BOOL b; @@ -3558,6 +3598,7 @@ START_TEST(edit) test_dbcs_WM_CHAR(); test_format_rect(); test_PASSWORDCHAR(); + test_WM_LBUTTONDOWN(); UnregisterWindowClasses(); } -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/10104