未验证 提交 fbcf664f 编写于 作者: O openharmony_ci 提交者: Gitee

!9831 无障碍xts内存泄漏整改

Merge pull request !9831 from 姜欢欢/master
......@@ -41,8 +41,10 @@ describe('AccessibleCaptionConfiguration', function () {
console.info('CaptionConfiguration_0010');
let captionManager = accessibility.getCaptionsManager();
let stateEventType = 'enableChange';
let ret = captionManager.on(stateEventType, (data) => {});
expect(ret).assertEqual(undefined);
let callbackdata = (data) => {}
captionManager.on(stateEventType, callbackdata);
captionManager.off(stateEventType, callbackdata);
expect(true).assertTrue();
done();
})
......@@ -58,42 +60,10 @@ describe('AccessibleCaptionConfiguration', function () {
console.info('CaptionConfiguration_0020');
let captionManager = accessibility.getCaptionsManager();
let stateEventType = 'styleChange';
let ret = captionManager.on(stateEventType, (data) => {});
expect(ret).assertEqual(undefined);
done();
})
/*
* @tc.number CaptionConfiguration_0050
* @tc.name CaptionConfiguration_0050
* @tc.desc The parameter input is 'enableChange', test the captionManager.off() function,
* and return undefined
* @tc.size SmallTest
* @tc.type User
*/
it('CaptionConfiguration_0050', 0, async function (done) {
console.info('CaptionConfiguration_0050');
let captionManager = accessibility.getCaptionsManager();
let stateEventType = 'enableChange';
let ret = captionManager.off(stateEventType, (data) => {});
expect(ret).assertEqual(undefined);
done();
})
/*
* @tc.number CaptionConfiguration_0060
* @tc.name CaptionConfiguration_0060
* @tc.desc The parameter input is 'styleChange', test the captionManager.off() function,
* and return undefined
* @tc.size SmallTest
* @tc.type User
*/
it('CaptionConfiguration_0060', 0, async function (done) {
console.info('CaptionConfiguration_0060');
let captionManager = accessibility.getCaptionsManager();
let stateEventType = 'styleChange';
let ret = captionManager.off(stateEventType, (data) => {});
expect(ret).assertEqual(undefined);
let callbackdata = (data) => {}
captionManager.on(stateEventType, callbackdata);
captionManager.off(stateEventType, callbackdata);
expect(true).assertTrue();
done();
})
})
......
......@@ -41,8 +41,10 @@ describe('AccessibleCaptionConfiguration', function () {
console.info('CaptionConfiguration_0010');
let captionManager = accessibility.getCaptionsManager();
let stateEventType = 'enableChange';
let ret = captionManager.on(stateEventType, (data) => {});
expect(ret).assertEqual(undefined);
let callbackdata = (data) => {}
captionManager.on(stateEventType, callbackdata);
captionManager.off(stateEventType, callbackdata);
expect(true).assertTrue();
done();
})
......@@ -58,42 +60,10 @@ describe('AccessibleCaptionConfiguration', function () {
console.info('CaptionConfiguration_0020');
let captionManager = accessibility.getCaptionsManager();
let stateEventType = 'styleChange';
let ret = captionManager.on(stateEventType, (data) => {});
expect(ret).assertEqual(undefined);
done();
})
/*
* @tc.number CaptionConfiguration_0050
* @tc.name CaptionConfiguration_0050
* @tc.desc The parameter input is 'enableChange', test the captionManager.off() function,
* and return undefined
* @tc.size SmallTest
* @tc.type User
*/
it('CaptionConfiguration_0050', 0, async function (done) {
console.info('CaptionConfiguration_0050');
let captionManager = accessibility.getCaptionsManager();
let stateEventType = 'enableChange';
let ret = captionManager.off(stateEventType, (data) => {});
expect(ret).assertEqual(undefined);
done();
})
/*
* @tc.number CaptionConfiguration_0060
* @tc.name CaptionConfiguration_0060
* @tc.desc The parameter input is 'styleChange', test the captionManager.off() function,
* and return undefined
* @tc.size SmallTest
* @tc.type User
*/
it('CaptionConfiguration_0060', 0, async function (done) {
console.info('CaptionConfiguration_0060');
let captionManager = accessibility.getCaptionsManager();
let stateEventType = 'styleChange';
let ret = captionManager.off(stateEventType, (data) => {});
expect(ret).assertEqual(undefined);
let callbackdata = (data) => {}
captionManager.on(stateEventType, callbackdata);
captionManager.off(stateEventType, callbackdata);
expect(true).assertTrue();
done();
})
})
......
......@@ -35,74 +35,38 @@ describe('AccessibleRegisterState', function () {
/******************************************************************************** */
/* Cases RegisterStateOnOff_0330-0360 are for accessibility.on() API test */
/******************************************************************************** */
/*
* @tc.number RegisterStateOnOff_0330
* @tc.name RegisterStateOnOff_0330
* @tc.desc The parameter input is 'accessibilityStateChange', test the accessibility.on() function,
* and return void.
* @tc.desc on(accessibilityStateChange)
* @tc.size SmallTest
* @tc.type User
*/
it('RegisterStateOnOff_0330', 0, async function (done) {
console.info('RegisterStateOnOff_0330');
let stateEventType = 'accessibilityStateChange';
let ret = accessibility.on(stateEventType, (data) => {});
expect(ret).assertEqual(undefined);
let callbackdata = (data) => {
}
accessibility.on('accessibilityStateChange', callbackdata);
accessibility.off('accessibilityStateChange', callbackdata);
expect(true).assertTrue();
done();
})
/*
* @tc.number RegisterStateOnOff_0340
* @tc.name RegisterStateOnOff_0340
* @tc.desc The parameter input is 'touchGuideStateChange', test the accessibility.on() function,
* and return void.
* @tc.desc on(touchGuideStateChange)
* @tc.size SmallTest
* @tc.type User
*/
it('RegisterStateOnOff_0340', 0, async function (done) {
console.info('RegisterStateOnOff_0340');
let stateEventType = 'touchGuideStateChange';
let ret = accessibility.on(stateEventType, (data) => {});
expect(ret).assertEqual(undefined);
done();
})
/******************************************************************************** */
/* Cases RegisterStateOnOff_0370-0410 are for accessibility.off() API test */
/******************************************************************************** */
/*
* @tc.number RegisterStateOnOff_0370
* @tc.name RegisterStateOnOff_0370
* @tc.desc The parameter input is 'accessibilityStateChange', test the accessibility.off() function,
* and return void.
* @tc.size SmallTest
* @tc.type User
*/
it('RegisterStateOnOff_0370', 0, async function (done) {
console.info('RegisterStateOnOff_0370');
let stateEventType = 'accessibilityStateChange';
let ret = accessibility.off(stateEventType, (data) => {});
expect(ret).assertEqual(undefined);
done();
})
/*
* @tc.number RegisterStateOnOff_0380
* @tc.name RegisterStateOnOff_0380
* @tc.desc The parameter input is 'touchGuideStateChange', test the accessibility.off() function,
* and return void.
* @tc.size SmallTest
* @tc.type User
*/
it('RegisterStateOnOff_0380', 0, async function (done) {
console.info('RegisterStateOnOff_0380');
let stateEventType = 'touchGuideStateChange';
let ret = accessibility.off(stateEventType, (data) => {});
expect(ret).assertEqual(undefined);
let callbackdata = (data) => {
}
accessibility.on('touchGuideStateChange', callbackdata);
accessibility.off('touchGuideStateChange', callbackdata);
expect(true).assertTrue();
done();
})
})
}
......@@ -39,70 +39,35 @@ describe('AccessibleRegisterState', function () {
/*
* @tc.number RegisterStateOnOff_0330
* @tc.name RegisterStateOnOff_0330
* @tc.desc The parameter input is 'accessibilityStateChange', test the accessibility.on() function,
* and return void.
* @tc.desc on('accessibilityStateChange')
* @tc.size SmallTest
* @tc.type User
*/
it('RegisterStateOnOff_0330', 0, async function (done) {
console.info('RegisterStateOnOff_0330');
let stateEventType = 'accessibilityStateChange';
let ret = accessibility.on(stateEventType, (data) => {});
expect(ret).assertEqual(undefined);
let callbackdata = (data) => {
}
accessibility.on('accessibilityStateChange', callbackdata);
accessibility.off('accessibilityStateChange', callbackdata);
expect(true).assertTrue();
done();
})
/*
* @tc.number RegisterStateOnOff_0340
* @tc.name RegisterStateOnOff_0340
* @tc.desc The parameter input is 'touchGuideStateChange', test the accessibility.on() function,
* and return void.
* @tc.desc on('touchGuideStateChange')
* @tc.size SmallTest
* @tc.type User
*/
it('RegisterStateOnOff_0340', 0, async function (done) {
console.info('RegisterStateOnOff_0340');
let stateEventType = 'touchGuideStateChange';
let ret = accessibility.on(stateEventType, (data) => {});
expect(ret).assertEqual(undefined);
done();
})
/******************************************************************************** */
/* Cases RegisterStateOnOff_0370-0410 are for accessibility.off() API test */
/******************************************************************************** */
/*
* @tc.number RegisterStateOnOff_0370
* @tc.name RegisterStateOnOff_0370
* @tc.desc The parameter input is 'accessibilityStateChange', test the accessibility.off() function,
* and return void.
* @tc.size SmallTest
* @tc.type User
*/
it('RegisterStateOnOff_0370', 0, async function (done) {
console.info('RegisterStateOnOff_0370');
let stateEventType = 'accessibilityStateChange';
let ret = accessibility.off(stateEventType, (data) => {});
expect(ret).assertEqual(undefined);
done();
})
/*
* @tc.number RegisterStateOnOff_0380
* @tc.name RegisterStateOnOff_0380
* @tc.desc The parameter input is 'touchGuideStateChange', test the accessibility.off() function,
* and return void.
* @tc.size SmallTest
* @tc.type User
*/
it('RegisterStateOnOff_0380', 0, async function (done) {
console.info('RegisterStateOnOff_0380');
let stateEventType = 'touchGuideStateChange';
let ret = accessibility.off(stateEventType, (data) => {});
expect(ret).assertEqual(undefined);
let callbackdata = (data) => {
}
accessibility.on('touchGuideStateChange', callbackdata);
accessibility.off('touchGuideStateChange', callbackdata);
expect(true).assertTrue();
done();
})
})
}
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册