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
b7104580
Commit
b7104580
authored
Aug 31, 2022
by
Zhiyi Zhang
Committed by
Alexandre Julliard
Sep 01, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
uxtheme/tests: Add theme tests.
parent
5d9f0be0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
0 deletions
+45
-0
system.c
dlls/uxtheme/tests/system.c
+45
-0
No files found.
dlls/uxtheme/tests/system.c
View file @
b7104580
...
...
@@ -2550,6 +2550,50 @@ static void test_GetThemeBackgroundRegion(void)
DestroyWindow
(
hwnd
);
}
static
void
test_theme
(
void
)
{
BOOL
transparent
;
HTHEME
htheme
;
HRESULT
hr
;
HWND
hwnd
;
if
(
!
IsThemeActive
())
{
skip
(
"Theming is inactive.
\n
"
);
return
;
}
hwnd
=
CreateWindowA
(
WC_STATICA
,
""
,
WS_POPUP
,
0
,
0
,
1
,
1
,
0
,
0
,
0
,
NULL
);
ok
(
!!
hwnd
,
"CreateWindowA failed, error %#lx.
\n
"
,
GetLastError
());
/* Test that scrollbar arrow parts are transparent */
htheme
=
OpenThemeData
(
hwnd
,
L"ScrollBar"
);
ok
(
!!
htheme
,
"OpenThemeData failed.
\n
"
);
transparent
=
FALSE
;
hr
=
GetThemeBool
(
htheme
,
SBP_ARROWBTN
,
0
,
TMT_TRANSPARENT
,
&
transparent
);
/* XP does use opaque scrollbar arrow parts and TMT_TRANSPARENT is FALSE */
if
(
LOBYTE
(
LOWORD
(
GetVersion
()))
<
6
)
{
ok
(
hr
==
E_PROP_ID_UNSUPPORTED
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
transparent
=
IsThemeBackgroundPartiallyTransparent
(
htheme
,
SBP_ARROWBTN
,
0
);
ok
(
!
transparent
,
"Expected opaque.
\n
"
);
}
/* > XP use opaque scrollbar arrow parts, but TMT_TRANSPARENT is TRUE */
else
{
ok
(
hr
==
S_OK
,
"Got unexpected hr %#lx,
\n
"
,
hr
);
ok
(
transparent
,
"Expected transparent.
\n
"
);
transparent
=
IsThemeBackgroundPartiallyTransparent
(
htheme
,
SBP_ARROWBTN
,
0
);
ok
(
transparent
,
"Expected transparent.
\n
"
);
}
CloseThemeData
(
htheme
);
DestroyWindow
(
hwnd
);
}
START_TEST
(
system
)
{
ULONG_PTR
ctx_cookie
;
...
...
@@ -2574,6 +2618,7 @@ START_TEST(system)
test_DrawThemeParentBackground
();
test_DrawThemeBackgroundEx
();
test_GetThemeBackgroundRegion
();
test_theme
();
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