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
32cd910b
Commit
32cd910b
authored
May 17, 2022
by
Piotr Caban
Committed by
Alexandre Julliard
May 17, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleacc: Add IAccessible refcount tests.
Signed-off-by:
Piotr Caban
<
piotr@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
3dbfe812
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
2 deletions
+16
-2
main.c
dlls/oleacc/tests/main.c
+16
-2
No files found.
dlls/oleacc/tests/main.c
View file @
32cd910b
...
...
@@ -100,6 +100,7 @@ static struct Accessible
{
IAccessible
IAccessible_iface
;
IOleWindow
IOleWindow_iface
;
LONG
ref
;
IAccessible
*
parent
;
HWND
acc_hwnd
;
...
...
@@ -140,12 +141,14 @@ static HRESULT WINAPI Accessible_QueryInterface(
static
ULONG
WINAPI
Accessible_AddRef
(
IAccessible
*
iface
)
{
return
2
;
struct
Accessible
*
This
=
impl_from_Accessible
(
iface
);
return
InterlockedIncrement
(
&
This
->
ref
);
}
static
ULONG
WINAPI
Accessible_Release
(
IAccessible
*
iface
)
{
return
1
;
struct
Accessible
*
This
=
impl_from_Accessible
(
iface
);
return
InterlockedDecrement
(
&
This
->
ref
);
}
static
HRESULT
WINAPI
Accessible_GetTypeInfoCount
(
...
...
@@ -226,9 +229,11 @@ static HRESULT WINAPI Accessible_get_accChild(IAccessible *iface,
return
S_FALSE
;
case
3
:
*
ppdispChild
=
(
IDispatch
*
)
&
Accessible_child
.
IAccessible_iface
;
IDispatch_AddRef
(
*
ppdispChild
);
return
S_OK
;
case
4
:
*
ppdispChild
=
(
IDispatch
*
)
&
Accessible_child
.
IAccessible_iface
;
IDispatch_AddRef
(
*
ppdispChild
);
return
S_FALSE
;
default:
ok
(
0
,
"unexpected call
\n
"
);
...
...
@@ -464,6 +469,7 @@ static struct Accessible Accessible =
{
{
&
AccessibleVtbl
},
{
&
OleWindowVtbl
},
1
,
NULL
,
0
,
0
};
...
...
@@ -471,6 +477,7 @@ static struct Accessible Accessible_child =
{
{
&
AccessibleVtbl
},
{
&
OleWindowVtbl
},
1
,
&
Accessible
.
IAccessible_iface
,
0
,
0
};
...
...
@@ -906,6 +913,8 @@ static void test_AccessibleObjectFromEvent(void)
IAccessible_Release
(
acc
);
DestroyWindow
(
hwnd
);
ok
(
Accessible
.
ref
==
1
,
"Accessible.ref = %ld
\n
"
,
Accessible
.
ref
);
ok
(
Accessible_child
.
ref
==
1
,
"Accessible.ref = %ld
\n
"
,
Accessible_child
.
ref
);
}
static
void
test_GetProcessHandleFromHwnd
(
void
)
...
...
@@ -1014,6 +1023,9 @@ static void test_AccessibleChildren(IAccessible *acc)
IDispatch_Release
(
V_DISPATCH
(
children
+
1
));
}
ok
(
V_VT
(
children
+
2
)
==
VT_EMPTY
,
"V_VT(children+2) = %d
\n
"
,
V_VT
(
children
+
2
));
ok
(
Accessible
.
ref
==
1
,
"Accessible.ref = %ld
\n
"
,
Accessible
.
ref
);
ok
(
Accessible_child
.
ref
==
1
,
"Accessible.ref = %ld
\n
"
,
Accessible_child
.
ref
);
}
#define check_acc_state(acc, state) _check_acc_state(__LINE__, acc, state)
...
...
@@ -2003,6 +2015,8 @@ static void test_WindowFromAccessibleObject(void)
CHECK_CALLED
(
Accessible_child_get_accParent
);
Accessible
.
ow_hwnd
=
NULL
;
ok
(
Accessible
.
ref
==
1
,
"Accessible.ref = %ld
\n
"
,
Accessible
.
ref
);
ok
(
Accessible_child
.
ref
==
1
,
"Accessible.ref = %ld
\n
"
,
Accessible_child
.
ref
);
}
START_TEST
(
main
)
...
...
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