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>
This commit is contained in:
Dmitry Timoshkov 2017-08-18 19:41:57 +08:00 committed by Alexandre Julliard
parent 99684bc425
commit a62a8601db
2 changed files with 12 additions and 0 deletions

View File

@ -1271,6 +1271,12 @@ static void test_DialogBoxParamA(void)
broken(GetLastError() == 0xdeadbeef),
"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);

View File

@ -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"