From: Eric Pouech eric.pouech@gmail.com
The edit control should process all events in queue to be fully initialized (otherwise the WM_PASTE will bypass some pending messages).
Wine-bug: https://bugs.winehq.org/show_bug.cgi?id=53276
Signed-off-by: Eric Pouech eric.pouech@gmail.com --- dlls/comctl32/tests/edit.c | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/dlls/comctl32/tests/edit.c b/dlls/comctl32/tests/edit.c index 91d16e044a0..19c77aeb4fb 100644 --- a/dlls/comctl32/tests/edit.c +++ b/dlls/comctl32/tests/edit.c @@ -3208,6 +3208,8 @@ static void test_paste(void) r = CloseClipboard(); ok(r == TRUE, "expected %d, got %d\n", TRUE, r);
+ flush_events(); + /* Paste single line */ SendMessageA(hEdit, WM_SETTEXT, 0, (LPARAM)""); r = SendMessageA(hEdit, WM_PASTE, 0, 0); @@ -3231,12 +3233,16 @@ static void test_paste(void) r = CloseClipboard(); ok(r == TRUE, "expected %d, got %d\n", TRUE, r);
+ flush_events(); + /* Paste multiline text in singleline edit - should be cut */ SendMessageA(hEdit, WM_SETTEXT, 0, (LPARAM)""); r = SendMessageA(hEdit, WM_PASTE, 0, 0); len = SendMessageA(hEdit, WM_GETTEXTLENGTH, 0, 0); ok(strlen("first line") == len, "got %d\n", len);
+ flush_events(); + /* Paste multiline text in multiline edit */ SendMessageA(hMultilineEdit, WM_SETTEXT, 0, (LPARAM)""); r = SendMessageA(hMultilineEdit, WM_PASTE, 0, 0);