未验证 提交 f6dcdbd5 编写于 作者: 姜欢欢 提交者: Gitee

t/AccessibleRegisterState.test.js.

Signed-off-by: N姜欢欢 <jianghuanhuan@huawei.com>
上级 945cd222
...@@ -38,37 +38,35 @@ describe('AccessibleRegisterState', function () { ...@@ -38,37 +38,35 @@ describe('AccessibleRegisterState', function () {
/* /*
* @tc.number RegisterStateOnOff_0330 * @tc.number RegisterStateOnOff_0330
* @tc.name RegisterStateOnOff_0330 * @tc.name RegisterStateOnOff_0330
* @tc.desc The parameter input is 'accessibilityStateChange', test the accessibility.on() function, * @tc.desc on(accessibilityStateChange)
* and return void.
* @tc.size SmallTest * @tc.size SmallTest
* @tc.type User * @tc.type User
*/ */
it('RegisterStateOnOff_0330', 0, async function (done) { it('RegisterStateOnOff_0330', 0, async function (done) {
console.info('RegisterStateOnOff_0330'); console.info('RegisterStateOnOff_0330');
let stateEventType = 'accessibilityStateChange'; let callbackdata = (data) => {
let callbackdata = (data) => {} }
accessibility.on(stateEventType, callbackdata); accessibility.on('accessibilityStateChange', callbackdata);
accessibility.off(stateEventType, callbackdata); accessibility.off('accessibilityStateChange', callbackdata);
expect(true).assertTrue(); expect(true).assertTrue();
done(); done();
}) })
/* /*
* @tc.number RegisterStateOnOff_0340 * @tc.number RegisterStateOnOff_0340
* @tc.name RegisterStateOnOff_0340 * @tc.name RegisterStateOnOff_0340
* @tc.desc The parameter input is 'touchGuideStateChange', test the accessibility.on() function, * @tc.desc on(touchGuideStateChange)
* and return void.
* @tc.size SmallTest * @tc.size SmallTest
* @tc.type User * @tc.type User
*/ */
it('RegisterStateOnOff_0340', 0, async function (done) { it('RegisterStateOnOff_0340', 0, async function (done) {
console.info('RegisterStateOnOff_0340'); console.info('RegisterStateOnOff_0340');
let stateEventType = 'touchGuideStateChange'; let callbackdata = (data) => {
let callbackdata = (data) => {} }
accessibility.on(stateEventType, callbackdata); accessibility.on('touchGuideStateChange', callbackdata);
accessibility.off(stateEventType, callbackdata); accessibility.off('touchGuideStateChange', callbackdata);
expect(true).assertTrue(); expect(true).assertTrue();
done(); done();
}) })
}) })
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册