Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Torge Matthies
wine
Commits
66e83d21
Commit
66e83d21
authored
15 years ago
by
Alexandre Julliard
Browse files
Options
Downloads
Patches
Plain Diff
comctl32/tests: Fix some test failures on older versions.
parent
8c700d2b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dlls/comctl32/tests/tab.c
+19
-8
19 additions, 8 deletions
dlls/comctl32/tests/tab.c
with
19 additions
and
8 deletions
dlls/comctl32/tests/tab.c
+
19
−
8
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
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment