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
dc328fe3
Commit
dc328fe3
authored
Mar 06, 2018
by
Piotr Caban
Committed by
Alexandre Julliard
Mar 06, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/tests: Add out of visible area item expand test.
Signed-off-by:
Piotr Caban
<
piotr@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
c195311c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
0 deletions
+44
-0
treeview.c
dlls/comctl32/tests/treeview.c
+44
-0
No files found.
dlls/comctl32/tests/treeview.c
View file @
dc328fe3
...
...
@@ -1528,6 +1528,49 @@ static void test_expandinvisible(void)
DestroyWindow
(
hTree
);
}
static
void
test_expand
(
void
)
{
HTREEITEM
first
,
second
,
last
,
child
;
TVINSERTSTRUCTA
ins
;
BOOL
visible
;
RECT
rect
;
HWND
tv
;
int
i
;
tv
=
create_treeview_control
(
0
);
ins
.
hParent
=
TVI_ROOT
;
ins
.
hInsertAfter
=
TVI_LAST
;
U
(
ins
).
item
.
mask
=
0
;
first
=
TreeView_InsertItemA
(
tv
,
&
ins
);
ok
(
first
!=
NULL
,
"failed to insert first node
\n
"
);
second
=
TreeView_InsertItemA
(
tv
,
&
ins
);
ok
(
second
!=
NULL
,
"failed to insert second node
\n
"
);
for
(
i
=
0
;
i
<
100
;
i
++
)
{
last
=
TreeView_InsertItemA
(
tv
,
&
ins
);
ok
(
last
!=
NULL
,
"failed to insert %d node
\n
"
,
i
);
}
ins
.
hParent
=
second
;
child
=
TreeView_InsertItemA
(
tv
,
&
ins
);
ok
(
child
!=
NULL
,
"failed to insert child node
\n
"
);
ok
(
SendMessageA
(
tv
,
TVM_SELECTITEM
,
TVGN_CARET
,
(
LPARAM
)
last
),
"last node selection failed
\n
"
);
ok
(
SendMessageA
(
tv
,
TVM_EXPAND
,
TVE_EXPAND
,
(
LPARAM
)
second
),
"expand of second node failed
\n
"
);
ok
(
SendMessageA
(
tv
,
TVM_SELECTITEM
,
TVGN_CARET
,
(
LPARAM
)
first
),
"first node selection failed
\n
"
);
*
(
HTREEITEM
*
)
&
rect
=
first
;
visible
=
SendMessageA
(
tv
,
TVM_GETITEMRECT
,
FALSE
,
(
LPARAM
)
&
rect
);
ok
(
visible
,
"first node should be visible
\n
"
);
ok
(
!
rect
.
left
,
"rect.left = %d
\n
"
,
rect
.
left
);
ok
(
!
rect
.
top
,
"rect.top = %d
\n
"
,
rect
.
top
);
ok
(
rect
.
right
,
"rect.right = 0
\n
"
);
ok
(
rect
.
bottom
,
"rect.bottom = 0
\n
"
);
DestroyWindow
(
tv
);
}
static
void
test_itemedit
(
void
)
{
DWORD
r
;
...
...
@@ -2859,6 +2902,7 @@ START_TEST(treeview)
test_get_set_tooltips
();
test_get_set_unicodeformat
();
test_expandinvisible
();
test_expand
();
test_itemedit
();
test_treeview_classinfo
();
test_delete_items
();
...
...
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