Dmitry Timoshkov : user32/tests: Test DialogBoxParam using a dialog template with invalid control class.

Alexandre Julliard julliard at winehq.org
Thu Aug 24 14:18:25 CDT 2017


Module: wine
Branch: master
Commit: a62a8601db26bd8c39e561505876c6c41b8156bf
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=a62a8601db26bd8c39e561505876c6c41b8156bf

Author: Dmitry Timoshkov <dmitry at 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 at baikal.ru>
Signed-off-by: Alexandre Julliard <julliard at 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 6b9d704..ac61d4e 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"




More information about the wine-cvs mailing list