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
d9c5cef3
Commit
d9c5cef3
authored
Jun 27, 2006
by
Paul Vriens
Committed by
Alexandre Julliard
Jun 27, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
uxtheme/tests: Add tests for IsThemePartDefined.
parent
3a40b175
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
5 deletions
+26
-5
system.c
dlls/uxtheme/tests/system.c
+26
-5
No files found.
dlls/uxtheme/tests/system.c
View file @
d9c5cef3
...
...
@@ -30,6 +30,7 @@ static HRESULT (WINAPI * pGetCurrentThemeName)(LPWSTR, int, LPWSTR, int, LPWSTR,
static
HTHEME
(
WINAPI
*
pGetWindowTheme
)(
HWND
);
static
BOOL
(
WINAPI
*
pIsAppThemed
)(
VOID
);
static
BOOL
(
WINAPI
*
pIsThemeActive
)(
VOID
);
static
BOOL
(
WINAPI
*
pIsThemePartDefined
)(
HTHEME
,
int
,
int
);
static
HTHEME
(
WINAPI
*
pOpenThemeData
)(
HWND
,
LPCWSTR
);
static
HRESULT
(
WINAPI
*
pSetWindowTheme
)(
HWND
,
LPCWSTR
,
LPCWSTR
);
...
...
@@ -57,6 +58,7 @@ static BOOL InitFunctionPtrs(void)
UXTHEME_GET_PROC
(
GetWindowTheme
)
UXTHEME_GET_PROC
(
IsAppThemed
)
UXTHEME_GET_PROC
(
IsThemeActive
)
UXTHEME_GET_PROC
(
IsThemePartDefined
)
UXTHEME_GET_PROC
(
OpenThemeData
)
UXTHEME_GET_PROC
(
SetWindowTheme
)
}
...
...
@@ -64,10 +66,10 @@ static BOOL InitFunctionPtrs(void)
* be checked (at some point in time) within the single tests if needed. All used functions for
* now are present on WinXP, W2K3 and Wine.
*/
if
(
!
pCloseThemeData
||
!
pGet
WindowThe
me
||
!
p
IsAppThemed
||
!
pIsThemeActive
||
!
p
OpenThemeData
||
!
pSetWindowTheme
||
!
p
GetCurrentThemeNa
me
)
if
(
!
pCloseThemeData
||
!
pGet
CurrentThemeNa
me
||
!
p
GetWindowTheme
||
!
pIsAppThemed
||
!
p
IsThemeActive
||
!
pIsThemePartDefined
||
!
p
OpenThemeData
||
!
pSetWindowThe
me
)
return
FALSE
;
return
TRUE
;
...
...
@@ -77,6 +79,7 @@ static void test_IsThemed(void)
{
BOOL
bThemeActive
;
BOOL
bAppThemed
;
BOOL
bTPDefined
;
SetLastError
(
0xdeadbeef
);
bThemeActive
=
pIsThemeActive
();
...
...
@@ -101,6 +104,13 @@ static void test_IsThemed(void)
ok
(
GetLastError
()
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got 0x%08lx
\n
"
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
bTPDefined
=
pIsThemePartDefined
(
NULL
,
0
,
0
);
ok
(
bTPDefined
==
FALSE
,
"Expected FALSE
\n
"
);
ok
(
GetLastError
()
==
E_HANDLE
,
"Expected E_HANDLE, got 0x%08lx
\n
"
,
GetLastError
());
}
static
void
test_GetWindowTheme
(
void
)
...
...
@@ -174,6 +184,7 @@ static void test_OpenThemeData(void)
BOOL
bThemeActive
;
HRESULT
hRes
;
BOOL
bDestroyed
;
BOOL
bTPDefined
;
WCHAR
szInvalidClassList
[]
=
{
'D'
,
'E'
,
'A'
,
'D'
,
'B'
,
'E'
,
'E'
,
'F'
,
0
};
WCHAR
szButtonClassList
[]
=
{
'B'
,
'u'
,
't'
,
't'
,
'o'
,
'n'
,
0
};
...
...
@@ -313,6 +324,16 @@ static void test_OpenThemeData(void)
"Expected 0xdeadbeef, got 0x%08lx
\n
"
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
bTPDefined
=
pIsThemePartDefined
(
hTheme
,
0
,
0
);
todo_wine
{
ok
(
bTPDefined
==
FALSE
,
"Expected FALSE
\n
"
);
ok
(
GetLastError
()
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got 0x%08lx
\n
"
,
GetLastError
());
}
bDestroyed
=
DestroyWindow
(
hWnd
);
if
(
!
bDestroyed
)
trace
(
"Window %p couldn't be destroyed : 0x%08lx
\n
"
,
...
...
@@ -461,7 +482,7 @@ START_TEST(system)
* only show input/return behaviour
*/
/* IsThemeActive
and IsAppThemed
*/
/* IsThemeActive
, IsAppThemed and IsThemePartDefined
*/
trace
(
"Starting test_IsThemed()
\n
"
);
test_IsThemed
();
...
...
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