Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
16ac644b
Commit
16ac644b
authored
Aug 26, 2022
by
Piotr Caban
Committed by
Alexandre Julliard
Oct 10, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/tests: Test passing extra data in PROPSHEETPAGE structure.
parent
88bc45a7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
2 deletions
+21
-2
propsheet.c
dlls/comctl32/tests/propsheet.c
+21
-2
No files found.
dlls/comctl32/tests/propsheet.c
View file @
16ac644b
...
...
@@ -1035,6 +1035,7 @@ struct custom_proppage
PROPSHEETPAGEA
pageA
;
PROPSHEETPAGEW
pageW
;
}
u
;
DWORD
extra_data
;
unsigned
int
addref_called
;
unsigned
int
release_called
;
};
...
...
@@ -1050,6 +1051,12 @@ static UINT CALLBACK proppage_callback_a(HWND hwnd, UINT msg, PROPSHEETPAGEA *ps
psp
->
lParam
,
psp
);
ok
(
psp_orig
->
pszTitle
==
psp
->
pszTitle
,
"Expected same page title pointer
\n
"
);
ok
(
!
lstrcmpA
(
psp_orig
->
pszTitle
,
psp
->
pszTitle
),
"Expected same page title string
\n
"
);
if
(
psp
->
dwSize
>=
FIELD_OFFSET
(
struct
custom_proppage
,
addref_called
))
{
struct
custom_proppage
*
extra_data
=
(
struct
custom_proppage
*
)
psp
;
todo_wine
ok
(
extra_data
->
extra_data
==
0x1234
,
"Expected extra_data to be preserved, got %lx
\n
"
,
extra_data
->
extra_data
);
}
switch
(
msg
)
{
...
...
@@ -1078,6 +1085,12 @@ static UINT CALLBACK proppage_callback_w(HWND hwnd, UINT msg, PROPSHEETPAGEW *ps
psp
->
lParam
,
psp
);
ok
(
psp_orig
->
pszTitle
==
psp
->
pszTitle
,
"Expected same page title pointer
\n
"
);
ok
(
!
lstrcmpW
(
psp_orig
->
pszTitle
,
psp
->
pszTitle
),
"Expected same page title string
\n
"
);
if
(
psp
->
dwSize
>=
FIELD_OFFSET
(
struct
custom_proppage
,
addref_called
))
{
struct
custom_proppage
*
extra_data
=
(
struct
custom_proppage
*
)
psp
;
todo_wine
ok
(
extra_data
->
extra_data
==
0x4321
,
"Expected extra_data to be preserved, got %lx
\n
"
,
extra_data
->
extra_data
);
}
switch
(
msg
)
{
...
...
@@ -1110,8 +1123,11 @@ static void test_CreatePropertySheetPage(void)
page
.
u
.
pageA
.
pszTitle
=
"Title"
;
/* Only minimal size validation is performed */
for
(
page
.
u
.
pageA
.
dwSize
=
PROPSHEETPAGEA_V1_SIZE
-
1
;
page
.
u
.
pageA
.
dwSize
<=
PROPSHEETPAGEA_V4_SIZE
+
1
;
page
.
u
.
pageA
.
dwSize
++
)
for
(
page
.
u
.
pageA
.
dwSize
=
PROPSHEETPAGEA_V1_SIZE
-
1
;
page
.
u
.
pageA
.
dwSize
<=
FIELD_OFFSET
(
struct
custom_proppage
,
addref_called
);
page
.
u
.
pageA
.
dwSize
++
)
{
page
.
extra_data
=
0x1234
;
page
.
addref_called
=
0
;
hpsp
=
pCreatePropertySheetPageA
(
&
page
.
u
.
pageA
);
...
...
@@ -1139,8 +1155,11 @@ static void test_CreatePropertySheetPage(void)
page
.
u
.
pageW
.
lParam
=
(
LPARAM
)
&
page
;
page
.
u
.
pageW
.
pszTitle
=
L"Title"
;
for
(
page
.
u
.
pageW
.
dwSize
=
PROPSHEETPAGEW_V1_SIZE
-
1
;
page
.
u
.
pageW
.
dwSize
<=
PROPSHEETPAGEW_V4_SIZE
+
1
;
page
.
u
.
pageW
.
dwSize
++
)
for
(
page
.
u
.
pageW
.
dwSize
=
PROPSHEETPAGEW_V1_SIZE
-
1
;
page
.
u
.
pageW
.
dwSize
<=
FIELD_OFFSET
(
struct
custom_proppage
,
addref_called
);
page
.
u
.
pageW
.
dwSize
++
)
{
page
.
extra_data
=
0x4321
;
page
.
addref_called
=
0
;
hpsp
=
pCreatePropertySheetPageW
(
&
page
.
u
.
pageW
);
...
...
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