[PATCH 2/2] comctl32/tests: A test for TDM_CLICK_BUTTON with invalid button id
Nikolay Sivov
nsivov at codeweavers.com
Tue Aug 29 16:45:01 CDT 2017
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
---
dlls/comctl32/tests/taskdialog.c | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/dlls/comctl32/tests/taskdialog.c b/dlls/comctl32/tests/taskdialog.c
index dcadd30f3c..120376f60e 100644
--- a/dlls/comctl32/tests/taskdialog.c
+++ b/dlls/comctl32/tests/taskdialog.c
@@ -118,6 +118,12 @@ static const struct message callback_msg_seq[] =
{ 0 }
};
+static const struct message click_invalid_button_msg_seq[] =
+{
+ { TDM_CLICK_BUTTON, 0, 0xfefe },
+ { 0 }
+};
+
static const struct message callback_seq[] =
{
{ WM_TD_CALLBACK, id|wparam|lparam, 0, 0, TDN_DIALOG_CONSTRUCTED },
@@ -127,11 +133,26 @@ static const struct message callback_seq[] =
{ 0 }
};
+static const struct message invalid_button_callback_seq[] =
+{
+ { WM_TD_CALLBACK, id|wparam|lparam, 0, 0, TDN_DIALOG_CONSTRUCTED },
+ { WM_TD_CALLBACK, id|wparam|lparam, 0, 0, TDN_CREATED },
+ { WM_TD_CALLBACK, id|wparam|lparam, 0xfefe, 0, TDN_BUTTON_CLICKED },
+ { WM_TD_CALLBACK, id|wparam|lparam, 0, 0, TDN_DESTROYED },
+ { 0 }
+};
+
static void test_callback(void)
{
run_test(IDOK, callback_msg_seq, callback_seq, "Callback test 1");
}
+static void test_TDM_CLICK_BUTTON(void)
+{
+ /* Invalid button id */
+ run_test(0xfefe, click_invalid_button_msg_seq, invalid_button_callback_seq, "Invalid button id test");
+}
+
START_TEST(taskdialog)
{
ULONG_PTR ctx_cookie;
@@ -167,6 +188,7 @@ START_TEST(taskdialog)
test_invalid_parameters();
test_callback();
+ test_TDM_CLICK_BUTTON();
unload_v6_module(ctx_cookie, hCtx);
}
--
2.14.1
More information about the wine-patches
mailing list