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
36a775d0
Commit
36a775d0
authored
Jun 21, 2006
by
Paul Vriens
Committed by
Alexandre Julliard
Jun 22, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
uxtheme/tests: Add some tests for GetWindowTheme.
parent
b865c07d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
0 deletions
+32
-0
system.c
dlls/uxtheme/tests/system.c
+32
-0
No files found.
dlls/uxtheme/tests/system.c
View file @
36a775d0
...
@@ -26,6 +26,7 @@
...
@@ -26,6 +26,7 @@
#include "wine/test.h"
#include "wine/test.h"
static
HRESULT
(
WINAPI
*
pCloseThemeData
)(
HTHEME
);
static
HRESULT
(
WINAPI
*
pCloseThemeData
)(
HTHEME
);
static
HTHEME
(
WINAPI
*
pGetWindowTheme
)(
HWND
);
static
BOOL
(
WINAPI
*
pIsAppThemed
)(
VOID
);
static
BOOL
(
WINAPI
*
pIsAppThemed
)(
VOID
);
static
BOOL
(
WINAPI
*
pIsThemeActive
)(
VOID
);
static
BOOL
(
WINAPI
*
pIsThemeActive
)(
VOID
);
static
HTHEME
(
WINAPI
*
pOpenThemeData
)(
HWND
,
LPCWSTR
);
static
HTHEME
(
WINAPI
*
pOpenThemeData
)(
HWND
,
LPCWSTR
);
...
@@ -51,6 +52,7 @@ static BOOL InitFunctionPtrs(void)
...
@@ -51,6 +52,7 @@ static BOOL InitFunctionPtrs(void)
if
(
hUxtheme
)
if
(
hUxtheme
)
{
{
UXTHEME_GET_PROC
(
CloseThemeData
)
UXTHEME_GET_PROC
(
CloseThemeData
)
UXTHEME_GET_PROC
(
GetWindowTheme
)
UXTHEME_GET_PROC
(
IsAppThemed
)
UXTHEME_GET_PROC
(
IsAppThemed
)
UXTHEME_GET_PROC
(
IsThemeActive
)
UXTHEME_GET_PROC
(
IsThemeActive
)
UXTHEME_GET_PROC
(
OpenThemeData
)
UXTHEME_GET_PROC
(
OpenThemeData
)
...
@@ -89,6 +91,31 @@ static void test_IsThemed(void)
...
@@ -89,6 +91,31 @@ static void test_IsThemed(void)
GetLastError
());
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
)
static
void
test_SetWindowTheme
(
void
)
{
{
HRESULT
hRes
;
HRESULT
hRes
;
...
@@ -244,6 +271,11 @@ START_TEST(system)
...
@@ -244,6 +271,11 @@ START_TEST(system)
if
(
pIsAppThemed
&&
pIsThemeActive
)
if
(
pIsAppThemed
&&
pIsThemeActive
)
test_IsThemed
();
test_IsThemed
();
/* GetWindowTheme */
trace
(
"Starting test_GetWindowTheme()
\n
"
);
if
(
pGetWindowTheme
)
test_GetWindowTheme
();
/* SetWindowTheme */
/* SetWindowTheme */
trace
(
"Starting test_SetWindowTheme()
\n
"
);
trace
(
"Starting test_SetWindowTheme()
\n
"
);
if
(
pSetWindowTheme
)
if
(
pSetWindowTheme
)
...
...
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