Module: wine Branch: stable Commit: 3a12abebaa5b734910f5255e1642ffab3d096b58 URL: https://source.winehq.org/git/wine.git/?a=commit;h=3a12abebaa5b734910f5255e1...
Author: Dmitry Timoshkov dmitry@baikal.ru Date: Fri Aug 18 19:41:57 2017 +0800
user32/tests: Test DialogBoxParam using a dialog template with invalid control class.
Signed-off-by: Dmitry Timoshkov dmitry@baikal.ru Signed-off-by: Alexandre Julliard julliard@winehq.org (cherry picked from commit a62a8601db26bd8c39e561505876c6c41b8156bf) Signed-off-by: Michael Stefaniuc mstefani@winehq.org
---
dlls/user32/tests/dialog.c | 6 ++++++ dlls/user32/tests/resource.rc | 6 ++++++ 2 files changed, 12 insertions(+)
diff --git a/dlls/user32/tests/dialog.c b/dlls/user32/tests/dialog.c index a37c678..45886aa 100644 --- a/dlls/user32/tests/dialog.c +++ b/dlls/user32/tests/dialog.c @@ -1272,6 +1272,12 @@ static void test_DialogBoxParamA(void) "got %d, expected ERROR_RESOURCE_NAME_NOT_FOUND\n",GetLastError());
SetLastError(0xdeadbeef); + ret = DialogBoxParamA(GetModuleHandleA(NULL), "TEST_DIALOG_INVALID_CLASS", 0, DestroyDlgWinProc, 0); +todo_wine + ok(ret == -1, "DialogBoxParamA returned %ld, expected -1\n", ret); + ok(GetLastError() == 0, "got %d\n", GetLastError()); + + SetLastError(0xdeadbeef); ret = DefDlgProcA(0, WM_ERASEBKGND, 0, 0); ok(ret == 0, "DefDlgProcA returned %ld, expected 0\n", ret); ok(GetLastError() == ERROR_INVALID_WINDOW_HANDLE || diff --git a/dlls/user32/tests/resource.rc b/dlls/user32/tests/resource.rc index f116b85..756e38f 100644 --- a/dlls/user32/tests/resource.rc +++ b/dlls/user32/tests/resource.rc @@ -124,6 +124,12 @@ FONT 8, "MS Shell Dlg" EDITTEXT 200,4,4,50,14 }
+TEST_DIALOG_INVALID_CLASS DIALOG 0, 0, 60, 30 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +{ + CONTROL "",1,"wine invalid class",WS_CHILD,0,0,40,10 +} + IDD_DIALOG DIALOG 0, 0, 186, 95 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Dialog"