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
d9c2a91f
Commit
d9c2a91f
authored
Feb 10, 2008
by
Reece H. Dunn
Committed by
Alexandre Julliard
Feb 15, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Improve the combo tests to check when the CBN_SELCHANGE notification is sent.
parent
43ed6eae
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
2 deletions
+27
-2
combo.c
dlls/user32/tests/combo.c
+27
-2
No files found.
dlls/user32/tests/combo.c
View file @
d9c2a91f
...
...
@@ -162,6 +162,7 @@ static void test_setfont(DWORD style)
static
LRESULT
(
CALLBACK
*
old_parent_proc
)(
HWND
hwnd
,
UINT
msg
,
WPARAM
wparam
,
LPARAM
lparam
);
static
LPCSTR
expected_edit_text
;
static
LPCSTR
expected_list_text
;
static
BOOL
selchange_fired
;
static
LRESULT
CALLBACK
parent_wnd_proc
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wparam
,
LPARAM
lparam
)
{
...
...
@@ -187,6 +188,8 @@ static LRESULT CALLBACK parent_wnd_proc(HWND hwnd, UINT msg, WPARAM wparam, LPAR
edit
,
expected_edit_text
);
ok
(
!
strcmp
(
list
,
expected_list_text
),
"list: got %s, expected %s
\n
"
,
list
,
expected_list_text
);
selchange_fired
=
TRUE
;
}
break
;
}
...
...
@@ -213,17 +216,39 @@ static void test_selection(DWORD style, const char * const text[],
idx
=
SendMessage
(
hCombo
,
CB_GETCURSEL
,
0
,
0
);
ok
(
idx
==
-
1
,
"expected selection -1, got %d
\n
"
,
idx
);
/* keyboard navigation */
expected_list_text
=
text
[
list
[
0
]];
expected_edit_text
=
text
[
edit
[
0
]];
selchange_fired
=
FALSE
;
SendMessage
(
hCombo
,
WM_KEYDOWN
,
VK_DOWN
,
0
);
ok
(
selchange_fired
,
"CBN_SELCHANGE not sent!
\n
"
);
expected_list_text
=
text
[
list
[
1
]];
expected_edit_text
=
text
[
edit
[
1
]];
selchange_fired
=
FALSE
;
SendMessage
(
hCombo
,
WM_KEYDOWN
,
VK_DOWN
,
0
);
ok
(
selchange_fired
,
"CBN_SELCHANGE not sent!
\n
"
);
expected_list_text
=
text
[
list
[
2
]];
expected_edit_text
=
text
[
edit
[
2
]];
selchange_fired
=
FALSE
;
SendMessage
(
hCombo
,
WM_KEYDOWN
,
VK_UP
,
0
);
ok
(
selchange_fired
,
"CBN_SELCHANGE not sent!
\n
"
);
/* programatic navigation */
expected_list_text
=
text
[
list
[
3
]];
expected_edit_text
=
text
[
edit
[
3
]];
selchange_fired
=
FALSE
;
SendMessage
(
hCombo
,
CB_SETCURSEL
,
list
[
3
],
0
);
ok
(
!
selchange_fired
,
"CBN_SELCHANGE sent!
\n
"
);
expected_list_text
=
text
[
list
[
4
]];
expected_edit_text
=
text
[
edit
[
4
]];
selchange_fired
=
FALSE
;
SendMessage
(
hCombo
,
CB_SETCURSEL
,
list
[
4
],
0
);
ok
(
!
selchange_fired
,
"CBN_SELCHANGE sent!
\n
"
);
SetWindowLongPtr
(
hMainWnd
,
GWLP_WNDPROC
,
(
ULONG_PTR
)
old_parent_proc
);
DestroyWindow
(
hCombo
);
...
...
@@ -232,8 +257,8 @@ static void test_selection(DWORD style, const char * const text[],
static
void
test_CBN_SELCHANGE
(
void
)
{
static
const
char
*
const
text
[]
=
{
"alpha"
,
"beta"
,
""
};
static
const
int
sel_1
[]
=
{
2
,
0
,
1
};
static
const
int
sel_2
[]
=
{
0
,
1
,
0
};
static
const
int
sel_1
[]
=
{
2
,
0
,
1
,
0
,
1
};
static
const
int
sel_2
[]
=
{
0
,
1
,
0
,
0
,
1
};
test_selection
(
CBS_SIMPLE
,
text
,
sel_1
,
sel_2
);
test_selection
(
CBS_DROPDOWN
,
text
,
sel_1
,
sel_2
);
...
...
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