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
ed1ed6ae
Commit
ed1ed6ae
authored
Feb 03, 2023
by
Connor McAdams
Committed by
Alexandre Julliard
Feb 16, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
uiautomationcore: Add support for UIA_NamePropertyId to MSAA providers.
Signed-off-by:
Connor McAdams
<
cmcadams@codeweavers.com
>
parent
bb66ad44
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
0 deletions
+41
-0
uiautomation.c
dlls/uiautomationcore/tests/uiautomation.c
+28
-0
uia_provider.c
dlls/uiautomationcore/uia_provider.c
+13
-0
No files found.
dlls/uiautomationcore/tests/uiautomation.c
View file @
ed1ed6ae
...
...
@@ -3434,6 +3434,34 @@ static void test_uia_prov_from_acc_properties(void)
IRawElementProviderSimple_Release
(
elprov
);
ok
(
Accessible
.
ref
==
1
,
"Unexpected refcnt %ld
\n
"
,
Accessible
.
ref
);
/* UIA_NamePropertyId tests. */
set_accessible_props
(
&
Accessible
,
0
,
0
,
0
,
L"Accessible"
,
0
,
0
,
0
,
0
);
hr
=
pUiaProviderFromIAccessible
(
&
Accessible
.
IAccessible_iface
,
CHILDID_SELF
,
UIA_PFIA_DEFAULT
,
&
elprov
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
Accessible
.
ref
==
2
,
"Unexpected refcnt %ld
\n
"
,
Accessible
.
ref
);
SET_EXPECT
(
Accessible_get_accName
);
VariantInit
(
&
v
);
hr
=
IRawElementProviderSimple_GetPropertyValue
(
elprov
,
UIA_NamePropertyId
,
&
v
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
V_VT
(
&
v
)
==
VT_BSTR
,
"Unexpected VT %d
\n
"
,
V_VT
(
&
v
));
ok
(
!
lstrcmpW
(
V_BSTR
(
&
v
),
Accessible
.
name
),
"Unexpected BSTR %s
\n
"
,
wine_dbgstr_w
(
V_BSTR
(
&
v
)));
VariantClear
(
&
v
);
CHECK_CALLED
(
Accessible_get_accName
);
/* Name is not cached. */
set_accessible_props
(
&
Accessible
,
0
,
0
,
0
,
L"Accessible2"
,
0
,
0
,
0
,
0
);
SET_EXPECT
(
Accessible_get_accName
);
hr
=
IRawElementProviderSimple_GetPropertyValue
(
elprov
,
UIA_NamePropertyId
,
&
v
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
V_VT
(
&
v
)
==
VT_BSTR
,
"Unexpected VT %d
\n
"
,
V_VT
(
&
v
));
ok
(
!
lstrcmpW
(
V_BSTR
(
&
v
),
Accessible
.
name
),
"Unexpected BSTR %s
\n
"
,
wine_dbgstr_w
(
V_BSTR
(
&
v
)));
VariantClear
(
&
v
);
CHECK_CALLED
(
Accessible_get_accName
);
IRawElementProviderSimple_Release
(
elprov
);
ok
(
Accessible
.
ref
==
1
,
"Unexpected refcnt %ld
\n
"
,
Accessible
.
ref
);
}
static
void
test_UiaProviderFromIAccessible
(
void
)
...
...
dlls/uiautomationcore/uia_provider.c
View file @
ed1ed6ae
...
...
@@ -664,6 +664,19 @@ HRESULT WINAPI msaa_provider_GetPropertyValue(IRawElementProviderSimple *iface,
STATE_SYSTEM_PROTECTED
));
break
;
case
UIA_NamePropertyId
:
{
BSTR
name
;
hr
=
IAccessible_get_accName
(
msaa_prov
->
acc
,
msaa_prov
->
cid
,
&
name
);
if
(
SUCCEEDED
(
hr
)
&&
name
)
{
V_VT
(
ret_val
)
=
VT_BSTR
;
V_BSTR
(
ret_val
)
=
name
;
}
break
;
}
default:
FIXME
(
"Unimplemented propertyId %d
\n
"
,
prop_id
);
break
;
...
...
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