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
3a3f4060
Commit
3a3f4060
authored
May 13, 2022
by
Francois Gouget
Committed by
Alexandre Julliard
May 16, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/tests: Use winetest_push_context() in tooltip:test_customdraw().
Signed-off-by:
Francois Gouget
<
fgouget@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
43363df3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
10 deletions
+12
-10
tooltips.c
dlls/comctl32/tests/tooltips.c
+12
-10
No files found.
dlls/comctl32/tests/tooltips.c
View file @
3a3f4060
...
...
@@ -188,6 +188,7 @@ static void test_customdraw(void) {
HWND
parent
,
hwndTip
;
RECT
rect
;
TTTOOLINFOA
toolInfo
=
{
0
};
winetest_push_context
(
"%ld"
,
iterationNumber
);
/* Create a main window */
parent
=
CreateWindowExA
(
0
,
"CustomDrawClass"
,
NULL
,
...
...
@@ -196,7 +197,7 @@ static void test_customdraw(void) {
50
,
50
,
300
,
300
,
NULL
,
NULL
,
NULL
,
0
);
ok
(
parent
!=
NULL
,
"
%ld: Creation of main window failed
\n
"
,
iterationNumber
);
ok
(
parent
!=
NULL
,
"
Creation of main window failed
\n
"
);
/* Make it show */
ShowWindow
(
parent
,
SW_SHOWNORMAL
);
...
...
@@ -208,7 +209,7 @@ static void test_customdraw(void) {
CW_USEDEFAULT
,
CW_USEDEFAULT
,
CW_USEDEFAULT
,
CW_USEDEFAULT
,
parent
,
NULL
,
GetModuleHandleA
(
NULL
),
0
);
ok
(
hwndTip
!=
NULL
,
"
%ld: Creation of tooltip window failed
\n
"
,
iterationNumber
);
ok
(
hwndTip
!=
NULL
,
"
Creation of tooltip window failed
\n
"
);
/* Set up parms for the wndproc to handle */
CD_Stages
=
0
;
...
...
@@ -229,7 +230,7 @@ static void test_customdraw(void) {
toolInfo
.
lParam
=
0xdeadbeef
;
GetClientRect
(
parent
,
&
toolInfo
.
rect
);
ret
=
SendMessageA
(
hwndTip
,
TTM_ADDTOOLA
,
0
,
(
LPARAM
)
&
toolInfo
);
ok
(
ret
,
"
%ld: Failed to add the tool.
\n
"
,
iterationNumber
);
ok
(
ret
,
"
Failed to add the tool.
\n
"
);
/* Make tooltip appear quickly */
SendMessageA
(
hwndTip
,
TTM_SETDELAYTIME
,
TTDT_INITIAL
,
MAKELPARAM
(
1
,
0
));
...
...
@@ -243,27 +244,28 @@ static void test_customdraw(void) {
{
/* Check CustomDraw results */
ok
(
CD_Stages
==
expectedResults
[
iterationNumber
].
ExpectedCalls
,
"
%ld: CustomDraw stages %x, expected %x
\n
"
,
iterationNumber
,
CD_Stages
,
"
CustomDraw stages %x, expected %x
\n
"
,
CD_Stages
,
expectedResults
[
iterationNumber
].
ExpectedCalls
);
}
ret
=
SendMessageA
(
hwndTip
,
TTM_GETCURRENTTOOLA
,
0
,
0
);
ok
(
ret
,
"
%ld: Failed to get current tool %#Ix.
\n
"
,
iterationNumber
,
ret
);
ok
(
ret
,
"
Failed to get current tool %#Ix.
\n
"
,
ret
);
memset
(
&
toolInfo
,
0xcc
,
sizeof
(
toolInfo
));
toolInfo
.
cbSize
=
sizeof
(
toolInfo
);
toolInfo
.
lpszText
=
NULL
;
toolInfo
.
lpReserved
=
(
void
*
)
0xdeadbeef
;
SendMessageA
(
hwndTip
,
TTM_GETCURRENTTOOLA
,
0
,
(
LPARAM
)
&
toolInfo
);
ok
(
toolInfo
.
hwnd
==
parent
,
"
%ld: Unexpected hwnd %p.
\n
"
,
iterationNumber
,
toolInfo
.
hwnd
);
ok
(
toolInfo
.
hinst
==
GetModuleHandleA
(
NULL
),
"
%ld: Unexpected hinst %p.
\n
"
,
iterationNumber
,
toolInfo
.
hinst
);
ok
(
toolInfo
.
uId
==
0x1234abcd
,
"
%ld: Unexpected uId %Ix.
\n
"
,
iterationNumber
,
toolInfo
.
uId
);
ok
(
toolInfo
.
lParam
==
0
,
"
%ld: Unexpected lParam %Ix.
\n
"
,
iterationNumber
,
toolInfo
.
lParam
);
ok
(
toolInfo
.
lpReserved
==
(
void
*
)
0xdeadbeef
,
"
%ld: Unexpected lpReserved %p.
\n
"
,
iterationNumber
,
toolInfo
.
lpReserved
);
ok
(
toolInfo
.
hwnd
==
parent
,
"
Unexpected hwnd %p.
\n
"
,
toolInfo
.
hwnd
);
ok
(
toolInfo
.
hinst
==
GetModuleHandleA
(
NULL
),
"
Unexpected hinst %p.
\n
"
,
toolInfo
.
hinst
);
ok
(
toolInfo
.
uId
==
0x1234abcd
,
"
Unexpected uId %Ix.
\n
"
,
toolInfo
.
uId
);
ok
(
toolInfo
.
lParam
==
0
,
"
Unexpected lParam %Ix.
\n
"
,
toolInfo
.
lParam
);
ok
(
toolInfo
.
lpReserved
==
(
void
*
)
0xdeadbeef
,
"
Unexpected lpReserved %p.
\n
"
,
toolInfo
.
lpReserved
);
/* Clean up */
DestroyWindow
(
hwndTip
);
DestroyWindow
(
parent
);
winetest_pop_context
();
}
SetCursorPos
(
orig_pos
.
x
,
orig_pos
.
y
);
...
...
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