Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
a04bc945
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看板
提交
a04bc945
编写于
10月 20, 2022
作者:
M
Mupceet
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update
Signed-off-by:
N
Mupceet
<
laiguizhong@huawei.com
>
上级
b4318515
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
19 addition
and
195 deletion
+19
-195
barrierfree/accessibilityextensioncontext/entry/src/main/ets/AccessibilityExtAbility/ExtensionContextTest.ts
.../main/ets/AccessibilityExtAbility/ExtensionContextTest.ts
+19
-49
barrierfree/accessibilityextensioncontext/entry/src/main/ets/test/AccessibilityExtensionContext.test.ets
.../src/main/ets/test/AccessibilityExtensionContext.test.ets
+0
-66
barrierfree/accessibleregisterstate/src/main/js/test/AccessibleRegisterState.test.js
...terstate/src/main/js/test/AccessibleRegisterState.test.js
+0
-80
未找到文件。
barrierfree/accessibilityextensioncontext/entry/src/main/ets/AccessibilityExtAbility/ExtensionContextTest.ts
浏览文件 @
a04bc945
...
...
@@ -178,10 +178,6 @@ export class ExtensionContextTest {
new
GesturePoint
(
1000
,
1000
));
this
.
gestureInjectCallback
(
caseName
,
gesturePath
);
break
;
case
'
AccessibilityExtensionContextTest_gestureInject_asyncCallback_4900
'
:
gesturePath
=
undefined
;
this
.
gestureInjectCallback
(
caseName
,
gesturePath
);
break
;
case
'
AccessibilityExtensionContextTest_gestureInject_asyncPromise_5000
'
:
gesturePath
=
new
GesturePath
(
100
);
gesturePath
.
points
.
push
(
new
GesturePoint
(
10
,
10
));
...
...
@@ -205,10 +201,6 @@ export class ExtensionContextTest {
new
GesturePoint
(
1000
,
1000
));
this
.
gestureInjectPromise
(
caseName
,
gesturePath
);
break
;
case
'
AccessibilityExtensionContextTest_gestureInject_asyncPromise_5400
'
:
gesturePath
=
undefined
;
this
.
gestureInjectPromise
(
caseName
,
gesturePath
);
break
;
default
:
console
.
warn
(
'
ExtensionContextTest processCase unknown!!!!!!!!!!
'
);
break
;
...
...
@@ -579,52 +571,30 @@ export class ExtensionContextTest {
private
async
gestureInjectCallback
(
caseName
:
string
,
gesturePath
:
object
)
{
let
result
=
false
;
if
(
gesturePath
==
undefined
)
{
this
.
context
.
injectGesture
(
gesturePath
,
(
err
,
res
)
=>
{
if
(
err
&&
err
.
code
!=
0
)
{
console
.
error
(
caseName
+
"
err:
"
+
JSON
.
stringify
(
err
.
code
));
result
=
true
;
}
this
.
publishCaseResult
(
caseName
,
result
);
});
}
else
{
this
.
context
.
injectGesture
(
gesturePath
,
(
err
,
res
)
=>
{
console
.
info
(
caseName
+
"
res:
"
+
JSON
.
stringify
(
res
));
result
=
true
;
if
(
err
&&
err
.
code
!=
0
)
{
console
.
error
(
caseName
+
"
err:
"
+
JSON
.
stringify
(
err
.
code
));
result
=
false
;
}
this
.
publishCaseResult
(
caseName
,
result
);
});
}
this
.
context
.
injectGesture
(
gesturePath
,
(
err
,
res
)
=>
{
console
.
info
(
caseName
+
"
res:
"
+
JSON
.
stringify
(
res
));
result
=
true
;
if
(
err
&&
err
.
code
!=
0
)
{
console
.
error
(
caseName
+
"
err:
"
+
JSON
.
stringify
(
err
.
code
));
result
=
false
;
}
this
.
publishCaseResult
(
caseName
,
result
);
});
}
private
async
gestureInjectPromise
(
caseName
:
string
,
gesturePath
:
object
)
{
let
result
=
false
;
if
(
gesturePath
==
undefined
)
{
this
.
context
.
injectGesture
(
gesturePath
).
then
((
res
)
=>
{
this
.
publishCaseResult
(
caseName
,
result
);
}).
catch
((
err
)
=>
{
if
(
err
&&
err
.
code
!=
0
)
{
console
.
error
(
caseName
+
'
error:
'
+
JSON
.
stringify
(
err
));
result
=
true
;
}
this
.
publishCaseResult
(
caseName
,
result
);
});
}
else
{
this
.
context
.
injectGesture
(
gesturePath
).
then
((
res
)
=>
{
console
.
info
(
caseName
+
"
res:
"
+
JSON
.
stringify
(
res
));
this
.
context
.
injectGesture
(
gesturePath
).
then
((
res
)
=>
{
console
.
info
(
caseName
+
"
res:
"
+
JSON
.
stringify
(
res
));
result
=
true
;
this
.
publishCaseResult
(
caseName
,
result
);
}).
catch
((
err
)
=>
{
if
(
err
&&
err
.
code
!=
0
)
{
console
.
error
(
caseName
+
'
error:
'
+
JSON
.
stringify
(
err
));
result
=
true
;
this
.
publishCaseResult
(
caseName
,
result
);
}).
catch
((
err
)
=>
{
if
(
err
&&
err
.
code
!=
0
)
{
console
.
error
(
caseName
+
'
error:
'
+
JSON
.
stringify
(
err
));
result
=
true
;
}
this
.
publishCaseResult
(
caseName
,
result
);
});
}
}
this
.
publishCaseResult
(
caseName
,
result
);
});
}
}
\ No newline at end of file
barrierfree/accessibilityextensioncontext/entry/src/main/ets/test/AccessibilityExtensionContext.test.ets
浏览文件 @
a04bc945
...
...
@@ -1015,39 +1015,6 @@ export default function abilityTest() {
}
})
/*
* @tc.number AccessibilityExtensionContextTest_gestureInject_asyncCallback_4900
* @tc.name AccessibilityExtensionContextTest_gestureInject_asyncCallback_4900
* @tc.desc The parameter input is gesturePath, test the gestureInject() function.
* The result of gestureInject() should be boolean type.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityExtensionContextTest_gestureInject_asyncCallback_4900', 0, async function (done) {
let caseName = 'AccessibilityExtensionContextTest_gestureInject_asyncCallback_4900';
console.info(caseName + 'start');
if (isConnect) {
publishCaseExecute(caseName);
setTimeout(() => {
if (caseResult != undefined) {
console.info(caseName + ':' + caseResult.data);
expect(passStr).assertEqual(caseResult.data);
expect(caseName).assertEqual(caseResult.parameters.case);
} else {
console.info(caseName + ': caseResult is undefined');
expect(null).assertFail();
}
done();
}, 3000);
} else {
console.error(caseName + ': extension not connected');
expect(null).assertFail();
done();
}
})
/*
* @tc.number AccessibilityExtensionContextTest_gestureInject_asyncPromise_5000
* @tc.name AccessibilityExtensionContextTest_gestureInject_asyncPromise_5000
...
...
@@ -1179,38 +1146,5 @@ export default function abilityTest() {
done();
}
})
/*
* @tc.number AccessibilityExtensionContextTest_gestureInject_asyncPromise_5400
* @tc.name AccessibilityExtensionContextTest_gestureInject_asyncPromise_5400
* @tc.desc The parameter input is gesturePath, test the gestureInject() function.
* The result of gestureInject() should be boolean type.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityExtensionContextTest_gestureInject_asyncPromise_5400', 0, async function(done) {
let caseName = 'AccessibilityExtensionContextTest_gestureInject_asyncPromise_5400';
console.info(caseName + 'start');
if (isConnect) {
publishCaseExecute(caseName);
setTimeout(() => {
if (caseResult != undefined) {
console.info(caseName + ':' + caseResult.data);
expect(passStr).assertEqual(caseResult.data);
expect(caseName).assertEqual(caseResult.parameters.case);
} else {
console.info(caseName + ': caseResult is undefined');
expect(null).assertFail();
}
done();
}, 3000);
} else {
console.error(caseName + ': extension not connected');
expect(null).assertFail();
done();
}
})
})
}
barrierfree/accessibleregisterstate/src/main/js/test/AccessibleRegisterState.test.js
浏览文件 @
a04bc945
...
...
@@ -68,38 +68,6 @@ describe('AccessibleRegisterState', function () {
done
();
})
/*
* @tc.number RegisterStateOnOff_0350
* @tc.name RegisterStateOnOff_0350
* @tc.desc The parameter input is '', test the accessibility.on() function,
* and return void.
* @tc.size SmallTest
* @tc.type User
*/
it
(
'
RegisterStateOnOff_0350
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
RegisterStateOnOff_0350
'
);
let
stateEventType
=
''
;
let
ret
=
accessibility
.
on
(
stateEventType
,
(
data
)
=>
{});
expect
(
ret
).
assertEqual
(
undefined
);
done
();
})
/*
* @tc.number RegisterStateOnOff_0360
* @tc.name RegisterStateOnOff_0360
* @tc.desc The parameter input is null, test the accessibility.on() function,
* and return void.
* @tc.size SmallTest
* @tc.type User
*/
it
(
'
RegisterStateOnOff_0360
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
RegisterStateOnOff_0360
'
);
let
stateEventType
=
null
;
let
ret
=
accessibility
.
on
(
stateEventType
,
(
data
)
=>
{});
expect
(
ret
).
assertEqual
(
undefined
);
done
();
})
/******************************************************************************** */
/* Cases RegisterStateOnOff_0370-0410 are for accessibility.off() API test */
/******************************************************************************** */
...
...
@@ -135,54 +103,6 @@ describe('AccessibleRegisterState', function () {
expect
(
ret
).
assertEqual
(
undefined
);
done
();
})
/*
* @tc.number RegisterStateOnOff_0390
* @tc.name RegisterStateOnOff_0390
* @tc.desc The parameter input is '', test the accessibility.off() function,
* and return void.
* @tc.size SmallTest
* @tc.type User
*/
it
(
'
RegisterStateOnOff_0390
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
RegisterStateOnOff_0390
'
);
let
stateEventType
=
''
;
let
ret
=
accessibility
.
off
(
stateEventType
,
(
data
)
=>
{});
expect
(
ret
).
assertEqual
(
undefined
);
done
();
})
/*
* @tc.number RegisterStateOnOff_0400
* @tc.name RegisterStateOnOff_0400
* @tc.desc The parameter input is null, test the accessibility.off() function,
* and return void.
* @tc.size SmallTest
* @tc.type User
*/
it
(
'
RegisterStateOnOff_0400
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
RegisterStateOnOff_0400
'
);
let
stateEventType
=
null
;
let
ret
=
accessibility
.
off
(
stateEventType
,
(
data
)
=>
{});
expect
(
ret
).
assertEqual
(
undefined
);
done
();
})
/*
* @tc.number RegisterStateOnOff_0410
* @tc.name RegisterStateOnOff_0410
* @tc.desc The parameter input is null, test the accessibility.off() function,
* and return void.
* @tc.size SmallTest
* @tc.type User
*/
it
(
'
RegisterStateOnOff_0410
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
RegisterStateOnOff_0410
'
);
let
stateEventType
=
null
;
let
ret
=
accessibility
.
off
(
stateEventType
,
(
data
)
=>
{});
expect
(
ret
).
assertEqual
(
undefined
);
done
();
})
})
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录