[PATCH] comctl32/edit/tests: Add interactive test showing a rendering glitch
Fabian Maurer
dark.shadow4 at web.de
Thu May 31 12:58:33 CDT 2018
Signed-off-by: Fabian Maurer <dark.shadow4 at web.de>
---
dlls/comctl32/tests/edit.c | 32 ++++++++++++++++++++++++++++++++
dlls/comctl32/tests/rsrc.rc | 12 ++++++++++++
2 files changed, 44 insertions(+)
diff --git a/dlls/comctl32/tests/edit.c b/dlls/comctl32/tests/edit.c
index 7e9e7e7634..76397ac92f 100644
--- a/dlls/comctl32/tests/edit.c
+++ b/dlls/comctl32/tests/edit.c
@@ -3094,6 +3094,36 @@ static void test_change_focus(void)
DestroyWindow(hwnd);
}
+static INT_PTR CALLBACK dialog_proc_interactive(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lparam)
+{
+ switch (msg)
+ {
+ case WM_COMMAND:
+ if (HIWORD(wparam) == BN_CLICKED)
+ {
+ EndDialog(hdlg, LOWORD(wparam));
+ }
+ break;
+ case WM_CLOSE:
+ EndDialog(hdlg, IDCANCEL);
+ break;
+
+ default:
+ break;
+ }
+
+ return FALSE;
+}
+
+static void test_rendering_interactive(void)
+{
+ int button_clicked;
+
+ button_clicked = DialogBoxParamA(GetModuleHandleA(NULL), "EDIT_OVERLAPPING_LABEL", NULL, dialog_proc_interactive, 0);
+ todo_wine
+ ok(button_clicked == IDOK, "Interactive test 'edit overlapping label' failed.\n");
+}
+
START_TEST(edit)
{
ULONG_PTR ctx_cookie;
@@ -3139,6 +3169,8 @@ START_TEST(edit)
test_wordbreak_proc();
test_change_focus();
+ test_rendering_interactive();
+
UnregisterWindowClasses();
unload_v6_module(ctx_cookie, hCtx);
diff --git a/dlls/comctl32/tests/rsrc.rc b/dlls/comctl32/tests/rsrc.rc
index 327aa225e1..959130e2f1 100644
--- a/dlls/comctl32/tests/rsrc.rc
+++ b/dlls/comctl32/tests/rsrc.rc
@@ -78,6 +78,18 @@ FONT 8, "MS Shell Dlg"
{
}
+EDIT_OVERLAPPING_LABEL DIALOG 0, 0, 200, 80
+STYLE WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | DS_CENTER
+CAPTION "Does the edit box look alright?"
+FONT 8, "MS Shell Dlg"
+{
+ LTEXT "Title:", -1, 5, 5, 70, 15, BS_CENTER
+ EDITTEXT 1000, 60, 5, 450, 15, WS_CHILD | WS_VISIBLE | WS_TABSTOP | ES_WANTRETURN
+
+ PUSHBUTTON "OK", IDOK, 20, 60, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
+ PUSHBUTTON "Broken", IDNO, 100, 60, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
+}
+
STRINGTABLE
{
IDS_TBADD1 "abc"
--
2.17.1
More information about the wine-devel
mailing list