Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
e275f6f8
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
e275f6f8
编写于
7月 28, 2022
作者:
M
Mupceet
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add xts api case
Signed-off-by:
N
Mupceet
<
laiguizhong@huawei.com
>
上级
e1f92667
变更
9
展开全部
隐藏空白更改
内联
并排
Showing
9 changed file
with
2318 addition
and
611 deletion
+2318
-611
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
+67
-462
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/accessibilityconfig/entry/src/main/ets/test/AccessibilityConfig.test.ets
浏览文件 @
e275f6f8
此差异已折叠。
点击以展开。
barrierfree/accessibilityelement/entry/src/main/ets/AccessibilityExtAbility/AccessibilityExtAbility.ts
浏览文件 @
e275f6f8
...
...
@@ -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
浏览文件 @
e275f6f8
...
...
@@ -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
浏览文件 @
e275f6f8
此差异已折叠。
点击以展开。
barrierfree/accessibilityevent/entry/src/main/ets/AccessibilityExtAbility/AccessibilityExtAbility.ts
浏览文件 @
e275f6f8
...
...
@@ -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
浏览文件 @
e275f6f8
...
...
@@ -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
浏览文件 @
e275f6f8
此差异已折叠。
点击以展开。
barrierfree/accessibilitygestureevent/entry/src/main/ets/AccessibilityExtAbility/AccessibilityExtAbility.ts
浏览文件 @
e275f6f8
...
...
@@ -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
浏览文件 @
e275f6f8
...
...
@@ -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
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录