Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alexey Alyaev
wine
Commits
36a775d0
Commit
36a775d0
authored
18 years ago
by
Paul Vriens
Committed by
Alexandre Julliard
18 years ago
Browse files
Options
Downloads
Patches
Plain Diff
uxtheme/tests: Add some tests for GetWindowTheme.
parent
b865c07d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dlls/uxtheme/tests/system.c
+32
-0
32 additions, 0 deletions
dlls/uxtheme/tests/system.c
with
32 additions
and
0 deletions
dlls/uxtheme/tests/system.c
+
32
−
0
View file @
36a775d0
...
...
@@ -26,6 +26,7 @@
#include
"wine/test.h"
static
HRESULT
(
WINAPI
*
pCloseThemeData
)(
HTHEME
);
static
HTHEME
(
WINAPI
*
pGetWindowTheme
)(
HWND
);
static
BOOL
(
WINAPI
*
pIsAppThemed
)(
VOID
);
static
BOOL
(
WINAPI
*
pIsThemeActive
)(
VOID
);
static
HTHEME
(
WINAPI
*
pOpenThemeData
)(
HWND
,
LPCWSTR
);
...
...
@@ -51,6 +52,7 @@ static BOOL InitFunctionPtrs(void)
if
(
hUxtheme
)
{
UXTHEME_GET_PROC
(
CloseThemeData
)
UXTHEME_GET_PROC
(
GetWindowTheme
)
UXTHEME_GET_PROC
(
IsAppThemed
)
UXTHEME_GET_PROC
(
IsThemeActive
)
UXTHEME_GET_PROC
(
OpenThemeData
)
...
...
@@ -89,6 +91,31 @@ static void test_IsThemed(void)
GetLastError
());
}
static
void
test_GetWindowTheme
(
void
)
{
HTHEME
hTheme
;
HWND
hWnd
;
SetLastError
(
0xdeadbeef
);
hTheme
=
pGetWindowTheme
(
NULL
);
ok
(
hTheme
==
NULL
,
"Expected a NULL return, got %p
\n
"
,
hTheme
);
todo_wine
ok
(
GetLastError
()
==
E_HANDLE
,
"Expected E_HANDLE, got 0x%08lx
\n
"
,
GetLastError
());
/* Only do the bare minumum to get a valid hwnd */
hWnd
=
CreateWindowExA
(
0
,
"static"
,
""
,
WS_POPUP
,
0
,
0
,
100
,
100
,
0
,
0
,
0
,
NULL
);
if
(
!
hWnd
)
return
;
SetLastError
(
0xdeadbeef
);
hTheme
=
pGetWindowTheme
(
hWnd
);
ok
(
hTheme
==
NULL
,
"Expected a NULL return, got %p
\n
"
,
hTheme
);
ok
(
GetLastError
()
==
0xdeadbeef
,
"Expected 0xdeadbeef, got 0x%08lx
\n
"
,
GetLastError
());
}
static
void
test_SetWindowTheme
(
void
)
{
HRESULT
hRes
;
...
...
@@ -244,6 +271,11 @@ START_TEST(system)
if
(
pIsAppThemed
&&
pIsThemeActive
)
test_IsThemed
();
/* GetWindowTheme */
trace
(
"Starting test_GetWindowTheme()
\n
"
);
if
(
pGetWindowTheme
)
test_GetWindowTheme
();
/* SetWindowTheme */
trace
(
"Starting test_SetWindowTheme()
\n
"
);
if
(
pSetWindowTheme
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment