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
cd143fc2
Commit
cd143fc2
authored
Oct 26, 2022
by
Connor McAdams
Committed by
Alexandre Julliard
Oct 26, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
uiautomationcore: Add support for ConditionType_{And/Or} conditions.
Signed-off-by:
Connor McAdams
<
cmcadams@codeweavers.com
>
parent
5b435796
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
53 additions
and
38 deletions
+53
-38
uiautomation.c
dlls/uiautomationcore/tests/uiautomation.c
+28
-36
uia_client.c
dlls/uiautomationcore/uia_client.c
+25
-2
No files found.
dlls/uiautomationcore/tests/uiautomation.c
View file @
cd143fc2
...
...
@@ -7132,17 +7132,15 @@ static void test_UiaGetUpdatedCache(void)
/* Equivalent to: if (1 && 1) */
hr
=
UiaGetUpdatedCache
(
node
,
&
cache_req
,
NormalizeState_View
,
NULL
,
&
out_req
,
&
tree_struct
);
todo_wine
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
todo_wine
ok
(
!!
out_req
,
"out_req == NULL
\n
"
);
todo_wine
ok
(
!!
tree_struct
,
"tree_struct == NULL
\n
"
);
if
(
out_req
)
{
exp_lbound
[
0
]
=
exp_lbound
[
1
]
=
0
;
exp_elems
[
0
]
=
exp_elems
[
1
]
=
1
;
test_cache_req_sa
(
out_req
,
exp_lbound
,
exp_elems
,
exp_node_desc
);
ok
(
!
wcscmp
(
tree_struct
,
L"P)"
),
"tree structure %s
\n
"
,
debugstr_w
(
tree_struct
));
ok_method_sequence
(
cache_req_seq1
,
NULL
);
}
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
!!
out_req
,
"out_req == NULL
\n
"
);
ok
(
!!
tree_struct
,
"tree_struct == NULL
\n
"
);
exp_lbound
[
0
]
=
exp_lbound
[
1
]
=
0
;
exp_elems
[
0
]
=
exp_elems
[
1
]
=
1
;
test_cache_req_sa
(
out_req
,
exp_lbound
,
exp_elems
,
exp_node_desc
);
ok
(
!
wcscmp
(
tree_struct
,
L"P)"
),
"tree structure %s
\n
"
,
debugstr_w
(
tree_struct
));
ok_method_sequence
(
cache_req_seq1
,
NULL
);
SafeArrayDestroy
(
out_req
);
SysFreeString
(
tree_struct
);
...
...
@@ -7156,14 +7154,12 @@ static void test_UiaGetUpdatedCache(void)
/* Equivalent to: if (1 && 0) */
hr
=
UiaGetUpdatedCache
(
node
,
&
cache_req
,
NormalizeState_View
,
NULL
,
&
out_req
,
&
tree_struct
);
todo_wine
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
ok_method_sequence
(
cache_req_seq2
,
NULL
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
ok_method_sequence
(
cache_req_seq2
,
NULL
);
ok
(
!
out_req
,
"out_req != NULL
\n
"
);
todo_wine
ok
(
!!
tree_struct
,
"tree_struct == NULL
\n
"
);
if
(
tree_struct
)
ok
(
!
wcscmp
(
tree_struct
,
L""
),
"tree structure %s
\n
"
,
debugstr_w
(
tree_struct
));
ok
(
!!
tree_struct
,
"tree_struct == NULL
\n
"
);
ok
(
!
wcscmp
(
tree_struct
,
L""
),
"tree structure %s
\n
"
,
debugstr_w
(
tree_struct
));
SysFreeString
(
tree_struct
);
/*
...
...
@@ -7178,17 +7174,15 @@ static void test_UiaGetUpdatedCache(void)
/* Equivalent to: if (1 || 0) */
hr
=
UiaGetUpdatedCache
(
node
,
&
cache_req
,
NormalizeState_View
,
NULL
,
&
out_req
,
&
tree_struct
);
todo_wine
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
todo_wine
ok
(
!!
out_req
,
"out_req == NULL
\n
"
);
todo_wine
ok
(
!!
tree_struct
,
"tree_struct == NULL
\n
"
);
if
(
out_req
)
{
exp_lbound
[
0
]
=
exp_lbound
[
1
]
=
0
;
exp_elems
[
0
]
=
exp_elems
[
1
]
=
1
;
test_cache_req_sa
(
out_req
,
exp_lbound
,
exp_elems
,
exp_node_desc
);
ok
(
!
wcscmp
(
tree_struct
,
L"P)"
),
"tree structure %s
\n
"
,
debugstr_w
(
tree_struct
));
ok_method_sequence
(
cache_req_seq1
,
NULL
);
}
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
!!
out_req
,
"out_req == NULL
\n
"
);
ok
(
!!
tree_struct
,
"tree_struct == NULL
\n
"
);
exp_lbound
[
0
]
=
exp_lbound
[
1
]
=
0
;
exp_elems
[
0
]
=
exp_elems
[
1
]
=
1
;
test_cache_req_sa
(
out_req
,
exp_lbound
,
exp_elems
,
exp_node_desc
);
ok
(
!
wcscmp
(
tree_struct
,
L"P)"
),
"tree structure %s
\n
"
,
debugstr_w
(
tree_struct
));
ok_method_sequence
(
cache_req_seq1
,
NULL
);
SafeArrayDestroy
(
out_req
);
SysFreeString
(
tree_struct
);
...
...
@@ -7202,14 +7196,12 @@ static void test_UiaGetUpdatedCache(void)
/* Equivalent to: if (0 || 0) */
hr
=
UiaGetUpdatedCache
(
node
,
&
cache_req
,
NormalizeState_View
,
NULL
,
&
out_req
,
&
tree_struct
);
todo_wine
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
ok_method_sequence
(
cache_req_seq2
,
NULL
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
ok_method_sequence
(
cache_req_seq2
,
NULL
);
ok
(
!
out_req
,
"out_req != NULL
\n
"
);
todo_wine
ok
(
!!
tree_struct
,
"tree_struct == NULL
\n
"
);
if
(
tree_struct
)
ok
(
!
wcscmp
(
tree_struct
,
L""
),
"tree structure %s
\n
"
,
debugstr_w
(
tree_struct
));
ok
(
!!
tree_struct
,
"tree_struct == NULL
\n
"
);
ok
(
!
wcscmp
(
tree_struct
,
L""
),
"tree structure %s
\n
"
,
debugstr_w
(
tree_struct
));
SysFreeString
(
tree_struct
);
/*
...
...
dlls/uiautomationcore/uia_client.c
View file @
cd143fc2
...
...
@@ -1922,6 +1922,8 @@ static BOOL uia_condition_matched(HRESULT hr)
static
HRESULT
uia_condition_check
(
HUIANODE
node
,
struct
UiaCondition
*
condition
)
{
HRESULT
hr
;
switch
(
condition
->
ConditionType
)
{
case
ConditionType_True
:
...
...
@@ -1933,7 +1935,6 @@ static HRESULT uia_condition_check(HUIANODE node, struct UiaCondition *condition
case
ConditionType_Not
:
{
struct
UiaNotCondition
*
not_cond
=
(
struct
UiaNotCondition
*
)
condition
;
HRESULT
hr
;
hr
=
uia_condition_check
(
node
,
not_cond
->
pConditions
);
if
(
FAILED
(
hr
))
...
...
@@ -1945,9 +1946,31 @@ static HRESULT uia_condition_check(HUIANODE node, struct UiaCondition *condition
return
S_OK
;
}
case
ConditionType_Property
:
case
ConditionType_And
:
case
ConditionType_Or
:
{
struct
UiaAndOrCondition
*
and_or_cond
=
(
struct
UiaAndOrCondition
*
)
condition
;
int
i
;
for
(
i
=
0
;
i
<
and_or_cond
->
cConditions
;
i
++
)
{
hr
=
uia_condition_check
(
node
,
and_or_cond
->
ppConditions
[
i
]);
if
(
FAILED
(
hr
))
return
hr
;
if
(
condition
->
ConditionType
==
ConditionType_And
&&
!
uia_condition_matched
(
hr
))
return
S_FALSE
;
else
if
(
condition
->
ConditionType
==
ConditionType_Or
&&
uia_condition_matched
(
hr
))
return
S_OK
;
}
if
(
condition
->
ConditionType
==
ConditionType_Or
)
return
S_FALSE
;
else
return
S_OK
;
}
case
ConditionType_Property
:
FIXME
(
"Unhandled condition type %d
\n
"
,
condition
->
ConditionType
);
return
E_NOTIMPL
;
...
...
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