1/* 2 * Copyright (C) 2021 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from '@ohos/hypium' 16import accessibility from '@ohos.accessibility' 17 18export default function AccessibleCaptionConfiguration() { 19describe('AccessibleCaptionConfiguration', function () { 20 21 beforeEach(async function (done) { 22 console.info(`AccessibleCaptionConfiguration: beforeEach starts`); 23 done(); 24 }) 25 26 afterEach(async function (done) { 27 console.info(`AccessibleCaptionConfiguration: afterEach starts`); 28 done(); 29 }) 30 31 32 /* 33 * @tc.number SUB_BASIC_BARRIERFREE_API_AccessibleCaptionConfiguration_0100 34 * @tc.name SUB_BASIC_BARRIERFREE_API_AccessibleCaptionConfiguration_0100 35 * @tc.desc The parameter input is 'enableChange', test the captionManager.on() function, 36 * and return undefined 37 * @tc.size SmallTest 38 * @tc.type User 39 */ 40 it('SUB_BASIC_BARRIERFREE_API_AccessibleCaptionConfiguration_0100', 0, async function (done) { 41 console.info('SUB_BASIC_BARRIERFREE_API_AccessibleCaptionConfiguration_0100'); 42 let captionManager = accessibility.getCaptionsManager(); 43 let stateEventType = 'enableChange'; 44 let callbackdata = (data) => {} 45 captionManager.on(stateEventType, callbackdata); 46 captionManager.off(stateEventType, callbackdata); 47 expect(true).assertTrue(); 48 done(); 49 }) 50 51 /* 52 * @tc.number SUB_BASIC_BARRIERFREE_API_AccessibleCaptionConfiguration_0200 53 * @tc.name SUB_BASIC_BARRIERFREE_API_AccessibleCaptionConfiguration_0200 54 * @tc.desc The parameter input is 'styleChange', test the captionManager.on() function, 55 * and return undefined 56 * @tc.size SmallTest 57 * @tc.type User 58 */ 59 it('SUB_BASIC_BARRIERFREE_API_AccessibleCaptionConfiguration_0200', 0, async function (done) { 60 console.info('SUB_BASIC_BARRIERFREE_API_AccessibleCaptionConfiguration_0200'); 61 let captionManager = accessibility.getCaptionsManager(); 62 let stateEventType = 'styleChange'; 63 let callbackdata = (data) => {} 64 captionManager.on(stateEventType, callbackdata); 65 captionManager.off(stateEventType, callbackdata); 66 expect(true).assertTrue(); 67 done(); 68 }) 69}) 70}