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
8138ac9a
Commit
8138ac9a
authored
Dec 01, 2017
by
Nikolay Sivov
Committed by
Alexandre Julliard
Dec 01, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/tests: Some cleanup for SysLink tests.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
084e772d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
48 deletions
+27
-48
syslink.c
dlls/comctl32/tests/syslink.c
+27
-48
No files found.
dlls/comctl32/tests/syslink.c
View file @
8138ac9a
...
...
@@ -180,39 +180,44 @@ static HWND create_syslink(DWORD style, HWND parent)
return
hWndSysLink
;
}
static
void
test_create_syslink
(
void
)
{
HWND
hWndSysLink
;
LONG
oldstyle
;
/* Create an invisible SysLink control */
flush_sequences
(
sequences
,
NUM_MSG_SEQUENCE
);
hWndSysLink
=
create_syslink
(
WS_CHILD
|
WS_TABSTOP
,
hWndParent
);
ok
(
hWndSysLink
!=
NULL
,
"Expected non NULL value (le %u)
\n
"
,
GetLastError
());
flush_events
();
ok_sequence
(
sequences
,
SYSLINK_SEQ_INDEX
,
empty_wnd_seq
,
"create SysLink"
,
FALSE
);
ok_sequence
(
sequences
,
PARENT_SEQ_INDEX
,
parent_create_syslink_wnd_seq
,
"create SysLink (parent)"
,
TRUE
);
/* Make the SysLink control visible */
flush_sequences
(
sequences
,
NUM_MSG_SEQUENCE
);
oldstyle
=
GetWindowLongA
(
hWndSysLink
,
GWL_STYLE
);
SetWindowLongA
(
hWndSysLink
,
GWL_STYLE
,
oldstyle
|
WS_VISIBLE
);
RedrawWindow
(
hWndSysLink
,
NULL
,
NULL
,
RDW_INVALIDATE
);
flush_events
();
ok_sequence
(
sequences
,
SYSLINK_SEQ_INDEX
,
visible_syslink_wnd_seq
,
"visible SysLink"
,
TRUE
);
ok_sequence
(
sequences
,
PARENT_SEQ_INDEX
,
parent_visible_syslink_wnd_seq
,
"visible SysLink (parent)"
,
TRUE
);
DestroyWindow
(
hWndSysLink
);
}
START_TEST
(
syslink
)
{
ULONG_PTR
ctx_cookie
;
HANDLE
hCtx
;
HMODULE
hComctl32
;
BOOL
(
WINAPI
*
pInitCommonControlsEx
)(
const
INITCOMMONCONTROLSEX
*
);
INITCOMMONCONTROLSEX
iccex
;
BOOL
rc
;
HWND
hWndSysLink
;
LONG
oldstyle
;
POINT
orig_pos
;
HANDLE
hCtx
;
if
(
!
load_v6_module
(
&
ctx_cookie
,
&
hCtx
))
return
;
/* LoadLibrary is needed. This file has no reference to functions in comctl32 */
hComctl32
=
LoadLibraryA
(
"comctl32.dll"
);
pInitCommonControlsEx
=
(
void
*
)
GetProcAddress
(
hComctl32
,
"InitCommonControlsEx"
);
if
(
!
pInitCommonControlsEx
)
{
win_skip
(
"InitCommonControlsEx() is missing. Skipping the tests
\n
"
);
return
;
}
iccex
.
dwSize
=
sizeof
(
iccex
);
iccex
.
dwICC
=
ICC_LINK_CLASS
;
rc
=
pInitCommonControlsEx
(
&
iccex
);
ok
(
rc
,
"InitCommonControlsEx failed (le %u)
\n
"
,
GetLastError
());
if
(
!
rc
)
{
skip
(
"Could not register ICC_LINK_CLASS
\n
"
);
return
;
}
ok
(
hComctl32
!=
NULL
,
"Failed to load comctl32.dll.
\n
"
);
/* Move the cursor off the parent window */
GetCursorPos
(
&
orig_pos
);
...
...
@@ -223,36 +228,10 @@ START_TEST(syslink)
/* Create parent window */
hWndParent
=
create_parent_window
();
ok
(
hWndParent
!=
NULL
,
"Failed to create parent Window!
\n
"
);
if
(
!
hWndParent
)
{
skip
(
"Parent window not present
\n
"
);
return
;
}
flush_events
();
/* Create an invisible SysLink control */
flush_sequences
(
sequences
,
NUM_MSG_SEQUENCE
);
hWndSysLink
=
create_syslink
(
WS_CHILD
|
WS_TABSTOP
,
hWndParent
);
ok
(
hWndSysLink
!=
NULL
,
"Expected non NULL value (le %u)
\n
"
,
GetLastError
());
if
(
!
hWndSysLink
)
{
skip
(
"SysLink control not present?
\n
"
);
return
;
}
flush_events
();
ok_sequence
(
sequences
,
SYSLINK_SEQ_INDEX
,
empty_wnd_seq
,
"create SysLink"
,
FALSE
);
ok_sequence
(
sequences
,
PARENT_SEQ_INDEX
,
parent_create_syslink_wnd_seq
,
"create SysLink (parent)"
,
TRUE
);
/* Make the SysLink control visible */
flush_sequences
(
sequences
,
NUM_MSG_SEQUENCE
);
oldstyle
=
GetWindowLongA
(
hWndSysLink
,
GWL_STYLE
);
SetWindowLongA
(
hWndSysLink
,
GWL_STYLE
,
oldstyle
|
WS_VISIBLE
);
RedrawWindow
(
hWndSysLink
,
NULL
,
NULL
,
RDW_INVALIDATE
);
flush_events
();
ok_sequence
(
sequences
,
SYSLINK_SEQ_INDEX
,
visible_syslink_wnd_seq
,
"visible SysLink"
,
TRUE
);
ok_sequence
(
sequences
,
PARENT_SEQ_INDEX
,
parent_visible_syslink_wnd_seq
,
"visible SysLink (parent)"
,
TRUE
);
test_create_syslink
();
DestroyWindow
(
hWndSysLink
);
DestroyWindow
(
hWndParent
);
unload_v6_module
(
ctx_cookie
,
hCtx
);
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