33#define WM_KEYF1 0x004d
36#define WM_TD_CALLBACK (WM_APP)
38#define NUM_MSG_SEQUENCES 1
39#define TASKDIALOG_SEQ_INDEX 0
41#define TEST_NUM_BUTTONS 10
42#define TEST_NUM_RADIO_BUTTONS 3
45#define ID_START_BUTTON (ID_START + 0)
46#define ID_START_RADIO_BUTTON (ID_START + 20)
395#define run_test(info, expect_button, expect_radio_button, verification_checked, seq, context) \
396 run_test_(info, expect_button, expect_radio_button, verification_checked, seq, context, \
397 ARRAY_SIZE(seq) - 1, __FILE__, __LINE__)
411 msg_start =
msg = heap_alloc_zero(
sizeof(*
msg) * (test_messages_len + 3));
415 for (
i = 0;
i < test_messages_len;
i++)
423 hr = pTaskDialogIndirect(
info, &ret_button, &ret_radio, &ret_verification);
428 "Wrong button. Expected %d, got %d\n", expect_button, ret_button);
430 "Wrong radio button. Expected %d, got %d\n", expect_radio_button, ret_radio);
453 for(; msg_send && msg_send->
message; msg_send++)
496 const WCHAR button_format[] = {
'%',
'0',
'2',
'd',0};
530 info.nDefaultButton = 0;
547 info.dwFlags = command_link_flags[
i];
550 info.nDefaultButton = 0xff;
552 info.pButtons = custom_buttons;
554 "default button: invalid default, with common buttons - 1");
556 info.nDefaultButton = -1;
559 info.nDefaultButton = -2;
561 "default button: invalid default, with common buttons - 3");
564 info.dwCommonButtons = 0;
566 "default button: invalid default, no common buttons");
580 info.nDefaultButton = 0;
585 info.pRadioButtons = radio_buttons;
589 "default radio button: default first radio button");
594 "default radio button: default radio button");
597 info.nDefaultRadioButton = -2;
599 "default radio button: default radio button with id -2");
604 "default radio button: radio button after clicking");
609 "default radio button: disable radio button before clicking");
615 "default radio button: no default radio flag");
619 info.nDefaultRadioButton = 0;
622 "default radio button: no default radio id and flag");
626 info.nDefaultRadioButton = 0xff;
629 "default radio button: no default flag, invalid id");
631 info.nDefaultRadioButton = 0;
634 "radio button: manually click radio button with negative id");
638 info.pButtons = custom_buttons;
640 info.pRadioButtons = radio_buttons;
641 info.dwCommonButtons = 0;
648 "sends click to non-existent buttons with WM_COMMAND");
684 if (
data->num_fired == 3)
685 ok(
data->last_elapsed_ms > elapsed_ms,
"Expected reference time update.\n");
688 delta = elapsed_ms -
data->last_elapsed_ms;
689 ok(delta > 0,
"Expected positive time tick difference.\n");
691 data->last_elapsed_ms = elapsed_ms;
693 if (
data->num_fired == 3)
726 ok(
ret == PBST_NORMAL,
"Expect state: %d got state: %lx\n", PBST_NORMAL,
ret);
728 ok(
ret == PBST_NORMAL,
"Expect state: %d got state: %lx\n", PBST_NORMAL,
ret);
731 todo_wine ok(
ret == PBST_PAUSED,
"Expect state: %d got state: %lx\n", PBST_PAUSED,
ret);
733 todo_wine ok(
ret == PBST_ERROR,
"Expect state: %d got state: %lx\n", PBST_ERROR,
ret);
745 ok(
ret == 0,
"Expect position:%x got:%lx\n", 0,
ret);
747 ok(
ret == 0,
"Expect position:%x got:%lx\n", 0,
ret);
752 ok(
ret == 0,
"Expect position:%x got:%lx\n", 0,
ret);
754 ok(
ret == 1,
"Expect position:%x got:%lx\n", 1,
ret);
806 "default verification box: default checked and then unchecked");
810 "default verification box: default unchecked and then checked");
816 static const WCHAR textW[] = {
't',
'e',
'x',
't', 0};
817 static const WCHAR button_format[] = {
'%',
'0',
'2',
'd', 0};
837 info.pRadioButtons = radio_buttons;
885 if (!pTaskDialogIndirect)
887 win_skip(
"TaskDialogIndirect not exported by name\n");
895 ok(pTaskDialog == ptr_ordinal,
"got wrong pointer for ordinal 344, %p expected %p\n",
896 ptr_ordinal, pTaskDialog);
899 ok(pTaskDialogIndirect == ptr_ordinal,
"got wrong pointer for ordinal 345, %p expected %p\n",
900 ptr_ordinal, pTaskDialogIndirect);
static BOOL heap_free(void *mem)
static void init_msg_sequences(struct msg_sequence **seq, int n)
static void flush_sequences(struct msg_sequence **seq, int n)
#define GetProcAddress(x, y)
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryA(LPCSTR lpLibFileName)
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
static void test_messages(void)
static const struct message_info msg_return_verification_checked[]
static const struct message_info msg_return_press_retry[]
static void test_verification_box(void)
static const struct message_info msg_return_default_radio_button_clicking_disabled[]
static void test_progress_bar(void)
static HRESULT CALLBACK taskdialog_callback_proc_timer(HWND hwnd, UINT notification, WPARAM wParam, LPARAM lParam, LONG_PTR ref_data)
static const struct message_info msg_got_tdn_help[]
static const struct message_info msg_select_negative_id_radio_button[]
static const struct message_info msg_press_nonexistent_buttons_with_command[]
static const struct message_info msg_send_click_ok[]
static const struct message_info msg_return_press_yes[]
#define NUM_MSG_SEQUENCES
static void test_navigate_page(void)
static const struct message_info msg_return_verification_unchecked[]
static const struct message_info msg_send_close_then_ok[]
static const struct message_info msg_return_press_negative_id_radio_button[]
static int int BOOL *static const WCHAR const WCHAR const WCHAR TASKDIALOG_COMMON_BUTTON_FLAGS
#define run_test(info, expect_button, expect_radio_button, verification_checked, seq, context)
static HRESULT CALLBACK taskdialog_callback_proc(HWND hwnd, UINT notification, WPARAM wParam, LPARAM lParam, LONG_PTR ref_data)
static const struct message_info msg_return_press_no[]
static const struct message_info msg_select_first_disabled_radio_button_and_press_ok[]
static const struct message_info msg_return_press_ok[]
static const struct message_info msg_return_default_verification_checked[]
static void test_buttons(void)
static const struct message_info msg_send_all_common_button_click_with_command[]
static void test_help(void)
static void test_invalid_parameters(void)
static const struct message_info msg_send_close[]
static const struct message_info msg_uncheck_verification[]
static const struct message_info msg_handle_wm_close_without_cancel_button[]
static const struct message_info msg_return_default_radio_button_2[]
static const struct message_info msg_return_no_default_radio_button_id_and_flag[]
static const struct message_info msg_send_f1[]
static void test_wm_close(void)
static const struct message_info msg_handle_wm_close[]
#define TEST_NUM_RADIO_BUTTONS
static const struct message_info msg_return_first_radio_button[]
static int int BOOL *static HINSTANCE
static const LONG_PTR test_ref_data
static const struct message_info msg_return_no_default_radio_button_flag[]
static const struct message_info msg_send_navigate[]
static const struct message_info msg_return_default_verification_unchecked[]
static const struct message_info msg_send_return[]
static const struct message_info * current_message_info
static const struct message_info msg_return_press_custom10[]
static const struct message_info msg_send_nonexistent_radio_button_click[]
static TASKDIALOGCONFIG navigated_info
static const struct message_info msg_return_default_radio_button_3[]
static const struct message_info msg_press_nonexistent_buttons[]
static void test_callback(void)
static const struct message_info msg_return_default_radio_button_1[]
static const struct message_info msg_check_verification[]
static int int BOOL *static const WCHAR const WCHAR const WCHAR const WCHAR int *static struct msg_sequence * sequences[NUM_MSG_SEQUENCES]
static const struct message_info msg_press_nonexistent_radio_button[]
static const struct message_info msg_return_navigated_page[]
#define TASKDIALOG_SEQ_INDEX
static const struct message_info msg_select_first_radio_button[]
static void run_test_(TASKDIALOGCONFIG *info, int expect_button, int expect_radio_button, BOOL verification_checked, const struct message_info *test_messages, const char *context, int test_messages_len, const char *file, int line)
static void init_test_message(UINT message, WPARAM wParam, LPARAM lParam, struct message *msg)
static const struct message_info msg_send_all_common_button_click[]
static const struct message_info msg_return_press_custom1[]
static void test_timer(void)
static const struct message_info msg_return_press_cancel[]
#define ID_START_RADIO_BUTTON
static const struct message_info msg_return_press_custom4[]
static HRESULT CALLBACK taskdialog_callback_proc_progress_bar(HWND hwnd, UINT notification, WPARAM wParam, LPARAM lParam, LONG_PTR ref_data)
static const WCHAR textW[]
struct _TASKDIALOGCONFIG TASKDIALOGCONFIG
@ TDF_NO_DEFAULT_RADIO_BUTTON
@ TDF_ALLOW_DIALOG_CANCELLATION
@ TDF_USE_COMMAND_LINKS_NO_ICON
@ TDF_SHOW_MARQUEE_PROGRESS_BAR
@ TDF_VERIFICATION_FLAG_CHECKED
@ TDM_SET_PROGRESS_BAR_RANGE
@ TDM_ENABLE_RADIO_BUTTON
@ TDM_SET_PROGRESS_BAR_POS
@ TDM_SET_PROGRESS_BAR_STATE
@ TDN_VERIFICATION_CLICKED
@ TDN_RADIO_BUTTON_CLICKED
PCWSTR pszVerificationText
const struct message_info * send
static BOOL load_v6_module(ULONG_PTR *pcookie, HANDLE *hCtx)
static void unload_v6_module(ULONG_PTR cookie, HANDLE hCtx)
BOOL WINAPI PostMessageW(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
int WINAPIV wsprintfW(_Out_ LPWSTR, _In_ _Printf_format_string_ LPCWSTR,...)
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)