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
66e83d21
Commit
66e83d21
authored
Aug 05, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/tests: Fix some test failures on older versions.
parent
8c700d2b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
8 deletions
+19
-8
tab.c
dlls/comctl32/tests/tab.c
+19
-8
No files found.
dlls/comctl32/tests/tab.c
View file @
66e83d21
...
...
@@ -89,13 +89,14 @@ static const struct message create_parent_wnd_seq[] = {
static
const
struct
message
add_tab_to_parent
[]
=
{
{
TCM_INSERTITEMA
,
sent
},
{
TCM_INSERTITEMA
,
sent
},
{
TCM_INSERTITEMA
,
sent
|
optional
},
{
WM_NOTIFYFORMAT
,
sent
|
defwinproc
},
{
WM_QUERYUISTATE
,
sent
|
wparam
|
lparam
|
defwinproc
|
optional
,
0
,
0
},
{
WM_PARENTNOTIFY
,
sent
|
defwinproc
},
{
TCM_INSERTITEMA
,
sent
},
{
TCM_INSERTITEMA
,
sent
},
{
TCM_INSERTITEMA
,
sent
},
{
TCM_INSERTITEMA
,
sent
|
optional
},
{
0
}
};
...
...
@@ -236,12 +237,15 @@ static const struct message insert_focus_seq[] = {
{
TCM_GETITEMCOUNT
,
sent
|
wparam
|
lparam
,
0
,
0
},
{
TCM_GETCURFOCUS
,
sent
|
wparam
|
lparam
,
0
,
0
},
{
TCM_INSERTITEM
,
sent
|
wparam
,
1
},
{
WM_NOTIFYFORMAT
,
sent
|
defwinproc
|
optional
},
{
WM_QUERYUISTATE
,
sent
|
defwinproc
|
optional
},
{
WM_PARENTNOTIFY
,
sent
|
defwinproc
|
optional
},
{
TCM_GETITEMCOUNT
,
sent
|
wparam
|
lparam
,
0
,
0
},
{
TCM_GETCURFOCUS
,
sent
|
wparam
|
lparam
,
0
,
0
},
{
TCM_INSERTITEM
,
sent
|
wparam
,
2
},
{
WM_NOTIFYFORMAT
,
sent
|
defwinproc
,
},
{
WM_NOTIFYFORMAT
,
sent
|
defwinproc
|
optional
},
{
WM_QUERYUISTATE
,
sent
|
defwinproc
|
optional
,
},
{
WM_PARENTNOTIFY
,
sent
|
defwinproc
,
},
{
WM_PARENTNOTIFY
,
sent
|
defwinproc
|
optional
},
{
TCM_GETITEMCOUNT
,
sent
|
wparam
|
lparam
,
0
,
0
},
{
TCM_GETCURFOCUS
,
sent
|
wparam
|
lparam
,
0
,
0
},
{
TCM_SETCURFOCUS
,
sent
|
wparam
|
lparam
,
-
1
,
0
},
...
...
@@ -505,7 +509,7 @@ static void test_tab(INT nMinTabWidth)
SIZE
size
;
HDC
hdc
;
HFONT
hOldFont
;
INT
i
,
dpi
;
INT
i
,
dpi
,
exp
;
hwTab
=
create_tabcontrol
(
TCS_FIXEDWIDTH
,
TCIF_TEXT
|
TCIF_IMAGE
);
SendMessage
(
hwTab
,
TCM_SETMINTABWIDTH
,
0
,
nMinTabWidth
);
...
...
@@ -585,8 +589,11 @@ static void test_tab(INT nMinTabWidth)
SendMessage
(
hwTab
,
TCM_SETMINTABWIDTH
,
0
,
nMinTabWidth
);
trace
(
" non fixed width, with text...
\n
"
);
CheckSize
(
hwTab
,
max
(
size
.
cx
+
TAB_PADDING_X
*
2
,
(
nMinTabWidth
<
0
)
?
DEFAULT_MIN_TAB_WIDTH
:
nMinTabWidth
),
-
1
,
"no icon, default width"
);
exp
=
max
(
size
.
cx
+
TAB_PADDING_X
*
2
,
(
nMinTabWidth
<
0
)
?
DEFAULT_MIN_TAB_WIDTH
:
nMinTabWidth
);
SendMessage
(
hwTab
,
TCM_GETITEMRECT
,
0
,
(
LPARAM
)
&
rTab
);
ok
(
rTab
.
right
-
rTab
.
left
==
exp
||
broken
(
rTab
.
right
-
rTab
.
left
==
DEFAULT_MIN_TAB_WIDTH
),
"no icon, default width: Expected width [%d] got [%d]
\n
"
,
exp
,
rTab
.
right
-
rTab
.
left
);
for
(
i
=
0
;
i
<
8
;
i
++
)
{
INT
nTabWidth
=
(
nMinTabWidth
<
0
)
?
TabWidthPadded
(
i
,
2
)
:
nMinTabWidth
;
...
...
@@ -610,7 +617,11 @@ static void test_tab(INT nMinTabWidth)
SendMessage
(
hwTab
,
TCM_SETMINTABWIDTH
,
0
,
nMinTabWidth
);
trace
(
" non fixed width, no text...
\n
"
);
CheckSize
(
hwTab
,
(
nMinTabWidth
<
0
)
?
DEFAULT_MIN_TAB_WIDTH
:
nMinTabWidth
,
-
1
,
"no icon, default width"
);
exp
=
(
nMinTabWidth
<
0
)
?
DEFAULT_MIN_TAB_WIDTH
:
nMinTabWidth
;
SendMessage
(
hwTab
,
TCM_GETITEMRECT
,
0
,
(
LPARAM
)
&
rTab
);
ok
(
rTab
.
right
-
rTab
.
left
==
exp
||
broken
(
rTab
.
right
-
rTab
.
left
==
DEFAULT_MIN_TAB_WIDTH
),
"no icon, default width: Expected width [%d] got [%d]
\n
"
,
exp
,
rTab
.
right
-
rTab
.
left
);
for
(
i
=
0
;
i
<
8
;
i
++
)
{
INT
nTabWidth
=
(
nMinTabWidth
<
0
)
?
TabWidthPadded
(
i
,
2
)
:
nMinTabWidth
;
...
...
@@ -960,7 +971,7 @@ static void test_insert_focus(HWND parent_wnd)
r
=
SendMessage
(
hTab
,
TCM_GETCURFOCUS
,
0
,
0
);
expect
(
2
,
r
);
ok_sequence
(
sequences
,
TAB_SEQ_INDEX
,
insert_focus_seq
,
"insert_focus test sequence"
,
TRU
E
);
ok_sequence
(
sequences
,
TAB_SEQ_INDEX
,
insert_focus_seq
,
"insert_focus test sequence"
,
FALS
E
);
ok_sequence
(
sequences
,
PARENT_SEQ_INDEX
,
empty_sequence
,
"insert_focus parent test sequence"
,
FALSE
);
DestroyWindow
(
hTab
);
...
...
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