Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
9fa5f83a
Commit
9fa5f83a
authored
Jun 23, 2022
by
Zhiyi Zhang
Committed by
Alexandre Julliard
Jun 27, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
uxtheme/tests: Add GetThemeBackgroundRegion() tests.
Signed-off-by:
Zhiyi Zhang
<
zzhang@codeweavers.com
>
parent
b7644afa
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
0 deletions
+35
-0
system.c
dlls/uxtheme/tests/system.c
+35
-0
No files found.
dlls/uxtheme/tests/system.c
View file @
9fa5f83a
...
@@ -2399,6 +2399,40 @@ static void test_DrawThemeBackgroundEx(void)
...
@@ -2399,6 +2399,40 @@ static void test_DrawThemeBackgroundEx(void)
DestroyWindow
(
hwnd
);
DestroyWindow
(
hwnd
);
}
}
static
void
test_GetThemeBackgroundRegion
(
void
)
{
HTHEME
htheme
;
HRGN
region
;
HRESULT
hr
;
HWND
hwnd
;
RECT
rect
;
int
ret
;
hwnd
=
CreateWindowA
(
WC_STATICA
,
""
,
WS_POPUP
,
0
,
0
,
1
,
1
,
0
,
0
,
0
,
NULL
);
ok
(
hwnd
!=
NULL
,
"CreateWindowA failed, error %#lx.
\n
"
,
GetLastError
());
htheme
=
OpenThemeData
(
hwnd
,
L"Rebar"
);
if
(
!
htheme
)
{
skip
(
"Theming is inactive.
\n
"
);
DestroyWindow
(
hwnd
);
return
;
}
hr
=
GetThemeEnumValue
(
htheme
,
RP_BAND
,
0
,
TMT_BGTYPE
,
&
ret
);
ok
(
hr
==
S_OK
,
"Got unexpected hr %#lx,
\n
"
,
hr
);
ok
(
ret
==
BT_NONE
,
"Got expected type %d.
\n
"
,
ret
);
SetRect
(
&
rect
,
0
,
0
,
10
,
10
);
region
=
(
HRGN
)
0xdeadbeef
;
hr
=
GetThemeBackgroundRegion
(
htheme
,
NULL
,
RP_BAND
,
0
,
&
rect
,
&
region
);
todo_wine
ok
(
hr
==
E_UNEXPECTED
||
broken
(
hr
==
S_OK
)
/* < Win10 */
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
ok
(
region
==
(
HRGN
)
0xdeadbeef
,
"Got unexpected region.
\n
"
);
CloseThemeData
(
htheme
);
DestroyWindow
(
hwnd
);
}
START_TEST
(
system
)
START_TEST
(
system
)
{
{
ULONG_PTR
ctx_cookie
;
ULONG_PTR
ctx_cookie
;
...
@@ -2422,6 +2456,7 @@ START_TEST(system)
...
@@ -2422,6 +2456,7 @@ START_TEST(system)
test_GetThemeTransitionDuration
();
test_GetThemeTransitionDuration
();
test_DrawThemeParentBackground
();
test_DrawThemeParentBackground
();
test_DrawThemeBackgroundEx
();
test_DrawThemeBackgroundEx
();
test_GetThemeBackgroundRegion
();
if
(
load_v6_module
(
&
ctx_cookie
,
&
ctx
))
if
(
load_v6_module
(
&
ctx_cookie
,
&
ctx
))
{
{
...
...
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