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
cbf7bdce
Commit
cbf7bdce
authored
Aug 09, 2021
by
Zhiyi Zhang
Committed by
Alexandre Julliard
Aug 09, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32/tests: Test that user32 loads uxtheme.
Signed-off-by:
Zhiyi Zhang
<
zzhang@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
78108f74
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
50 additions
and
0 deletions
+50
-0
class.c
dlls/user32/tests/class.c
+50
-0
No files found.
dlls/user32/tests/class.c
View file @
cbf7bdce
...
...
@@ -1490,6 +1490,55 @@ static void test_actctx_classes(void)
ReleaseActCtx
(
context
);
}
static
void
test_uxtheme
(
void
)
{
static
const
CHAR
*
class_name
=
"test_uxtheme_class"
;
BOOL
(
WINAPI
*
pIsThemeActive
)(
void
);
BOOL
dll_loaded
,
is_theme_active
;
WNDCLASSEXA
class
;
HMODULE
uxtheme
;
ATOM
atom
;
HWND
hwnd
;
memset
(
&
class
,
0
,
sizeof
(
class
));
class
.
cbSize
=
sizeof
(
class
);
class
.
lpfnWndProc
=
DefWindowProcA
;
class
.
hInstance
=
GetModuleHandleA
(
NULL
);
class
.
lpszClassName
=
class_name
;
atom
=
RegisterClassExA
(
&
class
);
ok
(
atom
,
"RegisterClassExA failed, error %u.
\n
"
,
GetLastError
());
dll_loaded
=
!!
GetModuleHandleA
(
"comctl32.dll"
);
ok
(
!
dll_loaded
,
"Expected comctl32.dll not loaded.
\n
"
);
dll_loaded
=
!!
GetModuleHandleA
(
"uxtheme.dll"
);
ok
(
!
dll_loaded
,
"Expected uxtheme.dll not loaded.
\n
"
);
/* Creating a window triggers uxtheme load when theming is active */
hwnd
=
CreateWindowA
(
class_name
,
"Test"
,
WS_POPUP
,
0
,
0
,
1
,
1
,
NULL
,
NULL
,
GetModuleHandleA
(
NULL
),
NULL
);
ok
(
!!
hwnd
,
"Failed to create a test window, error %u.
\n
"
,
GetLastError
());
dll_loaded
=
!!
GetModuleHandleA
(
"comctl32.dll"
);
ok
(
!
dll_loaded
,
"Expected comctl32.dll not loaded.
\n
"
);
/* Uxtheme is loaded when theming is active */
dll_loaded
=
!!
GetModuleHandleA
(
"uxtheme.dll"
);
uxtheme
=
LoadLibraryA
(
"uxtheme.dll"
);
ok
(
!!
uxtheme
,
"Failed to load uxtheme.dll, error %u.
\n
"
,
GetLastError
());
pIsThemeActive
=
(
void
*
)
GetProcAddress
(
uxtheme
,
"IsThemeActive"
);
ok
(
!!
pIsThemeActive
,
"Failed to load IsThemeActive, error %u.
\n
"
,
GetLastError
());
is_theme_active
=
pIsThemeActive
();
FreeLibrary
(
uxtheme
);
todo_wine_if
(
is_theme_active
)
ok
(
dll_loaded
==
is_theme_active
,
"Expected uxtheme %s when theming is %s.
\n
"
,
is_theme_active
?
"loaded"
:
"not loaded"
,
is_theme_active
?
"active"
:
"inactive"
);
DestroyWindow
(
hwnd
);
UnregisterClassA
(
class_name
,
GetModuleHandleA
(
NULL
));
}
START_TEST
(
class
)
{
char
**
argv
;
...
...
@@ -1502,6 +1551,7 @@ START_TEST(class)
return
;
}
test_uxtheme
();
test_IME
();
test_GetClassInfo
();
test_extra_values
();
...
...
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