From: Zhiyi Zhang zzhang@codeweavers.com
Signed-off-by: Zhiyi Zhang zzhang@codeweavers.com --- dlls/comctl32/tests/edit.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+)
diff --git a/dlls/comctl32/tests/edit.c b/dlls/comctl32/tests/edit.c index e588df8170b..429f01f8210 100644 --- a/dlls/comctl32/tests/edit.c +++ b/dlls/comctl32/tests/edit.c @@ -3326,6 +3326,22 @@ static const struct message killfocus_combined_seq[] = { 0 } };
+static const struct message setfocus_sent_only_combined_seq[] = +{ + { WM_KILLFOCUS, sent|id, 0, 0, PARENT_ID }, + { WM_SETFOCUS, sent|id, 0, 0, EDIT_ID }, + { WM_COMMAND, sent|wparam|id, MAKEWPARAM(1, EN_SETFOCUS), 0, PARENT_ID }, + { 0 } +}; + +static const struct message killfocus_sent_only_combined_seq[] = +{ + { WM_KILLFOCUS, sent|id, 0, 0, EDIT_ID }, + { WM_COMMAND, sent|wparam|id, MAKEWPARAM(1, EN_KILLFOCUS), 0, PARENT_ID }, + { WM_SETFOCUS, sent|id, 0, 0, PARENT_ID }, + { 0 } +}; + static void test_cue_banner(void) { HWND hwnd_edit; @@ -3437,6 +3453,18 @@ static void test_change_focus(void) while (PeekMessageA(&msg, 0, 0, 0, PM_REMOVE)) DispatchMessageA(&msg); ok_sequence(sequences, COMBINED_SEQ_INDEX, killfocus_combined_seq, "Kill focus", TRUE);
+ /* Test message sequences without waiting for posted messages */ + SetFocus(parent_wnd); + flush_sequences(sequences, NUM_MSG_SEQUENCES); + SetFocus(hwnd); + ok_sequence(sequences, COMBINED_SEQ_INDEX, setfocus_sent_only_combined_seq, + "Set focus sent only", TRUE); + + flush_sequences(sequences, NUM_MSG_SEQUENCES); + SetFocus(parent_wnd); + ok_sequence(sequences, COMBINED_SEQ_INDEX, killfocus_sent_only_combined_seq, + "Kill focus sent only", TRUE); + SetCursorPos(orig_pos.x, orig_pos.y);
DestroyWindow(hwnd);