Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
2a6a2b04
Commit
2a6a2b04
authored
Jun 27, 2022
by
Zhiyi Zhang
Committed by
Alexandre Julliard
Jun 29, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
uxtheme/tests: Add dialog procedure message tests.
Signed-off-by:
Zhiyi Zhang
<
zzhang@codeweavers.com
>
parent
e6155827
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
64 additions
and
0 deletions
+64
-0
system.c
dlls/uxtheme/tests/system.c
+64
-0
No files found.
dlls/uxtheme/tests/system.c
View file @
2a6a2b04
...
...
@@ -1614,6 +1614,37 @@ static const struct message empty_seq[] =
{
0
}
};
static
const
struct
message
wm_erasebkgnd_seq
[]
=
{
{
WM_ERASEBKGND
,
sent
},
{
WM_CTLCOLORDLG
,
sent
},
{
0
}
};
static
const
struct
message
wm_ctlcolormsgbox_seq
[]
=
{
{
WM_CTLCOLORMSGBOX
,
sent
},
{
0
}
};
static
const
struct
message
wm_ctlcolorbtn_seq
[]
=
{
{
WM_CTLCOLORBTN
,
sent
},
{
0
}
};
static
const
struct
message
wm_ctlcolordlg_seq
[]
=
{
{
WM_CTLCOLORDLG
,
sent
},
{
0
}
};
static
const
struct
message
wm_ctlcolorstatic_seq
[]
=
{
{
WM_CTLCOLORSTATIC
,
sent
},
{
0
}
};
static
HWND
dialog_child
;
static
DWORD
dialog_init_flag
;
static
BOOL
handle_WM_ERASEBKGND
;
...
...
@@ -1673,6 +1704,7 @@ static void test_EnableThemeDialogTexture(void)
HBRUSH
brush
,
brush2
;
HDC
child_hdc
,
hdc
;
LOGBRUSH
log_brush
;
char
buffer
[
32
];
ULONG_PTR
proc
;
WNDCLASSA
cls
;
HTHEME
theme
;
...
...
@@ -1779,6 +1811,20 @@ static void test_EnableThemeDialogTexture(void)
{{
WC_SCROLLBARA
}},
};
static
const
struct
message_test
{
UINT
msg
;
const
struct
message
*
msg_seq
;
}
message_tests
[]
=
{
{
WM_ERASEBKGND
,
wm_erasebkgnd_seq
},
{
WM_CTLCOLORMSGBOX
,
wm_ctlcolormsgbox_seq
},
{
WM_CTLCOLORBTN
,
wm_ctlcolorbtn_seq
},
{
WM_CTLCOLORDLG
,
wm_ctlcolordlg_seq
},
{
WM_CTLCOLORSTATIC
,
wm_ctlcolorstatic_seq
},
};
if
(
!
IsThemeActive
())
{
skip
(
"Theming is inactive.
\n
"
);
...
...
@@ -2260,6 +2306,24 @@ static void test_EnableThemeDialogTexture(void)
DestroyWindow
(
hwnd2
);
DestroyWindow
(
hwnd
);
/* Test that application dialog procedures should be called only once for each message */
dialog
=
CreateDialogIndirectParamA
(
NULL
,
&
temp
.
template
,
GetDesktopWindow
(),
test_EnableThemeDialogTexture_proc
,
(
LPARAM
)
&
param
);
ok
(
dialog
!=
NULL
,
"CreateDialogIndirectParamA failed, error %ld.
\n
"
,
GetLastError
());
child
=
dialog_child
;
ok
(
child
!=
NULL
,
"Failed to get child control, error %ld.
\n
"
,
GetLastError
());
child_hdc
=
GetDC
(
child
);
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
message_tests
);
++
i
)
{
sprintf
(
buffer
,
"message %#x
\n
"
,
message_tests
[
i
].
msg
);
flush_sequences
(
sequences
,
NUM_MSG_SEQUENCES
);
SendMessageW
(
dialog
,
message_tests
[
i
].
msg
,
(
WPARAM
)
child_hdc
,
(
LPARAM
)
child
);
ok_sequence
(
sequences
,
PARENT_SEQ_INDEX
,
message_tests
[
i
].
msg_seq
,
buffer
,
TRUE
);
}
ReleaseDC
(
child
,
child_hdc
);
EndDialog
(
dialog
,
0
);
UnregisterClassA
(
cls
.
lpszClassName
,
GetModuleHandleA
(
NULL
));
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment