Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
d58bba9b
X
Xts Acts
项目概览
OpenHarmony
/
Xts Acts
1 年多 前同步成功
通知
9
Star
22
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
X
Xts Acts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
d58bba9b
编写于
8月 01, 2022
作者:
O
openharmony_ci
提交者:
Gitee
8月 01, 2022
浏览文件
操作
浏览文件
下载
差异文件
!4674 合入无障碍的xts api全case
Merge pull request !4674 from Mupceet/release_0726_xts
上级
e6a190a9
cc7632cc
变更
11
展开全部
隐藏空白更改
内联
并排
Showing
11 changed file
with
2360 addition
and
2701 deletion
+2360
-2701
barrierfree/BUILD.gn
barrierfree/BUILD.gn
+1
-0
barrierfree/accessibilityconfig/entry/src/main/ets/test/AccessibilityConfig.test.ets
...nfig/entry/src/main/ets/test/AccessibilityConfig.test.ets
+1683
-1
barrierfree/accessibilityelement/entry/src/main/ets/AccessibilityExtAbility/AccessibilityExtAbility.ts
...in/ets/AccessibilityExtAbility/AccessibilityExtAbility.ts
+0
-2
barrierfree/accessibilityelement/entry/src/main/ets/AccessibilityExtAbility/ElementTest.ts
...entry/src/main/ets/AccessibilityExtAbility/ElementTest.ts
+14
-2
barrierfree/accessibilityelement/entry/src/main/ets/test/AccessibilityElement.test.ets
...ent/entry/src/main/ets/test/AccessibilityElement.test.ets
+538
-0
barrierfree/accessibilityevent/entry/src/main/ets/AccessibilityExtAbility/AccessibilityExtAbility.ts
...in/ets/AccessibilityExtAbility/AccessibilityExtAbility.ts
+0
-5
barrierfree/accessibilityextensioncontext/entry/src/main/ets/AccessibilityExtAbility/ExtensionContextTest.ts
.../main/ets/AccessibilityExtAbility/ExtensionContextTest.ts
+14
-135
barrierfree/accessibilityextensioncontext/entry/src/main/ets/test/AccessibilityExtensionContext.test.ets
.../src/main/ets/test/AccessibilityExtensionContext.test.ets
+89
-484
barrierfree/accessibilitygestureevent/entry/src/main/ets/AccessibilityExtAbility/AccessibilityExtAbility.ts
...in/ets/AccessibilityExtAbility/AccessibilityExtAbility.ts
+0
-2
barrierfree/accessibilitygestureevent/entry/src/main/ets/AccessibilityExtAbility/GestureEventTest.ts
.../src/main/ets/AccessibilityExtAbility/GestureEventTest.ts
+2
-2
barrierfree/accessiblesendevent/src/main/js/test/AccessibleSendEvent.test.js
...blesendevent/src/main/js/test/AccessibleSendEvent.test.js
+19
-2068
未找到文件。
barrierfree/BUILD.gn
浏览文件 @
d58bba9b
...
...
@@ -22,6 +22,7 @@ group("barrierfree") {
"accessibilityevent:ActsAccessibilityEventTest",
"accessibilityextension:ActsAccessibilityExtensionTest",
"accessibilityextensioncontext:ActsAccessibilityExtensionContextTest",
"accessibilitygestureevent:ActsAccessibilityGestureEventTest",
"accessibleabilitylist:ActsAccessibleAbilityListTest",
"accessiblecaptionconfiguration:ActsAccessibleCaptionConfigurationTest",
"accessiblecheckability:ActsAccessibleCheckAbilityTest",
...
...
barrierfree/accessibilityconfig/entry/src/main/ets/test/AccessibilityConfig.test.ets
浏览文件 @
d58bba9b
此差异已折叠。
点击以展开。
barrierfree/accessibilityelement/entry/src/main/ets/AccessibilityExtAbility/AccessibilityExtAbility.ts
浏览文件 @
d58bba9b
...
...
@@ -32,8 +32,6 @@ class AccessibilityExtAbility extends AccessibilityExtensionAbility {
function
publishCallback
(
err
)
{
console
.
info
(
"
onConnect====>onConnect publish call back result:
"
+
JSON
.
stringify
(
err
));
}
this
.
context
.
setEventTypeFilter
([
'
click
'
]);
}
onDisconnect
()
{
...
...
barrierfree/accessibilityelement/entry/src/main/ets/AccessibilityExtAbility/ElementTest.ts
浏览文件 @
d58bba9b
...
...
@@ -157,7 +157,13 @@ export class ElementTest {
result
=
await
this
.
executeAttributeValuePromise
(
caseName
,
'
endIndex
'
,
'
number
'
);
break
;
case
'
AccessibilityElementTest_attributeValue_asyncPromise_3700
'
:
result
=
await
this
.
executeAttributeValuePromise
(
caseName
,
'
rangeInfo
'
,
'
object
'
);
result
=
await
this
.
executeAttributeValuePromise
(
caseName
,
'
valueMax
'
,
'
number
'
);
break
;
case
'
AccessibilityElementTest_attributeValue_asyncPromise_3800
'
:
result
=
await
this
.
executeAttributeValuePromise
(
caseName
,
'
valueMin
'
,
'
number
'
);
break
;
case
'
AccessibilityElementTest_attributeValue_asyncPromise_3900
'
:
result
=
await
this
.
executeAttributeValuePromise
(
caseName
,
'
valueNow
'
,
'
number
'
);
break
;
case
'
AccessibilityElementTest_attributeValue_asyncPromise_4200
'
:
result
=
await
this
.
executeAttributeValuePromise
(
caseName
,
'
error
'
,
'
string
'
);
...
...
@@ -391,7 +397,13 @@ export class ElementTest {
await
this
.
executeAttributeValueCallback
(
caseName
,
'
endIndex
'
,
'
number
'
);
return
;
case
'
AccessibilityElementTest_attributeValue_asyncCallback_3700
'
:
await
this
.
executeAttributeValueCallback
(
caseName
,
'
rangeInfo
'
,
'
object
'
);
await
this
.
executeAttributeValueCallback
(
caseName
,
'
valueMax
'
,
'
number
'
);
return
;
case
'
AccessibilityElementTest_attributeValue_asyncCallback_3800
'
:
await
this
.
executeAttributeValueCallback
(
caseName
,
'
valueMin
'
,
'
number
'
);
return
;
case
'
AccessibilityElementTest_attributeValue_asyncCallback_3900
'
:
await
this
.
executeAttributeValueCallback
(
caseName
,
'
valueNow
'
,
'
number
'
);
return
;
case
'
AccessibilityElementTest_attributeValue_asyncCallback_4200
'
:
await
this
.
executeAttributeValueCallback
(
caseName
,
'
error
'
,
'
string
'
);
...
...
barrierfree/accessibilityelement/entry/src/main/ets/test/AccessibilityElement.test.ets
浏览文件 @
d58bba9b
此差异已折叠。
点击以展开。
barrierfree/accessibilityevent/entry/src/main/ets/AccessibilityExtAbility/AccessibilityExtAbility.ts
浏览文件 @
d58bba9b
...
...
@@ -26,11 +26,6 @@ class AccessibilityExtAbility extends AccessibilityExtensionAbility {
function
publishCallback
(
err
)
{
console
.
info
(
"
[Demo] onConnect====>onConnect publish call back result:
"
+
JSON
.
stringify
(
err
));
}
this
.
context
.
setEventTypeFilter
([
'
accessibilityFocus
'
,
'
accessibilityFocusClear
'
,
'
click
'
,
'
longClick
'
,
'
focus
'
,
'
select
'
,
'
hoverEnter
'
,
'
hoverExit
'
,
'
textUpdate
'
,
'
textSelectionUpdate
'
,
'
scroll
'
]);
}
onDisconnect
()
{
...
...
barrierfree/accessibilityextensioncontext/entry/src/main/ets/AccessibilityExtAbility/ExtensionContextTest.ts
浏览文件 @
d58bba9b
...
...
@@ -62,62 +62,6 @@ export class ExtensionContextTest {
let
gesturePos3
=
{};
switch
(
caseName
)
{
case
'
AccessibilityExtensionContextTest_setEventTypeFilter_asyncCallback_0100
'
:
eventType
=
[
'
accessibilityFocus
'
];
this
.
setEventTypeFilterCallback
(
caseName
,
eventType
);
break
;
case
'
AccessibilityExtensionContextTest_setEventTypeFilter_asyncCallback_0200
'
:
eventType
=
[
'
accessibilityFocusClear
'
];
this
.
setEventTypeFilterCallback
(
caseName
,
eventType
);
break
;
case
'
AccessibilityExtensionContextTest_setEventTypeFilter_asyncCallback_0300
'
:
eventType
=
[
'
click
'
,
'
longClick
'
];
this
.
setEventTypeFilterCallback
(
caseName
,
eventType
);
break
;
case
'
AccessibilityExtensionContextTest_setEventTypeFilter_asyncCallback_0400
'
:
eventType
=
[
'
focus
'
,
'
select
'
];
this
.
setEventTypeFilterCallback
(
caseName
,
eventType
);
break
;
case
'
AccessibilityExtensionContextTest_setEventTypeFilter_asyncCallback_0500
'
:
eventType
=
[
'
hoverEnter
'
,
'
hoverExit
'
];
this
.
setEventTypeFilterCallback
(
caseName
,
eventType
);
break
;
case
'
AccessibilityExtensionContextTest_setEventTypeFilter_asyncCallback_0600
'
:
eventType
=
[
'
accessibilityFocus
'
,
'
accessibilityFocusClear
'
,
'
click
'
,
'
longClick
'
,
'
focus
'
,
'
select
'
,
'
hoverEnter
'
,
'
hoverExit
'
,
'
textUpdate
'
,
'
textSelectionUpdate
'
,
'
scroll
'
];
this
.
setEventTypeFilterCallback
(
caseName
,
eventType
);
break
;
case
'
AccessibilityExtensionContextTest_setEventTypeFilter_asyncCallback_0700
'
:
this
.
setEventTypeFilterCallback
(
caseName
,
eventType
);
break
;
case
'
AccessibilityExtensionContextTest_setEventTypeFilter_asyncPromise_0800
'
:
eventType
=
[
'
accessibilityFocus
'
];
this
.
setEventTypeFilterPromise
(
caseName
,
eventType
);
break
;
case
'
AccessibilityExtensionContextTest_setEventTypeFilter_asyncPromise_0900
'
:
eventType
=
[
'
accessibilityFocusClear
'
];
this
.
setEventTypeFilterPromise
(
caseName
,
eventType
);
break
;
case
'
AccessibilityExtensionContextTest_setEventTypeFilter_asyncPromise_1000
'
:
eventType
=
[
'
click
'
,
'
longClick
'
];
this
.
setEventTypeFilterPromise
(
caseName
,
eventType
);
break
;
case
'
AccessibilityExtensionContextTest_setEventTypeFilter_asyncPromise_1100
'
:
eventType
=
[
'
focus
'
,
'
select
'
];
this
.
setEventTypeFilterPromise
(
caseName
,
eventType
);
break
;
case
'
AccessibilityExtensionContextTest_setEventTypeFilter_asyncPromise_1200
'
:
eventType
=
[
'
hoverEnter
'
,
'
hoverExit
'
];
this
.
setEventTypeFilterPromise
(
caseName
,
eventType
);
break
;
case
'
AccessibilityExtensionContextTest_setEventTypeFilter_asyncPromise_1300
'
:
eventType
=
[
'
accessibilityFocus
'
,
'
accessibilityFocusClear
'
,
'
click
'
,
'
longClick
'
,
'
focus
'
,
'
select
'
,
'
hoverEnter
'
,
'
hoverExit
'
,
'
textUpdate
'
,
'
textSelectionUpdate
'
,
'
scroll
'
];
this
.
setEventTypeFilterPromise
(
caseName
,
eventType
);
break
;
case
'
AccessibilityExtensionContextTest_setEventTypeFilter_asyncPromise_1400
'
:
this
.
setEventTypeFilterPromise
(
caseName
,
eventType
);
break
;
case
'
AccessibilityExtensionContextTest_setTargetBundleName_asyncCallback_1500
'
:
bundleName
=
[
'
com.example.accessibleformextension
'
];
this
.
setTargetBundleNameCallback
(
caseName
,
bundleName
);
...
...
@@ -374,83 +318,26 @@ export class ExtensionContextTest {
}
}
private
async
setEventTypeFilterCallback
(
caseName
:
string
,
eventType
:
Array
<
accessibility
.
Event
>
)
{
let
result
=
false
;
if
(
eventType
.
length
==
0
)
{
this
.
context
.
setEventTypeFilter
(
eventType
,
(
err
,
res
)
=>
{
console
.
info
(
caseName
+
"
res:
"
+
JSON
.
stringify
(
res
));
if
(
err
.
code
!=
0
)
{
console
.
error
(
caseName
+
"
err:
"
+
JSON
.
stringify
(
err
.
code
));
result
=
true
;
}
if
(
res
==
undefined
)
{
result
=
true
;
}
this
.
publishCaseResult
(
caseName
,
result
);
});
}
else
{
this
.
context
.
setEventTypeFilter
(
eventType
,
(
err
,
res
)
=>
{
console
.
info
(
caseName
+
"
res:
"
+
JSON
.
stringify
(
res
));
if
(
err
.
code
!=
0
)
{
console
.
error
(
caseName
+
"
err:
"
+
JSON
.
stringify
(
err
.
code
));
}
if
(
typeof
(
res
)
==
'
boolean
'
)
{
result
=
true
;
}
this
.
publishCaseResult
(
caseName
,
result
);
});
}
}
private
async
setEventTypeFilterPromise
(
caseName
:
string
,
eventType
:
Array
<
accessibility
.
Event
>
)
{
let
result
=
false
;
if
(
eventType
.
length
==
0
)
{
this
.
context
.
setEventTypeFilter
(
eventType
).
then
((
res
)
=>
{
console
.
info
(
caseName
+
"
res:
"
+
JSON
.
stringify
(
res
));
if
(
res
==
undefined
)
{
result
=
true
;
}
this
.
publishCaseResult
(
caseName
,
result
);
}).
catch
((
error
)
=>
{
console
.
error
(
caseName
+
"
error:
"
+
JSON
.
stringify
(
error
));
result
=
true
;
this
.
publishCaseResult
(
caseName
,
result
);
});
}
else
{
this
.
context
.
setEventTypeFilter
(
eventType
).
then
((
res
)
=>
{
console
.
info
(
caseName
+
"
res:
"
+
JSON
.
stringify
(
res
));
if
(
typeof
(
res
)
==
'
boolean
'
)
{
result
=
true
;
}
this
.
publishCaseResult
(
caseName
,
result
);
}).
catch
((
error
)
=>
{
console
.
error
(
caseName
+
"
error:
"
+
JSON
.
stringify
(
error
));
this
.
publishCaseResult
(
caseName
,
result
);
});
}
}
private
async
setTargetBundleNameCallback
(
caseName
:
string
,
bundleName
:
Array
<
string
>
)
{
let
result
=
fals
e
;
let
result
=
tru
e
;
this
.
context
.
setTargetBundleName
(
bundleName
,
(
err
,
res
)
=>
{
console
.
info
(
caseName
+
"
res:
"
+
JSON
.
stringify
(
res
));
if
(
err
.
code
!=
0
)
{
console
.
error
(
caseName
+
"
err:
"
+
JSON
.
stringify
(
err
.
code
));
}
if
(
typeof
(
res
)
==
'
boolean
'
)
{
result
=
true
;
result
=
false
;
}
this
.
publishCaseResult
(
caseName
,
result
);
});
}
private
async
setTargetBundleNamePromise
(
caseName
:
string
,
bundleName
:
Array
<
string
>
)
{
let
result
=
fals
e
;
let
result
=
tru
e
;
this
.
context
.
setTargetBundleName
(
bundleName
).
then
((
res
)
=>
{
console
.
info
(
caseName
+
"
res:
"
+
JSON
.
stringify
(
res
));
if
(
typeof
(
res
)
==
'
boolean
'
)
{
result
=
true
;
}
this
.
publishCaseResult
(
caseName
,
result
);
}).
catch
((
error
)
=>
{
console
.
error
(
caseName
+
"
error:
"
+
JSON
.
stringify
(
error
));
result
=
false
;
this
.
publishCaseResult
(
caseName
,
result
);
});
}
...
...
@@ -718,7 +605,7 @@ export class ExtensionContextTest {
private
async
gestureInjectCallback
(
caseName
:
string
,
gesturePath
:
object
)
{
let
result
=
false
;
if
(
gesturePath
==
undefined
)
{
this
.
context
.
gestureInject
(
gesturePath
,
()
=>
{}
,
(
err
,
res
)
=>
{
this
.
context
.
injectGesture
(
gesturePath
,
(
err
,
res
)
=>
{
console
.
info
(
caseName
+
"
res:
"
+
JSON
.
stringify
(
res
));
if
(
err
.
code
!=
0
)
{
console
.
error
(
caseName
+
"
err:
"
+
JSON
.
stringify
(
err
.
code
));
...
...
@@ -730,15 +617,11 @@ export class ExtensionContextTest {
this
.
publishCaseResult
(
caseName
,
result
);
});
}
else
{
this
.
context
.
gestureInject
(
gesturePath
,
()
=>
{}
,
(
err
,
res
)
=>
{
this
.
context
.
injectGesture
(
gesturePath
,
(
err
,
res
)
=>
{
console
.
info
(
caseName
+
"
res:
"
+
JSON
.
stringify
(
res
));
result
=
true
;
if
(
err
.
code
!=
0
)
{
console
.
error
(
caseName
+
"
err:
"
+
JSON
.
stringify
(
err
.
code
));
}
if
(
typeof
(
res
)
==
'
boolean
'
)
{
result
=
true
;
}
if
(
res
==
undefined
)
{
result
=
false
;
}
this
.
publishCaseResult
(
caseName
,
result
);
...
...
@@ -750,7 +633,7 @@ export class ExtensionContextTest {
private
async
gestureInjectPromise
(
caseName
:
string
,
gesturePath
:
object
)
{
let
result
=
false
;
if
(
gesturePath
==
undefined
)
{
this
.
context
.
gestureInject
(
gesturePath
,
()
=>
{}
).
then
((
res
)
=>
{
this
.
context
.
injectGesture
(
gesturePath
).
then
((
res
)
=>
{
console
.
info
(
caseName
+
"
res:
"
+
JSON
.
stringify
(
res
));
if
(
res
==
undefined
)
{
result
=
true
;
...
...
@@ -762,17 +645,13 @@ export class ExtensionContextTest {
this
.
publishCaseResult
(
caseName
,
result
);
});
}
else
{
this
.
context
.
gestureInject
(
gesturePath
,
()
=>
{}
).
then
((
res
)
=>
{
this
.
context
.
injectGesture
(
gesturePath
).
then
((
res
)
=>
{
console
.
info
(
caseName
+
"
res:
"
+
JSON
.
stringify
(
res
));
if
(
typeof
(
res
)
==
'
boolean
'
)
{
result
=
true
;
}
if
(
res
==
undefined
)
{
result
=
false
;
}
result
=
true
;
this
.
publishCaseResult
(
caseName
,
result
);
}).
catch
((
err
)
=>
{
console
.
error
(
caseName
+
'
error:
'
+
JSON
.
stringify
(
err
));
result
=
false
;
this
.
publishCaseResult
(
caseName
,
result
);
});
}
...
...
barrierfree/accessibilityextensioncontext/entry/src/main/ets/test/AccessibilityExtensionContext.test.ets
浏览文件 @
d58bba9b
此差异已折叠。
点击以展开。
barrierfree/accessibilitygestureevent/entry/src/main/ets/AccessibilityExtAbility/AccessibilityExtAbility.ts
浏览文件 @
d58bba9b
...
...
@@ -32,8 +32,6 @@ class AccessibilityExtAbility extends AccessibilityExtensionAbility {
function
publishCallback
(
err
)
{
console
.
info
(
"
onConnect====>onConnect publish call back result:
"
+
JSON
.
stringify
(
err
));
}
this
.
context
.
setEventTypeFilter
([
'
gesture
'
]);
}
onDisconnect
()
{
...
...
barrierfree/accessibilitygestureevent/entry/src/main/ets/AccessibilityExtAbility/GestureEventTest.ts
浏览文件 @
d58bba9b
...
...
@@ -280,7 +280,7 @@ export class GestureEventTest {
}
private
async
gestureInject
(
caseName
:
string
,
gesturePath
:
object
)
{
let
ret
=
await
this
.
context
?.
gestureInject
(
gesturePath
,
()
=>
{}
);
console
.
info
(
'
GestureEventTest processCase:
'
+
caseName
+
'
ret:
'
+
ret
);
await
this
.
context
?.
injectGesture
(
gesturePath
);
console
.
info
(
'
GestureEventTest processCase:
'
+
caseName
);
}
}
\ No newline at end of file
barrierfree/accessiblesendevent/src/main/js/test/AccessibleSendEvent.test.js
浏览文件 @
d58bba9b
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录