diff --git a/aafwk/aafwk_standard/BUILD.gn b/aafwk/aafwk_standard/BUILD.gn index 3ebdc601f004ac857ff81b748d015c9905e81935..afcb0d23e193ca81a1fb11ad45d740b31949d62d 100755 --- a/aafwk/aafwk_standard/BUILD.gn +++ b/aafwk/aafwk_standard/BUILD.gn @@ -23,18 +23,15 @@ group("aafwk_standard") { "actsabilitylifecyclestatenew:ActsAbilityLifecycleStateNewTest", "actsabilitymanageretstest:ActsAbilityManagerEtsTest", "actsdataabilityjs:ActsDataAbilityJsTest", - "actskillprocesswithaccount:ActsKillProcessWithAccountApi7Test", "actsstserviceabilityclientcase:ActsStServiceAbilityClientCaseTest", "amsabilitymanager/amsMissionSnapshotTest:ActsAmsMissionSnapshotTest", "amsabilitymanager/amsMissionSnapshotTestSingleton:ActsAmsMissionSnapshotTestSingleton", "amsabilitymanager/amsMissionSnapshotTestSingletonS:ActsAmsMissionSnapshotTestSingletonS", "amsdatauriutils:ActsAmsDataUriUtilsTest", "amsgetabilityprocessinfo:amsgetabilityprocessinfo", - "amsprocessmanageapi7:amsprocessmanageapi7", "context:context", "featureability:featureability", "formmanager:formmanager", - "lanuageConfigapi7:lanuageConfigapi7", "setshowonlockscreen:setshowonlockscreen", "want:want", ] diff --git a/aafwk/aafwk_standard/abilitymanager/actsamscallbackfifthscene/entry/src/main/js/test/MangerAbilityJsunit.test.js b/aafwk/aafwk_standard/abilitymanager/actsamscallbackfifthscene/entry/src/main/js/test/MangerAbilityJsunit.test.js index e56d4cdf81cad2d70fcb118dada3cbccdaf617fe..084d68666486fd0d7b68c89dd31cf9c5479cebd6 100644 --- a/aafwk/aafwk_standard/abilitymanager/actsamscallbackfifthscene/entry/src/main/js/test/MangerAbilityJsunit.test.js +++ b/aafwk/aafwk_standard/abilitymanager/actsamscallbackfifthscene/entry/src/main/js/test/MangerAbilityJsunit.test.js @@ -216,22 +216,4 @@ describe('ActsAmsCallBackFifthScene', function () { ); setTimeout(timeout, 5000); }) - - /* - * @tc.number : Acts_Ams_test_8000 - * @tc.name : killProcessesByBundleName : Kill Processes By BundleName - * @tc.desc : Kill Processes By BundleName(by CallBack) - */ - it('Acts_Ams_test_8000', 0, async function (done) { - appManager.killProcessesByBundleName('com.ix.verify.io', - (error, info) => { - console.info('Acts_Ams_test_8000 killProcessesByBundleName error.code: \ - ' + error.code + ',data [' + info + ']'); - expect(typeof (info)).assertEqual("number"); - expect(info).assertEqual(0); - done(); - } - ); - setTimeout(timeout, 5000); - }) }) \ No newline at end of file diff --git a/aafwk/aafwk_standard/abilitymanager/actsamscallbackfirstscene/entry/src/main/js/test/MangerAbilityJsunit.test.js b/aafwk/aafwk_standard/abilitymanager/actsamscallbackfirstscene/entry/src/main/js/test/MangerAbilityJsunit.test.js index acd157d27e3138f4dfdaa304ba40cd8375da9153..f8cc182c06b206b66c5dd01d35976024764dbe57 100644 --- a/aafwk/aafwk_standard/abilitymanager/actsamscallbackfirstscene/entry/src/main/js/test/MangerAbilityJsunit.test.js +++ b/aafwk/aafwk_standard/abilitymanager/actsamscallbackfirstscene/entry/src/main/js/test/MangerAbilityJsunit.test.js @@ -154,21 +154,6 @@ describe('ActsAmsCallBackFirstScene', function () { }); }) - /* - * @tc.number : Acts_Ams_test_1600 - * @tc.name : killProcessesByBundleName : Kill Processes By BundleName - * @tc.desc : Kill Processes By BundleName(by CallBack) - */ - it('Acts_Ams_test_1600', 0, async function (done) { - appManager.killProcessesByBundleName('com.ix.simulate.feature', - (error, info) => { - console.info('Acts_Ams_test_1600 killProcessesByBundleName error.code: \ - ' + error.code + ',data [' + info + ']'); - expect(error.code).assertEqual(0); - done(); - }); - }) - /* * @tc.number : Acts_Ams_test_1200 * @tc.name : moveMissionToFront : Move Mission To Top diff --git a/aafwk/aafwk_standard/abilitymanager/actsamscallbackfourthscene/entry/src/main/js/test/MangerAbilityJsunit.test.js b/aafwk/aafwk_standard/abilitymanager/actsamscallbackfourthscene/entry/src/main/js/test/MangerAbilityJsunit.test.js index 01ba80c5c4fcc1bdfc526fe7344fa36f4942bdb5..8aebf06abaa783b67055941f3e6b3b05db0c7d19 100644 --- a/aafwk/aafwk_standard/abilitymanager/actsamscallbackfourthscene/entry/src/main/js/test/MangerAbilityJsunit.test.js +++ b/aafwk/aafwk_standard/abilitymanager/actsamscallbackfourthscene/entry/src/main/js/test/MangerAbilityJsunit.test.js @@ -258,20 +258,6 @@ describe('ActsAmsCallBackFourthScene', function () { }); }) - /* - * @tc.number : Acts_Ams_test_6400 - * @tc.name : killProcessesByBundleName : Kill Processes By BundleName - * @tc.desc : Kill Processes By BundleName(by CallBack) - */ - it('Acts_Ams_test_6400', 0, async function (done) { - appManager.killProcessesByBundleName('xxxxxxxxx', - (error) => { - console.info('Acts_Ams_test_6400 killProcessesByBundleName error.code ' + error.code); - expect(error.code).assertEqual(2097183); - done(); - }); - }) - /* * @tc.number : Acts_Ams_test_11900 * @tc.name : clearMissions : delete Missions @@ -281,12 +267,11 @@ describe('ActsAmsCallBackFourthScene', function () { let maxnum = 30; let result = await missionManager.getMissionInfos("", maxnum); for (let i = 0; i < result.length; i++) { - console.info('Acts_Ams_test_11900 getMissionInfos result[' + i + "]: " + JSON.stringify(result[i])); + console.info('getMissionInfos result[' + i + "]: " + JSON.stringify(result[i])); } missionManager.clearAllMissions( (error, info) => { - console.info('Acts_Ams_test_11900 clearAllMissions error.code: \ - ' + error.code + ',data [' + info + ']'); + console.info('clearAllMissions error.code: \ ' + error.code + ',data [' + info + ']'); expect(error.code).assertEqual(0); done(); }); diff --git a/aafwk/aafwk_standard/abilitymanager/actsamscallbacksecondscene/entry/src/main/js/test/MangerAbilityJsunit.test.js b/aafwk/aafwk_standard/abilitymanager/actsamscallbacksecondscene/entry/src/main/js/test/MangerAbilityJsunit.test.js index d08cf0954e3cb4dda2ddcf29a9fcc5e4ff07c784..287c4390a19d6ab67317f206162929fe0bc6c327 100644 --- a/aafwk/aafwk_standard/abilitymanager/actsamscallbacksecondscene/entry/src/main/js/test/MangerAbilityJsunit.test.js +++ b/aafwk/aafwk_standard/abilitymanager/actsamscallbacksecondscene/entry/src/main/js/test/MangerAbilityJsunit.test.js @@ -212,19 +212,4 @@ describe('ActsAmsCallBackSecondScene', function () { done(); }); }) - - /* - * @tc.number : Acts_Ams_test_3200 - * @tc.name : killProcessesByBundleName : Kill Processes By BundleName - * @tc.desc : Kill Processes By BundleName(by CallBack) - */ - it('Acts_Ams_test_3200', 0, async function (done) { - appManager.killProcessesByBundleName('XXXXXXXXXXXX', - (error, info) => { - console.info('Acts_Ams_test_3200 killProcessesByBundleName error.code: \ - ' + error.code + ',data [' + info + ']'); - expect(error.code).assertEqual(2097183); - done(); - }); - }) }) \ No newline at end of file diff --git a/aafwk/aafwk_standard/abilitymanager/actsamscallbackthirdscene/entry/src/main/js/test/MangerAbilityJsunit.test.js b/aafwk/aafwk_standard/abilitymanager/actsamscallbackthirdscene/entry/src/main/js/test/MangerAbilityJsunit.test.js index 1d816caf1d001be0a64d4aa7171f6c1b7956a63e..38fd9e110851b4ea0a45c634bcb4274e22746eac 100644 --- a/aafwk/aafwk_standard/abilitymanager/actsamscallbackthirdscene/entry/src/main/js/test/MangerAbilityJsunit.test.js +++ b/aafwk/aafwk_standard/abilitymanager/actsamscallbackthirdscene/entry/src/main/js/test/MangerAbilityJsunit.test.js @@ -186,21 +186,4 @@ describe('ActsAmsCallBackThirdScene', function () { } ); }) - - /* - * @tc.number : Acts_Ams_test_4800 - * @tc.name : killProcessesByBundleName : Kill Processes By BundleName - * @tc.desc : Kill Processes By BundleName(by CallBack) - */ - it('Acts_Ams_test_4800', 0, async function (done) { - appManager.killProcessesByBundleName('xxxxxxxxxxx', - (error, info) => { - console.info('Acts_Ams_test_4800 killProcessesByBundleName error.code: \ - ' + error.code + ',data [' + info + ']'); - expect(error.code).assertEqual(2097215); - done(); - } - ); - done(); - }) }) \ No newline at end of file diff --git a/aafwk/aafwk_standard/abilitymanager/actsamstestfifthscene/entry/src/main/js/test/MangerAbilityJsunit.test.js b/aafwk/aafwk_standard/abilitymanager/actsamstestfifthscene/entry/src/main/js/test/MangerAbilityJsunit.test.js index 895d1c4c2f2d6a3b48d50c14f2512077d91b592a..96a9aa8779563c680d7491f007da871136bcf71d 100644 --- a/aafwk/aafwk_standard/abilitymanager/actsamstestfifthscene/entry/src/main/js/test/MangerAbilityJsunit.test.js +++ b/aafwk/aafwk_standard/abilitymanager/actsamstestfifthscene/entry/src/main/js/test/MangerAbilityJsunit.test.js @@ -224,21 +224,4 @@ describe('ActsAmsTestFifthScene', function () { console.log('Acts_Ams_test_0300 getMissionInfos failed: ' + err); }); }) - - /* - * @tc.number : Acts_Ams_test_1500 - * @tc.name : killProcessesByBundleName : Kill Processes By BundleName - * @tc.desc : Kill Processes By BundleName(by Promise) - */ - it('Acts_Ams_test_1500', 0, async function (done) { - console.info('Acts_test_1500 killProcessesByBundleName data'); - appManager.killProcessesByBundleName('com.ix.simulate.feature').then(data => { - console.log('Acts_test_1500 success: ' + data); - done(); - }).catch(err => { - console.log('Acts_test_1500 failed: ' + err.code); - expect(err.code).assertEqual(2097182); - done(); - }); - }) }) \ No newline at end of file diff --git a/aafwk/aafwk_standard/abilitymanager/actsamstestfirstscene/entry/src/main/js/test/MangerAbilityJsunit.test.js b/aafwk/aafwk_standard/abilitymanager/actsamstestfirstscene/entry/src/main/js/test/MangerAbilityJsunit.test.js index 8fb68c8dde0376aa37b3104cf2a8ebb199038c05..7c8d0193523c559691314804710c94b00ac88f2b 100644 --- a/aafwk/aafwk_standard/abilitymanager/actsamstestfirstscene/entry/src/main/js/test/MangerAbilityJsunit.test.js +++ b/aafwk/aafwk_standard/abilitymanager/actsamstestfirstscene/entry/src/main/js/test/MangerAbilityJsunit.test.js @@ -169,16 +169,4 @@ describe('ActsAmsTestFirstScene', function () { } done(); }) - - /* - * @tc.number : Acts_Ams_test_1500 - * @tc.name : killProcessesByBundleName : Kill Processes By BundleName - * @tc.desc : Kill Processes By BundleName(by Promise) - */ - it('Acts_Ams_test_1500', 0, async function (done) { - var info = await appManager.killProcessesByBundleName('com.ix.simulate.feature'); - console.info('Acts_Ams_test_1500 killProcessesByBundleName data [' + info + ']'); - expect(info).assertEqual(0); - done(); - }) }) \ No newline at end of file diff --git a/aafwk/aafwk_standard/abilitymanager/actsamstestsecondscene/entry/src/main/js/test/MangerAbilityJsunit.test.js b/aafwk/aafwk_standard/abilitymanager/actsamstestsecondscene/entry/src/main/js/test/MangerAbilityJsunit.test.js index 9791b2d9edb6c4a9e9428b6994060b35bc9a3973..cb98a278a3ffc7e459431a4c9420529aff81fd22 100644 --- a/aafwk/aafwk_standard/abilitymanager/actsamstestsecondscene/entry/src/main/js/test/MangerAbilityJsunit.test.js +++ b/aafwk/aafwk_standard/abilitymanager/actsamstestsecondscene/entry/src/main/js/test/MangerAbilityJsunit.test.js @@ -193,20 +193,4 @@ describe('ActsAmsTestSecondScene', function () { } done(); }) - - /* - * @tc.number : Acts_Ams_test_3100 - * @tc.name : killProcessesByBundleName : Kill Processes By BundleName - * @tc.desc : Kill Processes By BundleName(by Promise) - */ - it('Acts_Ams_test_3100', 0, async function (done) { - console.info('Acts_test_3100 killProcessesByBundleName data'); - appManager.killProcessesByBundleName('XXXXXXXXXXXX').then(data => { - console.log('Acts_test_3100 success: ' + data); - }).catch(err => { - console.log('Acts_test_3100 failed: ' + err.code); - expect(err.code).assertEqual(2097183); - done(); - }); - }) }) \ No newline at end of file diff --git a/aafwk/aafwk_standard/abilitymanager/actsamstestthirdscene/entry/src/main/js/test/MangerAbilityJsunit.test.js b/aafwk/aafwk_standard/abilitymanager/actsamstestthirdscene/entry/src/main/js/test/MangerAbilityJsunit.test.js index 89cf02f71fc65cc69e792ca1c7b81f5fcb69b0a6..87c487a80bd9214786fc866534f574d151c070a3 100644 --- a/aafwk/aafwk_standard/abilitymanager/actsamstestthirdscene/entry/src/main/js/test/MangerAbilityJsunit.test.js +++ b/aafwk/aafwk_standard/abilitymanager/actsamstestthirdscene/entry/src/main/js/test/MangerAbilityJsunit.test.js @@ -195,20 +195,4 @@ describe('ActsAmsTestThirdScene', function () { console.info('Acts_Ams_test_4300 moveMissionToFront data [' + info + ']'); done(); }) - - /* - * @tc.number : Acts_Ams_test_4700 - * @tc.name : killProcessesByBundleName : Kill Processes By BundleName - * @tc.desc : Kill Processes By BundleName(by Promise) - */ - it('Acts_Ams_test_4700', 0, async function (done) { - console.info('Acts_test_4700 killProcessesByBundleName data'); - appManager.killProcessesByBundleName('XXXXXXXX').then(data => { - console.log('Acts_test_4700 success: ' + data); - }).catch(err => { - console.log('Acts_test_4700 failed: ' + err.code); - expect(err.code).assertEqual(2097183); - done(); - }); - }) }) \ No newline at end of file diff --git a/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/MainAbility/pages/index.ets b/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/MainAbility/pages/index.ets index a4ac0111471b4f1f725a67debb3f8d9fa2e80fa4..5c93841ad37705a8fdfe60f24d245b71d81a057e 100644 --- a/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/MainAbility/pages/index.ets +++ b/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/MainAbility/pages/index.ets @@ -12,161 +12,47 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + +import testsuite2 from "../test/List.test.ets"; import file from '@system.file'; import {Core, ExpectExtend, ReportExtend} from "deccjsunit/index.ets"; -import testsuite from "../test/List.test.ets"; -import featureAbility from "@ohos.ability.featureAbility"; - -async function startService2() { - var str = { - "want": { - "bundleName": "com.ohos.acecollaboration", - "abilityName": "com.ohos.acecollaboration.ServiceAbility2", - }, - }; - var data = featureAbility.startAbility(str); - console.info('particleAbility_connectAbility_test_0100 startAbility succeeded: ' + JSON.stringify(data)); -} -async function startService3() { - var str = { - "want": { - "bundleName": "com.ohos.acecollaboration", - "abilityName": "com.ohos.acecollaboration.ServiceAbility3", - }, - }; - var data = featureAbility.startAbility(str); - console.info('particleAbility_connectAbility_test_0200 startAbility succeeded: ' + JSON.stringify(data)); -} -async function startService4() { - var str = { - "want": { - "bundleName": "com.ohos.acecollaboration", - "abilityName": "com.ohos.acecollaboration.ServiceAbility4", - }, - }; - var data = featureAbility.startAbility(str); - console.info('particleAbility_connectAbility_test_0300 startAbility succeeded: ' + JSON.stringify(data)); -} -async function startService5() { - var str = { - "want": { - "bundleName": "com.ohos.acecollaboration", - "abilityName": "com.ohos.acecollaboration.ServiceAbility5", - }, - }; - var data = featureAbility.startAbility(str); - console.info('particleAbility_connectAbility_test_0400 startAbility succeeded: ' + JSON.stringify(data)); -} -async function startService6(){ - var str = { - "want": { - "bundleName": "com.ohos.acecollaboration", - "abilityName": "com.ohos.acecollaboration.ServiceAbility6", - }, - }; - var data = featureAbility.startAbility(str); - console.info('particleAbility_connectAbility_test_0500 startAbility succeeded: ' + JSON.stringify(data)); -} -async function startService7(){ - var str = { - "want": { - "bundleName": "com.ohos.acecollaboration", - "abilityName": "com.ohos.acecollaboration.ServiceAbility7", - }, - }; - var data = featureAbility.startAbility(str); - console.info('particleAbility_connectAbility_test_0600 startAbility succeeded: ' + JSON.stringify(data)); -} @Entry @Component struct MyComponent { aboutToAppear() { - console.info("start run testcase!!!!") - featureAbility.getWant() - .then((Want) => { - const core = Core.getInstance(); - const expectExtend = new ExpectExtend({ - 'id': 'extend' - }); - core.addService('expect', expectExtend); - const reportExtend = new ReportExtend(file); - core.addService('report', reportExtend); - core.init(); - core.subscribeEvent('task', reportExtend); - const configService = core.getDefaultService('config'); - console.info('parameters---->' + JSON.stringify(Want.parameters)); - configService.setConfig(Want.parameters); - testsuite(); - core.execute(); - console.info('Operation successful. Data: ' + JSON.stringify(Want)); - }) - .catch((error) => { - console.error('Operation failed. Cause: ' + JSON.stringify(error)); - }) + console.info("start run testcase2!!!!") + const core = Core.getInstance(); + const expectExtend = new ExpectExtend({ + 'id': 'extend' + }); + core.addService('expect', expectExtend); + const reportExtend = new ReportExtend(file); + core.addService('report', reportExtend); + core.init(); + core.subscribeEvent('task', reportExtend); + const configService = core.getDefaultService('config'); + configService.setConfig(this) + testsuite2(); + core.execute(); } build() { - Flex({ - direction: FlexDirection.Column, - alignItems: ItemAlign.Center, - justifyContent: FlexAlign.Center - }) { - Text('ACE ETS TEST 组件协同') + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Text('Hello World') .fontSize(50) .fontWeight(FontWeight.Bold) - Button('disconnectAbility_promise') - .fontSize(40) - .height(40) - .margin({ top: 20 }) - .fontWeight(FontWeight.Bold) - .onClick(() => { - startService2(); - }); - Button('disconnectAbility_callback') - .fontSize(40) - .height(40) - .margin({ top: 20 }) - .fontWeight(FontWeight.Bold) - .onClick(() => { - startService3(); - }); - Button('connectotherAbility') - .fontSize(40) - .height(40) - .margin({ top: 20 }) - .fontWeight(FontWeight.Bold) - .onClick(() => { - startService4(); - }); - Button('connectnull') - .fontSize(40) - .height(40) - .margin({ top: 20 }) - .fontWeight(FontWeight.Bold) - .onClick(() => { - startService5(); - }); - Button('connecterror') - .fontSize(40) - .height(40) - .margin({top:20}) - .fontWeight(FontWeight.Bold) - .onClick(() => { - startService6(); - }); - Button('connectAPI8') - .fontSize(40) - .height(40) - .margin({top:20}) - .fontWeight(FontWeight.Bold) - .onClick(() => { - startService7(); - }); - + Button() { + Text('next page') + .fontSize(25) + .fontWeight(FontWeight.Bold) + }.type(ButtonType.Capsule) + .margin({ + top: 20 + }) + .backgroundColor('#0D9FFB') } .width('100%') .height('100%') } -} - +} \ No newline at end of file diff --git a/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/MainAbility2/pages/index.ets b/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/MainAbility2/pages/index.ets index e90a861b06feb9417415562b2421a432ac6d461d..5fd176012ff6ea344d07f9347b86e9ec97c7f8ac 100644 --- a/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/MainAbility2/pages/index.ets +++ b/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/MainAbility2/pages/index.ets @@ -22,27 +22,19 @@ import {Core, ExpectExtend, ReportExtend} from "deccjsunit/index.ets"; struct MyComponent { aboutToAppear() { console.info("start run testcase2!!!!") - featureAbility.getWant() - .then((Want) => { - const core = Core.getInstance(); - const expectExtend = new ExpectExtend({ - 'id': 'extend' - }); - core.addService('expect', expectExtend); - const reportExtend = new ReportExtend(file); - core.addService('report', reportExtend); - core.init(); - core.subscribeEvent('task', reportExtend); - const configService = core.getDefaultService('config'); - console.info('parameters2---->' + JSON.stringify(Want.parameters)); - configService.setConfig(Want.parameters); - testsuite2(); - core.execute(); - console.info('Operation successful2. Data: ' + JSON.stringify(Want)); - }) - .catch((error) => { - console.error('Operation failed2. Cause: ' + JSON.stringify(error)); - }) + const core = Core.getInstance(); + const expectExtend = new ExpectExtend({ + 'id': 'extend' + }); + core.addService('expect', expectExtend); + const reportExtend = new ReportExtend(file); + core.addService('report', reportExtend); + core.init(); + core.subscribeEvent('task', reportExtend); + const configService = core.getDefaultService('config'); + configService.setConfig(this) + testsuite2(); + core.execute(); } build() { diff --git a/aafwk/aafwk_standard/actsabilitymanageretstest/myapplication1/src/main/ets/MainAbility/pages/index.ets b/aafwk/aafwk_standard/actsabilitymanageretstest/myapplication1/src/main/ets/MainAbility/pages/index.ets index d39e37aa687879af8aa3ab6021f85353730243fb..8e4b3ecd582489a3519ec04ed6fdd4462681e2d5 100644 --- a/aafwk/aafwk_standard/actsabilitymanageretstest/myapplication1/src/main/ets/MainAbility/pages/index.ets +++ b/aafwk/aafwk_standard/actsabilitymanageretstest/myapplication1/src/main/ets/MainAbility/pages/index.ets @@ -23,27 +23,19 @@ import featureAbility from "@ohos.ability.featureAbility"; struct Index { aboutToAppear() { console.info("start run testcase!!!!") - featureAbility.getWant() - .then((Want) => { - const core = Core.getInstance(); - const expectExtend = new ExpectExtend({ - 'id': 'extend' - }); - core.addService('expect', expectExtend); - const reportExtend = new ReportExtend(file); - core.addService('report', reportExtend); - core.init(); - core.subscribeEvent('task', reportExtend); - const configService = core.getDefaultService('config'); - console.info('parameters---->' + JSON.stringify(Want.parameters)); - configService.setConfig(Want.parameters); - testsuite_app1(); - core.execute(); - console.info('Operation successful. Data: ' + JSON.stringify(Want)); - }) - .catch((error) => { - console.error('Operation failed. Cause: ' + JSON.stringify(error)); - }) + const core = Core.getInstance(); + const expectExtend = new ExpectExtend({ + 'id': 'extend' + }); + core.addService('expect', expectExtend); + const reportExtend = new ReportExtend(file); + core.addService('report', reportExtend); + core.init(); + core.subscribeEvent('task', reportExtend); + const configService = core.getDefaultService('config'); + configService.setConfig(this) + testsuite_app1(); + core.execute(); } build() { Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { diff --git a/aafwk/aafwk_standard/actskillprocesswithaccount/BUILD.gn b/aafwk/aafwk_standard/actskillprocesswithaccount/BUILD.gn deleted file mode 100644 index 32548744650646ea494b7cd998ae7fb8f83a63e8..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/actskillprocesswithaccount/BUILD.gn +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright (c) 2022 Huawei Device Co., Ltd. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import("//test/xts/tools/build/suite.gni") - -group("ActsKillProcessWithAccountApi7Test") { - testonly = true - if (is_standard_system) { - deps = [ - "actskillprocesswithaccountapi7:ActsKillProcessWithAccountApi7Test", - "actskillprocesswithaccountclose:ActsKillProcessWithAccountCloseApi7", - ] - } -} diff --git a/aafwk/aafwk_standard/actskillprocesswithaccount/actskillprocesswithaccountapi7/BUILD.gn b/aafwk/aafwk_standard/actskillprocesswithaccount/actskillprocesswithaccountapi7/BUILD.gn deleted file mode 100644 index d2c0009ac9070eb638a31294d8578651f6dca6a0..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/actskillprocesswithaccount/actskillprocesswithaccountapi7/BUILD.gn +++ /dev/null @@ -1,31 +0,0 @@ -# Copyright (c) 2022 Huawei Device Co., Ltd. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import("//test/xts/tools/build/suite.gni") - -ohos_js_hap_suite("ActsKillProcessWithAccountApi7Test") { - hap_name = "ActsKillProcessWithAccountApi7Test" - hap_profile = "./entry/src/main/config.json" - deps = [ - ":hjs_demo_js_assets", - ":hjs_demo_resources", - ] - certificate_profile = "./signature/openharmony_sx.p7b" -} -ohos_js_assets("hjs_demo_js_assets") { - source_dir = "./entry/src/main/js/default" -} -ohos_resources("hjs_demo_resources") { - sources = [ "./entry/src/main/js/resources" ] - hap_profile = "./entry/src/main/config.json" -} diff --git a/aafwk/aafwk_standard/actskillprocesswithaccount/actskillprocesswithaccountapi7/Test.json b/aafwk/aafwk_standard/actskillprocesswithaccount/actskillprocesswithaccountapi7/Test.json deleted file mode 100644 index 9c63a11187748fab4648648e089db985ceaca070..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/actskillprocesswithaccount/actskillprocesswithaccountapi7/Test.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "description": "Configuration for hjsunit Tests", - "driver": { - "type": "JSUnitTest", - "test-timeout": "60000", - "package": "com.example.myapplication.actsapi7killtest", - "shell-timeout": "60000" - }, - "kits": [ - { - "test-file-name": [ - "ActsKillProcessWithAccountApi7Test.hap", - "ActsKillProcessWithAccountCloseApi7.hap" - ], - "type": "AppInstallKit", - "cleanup-apps": true - }, - { - "type": "ShellKit", - "run-command": [ - "remount" - ] - }, - { - "type": "PushKit", - "push": [ - "ActsKillProcessWithAccountCloseApi7.hap->/data/ActsKillProcessWithAccountCloseApi7.hap" - ] - - }, - { - "type": "ShellKit", - "run-command": [ - "chmod 644 /data/*.hap" - ] - } - ] -} diff --git a/aafwk/aafwk_standard/actskillprocesswithaccount/actskillprocesswithaccountapi7/entry/src/main/config.json b/aafwk/aafwk_standard/actskillprocesswithaccount/actskillprocesswithaccountapi7/entry/src/main/config.json deleted file mode 100644 index a2d8038c261520e08d1db88a7693018e3b7db168..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/actskillprocesswithaccount/actskillprocesswithaccountapi7/entry/src/main/config.json +++ /dev/null @@ -1,107 +0,0 @@ -{ - "app": { - "bundleName": "com.example.myapplication.actsapi7killtest", - "vendor": "example", - "version": { - "code": 1, - "name": "1.0" - }, - "apiVersion": { - "compatible": 4, - "target": 5, - "releaseType": "Beta1" - } - }, - "deviceConfig": {}, - "module": { - "package": "com.example.myapplication.actsapi7killtest", - "name": ".MyApplication", - "deviceType": [ - "phone" - ], - "distro": { - "deliveryWithInstall": true, - "moduleName": "entry", - "moduleType": "entry" - }, - "abilities": [ - { - "skills": [ - { - "entities": [ - "entity.system.home" - ], - "actions": [ - "action.system.home" - ] - } - ], - "name": "com.example.myapplication.actsapi7killtest.MainAbility", - "icon": "$media:icon", - "description": "$string:mainability_description", - "label": "$string:app_name", - "type": "page", - "launchType": "singleton", - "visible": true - } - ], - "reqPermissions": [ - { - "name":"ohos.permission.GET_BUNDLE_INFO_PRIVILEGED", - "reason":"need use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED" - }, - { - "name":"ohos.permission.GET_BUNDLE_INFO", - "reason":"need use ohos.permission.GET_BUNDLE_INFO" - }, - { - "name":"ohos.permission.CHANGE_ABILITY_ENABLED_STATE", - "reason":"need use ohos.permission.CHANGE_ABILITY_ENABLED_STATE" - }, - { - "name":"ohos.permission.REMOVE_CACHE_FILES", - "reason":"need use ohos.permission.REMOVE_CACHE_FILES" - }, - { - "name":"ohos.permission.LISTEN_BUNDLE_CHANGE", - "reason":"need use ohos.permission.LISTEN_BUNDLE_CHANGE" - }, - { - "name":"ohos.permission.INSTALL_BUNDLE", - "reason":"need use ohos.permission.INSTALL_BUNDLE" - }, - { - "name":"ohos.permission.MANAGE_MISSIONS", - "reason":"need use ohos.permission.MANAGE_MISSIONS" - }, - { - "name":"ohos.permission.GET_RUNNING_INFO", - "reason":"need use ohos.permission.GET_RUNNING_INFO" - }, - { - "name":"ohos.permission.CLEAN_BACKGROUND_PROCESSES", - "reason":"need use ohos.permission.CLEAN_BACKGROUND_PROCESSES" - }, - { - "name":"ohos.permission.CLEAN_APPLICATION_DATA", - "reason":"need use ohos.permission.CLEAN_APPLICATION_DATA" - }, - { - "name":"ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS", - "reason":"need use ohos.permission.GET_RUNNING_INFO" - } - ], - "js": [ - { - "pages": [ - "pages/index/index" - ], - "name": "default", - "window": { - "designWidth": 720, - "autoDesignWidth": false - } - } - ] - } -} \ No newline at end of file diff --git a/aafwk/aafwk_standard/actskillprocesswithaccount/actskillprocesswithaccountapi7/entry/src/main/js/default/app.js b/aafwk/aafwk_standard/actskillprocesswithaccount/actskillprocesswithaccountapi7/entry/src/main/js/default/app.js deleted file mode 100644 index 11ca2c1d6428bbb29c4a01126536132868c5df26..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/actskillprocesswithaccount/actskillprocesswithaccountapi7/entry/src/main/js/default/app.js +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) 2022 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -export default { - onCreate() { - console.info('ActsProcessManageJsTest onCreate'); - }, - onDestroy() { - console.info('ActsProcessManageJsTest onDestroy'); - }, - onShow() { - console.info('ActsProcessManageJsTest onShow'); - }, - onHide() { - console.info('ActsProcessManageJsTest onHide'); - } -}; diff --git a/aafwk/aafwk_standard/actskillprocesswithaccount/actskillprocesswithaccountapi7/entry/src/main/js/default/i18n/en-US.json b/aafwk/aafwk_standard/actskillprocesswithaccount/actskillprocesswithaccountapi7/entry/src/main/js/default/i18n/en-US.json deleted file mode 100644 index e63c70d978a3a53be988388c87182f81785e170c..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/actskillprocesswithaccount/actskillprocesswithaccountapi7/entry/src/main/js/default/i18n/en-US.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "strings": { - "hello": "Hello", - "world": "World" - } -} \ No newline at end of file diff --git a/aafwk/aafwk_standard/actskillprocesswithaccount/actskillprocesswithaccountapi7/entry/src/main/js/default/i18n/zh-CN.json b/aafwk/aafwk_standard/actskillprocesswithaccount/actskillprocesswithaccountapi7/entry/src/main/js/default/i18n/zh-CN.json deleted file mode 100644 index de6ee5748322f44942c1b003319d8e66c837675f..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/actskillprocesswithaccount/actskillprocesswithaccountapi7/entry/src/main/js/default/i18n/zh-CN.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "strings": { - "hello": "您好", - "world": "世界" - } -} \ No newline at end of file diff --git a/aafwk/aafwk_standard/actskillprocesswithaccount/actskillprocesswithaccountapi7/entry/src/main/js/default/pages/index/index.css b/aafwk/aafwk_standard/actskillprocesswithaccount/actskillprocesswithaccountapi7/entry/src/main/js/default/pages/index/index.css deleted file mode 100644 index cfd4c53e39aecb2d83a0fbdec971eca4041c8a3a..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/actskillprocesswithaccount/actskillprocesswithaccountapi7/entry/src/main/js/default/pages/index/index.css +++ /dev/null @@ -1,14 +0,0 @@ -.container { - flex-direction: column; - justify-content: center; - align-items: center; -} - -.title { - font-size: 100px; -} - -.btn { - width: 200px; - height: 80px; -} diff --git a/aafwk/aafwk_standard/actskillprocesswithaccount/actskillprocesswithaccountapi7/entry/src/main/js/default/pages/index/index.hml b/aafwk/aafwk_standard/actskillprocesswithaccount/actskillprocesswithaccountapi7/entry/src/main/js/default/pages/index/index.hml deleted file mode 100644 index 83c5e0fcabbb1d5df26d69f4a5c2031c1e65b70a..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/actskillprocesswithaccount/actskillprocesswithaccountapi7/entry/src/main/js/default/pages/index/index.hml +++ /dev/null @@ -1,6 +0,0 @@ -
- - {{ $t('strings.hello') }} {{ title }} - - -
diff --git a/aafwk/aafwk_standard/actskillprocesswithaccount/actskillprocesswithaccountapi7/entry/src/main/js/default/pages/index/index.js b/aafwk/aafwk_standard/actskillprocesswithaccount/actskillprocesswithaccountapi7/entry/src/main/js/default/pages/index/index.js deleted file mode 100644 index a6d4c3ea607cf4251f2008ad271f48a0874e1ba2..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/actskillprocesswithaccount/actskillprocesswithaccountapi7/entry/src/main/js/default/pages/index/index.js +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright (c) 2022 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { Core, ExpectExtend } from 'deccjsunit/index' - -const injectRef = Object.getPrototypeOf(global) || global -injectRef.regeneratorRuntime = require('@babel/runtime/regenerator') - -export default { - data: { - title: "", - testTime: 0 - }, - onInit() { - console.info('ActsProcessManageJsTest onInit'); - this.title = this.$t('strings.world'); - }, - onShow() { - console.info('ActsProcessManageJsTest onShow'); - console.info('ActsProcessManageJsTest testTime' + this.testTime); - if (this.testTime == 0) { - const core = Core.getInstance() - const expectExtend = new ExpectExtend({ - 'id': 'extend' - }) - core.addService('expect', expectExtend) - core.init() - const configService = core.getDefaultService('config') - this.timeout = 30000; - configService.setConfig(this) - - require('../../../test/List.test') - core.execute() - } - this.testTime++; - }, - onReady() { - console.info('ActsProcessManageJsTest onReady'); - }, - onActive() { - console.info('ActsProcessManageJsTest onActive'); - }, - onInactive() { - console.info('ActsProcessManageJsTest onInactive'); - }, - onHide() { - console.info('ActsProcessManageJsTest onHide'); - }, - onDestroy() { - console.info('ActsProcessManageJsTest onDestroy'); - }, - onBackPress() { - console.info('ActsProcessManageJsTest onBackPress'); - }, - onNewRequest() { - console.info('ActsProcessManageJsTest onNewRequest'); - }, - onStartContinuation() { - console.info('ActsProcessManageJsTest onStartContinuation'); - }, - onSaveData(value) { - console.info('ActsProcessManageJsTest onSaveData:' + JSON.stringify(value)); - }, - onRestoreData(value) { - console.info('ActsProcessManageJsTest onRestoreData:' + JSON.stringify(value)); - }, - onCompleteContinuation(code) { - console.info('ActsProcessManageJsTest onCompleteContinuation:' + JSON.stringify(code)); - }, - onConfigurationUpdated(configuration) { - console.info('ActsProcessManageJsTest onConfigurationUpdated:' + JSON.stringify(configuration)); - } -} diff --git a/aafwk/aafwk_standard/actskillprocesswithaccount/actskillprocesswithaccountapi7/entry/src/main/js/resources/base/element/string.json b/aafwk/aafwk_standard/actskillprocesswithaccount/actskillprocesswithaccountapi7/entry/src/main/js/resources/base/element/string.json deleted file mode 100644 index 03574a36c533357eef7fc0acc5e21af14f4e5f67..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/actskillprocesswithaccount/actskillprocesswithaccountapi7/entry/src/main/js/resources/base/element/string.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "string": [ - { - "name": "app_name", - "value": "actsparticleabilitytest" - }, - { - "name": "mainability_description", - "value": "JS_Phone_Empty Feature Ability" - } - ] -} \ No newline at end of file diff --git a/aafwk/aafwk_standard/actskillprocesswithaccount/actskillprocesswithaccountapi7/entry/src/main/js/resources/base/media/icon.png b/aafwk/aafwk_standard/actskillprocesswithaccount/actskillprocesswithaccountapi7/entry/src/main/js/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/aafwk/aafwk_standard/actskillprocesswithaccount/actskillprocesswithaccountapi7/entry/src/main/js/resources/base/media/icon.png and /dev/null differ diff --git a/aafwk/aafwk_standard/actskillprocesswithaccount/actskillprocesswithaccountapi7/entry/src/main/js/test/ActsKillProcessTest.test.js b/aafwk/aafwk_standard/actskillprocesswithaccount/actskillprocesswithaccountapi7/entry/src/main/js/test/ActsKillProcessTest.test.js deleted file mode 100644 index a3a739e8ccacd17a9244d1086303879652f45b86..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/actskillprocesswithaccount/actskillprocesswithaccountapi7/entry/src/main/js/test/ActsKillProcessTest.test.js +++ /dev/null @@ -1,287 +0,0 @@ -/* - * Copyright (C) 2022 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from "deccjsunit/index" -import appManager from '@ohos.application.AppManager'; -import featureAbility from '@ohos.ability.featureAbility' - -const ACCOUNT_ID = 100; -const NULL_ACCOUNT_ID = 102; -const BUNDLE_NAME = 'com.example.actskillprocesswithaccountcloseapi7'; -const NULL_BUNDLE_NAME = 'com.aaa.bbb'; -const START_ABILITY_NAME = 'com.example.actskillprocesswithaccountcloseapi7.MainAbility'; - -describe('ActskillProcessWithaccountTest', function () { - - beforeEach(async (done) => { - console.log('======>beforeEach killProcessWithAccountFATest<======='); - - await featureAbility.startAbility({ - want: - { - bundleName: BUNDLE_NAME, - abilityName: START_ABILITY_NAME - } - }).then(async () => { - console.log("====>end ACTS_KillProcessWithAccountFA startability ====>success!") - done(); - }) - }) - - function sleep(time) { - let delta; - if (typeof time != 'number' || time <= 0) { - delta = 100; - } else { - delta = Math.round(time); - } - for (let start = Date.now(); Date.now() - start <= delta;); - } - - function checkRunningProcess(name, dataInfo) { - for (let i = 0, len = dataInfo.length; i < len; i++) { - if (dataInfo[i].processName == name) { - return true; - } - } - return false; - } - - /** - * @tc.number: ACTS_KillProcessWithAccountFA_0100 - * @tc.name: Provide the system interface of the specified user management application. - * @tc.desc: Validates the ability to stop the specified process for the specified user. - */ - it('ACTS_KillProcessWithAccountFA_0100', 0, async function (done) { - console.debug("====>ACTS_KillProcessWithAccountFA_0100 start startAbility====>"); - - var procrssinfo = await appManager.getProcessRunningInfos() - console.log('ACTS_KillProcessWithAccountFA_0100 ==1== getProcessRunningInfos ======> ' - + JSON.stringify(procrssinfo)); - var infores = checkRunningProcess(BUNDLE_NAME, procrssinfo) - console.log("====>ACTS_KillProcessWithAccountFA_0100====>infores = " + infores) - expect(infores).assertEqual(true); - - await appManager.killProcessWithAccount(BUNDLE_NAME, ACCOUNT_ID).then(async () => { - console.log('ACTS_KillProcessWithAccountFA_0100 killProcess ======> start'); - }) - - setTimeout(async () => { - var copyprocrssinfo = await appManager.getProcessRunningInfos() - console.log('ACTS_KillProcessWithAccountFA_0100 getProcessRunningInfos ======> ' - + JSON.stringify(copyprocrssinfo)); - var outcopy = checkRunningProcess(BUNDLE_NAME, copyprocrssinfo) - console.log("====>ACTS_KillProcessWithAccountFA_0100====>outcopy = " + outcopy) - expect(outcopy).assertEqual(false); - done(); - }, 3000) - }) - - /** - * @tc.number: ACTS_KillProcessWithAccountFA_0300 - * @tc.name: Provide the system interface of the specified user management application. - * @tc.desc: Authentication cannot stop the specified process for the specified user. - */ - it('ACTS_KillProcessWithAccountFA_0300', 0, async function (done) { - console.debug("====>ACTS_KillProcessWithAccountFA_0300 start startAbility====>"); - - var getinfo = await appManager.getProcessRunningInfos() - console.log('ACTS_KillProcessWithAccountFA_0300 getProcessRunningInfos =1= ======> ' - + JSON.stringify(getinfo)); - var res = checkRunningProcess(BUNDLE_NAME, getinfo) - console.log("====>ACTS_KillProcessWithAccountFA_0300====>res = " + res) - expect(res).assertEqual(true); - - appManager.killProcessWithAccount(NULL_BUNDLE_NAME, ACCOUNT_ID).then(() => { - console.log('ACTS_KillProcessWithAccountFA_0300 ======> '); - }) - - setTimeout(async () => { - var procrssinfo = await appManager.getProcessRunningInfos() - console.log('ACTS_KillProcessWithAccountFA_0300 ==1== getProcessRunningInfos ======> ' - + JSON.stringify(procrssinfo)); - var infores = checkRunningProcess(BUNDLE_NAME, procrssinfo) - console.log("====>ACTS_KillProcessWithAccountFA_0300====>infores = " + infores) - expect(infores).assertEqual(true); - - await appManager.killProcessWithAccount(BUNDLE_NAME, ACCOUNT_ID).then(async () => { - console.log('ACTS_KillProcessWithAccountFA_0300 killProcess ======> start'); - sleep(500) - var copyprocrssinfo = await appManager.getProcessRunningInfos() - console.log('ACTS_KillProcessWithAccountFA_0300 getProcessRunningInfos ======> ' - + JSON.stringify(copyprocrssinfo)); - var outcopy = checkRunningProcess(BUNDLE_NAME, copyprocrssinfo) - console.log("====>ACTS_KillProcessWithAccountFA_0300====> outcopy = " + outcopy) - expect(outcopy).assertEqual(false); - done(); - }) - }, 1500) - }) - - /** - * @tc.number: ACTS_KillProcessWithAccountFA_0400 - * @tc.name: Provide the system interface of the specified user management application. - * @tc.desc: Authentication cannot stop the specified process for the specified user. - */ - it('ACTS_KillProcessWithAccountFA_0400', 0, async function (done) { - console.debug("====>ACTS_KillProcessWithAccountFA_0400 start startAbility====>"); - - var getinfo = await appManager.getProcessRunningInfos() - console.log('ACTS_KillProcessWithAccountFA_0400 getProcessRunningInfos =1= ======> ' - + JSON.stringify(getinfo)); - var res = checkRunningProcess(BUNDLE_NAME, getinfo) - console.log("====>ACTS_KillProcessWithAccountFA_0400====>res = " + res) - expect(res).assertEqual(true); - - appManager.killProcessWithAccount(BUNDLE_NAME, NULL_ACCOUNT_ID).then(() => { - console.log('ACTS_KillProcessWithAccountFA_0400 killProcess ======> start'); - }) - - setTimeout(async () => { - var procrssinfo = await appManager.getProcessRunningInfos() - console.log('ACTS_KillProcessWithAccountFA_0400 ==1== getProcessRunningInfos ======> ' - + JSON.stringify(procrssinfo)); - var infores = checkRunningProcess(BUNDLE_NAME, procrssinfo) - console.log("====>ACTS_KillProcessWithAccountFA_0400====>infores = " + infores) - expect(infores).assertEqual(true); - - appManager.killProcessWithAccount(BUNDLE_NAME, ACCOUNT_ID).then(async () => { - console.log('ACTS_KillProcessWithAccountFA_0400 killProcess2 ======> start'); - - sleep(500) - var copyprocrssinfo = await appManager.getProcessRunningInfos() - console.log('ACTS_KillProcessWithAccountFA_0400 ==2== getProcessRunningInfos ======>' - + JSON.stringify(copyprocrssinfo)); - var out = checkRunningProcess(BUNDLE_NAME, copyprocrssinfo) - console.log("====>ACTS_KillProcessWithAccountFA_0400====>infores = " + out) - expect(out).assertEqual(false); - done(); - }) - }, 1500) - }) - - /** - * @tc.number: ACTS_KillProcessWithAccountFA_0500 - * @tc.name: Provide the system interface of the specified user management application. - * @tc.desc: Validates the ability to stop the specified process for the specified user. - */ - it('ACTS_KillProcessWithAccountFA_0500', 0, async function (done) { - console.debug("====>ACTS_KillProcessWithAccountFA_0500 start startAbility====>"); - - var procrssinfo = await appManager.getProcessRunningInfos() - console.log('ACTS_KillProcessWithAccountFA_0500 ==1== getProcessRunningInfos ======> ' - + JSON.stringify(procrssinfo)); - var infores = checkRunningProcess(BUNDLE_NAME, procrssinfo) - console.log("====>ACTS_KillProcessWithAccountFA_0500====>infores = " + infores) - expect(infores).assertEqual(true); - - await appManager.killProcessWithAccount(BUNDLE_NAME, ACCOUNT_ID, (async () => { - console.log('ACTS_KillProcessWithAccountFA_0500 killProcess ======> start'); - })) - - setTimeout(async () => { - var copyprocrssinfo = await appManager.getProcessRunningInfos() - console.log('ACTS_KillProcessWithAccountFA_0500 getProcessRunningInfos ======> ' - + JSON.stringify(copyprocrssinfo)); - var outcopy = checkRunningProcess(BUNDLE_NAME, copyprocrssinfo) - console.log("====>ACTS_KillProcessWithAccountFA_0500====>outcopy = " + outcopy) - expect(outcopy).assertEqual(false); - done(); - }, 3000) - }) - - /** - * @tc.number: ACTS_KillProcessWithAccountFA_0700 - * @tc.name: Provide the system interface of the specified user management application. - * @tc.desc: Authentication cannot stop the specified process for the specified user. - */ - it('ACTS_KillProcessWithAccountFA_0700', 0, async function (done) { - console.debug("====>ACTS_KillProcessWithAccountFA_0700 start startAbility====>"); - - var getinfo = await appManager.getProcessRunningInfos() - console.log('ACTS_KillProcessWithAccountFA_0700 getProcessRunningInfos =1= ======> ' - + JSON.stringify(getinfo)); - var res = checkRunningProcess(BUNDLE_NAME, getinfo) - console.log("====>ACTS_KillProcessWithAccountFA_0700====>res = " + res) - expect(res).assertEqual(true); - - appManager.killProcessWithAccount(NULL_BUNDLE_NAME, ACCOUNT_ID, (() => { - console.log('ACTS_KillProcessWithAccountFA_0700 killProcess ======> start'); - })) - - setTimeout(async () => { - var procrssinfo = await appManager.getProcessRunningInfos() - console.log('ACTS_KillProcessWithAccountFA_0700 ==1== getProcessRunningInfos ======> ' - + JSON.stringify(procrssinfo)); - var infores = checkRunningProcess(BUNDLE_NAME, procrssinfo) - console.log("====>ACTS_KillProcessWithAccountFA_0700====>infores = " + infores) - expect(infores).assertEqual(true); - - await appManager.killProcessWithAccount(BUNDLE_NAME, ACCOUNT_ID).then(async () => { - console.log('ACTS_KillProcessWithAccountFA_0700 killProcess ======> start'); - sleep(500) - var copyprocrssinfo = await appManager.getProcessRunningInfos() - console.log('ACTS_KillProcessWithAccountFA_0700 getProcessRunningInfos ======> ' - + JSON.stringify(copyprocrssinfo)); - var outcopy = checkRunningProcess(BUNDLE_NAME, copyprocrssinfo) - console.log("====>ACTS_KillProcessWithAccountFA_0700====> outcopy = " + outcopy) - expect(outcopy).assertEqual(false); - done(); - }) - }, 1500) - }) - - /** - * @tc.number: ACTS_KillProcessWithAccountFA_0800 - * @tc.name: Provide the system interface of the specified user management application. - * @tc.desc: Authentication cannot stop the specified process for the specified user. - */ - it('ACTS_KillProcessWithAccountFA_0800', 0, async function (done) { - console.debug("====>ACTS_KillProcessWithAccountFA_0800 start startAbility====>"); - - var getinfo = await appManager.getProcessRunningInfos() - console.log('ACTS_KillProcessWithAccountFA_0800 getProcessRunningInfos =1= ======> ' - + JSON.stringify(getinfo)); - var res = checkRunningProcess(BUNDLE_NAME, getinfo) - console.log("====>ACTS_KillProcessWithAccountFA_0800====>res = " + res) - expect(res).assertEqual(true); - - appManager.killProcessWithAccount(BUNDLE_NAME, NULL_ACCOUNT_ID, (() => { - console.log('ACTS_KillProcessWithAccountFA_0800 killProcess ======> start'); - })) - - setTimeout(async () => { - var procrssinfo = await appManager.getProcessRunningInfos() - console.log('ACTS_KillProcessWithAccountFA_0800 ==1== getProcessRunningInfos ======> ' - + JSON.stringify(procrssinfo)); - var infores = checkRunningProcess(BUNDLE_NAME, procrssinfo) - console.log("====>ACTS_KillProcessWithAccountFA_0800====>infores = " + infores) - expect(infores).assertEqual(true); - - await appManager.killProcessWithAccount(BUNDLE_NAME, ACCOUNT_ID).then(async () => { - console.log('ACTS_KillProcessWithAccountFA_0800 killProcess ======> start'); - sleep(500) - var copyprocrssinfo = await appManager.getProcessRunningInfos() - console.log('ACTS_KillProcessWithAccountFA_0800 getProcessRunningInfos ======> ' - + JSON.stringify(copyprocrssinfo)); - var outcopy = checkRunningProcess(BUNDLE_NAME, copyprocrssinfo) - console.log("====>ACTS_KillProcessWithAccountFA_0800====> outcopy = " + outcopy) - expect(outcopy).assertEqual(false); - done(); - }) - }, 1500) - }) - -}) \ No newline at end of file diff --git a/aafwk/aafwk_standard/actskillprocesswithaccount/actskillprocesswithaccountapi7/entry/src/main/js/test/List.test.js b/aafwk/aafwk_standard/actskillprocesswithaccount/actskillprocesswithaccountapi7/entry/src/main/js/test/List.test.js deleted file mode 100644 index 9eea0f05fbc9dfad9feff5ea252baf04564c1101..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/actskillprocesswithaccount/actskillprocesswithaccountapi7/entry/src/main/js/test/List.test.js +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Copyright (c) 2022 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -require('./ActsKillProcessTest.test.js') \ No newline at end of file diff --git a/aafwk/aafwk_standard/actskillprocesswithaccount/actskillprocesswithaccountapi7/signature/openharmony_sx.p7b b/aafwk/aafwk_standard/actskillprocesswithaccount/actskillprocesswithaccountapi7/signature/openharmony_sx.p7b deleted file mode 100644 index cc53179a48f88f20acc379c138a001e9a15838f6..0000000000000000000000000000000000000000 Binary files a/aafwk/aafwk_standard/actskillprocesswithaccount/actskillprocesswithaccountapi7/signature/openharmony_sx.p7b and /dev/null differ diff --git a/aafwk/aafwk_standard/actskillprocesswithaccount/actskillprocesswithaccountclose/BUILD.gn b/aafwk/aafwk_standard/actskillprocesswithaccount/actskillprocesswithaccountclose/BUILD.gn deleted file mode 100644 index bc30d324ddb3f2a566aef5528dea82ade7e7e1e1..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/actskillprocesswithaccount/actskillprocesswithaccountclose/BUILD.gn +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright (C) 2022 Huawei Device Co., Ltd. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -import("//test/xts/tools/build/suite.gni") - -ohos_hap("ActsKillProcessWithAccountCloseApi7") { - hap_name = "ActsKillProcessWithAccountCloseApi7" - hap_profile = "./src/main/config.json" - subsystem_name = XTS_SUITENAME - final_hap_path = - "${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap" - testonly = true - deps = [ - ":hjs_demo_js_assets", - ":hjs_demo_resources", - ] - certificate_profile = "./signature/openharmony_sx.p7b" -} -ohos_js_assets("hjs_demo_js_assets") { - source_dir = "./src/main/js/default" -} -ohos_resources("hjs_demo_resources") { - sources = [ "./src/main/js/resources" ] - hap_profile = "./src/main/config.json" -} diff --git a/aafwk/aafwk_standard/actskillprocesswithaccount/actskillprocesswithaccountclose/signature/openharmony_sx.p7b b/aafwk/aafwk_standard/actskillprocesswithaccount/actskillprocesswithaccountclose/signature/openharmony_sx.p7b deleted file mode 100644 index cc53179a48f88f20acc379c138a001e9a15838f6..0000000000000000000000000000000000000000 Binary files a/aafwk/aafwk_standard/actskillprocesswithaccount/actskillprocesswithaccountclose/signature/openharmony_sx.p7b and /dev/null differ diff --git a/aafwk/aafwk_standard/actskillprocesswithaccount/actskillprocesswithaccountclose/src/main/config.json b/aafwk/aafwk_standard/actskillprocesswithaccount/actskillprocesswithaccountclose/src/main/config.json deleted file mode 100644 index 855f8170cc9d1c19fe29832e72c43452e47a0969..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/actskillprocesswithaccount/actskillprocesswithaccountclose/src/main/config.json +++ /dev/null @@ -1,99 +0,0 @@ -{ - "app": { - "bundleName": "com.example.actskillprocesswithaccountcloseapi7", - "vendor": "example", - "version": { - "code": 1, - "name": "1.0" - }, - "apiVersion": { - "compatible": 4, - "target": 5, - "releaseType": "Beta1" - } - }, - "deviceConfig": {}, - "module": { - "package": "com.example.actskillprocesswithaccountcloseapi7", - "name": ".MyApplication", - "deviceType": [ - "phone" - ], - "distro": { - "deliveryWithInstall": true, - "moduleName": "entry", - "moduleType": "entry" - }, - "abilities": [ - { - "skills": [ - { - "entities": [ - "entity.system.home" - ], - "actions": [ - "action.system.home" - ] - } - ], - "name": "com.example.actskillprocesswithaccountcloseapi7.MainAbility", - "visible": true, - "icon": "$media:icon", - "description": "$string:mainability_description", - "label": "$string:app_name", - "type": "page", - "launchType": "standard" - } - ], - "reqPermissions": [ - { - "name":"ohos.permission.GET_BUNDLE_INFO_PRIVILEGED", - "reason":"need use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED" - }, - { - "name":"ohos.permission.GET_BUNDLE_INFO", - "reason":"need use ohos.permission.GET_BUNDLE_INFO" - }, - { - "name":"ohos.permission.CHANGE_ABILITY_ENABLED_STATE", - "reason":"need use ohos.permission.CHANGE_ABILITY_ENABLED_STATE" - }, - { - "name":"ohos.permission.REMOVE_CACHE_FILES", - "reason":"need use ohos.permission.REMOVE_CACHE_FILES" - }, - { - "name":"ohos.permission.LISTEN_BUNDLE_CHANGE", - "reason":"need use ohos.permission.LISTEN_BUNDLE_CHANGE" - }, - { - "name":"ohos.permission.MANAGE_MISSIONS", - "reason":"need use ohos.permission.MANAGE_MISSIONS" - }, - { - "name":"ohos.permission.GET_RUNNING_INFO", - "reason":"need use ohos.permission.GET_RUNNING_INFO" - }, - { - "name":"ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS", - "reason":"need use ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS" - }, - { - "name":"ohos.permission.CLEAN_BACKGROUND_PROCESSES", - "reason":"need use ohos.permission.CLEAN_BACKGROUND_PROCESSES" - } - ], - "js": [ - { - "pages": [ - "pages/index/index" - ], - "name": "default", - "window": { - "designWidth": 720, - "autoDesignWidth": false - } - } - ] - } -} \ No newline at end of file diff --git a/aafwk/aafwk_standard/actskillprocesswithaccount/actskillprocesswithaccountclose/src/main/js/default/app.js b/aafwk/aafwk_standard/actskillprocesswithaccount/actskillprocesswithaccountclose/src/main/js/default/app.js deleted file mode 100644 index d2c2487707610d1e26f9cc8953d87e1507c2fcc1..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/actskillprocesswithaccount/actskillprocesswithaccountclose/src/main/js/default/app.js +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) 2022 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -export default { - onCreate() { - console.info('ProcessManageSystemAppB onCreate'); - }, - onDestroy() { - console.info('ProcessManageSystemAppB onDestroy'); - }, - onShow() { - console.info('ProcessManageSystemAppB onShow'); - }, - onHide() { - console.info('ProcessManageSystemAppB onHide'); - } -}; diff --git a/aafwk/aafwk_standard/actskillprocesswithaccount/actskillprocesswithaccountclose/src/main/js/default/i18n/en-US.json b/aafwk/aafwk_standard/actskillprocesswithaccount/actskillprocesswithaccountclose/src/main/js/default/i18n/en-US.json deleted file mode 100644 index e63c70d978a3a53be988388c87182f81785e170c..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/actskillprocesswithaccount/actskillprocesswithaccountclose/src/main/js/default/i18n/en-US.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "strings": { - "hello": "Hello", - "world": "World" - } -} \ No newline at end of file diff --git a/aafwk/aafwk_standard/actskillprocesswithaccount/actskillprocesswithaccountclose/src/main/js/default/i18n/zh-CN.json b/aafwk/aafwk_standard/actskillprocesswithaccount/actskillprocesswithaccountclose/src/main/js/default/i18n/zh-CN.json deleted file mode 100644 index de6ee5748322f44942c1b003319d8e66c837675f..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/actskillprocesswithaccount/actskillprocesswithaccountclose/src/main/js/default/i18n/zh-CN.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "strings": { - "hello": "您好", - "world": "世界" - } -} \ No newline at end of file diff --git a/aafwk/aafwk_standard/actskillprocesswithaccount/actskillprocesswithaccountclose/src/main/js/default/pages/index/index.css b/aafwk/aafwk_standard/actskillprocesswithaccount/actskillprocesswithaccountclose/src/main/js/default/pages/index/index.css deleted file mode 100644 index 6fda792753f2e15f22b529c7b90a82185b2770bf..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/actskillprocesswithaccount/actskillprocesswithaccountclose/src/main/js/default/pages/index/index.css +++ /dev/null @@ -1,9 +0,0 @@ -.container { - flex-direction: column; - justify-content: center; - align-items: center; -} - -.title { - font-size: 100px; -} diff --git a/aafwk/aafwk_standard/actskillprocesswithaccount/actskillprocesswithaccountclose/src/main/js/default/pages/index/index.hml b/aafwk/aafwk_standard/actskillprocesswithaccount/actskillprocesswithaccountclose/src/main/js/default/pages/index/index.hml deleted file mode 100644 index f64b040a5ae394dbaa5e185e1ecd4f4556b92184..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/actskillprocesswithaccount/actskillprocesswithaccountclose/src/main/js/default/pages/index/index.hml +++ /dev/null @@ -1,5 +0,0 @@ -
- - {{ $t('strings.hello') }} {{ title }} - -
diff --git a/aafwk/aafwk_standard/actskillprocesswithaccount/actskillprocesswithaccountclose/src/main/js/default/pages/index/index.js b/aafwk/aafwk_standard/actskillprocesswithaccount/actskillprocesswithaccountclose/src/main/js/default/pages/index/index.js deleted file mode 100644 index ced02a728310be7871c06f3de1ce9bb574205062..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/actskillprocesswithaccount/actskillprocesswithaccountclose/src/main/js/default/pages/index/index.js +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (c) 2022 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import commonEvent from '@ohos.commonevent' - -const injectRef = Object.getPrototypeOf(global) || global -injectRef.regeneratorRuntime = require('@babel/runtime/regenerator') - -export default { - data: { - title: "" - }, - onInit() { - console.info('ACTS_ProcessManage SystemAppB onInit'); - this.title = "ACTS_ProcessManage SystemAppB"; - }, - onReady() { - console.info('ACTS_ProcessManage SystemAppB onReady'); - }, - onActive() { - console.info('ACTS_ProcessManage SystemAppB onActive'); - }, - onShow() { - console.info('ACTS_ProcessManage SystemAppB onShow'); - }, - onInactive() { - console.info('ACTS_ProcessManage SystemAppB onInactive'); - }, - onHide() { - console.info('ACTS_ProcessManage SystemAppB onHide'); - }, - onDestroy() { - console.info('ACTS_ProcessManage SystemAppB onDestroy'); - }, - onBackPress() { - console.info('ACTS_ProcessManage SystemAppB onBackPress'); - }, - onNewRequest() { - console.info('ACTS_ProcessManage SystemAppB onNewRequest'); - }, - onStartContinuation() { - console.info('ACTS_ProcessManage SystemAppB onStartContinuation'); - }, - onSaveData(value) { - console.info('ACTS_ProcessManage SystemAppB onSaveData:' + JSON.stringify(value)); - }, - onRestoreData(value) { - console.info('ACTS_ProcessManage SystemAppB onRestoreData:' + JSON.stringify(value)); - }, - onCompleteContinuation(code) { - console.info('ACTS_ProcessManage SystemAppB onCompleteContinuation:' + JSON.stringify(code)); - }, - onConfigurationUpdated(configuration) { - console.info('ACTS_ProcessManage SystemAppB onConfigurationUpdated:' + JSON.stringify(configuration)); - } -} \ No newline at end of file diff --git a/aafwk/aafwk_standard/actskillprocesswithaccount/actskillprocesswithaccountclose/src/main/js/resources/base/element/string.json b/aafwk/aafwk_standard/actskillprocesswithaccount/actskillprocesswithaccountclose/src/main/js/resources/base/element/string.json deleted file mode 100644 index fd60cdefa929070f1798c6e36f0502f1e1e219a4..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/actskillprocesswithaccount/actskillprocesswithaccountclose/src/main/js/resources/base/element/string.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "string": [ - { - "name": "app_name", - "value": "particlestartability" - }, - { - "name": "mainability_description", - "value": "JS_Phone_Empty Feature Ability" - } - ] -} \ No newline at end of file diff --git a/aafwk/aafwk_standard/actskillprocesswithaccount/actskillprocesswithaccountclose/src/main/js/resources/base/media/icon.png b/aafwk/aafwk_standard/actskillprocesswithaccount/actskillprocesswithaccountclose/src/main/js/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/aafwk/aafwk_standard/actskillprocesswithaccount/actskillprocesswithaccountclose/src/main/js/resources/base/media/icon.png and /dev/null differ diff --git a/aafwk/aafwk_standard/amsgetabilityprocessinfo/actsgetabilityprocessinfotest/entry/src/main/js/test/ActsProcessManageJsTest.test.js b/aafwk/aafwk_standard/amsgetabilityprocessinfo/actsgetabilityprocessinfotest/entry/src/main/js/test/ActsProcessManageJsTest.test.js index 12c844f469a3ad3dee1a1a4d162e336a1a72c228..fbee3beb2d32dba482950dd7f2deb623614d6706 100644 --- a/aafwk/aafwk_standard/amsgetabilityprocessinfo/actsgetabilityprocessinfotest/entry/src/main/js/test/ActsProcessManageJsTest.test.js +++ b/aafwk/aafwk_standard/amsgetabilityprocessinfo/actsgetabilityprocessinfotest/entry/src/main/js/test/ActsProcessManageJsTest.test.js @@ -14,11 +14,7 @@ */ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index" -import commonEvent from '@ohos.commonevent' -import bundle from '@ohos.bundle' -import missionManager from '@ohos.application.missionManager' import abilityManager from '@ohos.application.AbilityManager' -import featureAbility from '@ohos.ability.featureAbility' import appManager from '@ohos.application.AppManager' describe('ActsAbilityRunningInfosTest', function () { @@ -34,12 +30,6 @@ describe('ActsAbilityRunningInfosTest', function () { expect(dataInfo[i].pid).assertLarger(500); expect(dataInfo[i].startTime).assertLarger(3000); expect(dataInfo[i].abilityState).assertLarger(0); - expect(dataInfo[i].abilityState==abilityManager.AbilityState.FOREGROUND || - dataInfo[i].abilityState==abilityManager.AbilityState.BACKGROUNDING - || (dataInfo[i].abilityState!=abilityManager.AbilityState.INITIAL - ) || (dataInfo[i].abilityState!=abilityManager.AbilityState.FOREGROUNDING - ) || (dataInfo[i].abilityState!=abilityManager.AbilityState.BACKGROUNDING - )).assertTrue(); return true; } } @@ -58,36 +48,7 @@ describe('ActsAbilityRunningInfosTest', function () { } /* - * @tc.number: ACTS_getAbilityRunningInfos_0100 - * @tc.name: Application running ability information query - * @tc.desc: Verify applications are started to query getAbilityRunningInfos ability information - * (by promise) - */ - it('ACTS_getAbilityRunningInfos_0100', 0, async function (done) { - console.log('ACTS_getAbilityRunningInfos_0100==== ACTS_getAbilityRunningInfos_0100 ====>' + JSON.stringify(data)) - expect(checkRunningAbility('com.ohos.launcher.MainAbility', data)).assertTrue(); - done(); - }) - - /* - * @tc.number: ACTS_getAbilityRunningInfos_0200 - * @tc.name: Application running ability information query - * @tc.desc: Verify applications are started to query getAbilityRunningInfos ability information - * (by callback) - */ - it('ACTS_getAbilityRunningInfos_0200', 0, async function (done) { - console.log('ACTS_getAbilityRunningInfos_0200===={ - console.info('====> ACTS_getAbilityRunningInfos_0200 ====>' + JSON.stringify(data)) - expect(checkRunningAbility('com.ohos.launcher.MainAbility', data)).assertTrue(); - done(); - }) - }) - - /* - * @tc.number: ACTS_getAbilityRunningInfos_0100 + * @tc.number: ACTS_getProcessRunningInfos_0100 * @tc.name: Application running ability information query * @tc.desc: Verify applications are started to query getProcessRunningInfos ability information * (by promise) diff --git a/aafwk/aafwk_standard/amsprocessmanageapi7/BUILD.gn b/aafwk/aafwk_standard/amsprocessmanageapi7/BUILD.gn deleted file mode 100644 index f72724952a38e1b64f4fc475bee987f0609f2fca..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/amsprocessmanageapi7/BUILD.gn +++ /dev/null @@ -1,27 +0,0 @@ -# Copyright (c) 2022 Huawei Device Co., Ltd. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import("//test/xts/tools/build/suite.gni") - -group("amsprocessmanageapi7") { - testonly = true - if (is_standard_system) { - deps = [ - "actsprocessmanagejstest:ActsAmsProcessManageJsApi7Test", - "pmsystemappa:ActsAmsProcessManageSystemAppAApi7", - "pmsystemappamulti:ActsAmsProcessManageSystemAppAMultiApi7", - "pmsystemappb:ActsAmsProcessManageSystemAppBApi7", - "pmvendorappa:ActsAmsProcessManageVendorAppAApi7", - ] - } -} diff --git a/aafwk/aafwk_standard/amsprocessmanageapi7/actsprocessmanagejstest/BUILD.gn b/aafwk/aafwk_standard/amsprocessmanageapi7/actsprocessmanagejstest/BUILD.gn deleted file mode 100644 index 071ab18f86b868ae747129bd991ee9ecf26fca97..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/amsprocessmanageapi7/actsprocessmanagejstest/BUILD.gn +++ /dev/null @@ -1,31 +0,0 @@ -# Copyright (c) 2022 Huawei Device Co., Ltd. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import("//test/xts/tools/build/suite.gni") - -ohos_js_hap_suite("ActsAmsProcessManageJsApi7Test") { - hap_name = "ActsAmsProcessManageJsApi7Test" - hap_profile = "./entry/src/main/config.json" - deps = [ - ":hjs_demo_js_assets", - ":hjs_demo_resources", - ] - certificate_profile = "./signature/openharmony_sx.p7b" -} -ohos_js_assets("hjs_demo_js_assets") { - source_dir = "./entry/src/main/js/default" -} -ohos_resources("hjs_demo_resources") { - sources = [ "./entry/src/main/js/resources" ] - hap_profile = "./entry/src/main/config.json" -} diff --git a/aafwk/aafwk_standard/amsprocessmanageapi7/actsprocessmanagejstest/Test.json b/aafwk/aafwk_standard/amsprocessmanageapi7/actsprocessmanagejstest/Test.json deleted file mode 100644 index 03e84bb27900f395d95f44a4738610852697e545..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/amsprocessmanageapi7/actsprocessmanagejstest/Test.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "description": "Configuration for hjsunit Tests", - "driver": { - "type": "JSUnitTest", - "test-timeout": "300000", - "package": "com.acts.actsprocessmanagejstestapi7", - "shell-timeout": "60000" - }, - "kits": [ - { - "test-file-name": [ - "ActsAmsProcessManageJsApi7Test.hap" - ], - "type": "AppInstallKit", - "cleanup-apps": true - }, - { - "type": "ShellKit", - "run-command": [ - "remount" - ] - }, - { - "type": "PushKit", - "push": [ - "ActsAmsProcessManageSystemAppAApi7.hap->/data/ActsAmsProcessManageSystemAppAApi7.hap", - "ActsAmsProcessManageSystemAppAMultiApi7.hap->/data/ActsAmsProcessManageSystemAppAMultiApi7.hap", - "ActsAmsProcessManageSystemAppBApi7.hap->/data/ActsAmsProcessManageSystemAppBApi7.hap", - "ActsAmsProcessManageVendorAppAApi7.hap->/data/ActsAmsProcessManageVendorAppAApi7.hap" - ] - - }, - { - "type": "ShellKit", - "run-command": [ - "chmod 644 /data/*.hap" - ] - } - ] -} diff --git a/aafwk/aafwk_standard/amsprocessmanageapi7/actsprocessmanagejstest/entry/src/main/config.json b/aafwk/aafwk_standard/amsprocessmanageapi7/actsprocessmanagejstest/entry/src/main/config.json deleted file mode 100644 index 855dbe43597811e92c08dc2ede36c47298350905..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/amsprocessmanageapi7/actsprocessmanagejstest/entry/src/main/config.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "app": { - "bundleName": "com.acts.actsprocessmanagejstestapi7", - "vendor": "example", - "version": { - "code": 1, - "name": "1.0" - }, - "apiVersion": { - "compatible": 4, - "target": 5, - "releaseType": "Beta1" - } - }, - "deviceConfig": {}, - "module": { - "package": "com.acts.actsprocessmanagejstestapi7", - "name": ".MyApplication", - "deviceType": [ - "phone" - ], - "distro": { - "deliveryWithInstall": true, - "moduleName": "entry", - "moduleType": "entry" - }, - "abilities": [ - { - "skills": [ - { - "entities": [ - "entity.system.home" - ], - "actions": [ - "action.system.home" - ] - } - ], - "name": "com.acts.actsprocessmanagejstestapi7.MainAbility", - "icon": "$media:icon", - "description": "$string:mainability_description", - "label": "$string:app_name", - "type": "page", - "launchType": "singleton", - "visible": true - } - ], - "reqPermissions": [ - { - "name":"ohos.permission.GET_BUNDLE_INFO_PRIVILEGED", - "reason":"need use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED" - }, - { - "name":"ohos.permission.GET_BUNDLE_INFO", - "reason":"need use ohos.permission.GET_BUNDLE_INFO" - }, - { - "name":"ohos.permission.CHANGE_ABILITY_ENABLED_STATE", - "reason":"need use ohos.permission.CHANGE_ABILITY_ENABLED_STATE" - }, - { - "name":"ohos.permission.REMOVE_CACHE_FILES", - "reason":"need use ohos.permission.REMOVE_CACHE_FILES" - }, - { - "name":"ohos.permission.LISTEN_BUNDLE_CHANGE", - "reason":"need use ohos.permission.LISTEN_BUNDLE_CHANGE" - }, - { - "name":"ohos.permission.INSTALL_BUNDLE", - "reason":"need use ohos.permission.INSTALL_BUNDLE" - }, - { - "name":"ohos.permission.MANAGE_MISSIONS", - "reason":"need use ohos.permission.MANAGE_MISSIONS" - }, - { - "name":"ohos.permission.GET_RUNNING_INFO", - "reason":"need use ohos.permission.GET_RUNNING_INFO" - }, - { - "name":"ohos.permission.CLEAN_BACKGROUND_PROCESSES", - "reason":"need use ohos.permission.CLEAN_BACKGROUND_PROCESSES" - }, - { - "name":"ohos.permission.CLEAN_APPLICATION_DATA", - "reason":"need use ohos.permission.CLEAN_APPLICATION_DATA" - } - ], - "js": [ - { - "pages": [ - "pages/index/index" - ], - "name": "default", - "window": { - "designWidth": 720, - "autoDesignWidth": false - } - } - ] - } -} \ No newline at end of file diff --git a/aafwk/aafwk_standard/amsprocessmanageapi7/actsprocessmanagejstest/entry/src/main/js/default/app.js b/aafwk/aafwk_standard/amsprocessmanageapi7/actsprocessmanagejstest/entry/src/main/js/default/app.js deleted file mode 100644 index 11ca2c1d6428bbb29c4a01126536132868c5df26..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/amsprocessmanageapi7/actsprocessmanagejstest/entry/src/main/js/default/app.js +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) 2022 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -export default { - onCreate() { - console.info('ActsProcessManageJsTest onCreate'); - }, - onDestroy() { - console.info('ActsProcessManageJsTest onDestroy'); - }, - onShow() { - console.info('ActsProcessManageJsTest onShow'); - }, - onHide() { - console.info('ActsProcessManageJsTest onHide'); - } -}; diff --git a/aafwk/aafwk_standard/amsprocessmanageapi7/actsprocessmanagejstest/entry/src/main/js/default/i18n/en-US.json b/aafwk/aafwk_standard/amsprocessmanageapi7/actsprocessmanagejstest/entry/src/main/js/default/i18n/en-US.json deleted file mode 100644 index e63c70d978a3a53be988388c87182f81785e170c..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/amsprocessmanageapi7/actsprocessmanagejstest/entry/src/main/js/default/i18n/en-US.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "strings": { - "hello": "Hello", - "world": "World" - } -} \ No newline at end of file diff --git a/aafwk/aafwk_standard/amsprocessmanageapi7/actsprocessmanagejstest/entry/src/main/js/default/i18n/zh-CN.json b/aafwk/aafwk_standard/amsprocessmanageapi7/actsprocessmanagejstest/entry/src/main/js/default/i18n/zh-CN.json deleted file mode 100644 index de6ee5748322f44942c1b003319d8e66c837675f..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/amsprocessmanageapi7/actsprocessmanagejstest/entry/src/main/js/default/i18n/zh-CN.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "strings": { - "hello": "您好", - "world": "世界" - } -} \ No newline at end of file diff --git a/aafwk/aafwk_standard/amsprocessmanageapi7/actsprocessmanagejstest/entry/src/main/js/default/pages/index/index.css b/aafwk/aafwk_standard/amsprocessmanageapi7/actsprocessmanagejstest/entry/src/main/js/default/pages/index/index.css deleted file mode 100644 index cfd4c53e39aecb2d83a0fbdec971eca4041c8a3a..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/amsprocessmanageapi7/actsprocessmanagejstest/entry/src/main/js/default/pages/index/index.css +++ /dev/null @@ -1,14 +0,0 @@ -.container { - flex-direction: column; - justify-content: center; - align-items: center; -} - -.title { - font-size: 100px; -} - -.btn { - width: 200px; - height: 80px; -} diff --git a/aafwk/aafwk_standard/amsprocessmanageapi7/actsprocessmanagejstest/entry/src/main/js/default/pages/index/index.hml b/aafwk/aafwk_standard/amsprocessmanageapi7/actsprocessmanagejstest/entry/src/main/js/default/pages/index/index.hml deleted file mode 100644 index 83c5e0fcabbb1d5df26d69f4a5c2031c1e65b70a..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/amsprocessmanageapi7/actsprocessmanagejstest/entry/src/main/js/default/pages/index/index.hml +++ /dev/null @@ -1,6 +0,0 @@ -
- - {{ $t('strings.hello') }} {{ title }} - - -
diff --git a/aafwk/aafwk_standard/amsprocessmanageapi7/actsprocessmanagejstest/entry/src/main/js/default/pages/index/index.js b/aafwk/aafwk_standard/amsprocessmanageapi7/actsprocessmanagejstest/entry/src/main/js/default/pages/index/index.js deleted file mode 100644 index a6d4c3ea607cf4251f2008ad271f48a0874e1ba2..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/amsprocessmanageapi7/actsprocessmanagejstest/entry/src/main/js/default/pages/index/index.js +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright (c) 2022 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { Core, ExpectExtend } from 'deccjsunit/index' - -const injectRef = Object.getPrototypeOf(global) || global -injectRef.regeneratorRuntime = require('@babel/runtime/regenerator') - -export default { - data: { - title: "", - testTime: 0 - }, - onInit() { - console.info('ActsProcessManageJsTest onInit'); - this.title = this.$t('strings.world'); - }, - onShow() { - console.info('ActsProcessManageJsTest onShow'); - console.info('ActsProcessManageJsTest testTime' + this.testTime); - if (this.testTime == 0) { - const core = Core.getInstance() - const expectExtend = new ExpectExtend({ - 'id': 'extend' - }) - core.addService('expect', expectExtend) - core.init() - const configService = core.getDefaultService('config') - this.timeout = 30000; - configService.setConfig(this) - - require('../../../test/List.test') - core.execute() - } - this.testTime++; - }, - onReady() { - console.info('ActsProcessManageJsTest onReady'); - }, - onActive() { - console.info('ActsProcessManageJsTest onActive'); - }, - onInactive() { - console.info('ActsProcessManageJsTest onInactive'); - }, - onHide() { - console.info('ActsProcessManageJsTest onHide'); - }, - onDestroy() { - console.info('ActsProcessManageJsTest onDestroy'); - }, - onBackPress() { - console.info('ActsProcessManageJsTest onBackPress'); - }, - onNewRequest() { - console.info('ActsProcessManageJsTest onNewRequest'); - }, - onStartContinuation() { - console.info('ActsProcessManageJsTest onStartContinuation'); - }, - onSaveData(value) { - console.info('ActsProcessManageJsTest onSaveData:' + JSON.stringify(value)); - }, - onRestoreData(value) { - console.info('ActsProcessManageJsTest onRestoreData:' + JSON.stringify(value)); - }, - onCompleteContinuation(code) { - console.info('ActsProcessManageJsTest onCompleteContinuation:' + JSON.stringify(code)); - }, - onConfigurationUpdated(configuration) { - console.info('ActsProcessManageJsTest onConfigurationUpdated:' + JSON.stringify(configuration)); - } -} diff --git a/aafwk/aafwk_standard/amsprocessmanageapi7/actsprocessmanagejstest/entry/src/main/js/resources/base/element/string.json b/aafwk/aafwk_standard/amsprocessmanageapi7/actsprocessmanagejstest/entry/src/main/js/resources/base/element/string.json deleted file mode 100644 index 03574a36c533357eef7fc0acc5e21af14f4e5f67..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/amsprocessmanageapi7/actsprocessmanagejstest/entry/src/main/js/resources/base/element/string.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "string": [ - { - "name": "app_name", - "value": "actsparticleabilitytest" - }, - { - "name": "mainability_description", - "value": "JS_Phone_Empty Feature Ability" - } - ] -} \ No newline at end of file diff --git a/aafwk/aafwk_standard/amsprocessmanageapi7/actsprocessmanagejstest/entry/src/main/js/resources/base/media/icon.png b/aafwk/aafwk_standard/amsprocessmanageapi7/actsprocessmanagejstest/entry/src/main/js/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/aafwk/aafwk_standard/amsprocessmanageapi7/actsprocessmanagejstest/entry/src/main/js/resources/base/media/icon.png and /dev/null differ diff --git a/aafwk/aafwk_standard/amsprocessmanageapi7/actsprocessmanagejstest/entry/src/main/js/test/ActsProcessManageJsTest.test.js b/aafwk/aafwk_standard/amsprocessmanageapi7/actsprocessmanagejstest/entry/src/main/js/test/ActsProcessManageJsTest.test.js deleted file mode 100644 index 4258d290fadb346c2207895de2758871c2e5a9cb..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/amsprocessmanageapi7/actsprocessmanagejstest/entry/src/main/js/test/ActsProcessManageJsTest.test.js +++ /dev/null @@ -1,1506 +0,0 @@ -/* - * Copyright (c) 2022 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import fileio from '@ohos.fileio'; -import commonEvent from "@ohos.commonevent" -import abilitymanager from '@ohos.app.abilitymanager' -import abilityManager from '@ohos.application.appManager' -import missionmanager from '@ohos.application.missionManager' -import featureAbility from '@ohos.ability.featureAbility' -import file from '@system.file' -import bundle from '@ohos.bundle' -import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index' - -const BUNDLE_PATHS = [['/data/ActsAmsProcessManageSystemAppAApi7.hap', - '/data/ActsAmsProcessManageSystemAppAMultiApi7.hap'], -['/data/ActsAmsProcessManageSystemAppBApi7.hap'], -['/data/ActsAmsProcessManageVendorAppAApi7.hap']]; -const BUNDLE_NAMES = ['com.acts.pmsystemappaapi7', - 'com.acts.pmsystemappbapi7', - 'com.acts.pmvendorappaapi7']; -const PATHS_COUNT = 3; -const BUNDLE_COUNT = 3; - -var subscribeInfo = { - events: [ - "event_from_ProcessManage_SystemAppA", - "event_from_ProcessManage_VendorAppA" - ], -}; -var eventFromSystemA = "event_from_ProcessManage_SystemAppA"; -var eventFromVendorA = "event_from_ProcessManage_VendorAppA"; - -var systemABundleName = "com.acts.pmsystemappaapi7"; -var systemAMultiBundleName = "com.acts.pmsystemappamultiapi7"; -var systemBBundleName = "com.acts.pmsystemappbapi7"; -var vendorABundleName = "com.acts.pmvendorappaapi7"; -var vendorServiceBundleName = "com.acts.pmvendorappserviceapi7"; -var systemAAbilityName = "com.acts.pmsystemappaapi7.MainAbility"; -var systemBAbilityName = "com.acts.pmsystemappbapi7.MainAbility"; -var vendorAAbilityName = "com.acts.pmvendorappaapi7.MainAbility"; -var systemAMultiAbilityName = "com.acts.pmsystemappamultiapi7.MainAbility"; - -var systemAProcessName = systemABundleName; -var systemAMultiProcessName = systemAMultiBundleName; -var systemBProcessName = systemBBundleName; -var vendorAProcessName = vendorABundleName; -var uriSystemA = '/data/accounts/account_0/appdata/com.acts.pmsystemappa/com.acts.pmsystemappa'; -var uriSystemAMulti = '/data/accounts/account_0/appdata/com.acts.pmsystemappa/com.acts.pmsystemappamulti'; -var uriSystemB = '/data/accounts/account_0/appdata/com.acts.pmsystemappb/com.acts.pmsystemappb'; -var uriVendorA = '/data/accounts/account_0/appdata/com.acts.pmvendorappa/com.acts.pmvendorappa'; - -describe('ActsAmsProcessManageJsTestApi7', function () { - - beforeEach(async (done) => { - await clearMissionId(); - setTimeout(async function () { - try { - let installer = await bundle.getBundleInstaller(); - console.log('======>ACTS_ProcessManage beforeEach installer<=======' - + JSON.stringify(installer)); - var count = 0; - for (let i = 0; i < PATHS_COUNT; i++) { - installer.install(BUNDLE_PATHS[i], { - userId: 100, - installFlag: 1, - isKeepData: false - }, (err, data) => { - count++; - console.log('======>ACTS_ProcessManage beforeEach install finish<=======' - + err.code); - console.log('======>ACTS_ProcessManage beforeEach install finish<=======' - + data.status); - console.log('======>ACTS_ProcessManage beforeEach install finish<=======' - + data.statusMessage); - if (count == PATHS_COUNT) { - setTimeout(function () { - done(); - }, 2000); - } - }) - } - } catch (err) { - console.log('======>ACTS_ProcessManage beforeEach err<=======' + err); - } - }, 500); - }) - - afterEach(async (done) => { - setTimeout(async function () { - let installer = await bundle.getBundleInstaller(); - var count = 0; - var testMissionId; - - testMissionId = await getMissionId(); - console.log('======>ACTS_ProcessManage afterEach testMissionId<=======' + testMissionId); - await missionmanager.moveMissionToFront(testMissionId); - - for (let i = 0; i < BUNDLE_COUNT; i++) { - installer.uninstall(BUNDLE_NAMES[i], { - userId: 100, - installFlag: 1, - isKeepData: false - }, (err, data) => { - count++; - console.log('======>ACTS_ProcessManage afterEach uninstall finish<=======' - + err.code); - console.log('======>ACTS_ProcessManage afterEach uninstall finish<=======' - + data.status); - console.log('======>ACTS_ProcessManage afterEach uninstall finish<=======' - + data.statusMessage); - if (count == BUNDLE_COUNT) { - setTimeout(function () { - done(); - }, 2000); - } - }) - } - }, 1000); - }) - - function getMissionId() { - return new Promise(async (resolve, reject) => { - var numMax = 1024; - var missionId = -1; - var missionInfos = await missionmanager.getMissionInfos('', numMax); - for (let i = 0; i < missionInfos.length; i++) { - console.log('getMissionId result: ' + i + '= ' + JSON.stringify(missionInfos[i])) - if ((missionInfos[i].want.abilityName == "com.acts.actsprocessmanagejstestapi7.MainAbility") && - (missionInfos[i].runningState == 0)) { - missionId = missionInfos[i].missionId; - break; - } - } - console.log('======>getMissionId resolve missionId<=======' + missionId); - resolve(missionId); - }) - } - - function clearMissionId() { - return new Promise(async (resolve, reject) => { - var numMax = 1024; - var missionInfos = await missionmanager.getMissionInfos('', numMax); - for (let i = 0; i < missionInfos.length; i++) { - if ((missionInfos[i].want.bundleName == systemABundleName) || - (missionInfos[i].want.bundleName == systemBBundleName) || - (missionInfos[i].want.bundleName == vendorABundleName) || - (missionInfos[i].want.bundleName == vendorServiceBundleName)) { - missionmanager.clearMission(missionInfos[i].missionId, (err, data) => { - console.debug("====>ACTS_ProcessManage clearMission id:" + missionInfos[i].missionId); - }); - } - } - console.log('======>ACTS_ProcessManage clearMission finish<======='); - resolve(); - }) - } - - - function checkPromiseExistDelay(processName) { - return new Promise(async (resolve, reject) => { - setTimeout(async function () { - try { - var processInfos = await abilitymanager.getActiveProcessInfos(); - console.debug("====>ACTS_ProcessManage checkPromiseExistDelay processInfos====>" - + JSON.stringify(processInfos)); - resolve(checkProcessExistInInfos(processInfos, processName)); - } catch (err) { - onsole.debug("====>ACTS_ProcessManage checkPromiseExistDelay err====>" - + JSON.stringify(err)); - } - }, 2000); - }); - } - - function checkProcessExistInInfos(processInfos, processName) { - for (var i = 0; i < processInfos.length; i++) { - if (processInfos[i].processName == processName) { - return true; - } - } - return false; - } - - function checkPromiseMissionExistDelay(abilityName) { - var numMax = 1024; - - return new Promise(async (resolve, reject) => { - try { - var missionInfos = await missionmanager.getMissionInfos('', numMax); - console.debug("====>ACTS_ProcessManage checkPromiseMissionExistDelay missionInfos====>" - + JSON.stringify(missionInfos)); - resolve(checkMissionExistInInfos(missionInfos, abilityName)); - } catch (err) { - onsole.debug("====>ACTS_ProcessManage checkPromiseMissionExistDelay err====>" - + JSON.stringify(err)); - } - }); - } - - function checkMissionExistInInfos(missionInfos, abilityName) { - for (var i = 0; i < missionInfos.length; i++) { - if ((missionInfos[i].want.abilityName == abilityName) && (missionInfos[i].runningState == 0)) { - return true; - } - } - return false; - } - - function getAppDataPathFileNums(uri, callBack) { - setTimeout(async function () { - - file.list({ - uri: uri, - success: function (data) { - console.log('====>ActsProcessManageJsTest call list success data ====>' - + JSON.stringify(data)); - callBack(null, data.fileList.length); - }, - fail: function (data, code) { - callBack(data, null); - console.log('call list failed, code: ' + code + ', data: ' + data); - }, - }); - }, 2000); - } - - /* - * @tc.number: ACTS_ProcessManage_killProcessesByBundleNameFA_0100 - * @tc.name: The system application stops itself - * @tc.desc: Check the process was killed (by promise) - */ - it('ACTS_ProcessManage_killProcessesByBundleNameFA_0100', 0, async function (done) { - console.log('ACTS_ProcessManage_killProcessesByBundleNameFA_0100 begin'); - - await featureAbility.startAbility( - { - want: - { - bundleName: systemABundleName, - abilityName: systemAAbilityName, - action: "promiseKill", - parameters: { - testTarget: systemABundleName - } - }, - } - ); - - setTimeout(async function () { - var processexist = await checkPromiseExistDelay(systemAProcessName); - console.debug("====>ACTS_ProcessManage_killProcessesByBundleNameFA_0100 processexist:====>" - + JSON.stringify(processexist)); - expect(processexist).assertEqual(false); - - var missionexist = await checkPromiseMissionExistDelay(systemAAbilityName) - console.debug("====>ACTS_ProcessManage_killProcessesByBundleNameFA_0100 missionexist:====>" - + JSON.stringify(missionexist)); - expect(missionexist).assertEqual(false); - - console.log('ACTS_ProcessManage_killProcessesByBundleNameFA_0100 end'); - done(); - }, 4000); - }) - - /* - * @tc.number: ACTS_ProcessManage_killProcessesByBundleNameFA_0200 - * @tc.name: The system application stops other system application - * @tc.desc: Check the process was killed (by promise) - */ - it('ACTS_ProcessManage_killProcessesByBundleNameFA_0200', 0, async function (done) { - console.log('ACTS_ProcessManage_killProcessesByBundleNameFA_0200 begin'); - var subscriber; - - await featureAbility.startAbility( - { - want: - { - bundleName: systemABundleName, - abilityName: systemAAbilityName, - action: "promiseKill", - parameters: { - testTarget: systemBBundleName - } - }, - }, (error, data) => { - console.log('ACTS_ProcessManage_killProcessesByBundleNameFA_0200 - startAbility: ' - + JSON.stringify(error) + ", " + JSON.stringify(data)) - } - ); - await commonEvent.createSubscriber(subscribeInfo).then(async (data) => { - console.debug("====>ACTS_ProcessManage_killProcessesByBundleNameFA_0200 Create Subscriber data====>" - + data); - subscriber = data; - console.debug("====>ACTS_ProcessManage_killProcessesByBundleNameFA_0200 subscriber====>" - + JSON.stringify(subscriber)); - await commonEvent.subscribe(subscriber, subscribeCallBack); - }); - async function subscribeCallBack(err, data) { - console.debug("====>ACTS_ProcessManage_killProcessesByBundleNameFA_0200 Subscribe CallBack data:====>" - + JSON.stringify(data)); - expect(data.event).assertEqual(eventFromSystemA); - expect(data.data).assertEqual('0'); - commonEvent.unsubscribe(subscriber, unSubscribeCallback); - - } - async function unSubscribeCallback() { - console.debug("====>ACTS_ProcessManage_killProcessesByBundleNameFA_0200 UnSubscribe CallBack====>"); - var processexist = await checkPromiseExistDelay(systemBProcessName); - console.debug("====>ACTS_ProcessManage_killProcessesByBundleNameFA_0200 processexist:====>" - + JSON.stringify(processexist)); - expect(processexist).assertEqual(false); - - var missionexist = await checkPromiseMissionExistDelay(systemBAbilityName) - console.debug("====>ACTS_ProcessManage_killProcessesByBundleNameFA_0200 missionexist:====>" - + JSON.stringify(missionexist)); - expect(missionexist).assertEqual(false); - - console.log('ACTS_ProcessManage_killProcessesByBundleNameFA_0200 end'); - done(); - } - }) - - /* - * @tc.number: ACTS_ProcessManage_killProcessesByBundleNameFA_0300 - * @tc.name: The system application stops third-party application - * @tc.desc: Check the process was killed (by promise) - */ - it('ACTS_ProcessManage_killProcessesByBundleNameFA_0300', 0, async function (done) { - console.log('ACTS_ProcessManage_killProcessesByBundleNameFA_0300 begin'); - var subscriber; - - await featureAbility.startAbility( - { - want: - { - bundleName: systemABundleName, - abilityName: systemAAbilityName, - action: "promiseKill", - parameters: { - testTarget: vendorABundleName - } - }, - } - ); - await commonEvent.createSubscriber(subscribeInfo).then(async (data) => { - console.debug("====>ACTS_ProcessManage_killProcessesByBundleNameFA_0300 Create Subscriber data====>" - + data); - subscriber = data; - console.debug("====>ACTS_ProcessManage_killProcessesByBundleNameFA_0300 subscriber====>" - + JSON.stringify(subscriber)); - await commonEvent.subscribe(subscriber, subscribeCallBack); - }); - async function subscribeCallBack(err, data) { - console.debug("====>ACTS_ProcessManage_killProcessesByBundleNameFA_0300 Subscribe CallBack data:====>" - + JSON.stringify(data)); - expect(data.event).assertEqual(eventFromSystemA); - expect(data.data).assertEqual('0'); - commonEvent.unsubscribe(subscriber, unSubscribeCallback); - } - - async function unSubscribeCallback() { - console.debug("====>ACTS_ProcessManage_killProcessesByBundleNameFA_0300 UnSubscribe CallBack====>"); - var processexist = await checkPromiseExistDelay(vendorAProcessName); - console.debug("====>ACTS_ProcessManage_killProcessesByBundleNameFA_0300 processexist:====>" - + JSON.stringify(processexist)); - expect(processexist).assertEqual(false); - - var missionexist = await checkPromiseMissionExistDelay(vendorAAbilityName) - console.debug("====>ACTS_ProcessManage_killProcessesByBundleNameFA_0300 missionexist:====>" - + JSON.stringify(missionexist)); - expect(missionexist).assertEqual(false); - - console.log('ACTS_ProcessManage_killProcessesByBundleNameFA_0300 end'); - done(); - } - }) - - /* - * @tc.number: ACTS_ProcessManage_killProcessesByBundleNameFA_0400 - * @tc.name: The system application stops multiprocess application - * @tc.desc: Check the process was killed (by promise) - */ - it('ACTS_ProcessManage_killProcessesByBundleNameFA_0400', 0, async function (done) { - console.log('ACTS_ProcessManage_killProcessesByBundleNameFA_0400 begin'); - var flagProcessA = 0; - var flagProcessAMulti = 0; - var flagMissionA = 0; - var flagMissionAMulti = 0; - var numMax = 1024; - - await featureAbility.startAbility( - { - want: - { - bundleName: systemABundleName, - abilityName: systemAAbilityName, - action: "promiseKill", - parameters: { - testTarget: systemAMultiAbilityName - } - }, - } - ); - setTimeout(async function () { - - var processInfos = await abilitymanager.getActiveProcessInfos(); - console.debug("====>ACTS_ProcessManage_killProcessesByBundleNameFA_0400 processInfos====>" - + JSON.stringify(processInfos)); - for (var i = 0; i < processInfos.length; i++) { - if (processInfos[i].processName == systemAProcessName) { - flagProcessA++; - } - if (processInfos[i].processName == systemAMultiProcessName) { - flagProcessAMulti++; - } - } - console.debug("====>ACTS_ProcessManage_killProcessesByBundleNameFA_0400 flagProcessA====>" - + JSON.stringify(flagProcessA)); - console.debug("====>ACTS_ProcessManage_killProcessesByBundleNameFA_0400 flagProcessAMulti====>" - + JSON.stringify(flagProcessAMulti)); - expect(flagProcessA).assertEqual(0); - expect(flagProcessAMulti).assertEqual(0); - - var missionInfos = await missionmanager.getMissionInfos('', numMax); - console.debug("====>ACTS_ProcessManage checkPromiseMissionExistDelay missionInfos====>" - + JSON.stringify(missionInfos)); - for (var i = 0; i < missionInfos.length; i++) { - - if ((missionInfos[i].want.abilityName == systemAAbilityName) - && (missionInfos[i].runningState == 0)) { - flagMissionA++; - } - if ((missionInfos[i].want.abilityName == systemAMultiAbilityName) - && (missionInfos[i].runningState == 0)) { - flagMissionAMulti++; - } - } - console.debug("====>ACTS_ProcessManage_killProcessesByBundleNameFA_0400 flagMissionA====>" - + JSON.stringify(flagMissionA)); - console.debug("====>ACTS_ProcessManage_killProcessesByBundleNameFA_0400 flagMissionAMulti====>" - + JSON.stringify(flagMissionAMulti)); - expect(flagMissionA).assertEqual(0); - expect(flagMissionAMulti).assertEqual(0); - - console.log('ACTS_ProcessManage_killProcessesByBundleNameFA_0400 end'); - done(); - }, 6000); - }) - - /* - * @tc.number: ACTS_ProcessManage_killProcessesByBundleNameFA_0500 - * @tc.name: The system application stops itself - * @tc.desc: Check the process was killed (by AsyncCallback) - */ - it('ACTS_ProcessManage_killProcessesByBundleNameFA_0500', 0, async function (done) { - console.log('ACTS_ProcessManage_killProcessesByBundleNameFA_0500 begin'); - await featureAbility.startAbility( - { - want: - { - bundleName: systemABundleName, - abilityName: systemAAbilityName, - action: "asyncKill", - parameters: { - testTarget: systemABundleName - } - }, - } - ); - setTimeout(async function () { - var processexist = await checkPromiseExistDelay(systemAProcessName); - console.debug("====>ACTS_ProcessManage_killProcessesByBundleNameFA_0500 processexist:====>" - + JSON.stringify(processexist)); - expect(processexist).assertEqual(false); - - var missionexist = await checkPromiseMissionExistDelay(systemAAbilityName) - console.debug("====>ACTS_ProcessManage_killProcessesByBundleNameFA_0500 missionexist:====>" - + JSON.stringify(missionexist)); - expect(missionexist).assertEqual(false); - - console.log('ACTS_ProcessManage_killProcessesByBundleNameFA_0500 end'); - done(); - }, 4000); - }) - - /* - * @tc.number: ACTS_ProcessManage_killProcessesByBundleNameFA_0600 - * @tc.name: The system application stops other system application - * @tc.desc: Check the process was killed (by AsyncCallback) - */ - it('ACTS_ProcessManage_killProcessesByBundleNameFA_0600', 0, async function (done) { - console.log('ACTS_ProcessManage_killProcessesByBundleNameFA_0600 begin'); - var subscriber; - - await featureAbility.startAbility( - { - want: - { - bundleName: systemABundleName, - abilityName: systemAAbilityName, - action: "asyncKill", - parameters: { - testTarget: systemBBundleName - } - }, - } - ); - await commonEvent.createSubscriber(subscribeInfo).then(async (data) => { - console.debug("====>ACTS_ProcessManage_killProcessesByBundleNameFA_0600 Create Subscriber data====>" - + data); - subscriber = data; - console.debug("====>ACTS_ProcessManage_killProcessesByBundleNameFA_0600 subscriber====>" - + JSON.stringify(subscriber)); - await commonEvent.subscribe(subscriber, subscribeCallBack); - }); - async function subscribeCallBack(err, data) { - console.debug("====>ACTS_ProcessManage_killProcessesByBundleNameFA_0600 Subscribe CallBack data:====>" - + JSON.stringify(data)); - expect(data.event).assertEqual(eventFromSystemA); - expect(data.data).assertEqual('0'); - commonEvent.unsubscribe(subscriber, unSubscribeCallback); - - } - - async function unSubscribeCallback() { - console.debug("====>ACTS_ProcessManage_killProcessesByBundleNameFA_0600 UnSubscribe CallBack====>"); - var processexist = await checkPromiseExistDelay(systemBProcessName); - console.debug("====>ACTS_ProcessManage_killProcessesByBundleNameFA_0600 processexist:====>" - + JSON.stringify(processexist)); - expect(processexist).assertEqual(false); - - var missionexist = await checkPromiseMissionExistDelay(systemBAbilityName) - console.debug("====>ACTS_ProcessManage_killProcessesByBundleNameFA_0600 missionexist:====>" - + JSON.stringify(missionexist)); - expect(missionexist).assertEqual(false); - - console.log('ACTS_ProcessManage_killProcessesByBundleNameFA_0600 end'); - done(); - } - }) - - /* - * @tc.number: ACTS_ProcessManage_killProcessesByBundleNameFA_0700 - * @tc.name: The system application stops third-party application - * @tc.desc: Check the process was killed (by AsyncCallback) - */ - it('ACTS_ProcessManage_killProcessesByBundleNameFA_0700', 0, async function (done) { - console.log('ACTS_ProcessManage_killProcessesByBundleNameFA_0700 begin'); - var subscriber; - - await featureAbility.startAbility( - { - want: - { - bundleName: systemABundleName, - abilityName: systemAAbilityName, - action: "asyncKill", - parameters: { - testTarget: vendorABundleName - } - }, - } - ); - await commonEvent.createSubscriber(subscribeInfo).then(async (data) => { - console.debug("====>ACTS_ProcessManage_killProcessesByBundleNameFA_0700 Create Subscriber data====>" - + data); - subscriber = data; - console.debug("====>ACTS_ProcessManage_killProcessesByBundleNameFA_0700 subscriber====>" - + JSON.stringify(subscriber)); - await commonEvent.subscribe(subscriber, subscribeCallBack); - }); - async function subscribeCallBack(err, data) { - console.debug("====>ACTS_ProcessManage_killProcessesByBundleNameFA_0700 Subscribe CallBack data:====>" - + JSON.stringify(data)); - expect(data.event).assertEqual(eventFromSystemA); - expect(data.data).assertEqual('0'); - commonEvent.unsubscribe(subscriber, unSubscribeCallback); - - } - - async function unSubscribeCallback() { - console.debug("====>ACTS_ProcessManage_killProcessesByBundleNameFA_0700 UnSubscribe CallBack====>"); - var processexist = await checkPromiseExistDelay(vendorAProcessName); - console.debug("====>ACTS_ProcessManage_killProcessesByBundleNameFA_0700 processexist:====>" - + JSON.stringify(processexist)); - expect(processexist).assertEqual(false); - - var missionexist = await checkPromiseMissionExistDelay(vendorAAbilityName) - console.debug("====>ACTS_ProcessManage_killProcessesByBundleNameFA_0700 missionexist:====>" - + JSON.stringify(missionexist)); - expect(missionexist).assertEqual(false); - - console.log('ACTS_ProcessManage_killProcessesByBundleNameFA_0700 end'); - done(); - - } - }) - - /* - * @tc.number: ACTS_ProcessManage_killProcessesByBundleNameFA_0800 - * @tc.name: The system application stops multiprocess application - * @tc.desc: Check the process was killed (by AsyncCallback) - */ - it('ACTS_ProcessManage_killProcessesByBundleNameFA_0800', 0, async function (done) { - console.log('ACTS_ProcessManage_killProcessesByBundleNameFA_0800 begin'); - var flagProcessA = 0; - var flagProcessAMulti = 0; - var flagMissionA = 0; - var flagMissionAMulti = 0; - var numMax = 1024; - - await featureAbility.startAbility( - { - want: - { - bundleName: systemABundleName, - abilityName: systemAAbilityName, - action: "asyncKill", - parameters: { - testTarget: systemAMultiAbilityName - } - }, - } - ); - setTimeout(async function () { - - var processInfos = await abilitymanager.getActiveProcessInfos(); - console.debug("====>ACTS_ProcessManage_killProcessesByBundleNameFA_0800 processInfos====>" - + JSON.stringify(processInfos)); - for (var i = 0; i < processInfos.length; i++) { - if (processInfos[i].processName == systemAProcessName) { - flagProcessA++; - } - if (processInfos[i].processName == systemAMultiProcessName) { - flagProcessAMulti++; - } - } - console.debug("====>ACTS_ProcessManage_killProcessesByBundleNameFA_0800 flagProcessA====>" - + JSON.stringify(flagProcessA)); - console.debug("====>ACTS_ProcessManage_killProcessesByBundleNameFA_0800 flagProcessAMulti====>" - + JSON.stringify(flagProcessAMulti)); - expect(flagProcessA).assertEqual(0); - expect(flagProcessAMulti).assertEqual(0); - - var missionInfos = await missionmanager.getMissionInfos('', numMax); - console.debug("====>ACTS_ProcessManage_killProcessesByBundleNameFA_0800 missionInfos====>" - + JSON.stringify(missionInfos)); - for (var i = 0; i < missionInfos.length; i++) { - - if ((missionInfos[i].want.abilityName == systemAAbilityName) - && (missionInfos[i].runningState == 0)) { - flagMissionA++; - } - if ((missionInfos[i].want.abilityName == systemAMultiAbilityName) - && (missionInfos[i].runningState == 0)) { - flagMissionAMulti++; - } - } - console.debug("====>ACTS_ProcessManage_killProcessesByBundleNameFA_0800 flagMissionA====>" - + JSON.stringify(flagMissionA)); - console.debug("====>ACTS_ProcessManage_killProcessesByBundleNameFA_0800 flagMissionAMulti====>" - + JSON.stringify(flagMissionAMulti)); - expect(flagMissionA).assertEqual(0); - expect(flagMissionAMulti).assertEqual(0); - - console.log('ACTS_ProcessManage_killProcessesByBundleNameFA_0800 end'); - done(); - }, 6000); - - }) - - - /* - * @tc.number: ACTS_ProcessManage_killProcessesByBundleNameFA_0900 - * @tc.name: Parameter is null - * @tc.desc: Check the result is OK (by promise) - */ - it('ACTS_ProcessManage_killProcessesByBundleNameFA_0900', 0, async function (done) { - - console.log('ACTS_ProcessManage_killProcessesByBundleNameFA_0900 begin'); - try { - var result = await abilityManager.killProcessesByBundleName(null); - console.debug("====>ACTS_ProcessManage_killProcessesByBundleNameFA_0900 null result:====>" - + JSON.stringify(result)); - expect(result == 0).assertEqual(false); - console.log('ACTS_ProcessManage_killProcessesByBundleNameFA_0900 end'); - done(); - } - catch (err) { - console.debug("====>ACTS_ProcessManage_killProcessesByBundleNameFA_0900 err:====>" - + JSON.stringify(err)); - done(); - } - }) - - - /* - * @tc.number: ACTS_ProcessManage_killProcessesByBundleNameFA_1000 - * @tc.name: Parameter is '' - * @tc.desc: Check the result is OK (by promise) - */ - it('ACTS_ProcessManage_killProcessesByBundleNameFA_1000', 0, async function (done) { - - console.log('ACTS_ProcessManage_killProcessesByBundleNameFA_1000 begin'); - try { - var result = await abilityManager.killProcessesByBundleName(''); - console.debug("====>ACTS_ProcessManage_killProcessesByBundleNameFA_1000 '' result:====>" - + JSON.stringify(result)); - expect(result).assertEqual(2097215); - console.log('ACTS_ProcessManage_killProcessesByBundleNameFA_1000 end'); - done(); - } - catch (err) { - console.debug("====>ACTS_ProcessManage_killProcessesByBundleNameFA_1000 err:====>" - + JSON.stringify(err)); - done(); - } - }) - - /* - * @tc.number: ACTS_ProcessManage_killProcessesByBundleNameFA_1100 - * @tc.name: Parameter is undefined - * @tc.desc: Check the result is OK (by promise) - */ - it('ACTS_ProcessManage_killProcessesByBundleNameFA_1100', 0, async function (done) { - console.log('ACTS_ProcessManage_killProcessesByBundleNameFA_1100 begin'); - try { - var result = await abilityManager.killProcessesByBundleName(undefined); - console.debug("====>ACTS_ProcessManage_killProcessesByBundleNameFA_1100 undefined result:====>" - + JSON.stringify(result)); - expect(result == 0).assertEqual(false); - console.log('ACTS_ProcessManage_killProcessesByBundleNameFA_1100 end'); - done(); - } - catch (err) { - console.debug("====>ACTS_ProcessManage_killProcessesByBundleNameFA_1100 err:====>" - + JSON.stringify(err)); - done(); - } - }) - - /* - * @tc.number: ACTS_ProcessManage_killProcessesByBundleNameFA_1200 - * @tc.name: Stop an application that doesn't exist - * @tc.desc: Check the result is OK (by promise) - */ - it('ACTS_ProcessManage_killProcessesByBundleNameFA_1200', 0, async function (done) { - console.log('ACTS_ProcessManage_killProcessesByBundleNameFA_1200 begin'); - try { - var result = await abilityManager.killProcessesByBundleName("aa.bb.notExist"); - console.debug("====>ACTS_ProcessManage_killProcessesByBundleNameFA_1200 aa.bb.notExist result:====>" - + JSON.stringify(result)); - expect(result).assertEqual(2097215); - console.log('ACTS_ProcessManage_killProcessesByBundleNameFA_1200 end'); - done(); - } - catch (err) { - console.debug("====>ACTS_ProcessManage_killProcessesByBundleNameFA_1200 err:====>" - + JSON.stringify(err)); - done(); - } - }) - - /* - * @tc.number: ACTS_ProcessManage_killProcessesByBundleNameFA_1300 - * @tc.name: Stop an application that exists but is not started - * @tc.desc: Check the result is OK (by promise) - */ - it('ACTS_ProcessManage_killProcessesByBundleNameFA_1300', 0, async function (done) { - console.log('ACTS_ProcessManage_killProcessesByBundleNameFA_1300 begin'); - try { - var result = await abilityManager.killProcessesByBundleName(systemABundleName); - console.debug("====>ACTS_ProcessManage_killProcessesByBundleNameFA_1300 without runnning result:====>" - + JSON.stringify(result)); - expect(result).assertEqual(0); - console.log('ACTS_ProcessManage_killProcessesByBundleNameFA_1300 end'); - done(); - } - catch (err) { - console.debug("====>ACTS_ProcessManage_killProcessesByBundleNameFA_1300 err:====>" - + JSON.stringify(err)); - done(); - } - }) - - - /* - * @tc.number: ACTS_ProcessManage_clearUpApplicationDataFA_0100 - * @tc.name: The system application cleans itself - * @tc.desc: Check the process was cleaned up (by promise) - */ - it('ACTS_ProcessManage_clearUpApplicationDataFA_0100', 0, async function (done) { - console.log('ACTS_ProcessManage_clearUpApplicationDataFA_0100 begin'); - await featureAbility.startAbility( - { - want: - { - bundleName: systemABundleName, - abilityName: systemAAbilityName, - action: "promiseCleanup", - parameters: { - testTarget: systemABundleName - } - }, - } - ); - setTimeout(async function () { - var processexist = await checkPromiseExistDelay(systemAProcessName); - console.debug("====>ACTS_ProcessManage_clearUpApplicationDataFA_0100 processexist:====>" - + JSON.stringify(processexist)); - expect(processexist).assertEqual(false); - - var missionexist = await checkPromiseMissionExistDelay(systemAAbilityName) - console.debug("====>ACTS_ProcessManage_clearUpApplicationDataFA_0100 missionexist:====>" - + JSON.stringify(missionexist)); - expect(missionexist).assertEqual(false); - - fileio.opendir(uriSystemA).then(function (dir) { - console.info("ACTS_ProcessManage_clearUpApplicationDataFA_0100 opendir successfully:" - + JSON.stringify(dir)); - }).catch(function (err) { - console.info("ACTS_ProcessManage_clearUpApplicationDataFA_0100 opendir failed error:" + err); - console.info("ACTS_ProcessManage_clearUpApplicationDataFA_0100 opendir failed JSON error:" - + JSON.stringify(err)); - expect(err.code).assertEqual('2'); - }); - fileio.opendir(uriSystemAMulti).then(function (dir) { - console.info("ACTS_ProcessManage_clearUpApplicationDataFA_0100 opendir Multi successfully:" - + JSON.stringify(dir)); - }).catch(function (err) { - console.info("ACTS_ProcessManage_clearUpApplicationDataFA_0100 opendir Multi failed error:" + err); - console.info("ACTS_ProcessManage_clearUpApplicationDataFA_0100 opendir Multi failed JSON error:" - + JSON.stringify(err)); - expect(err.code).assertEqual('2'); - console.log('ACTS_ProcessManage_clearUpApplicationDataFA_0100 end'); - done(); - }); - - }, 2000); - }) - - /* - * @tc.number: ACTS_ProcessManage_clearUpApplicationDataFA_0200 - * @tc.name: The system application cleans other system application - * @tc.desc: Check the process was cleaned up (by promise) - */ - it('ACTS_ProcessManage_clearUpApplicationDataFA_0200', 0, async function (done) { - console.log('ACTS_ProcessManage_clearUpApplicationDataFA_0200 begin'); - var subscriber; - - await featureAbility.startAbility( - { - want: - { - bundleName: systemABundleName, - abilityName: systemAAbilityName, - action: "promiseCleanup", - parameters: { - testTarget: systemBBundleName - } - }, - } - ); - var subscriber = await commonEvent.createSubscriber(subscribeInfo) - console.debug("====>ACTS_ProcessManage_clearUpApplicationDataFA_0200 subscriber====>" - + JSON.stringify(subscriber)); - await commonEvent.subscribe(subscriber, subscribeCallBack); - - async function subscribeCallBack(err, data) { - - console.debug("====>ACTS_ProcessManage_clearUpApplicationDataFA_0200 SubscribeCallBack data.event:====>" - + JSON.stringify(data.event)); - expect(data.event).assertEqual(eventFromSystemA); - expect(data.data).assertEqual('0'); - commonEvent.unsubscribe(subscriber, unSubscribeCallback); - - var processexist = await checkPromiseExistDelay(systemBProcessName); - console.debug("====>ACTS_ProcessManage_clearUpApplicationDataFA_0200 subscribeCallBack processexist:" - + JSON.stringify(processexist)); - expect(processexist).assertEqual(false); - var missionexist = await checkPromiseMissionExistDelay(systemBAbilityName) - console.debug("====>ACTS_ProcessManage_clearUpApplicationDataFA_0200 subscribeCallBack missionexist:" - + JSON.stringify(missionexist)); - expect(missionexist).assertEqual(false); - - fileio.opendir(uriSystemB).then(function (dir) { - console.info("ACTS_ProcessManage_clearUpApplicationDataFA_0200 opendir successfully:" - + JSON.stringify(dir)); - }).catch(function (err) { - console.info("ACTS_ProcessManage_clearUpApplicationDataFA_0200 opendir failed error:" + err); - console.info("ACTS_ProcessManage_clearUpApplicationDataFA_0200 opendir failed JSON error:" - + JSON.stringify(err)); - expect(err.code).assertEqual('2'); - console.log('ACTS_ProcessManage_clearUpApplicationDataFA_0200 end'); - done(); - }); - } - function unSubscribeCallback() { - console.debug("====>ACTS_ProcessManage_clearUpApplicationDataFA_0200 UnSubscribe CallBack====>"); - } - }) - - /* - * @tc.number: ACTS_ProcessManage_clearUpApplicationDataFA_0300 - * @tc.name: The system application cleans third-party application - * @tc.desc: Check the process was cleaned up (by promise) - */ - it('ACTS_ProcessManage_clearUpApplicationDataFA_0300', 0, async function (done) { - console.log('ACTS_ProcessManage_clearUpApplicationDataFA_0300 begin'); - var subscriber; - - await featureAbility.startAbility( - { - want: - { - bundleName: systemABundleName, - abilityName: systemAAbilityName, - action: "promiseCleanup", - parameters: { - testTarget: vendorABundleName - } - }, - } - ); - var subscriber = await commonEvent.createSubscriber(subscribeInfo) - console.debug("====>ACTS_ProcessManage_clearUpApplicationDataFA_0300 subscriber====>" - + JSON.stringify(subscriber)); - await commonEvent.subscribe(subscriber, subscribeCallBack); - - async function subscribeCallBack(err, data) { - - console.debug("====>ACTS_ProcessManage_clearUpApplicationDataFA_0300 SubscribeCallBack data.event:====>" - + JSON.stringify(data)); - expect(data.event).assertEqual(eventFromSystemA); - expect(data.data).assertEqual('0'); - commonEvent.unsubscribe(subscriber, unSubscribeCallback); - setTimeout(async function () { - var processexist = await checkPromiseExistDelay(vendorAProcessName); - console.debug("====>ACTS_ProcessManage_clearUpApplicationDataFA_0300 subscribeCallBack processexist:" - + JSON.stringify(processexist)); - expect(processexist).assertEqual(false); - var missionexist = await checkPromiseMissionExistDelay(vendorAAbilityName) - console.debug("====>ACTS_ProcessManage_clearUpApplicationDataFA_0300 subscribeCallBack missionexist:" - + JSON.stringify(missionexist)); - expect(missionexist).assertEqual(false); - - fileio.opendir(uriVendorA).then(function (dir) { - console.info("ACTS_ProcessManage_clearUpApplicationDataFA_0300 opendir successfully:" - + JSON.stringify(dir)); - }).catch(function (err) { - console.info("ACTS_ProcessManage_clearUpApplicationDataFA_0300 opendir failed error:" + err); - console.info("ACTS_ProcessManage_clearUpApplicationDataFA_0300 opendir failed JSON error:" - + JSON.stringify(err)); - expect(err.code).assertEqual('2'); - console.log('ACTS_ProcessManage_clearUpApplicationDataFA_0300 end'); - done(); - }); - }, 6000); - } - function unSubscribeCallback() { - console.debug("====>ACTS_ProcessManage_clearUpApplicationDataFA_0300 UnSubscribe CallBack====>"); - } - }) - - /* - * @tc.number: ACTS_ProcessManage_clearUpApplicationDataFA_0400 - * @tc.name: The system application cleans multiprocess application - * @tc.desc: Check the process was cleaned up (by promise) - */ - it('ACTS_ProcessManage_clearUpApplicationDataFA_0400', 0, async function (done) { - console.log('ACTS_ProcessManage_clearUpApplicationDataFA_0400 begin'); - var flagProcessA = 0; - var flagProcessAMulti = 0; - var flagMissionA = 0; - var flagMissionAMulti = 0; - var numMax = 1024; - - await featureAbility.startAbility( - { - want: - { - bundleName: systemABundleName, - abilityName: systemAAbilityName, - action: "promiseCleanup", - parameters: { - testTarget: systemAMultiAbilityName - } - }, - } - ); - setTimeout(async function () { - - var processInfos = await abilitymanager.getActiveProcessInfos(); - console.debug("====>ACTS_ProcessManage_clearUpApplicationDataFA_0400 processInfos====>" - + JSON.stringify(processInfos)); - for (var i = 0; i < processInfos.length; i++) { - if (processInfos[i].processName == systemAProcessName) { - flagProcessA++; - } - if (processInfos[i].processName == systemAMultiProcessName) { - flagProcessAMulti++; - } - } - console.debug("====>ACTS_ProcessManage_clearUpApplicationDataFA_0400 flagProcessA====>" - + JSON.stringify(flagProcessA)); - console.debug("====>ACTS_ProcessManage_clearUpApplicationDataFA_0400 flagProcessAMulti====>" - + JSON.stringify(flagProcessAMulti)); - expect(flagProcessA).assertEqual(0); - expect(flagProcessAMulti).assertEqual(0); - - var missionInfos = await missionmanager.getMissionInfos('', numMax); - console.debug("====>ACTS_ProcessManage_clearUpApplicationDataFA_0400 missionInfos====>" - + JSON.stringify(missionInfos)); - for (var i = 0; i < missionInfos.length; i++) { - if ((missionInfos[i].want.abilityName == systemAAbilityName) - && (missionInfos[i].runningState == 0)) { - flagMissionA++; - } - if ((missionInfos[i].want.abilityName == systemAMultiAbilityName) - && (missionInfos[i].runningState == 0)) { - flagMissionAMulti++; - } - } - console.debug("====>ACTS_ProcessManage_clearUpApplicationDataFA_0400 flagMissionA====>" - + JSON.stringify(flagMissionA)); - console.debug("====>ACTS_ProcessManage_clearUpApplicationDataFA_0400 flagMissionAMulti====>" - + JSON.stringify(flagMissionAMulti)); - expect(flagMissionA).assertEqual(0); - expect(flagMissionAMulti).assertEqual(0); - - fileio.opendir(uriSystemA).then(function (dir) { - console.info("ACTS_ProcessManage_clearUpApplicationDataFA_0400 opendir successfully:" - + JSON.stringify(dir)); - }).catch(function (err) { - console.info("ACTS_ProcessManage_clearUpApplicationDataFA_0400 opendir failed error:" + err); - console.info("ACTS_ProcessManage_clearUpApplicationDataFA_0400 opendir failed JSON error:" - + JSON.stringify(err)); - expect(err.code).assertEqual('2'); - }); - fileio.opendir(uriSystemAMulti).then(function (dir) { - console.info("ACTS_ProcessManage_clearUpApplicationDataFA_0400 opendir Multi successfully:" - + JSON.stringify(dir)); - }).catch(function (err) { - console.info("ACTS_ProcessManage_clearUpApplicationDataFA_0400 opendir Multi failed error:" + err); - console.info("ACTS_ProcessManage_clearUpApplicationDataFA_0400 opendir Multi failed JSON error:" - + JSON.stringify(err)); - expect(err.code).assertEqual('2'); - console.log('ACTS_ProcessManage_clearUpApplicationDataFA_0400 end'); - done(); - }); - }, 6000); - }) - - /* - * @tc.number: ACTS_ProcessManage_clearUpApplicationDataFA_0500 - * @tc.name: The system application cleans itself - * @tc.desc: Check the process was cleaned up (by AsyncCallback) - */ - it('ACTS_ProcessManage_clearUpApplicationDataFA_0500', 0, async function (done) { - console.log('ACTS_ProcessManage_clearUpApplicationDataFA_0500 begin'); - await featureAbility.startAbility( - { - want: - { - bundleName: systemABundleName, - abilityName: systemAAbilityName, - action: "asyncCleanup", - parameters: { - testTarget: systemABundleName - } - }, - } - ); - setTimeout(async function () { - var processexist = await checkPromiseExistDelay(systemAProcessName); - console.debug("====>ACTS_ProcessManage_clearUpApplicationDataFA_0500 processexist:====>" - + JSON.stringify(processexist)); - expect(processexist).assertEqual(false); - - var missionexist = await checkPromiseMissionExistDelay(systemAAbilityName) - console.debug("====>ACTS_ProcessManage_clearUpApplicationDataFA_0500 missionexist:====>" - + JSON.stringify(missionexist)); - expect(missionexist).assertEqual(false); - - fileio.opendir(uriSystemA).then(function (dir) { - console.info("ACTS_ProcessManage_clearUpApplicationDataFA_0500 opendir successfully:" - + JSON.stringify(dir)); - }).catch(function (err) { - console.info("ACTS_ProcessManage_clearUpApplicationDataFA_0500 opendir failed error:" + err); - console.info("ACTS_ProcessManage_clearUpApplicationDataFA_0500 opendir failed JSON error:" - + JSON.stringify(err)); - expect(err.code).assertEqual('2'); - }); - fileio.opendir(uriSystemAMulti).then(function (dir) { - console.info("ACTS_ProcessManage_clearUpApplicationDataFA_0500 opendir Multi successfully:" - + JSON.stringify(dir)); - }).catch(function (err) { - console.info("ACTS_ProcessManage_clearUpApplicationDataFA_0500 opendir Multi failed error:" + err); - console.info("ACTS_ProcessManage_clearUpApplicationDataFA_0500 opendir Multi failed JSON error:" - + JSON.stringify(err)); - expect(err.code).assertEqual('2'); - console.log('ACTS_ProcessManage_clearUpApplicationDataFA_0500 end'); - done(); - }); - }, 6000); - }) - - /* - * @tc.number: ACTS_ProcessManage_clearUpApplicationDataFA_0600 - * @tc.name: The system application cleans other system application - * @tc.desc: Check the process was cleaned up (by AsyncCallback) - */ - it('ACTS_ProcessManage_clearUpApplicationDataFA_0600', 0, async function (done) { - console.log('ACTS_ProcessManage_clearUpApplicationDataFA_0600 begin'); - var subscriber; - - await featureAbility.startAbility( - { - want: - { - bundleName: systemABundleName, - abilityName: systemAAbilityName, - action: "asyncCleanup", - parameters: { - testTarget: systemBBundleName - } - }, - } - ); - await commonEvent.createSubscriber(subscribeInfo).then(async (data) => { - console.debug("====>ACTS_ProcessManage_clearUpApplicationDataFA_0600 Create Subscriber data====>" - + data); - subscriber = data; - console.debug("====>ACTS_ProcessManage_clearUpApplicationDataFA_0600 subscriber====>" - + JSON.stringify(subscriber)); - await commonEvent.subscribe(subscriber, subscribeCallBack); - }); - async function subscribeCallBack(err, data) { - console.debug("====>ACTS_ProcessManage_clearUpApplicationDataFA_0600 SubscribeCallBack data:====>" - + JSON.stringify(data)); - expect(data.event).assertEqual(eventFromSystemA); - expect(data.data).assertEqual('0'); - commonEvent.unsubscribe(subscriber, unSubscribeCallback); - setTimeout(async function () { - var processexist = await checkPromiseExistDelay(systemBProcessName); - console.debug("====>ACTS_ProcessManage_clearUpApplicationDataFA_0600 processexist:====>" - + JSON.stringify(processexist)); - expect(processexist).assertEqual(false); - - var missionexist = await checkPromiseMissionExistDelay(systemBAbilityName) - console.debug("====>ACTS_ProcessManage_clearUpApplicationDataFA_0600 missionexist:====>" - + JSON.stringify(missionexist)); - expect(missionexist).assertEqual(false); - - fileio.opendir(uriSystemB).then(function (dir) { - console.info("ACTS_ProcessManage_clearUpApplicationDataFA_0600 opendir successfully:" - + JSON.stringify(dir)); - }).catch(function (err) { - console.info("ACTS_ProcessManage_clearUpApplicationDataFA_0600 opendir failed error:" + err); - console.info("ACTS_ProcessManage_clearUpApplicationDataFA_0600 opendir failed JSON error:" - + JSON.stringify(err)); - expect(err.code).assertEqual('2'); - console.log('ACTS_ProcessManage_clearUpApplicationDataFA_0600 end'); - done(); - }); - }, 6000); - } - function unSubscribeCallback() { - console.debug("====>ACTS_ProcessManage_clearUpApplicationDataFA_0600 UnSubscribe CallBack====>"); - } - }) - - /* - * @tc.number: ACTS_ProcessManage_clearUpApplicationDataFA_0700 - * @tc.name: The system application cleans third-party application - * @tc.desc: Check the process was cleaned up (by AsyncCallback) - */ - it('ACTS_ProcessManage_clearUpApplicationDataFA_0700', 0, async function (done) { - console.log('ACTS_ProcessManage_clearUpApplicationDataFA_0700 begin'); - var subscriber; - await featureAbility.startAbility( - { - want: - { - bundleName: systemABundleName, - abilityName: systemAAbilityName, - action: "asyncCleanup", - parameters: { - testTarget: vendorABundleName - } - }, - } - ); - await commonEvent.createSubscriber(subscribeInfo).then(async (data) => { - console.debug("====>ACTS_ProcessManage_clearUpApplicationDataFA_0700 Create Subscriber data====>" - + data); - subscriber = data; - console.debug("====>ACTS_ProcessManage_clearUpApplicationDataFA_0700 subscriber====>" - + JSON.stringify(subscriber)); - await commonEvent.subscribe(subscriber, subscribeCallBack); - }); - async function subscribeCallBack(err, data) { - console.debug("====>ACTS_ProcessManage_clearUpApplicationDataFA_0700 SubscribeCallBack data:====>" - + JSON.stringify(data)); - expect(data.event).assertEqual(eventFromSystemA); - commonEvent.unsubscribe(subscriber, unSubscribeCallback); - setTimeout(async function () { - var processexist = await checkPromiseExistDelay(vendorAProcessName); - console.debug("====>ACTS_ProcessManage_clearUpApplicationDataFA_0700 processexist:====>" - + JSON.stringify(processexist)); - expect(processexist).assertEqual(false); - - var missionexist = await checkPromiseMissionExistDelay(vendorAAbilityName) - console.debug("====>ACTS_ProcessManage_clearUpApplicationDataFA_0700 missionexist:====>" - + JSON.stringify(missionexist)); - expect(missionexist).assertEqual(false); - - fileio.opendir(uriVendorA).then(function (dir) { - console.info("ACTS_ProcessManage_clearUpApplicationDataFA_0700 opendir successfully:" - + JSON.stringify(dir)); - }).catch(function (err) { - console.info("ACTS_ProcessManage_clearUpApplicationDataFA_0700 opendir failed error:" + err); - console.info("ACTS_ProcessManage_clearUpApplicationDataFA_0700 opendir failed JSON error:" - + JSON.stringify(err)); - expect(err.code).assertEqual('2'); - console.log('ACTS_ProcessManage_clearUpApplicationDataFA_0700 end'); - done(); - }); - }, 6000); - } - function unSubscribeCallback() { - console.debug("====>ACTS_ProcessManage_clearUpApplicationDataFA_0700 UnSubscribe CallBack====>"); - } - }) - - /* - * @tc.number: ACTS_ProcessManage_clearUpApplicationDataFA_0800 - * @tc.name: The system application cleans multiprocess application - * @tc.desc: Check the process was cleaned up (by AsyncCallback) - */ - it('ACTS_ProcessManage_clearUpApplicationDataFA_0800', 0, async function (done) { - console.log('ACTS_ProcessManage_clearUpApplicationDataFA_0800 begin'); - var flagProcessA = 0; - var flagProcessAMulti = 0; - var flagMissionA = 0; - var flagMissionAMulti = 0; - var numMax = 1024; - - await featureAbility.startAbility( - { - want: - { - bundleName: systemABundleName, - abilityName: systemAAbilityName, - action: "asyncCleanup", - parameters: { - testTarget: systemAMultiAbilityName - } - }, - } - ); - setTimeout(async function () { - - var processInfos = await abilitymanager.getActiveProcessInfos(); - console.debug("====>ACTS_ProcessManage_clearUpApplicationDataFA_0800 processInfos====>" - + JSON.stringify(processInfos)); - for (var i = 0; i < processInfos.length; i++) { - if (processInfos[i].processName == systemAProcessName) { - flagProcessA++; - } - if (processInfos[i].processName == systemAMultiProcessName) { - flagProcessAMulti++; - } - } - console.debug("====>ACTS_ProcessManage_clearUpApplicationDataFA_0800 flagProcessA====>" - + JSON.stringify(flagProcessA)); - console.debug("====>ACTS_ProcessManage_clearUpApplicationDataFA_0800 flagProcessAMulti====>" - + JSON.stringify(flagProcessAMulti)); - expect(flagProcessA).assertEqual(0); - expect(flagProcessAMulti).assertEqual(0); - - var missionInfos = await missionmanager.getMissionInfos('', numMax); - console.debug("====>ACTS_ProcessManage_clearUpApplicationDataFA_0800 missionInfos====>" - + JSON.stringify(missionInfos)); - for (var i = 0; i < missionInfos.length; i++) { - if ((missionInfos[i].want.abilityName == systemAAbilityName) - && (missionInfos[i].runningState == 0)) { - flagMissionA++; - } - if ((missionInfos[i].want.abilityName == systemAMultiAbilityName) - && (missionInfos[i].runningState == 0)) { - flagMissionAMulti++; - } - } - console.debug("====>ACTS_ProcessManage_clearUpApplicationDataFA_0800 flagMissionA====>" - + JSON.stringify(flagMissionA)); - console.debug("====>ACTS_ProcessManage_clearUpApplicationDataFA_0800 flagMissionAMulti====>" - + JSON.stringify(flagMissionAMulti)); - expect(flagMissionA).assertEqual(0); - expect(flagMissionAMulti).assertEqual(0); - - fileio.opendir(uriSystemA).then(function (dir) { - console.info("ACTS_ProcessManage_clearUpApplicationDataFA_0800 opendir successfully:" - + JSON.stringify(dir)); - }).catch(function (err) { - console.info("ACTS_ProcessManage_clearUpApplicationDataFA_0800 opendir failed error:" + err); - console.info("ACTS_ProcessManage_clearUpApplicationDataFA_0800 opendir failed JSON error:" - + JSON.stringify(err)); - expect(err.code).assertEqual('2'); - }); - fileio.opendir(uriSystemAMulti).then(function (dir) { - console.info("ACTS_ProcessManage_clearUpApplicationDataFA_0800 opendir Multi successfully:" - + JSON.stringify(dir)); - }).catch(function (err) { - console.info("ACTS_ProcessManage_clearUpApplicationDataFA_0800 opendir Multi failed error:" + err); - console.info("ACTS_ProcessManage_clearUpApplicationDataFA_0800 opendir Multi failed JSON error:" - + JSON.stringify(err)); - expect(err.code).assertEqual('2'); - console.log('ACTS_ProcessManage_clearUpApplicationDataFA_0800 end'); - done(); - }); - }, 6000); - }) - - /* - * @tc.number: ACTS_ProcessManage_clearUpApplicationDataFA_0900 - * @tc.name: Parameter is null - * @tc.desc: Check the result is OK (by AsyncCallback) - */ - it('ACTS_ProcessManage_clearUpApplicationDataFA_0900', 0, async function (done) { - console.log('ACTS_ProcessManage_clearUpApplicationDataFA_0900 begin'); - - try { - var result = await abilityManager.clearUpApplicationData(null); - console.debug("====>ACTS_ProcessManage_clearUpApplicationDataFA_0900 null result:====>" - + JSON.stringify(result)); - expect(result == 0).assertEqual(false); - console.log('ACTS_ProcessManage_clearUpApplicationDataFA_0900 end'); - done(); - } - catch (err) { - console.debug("====>ACTS_ProcessManage_clearUpApplicationDataFA_0900 err:====>" - + JSON.stringify(err)); - done(); - } - }) - - /* - * @tc.number: ACTS_ProcessManage_clearUpApplicationDataFA_1000 - * @tc.name: Parameter is '' - * @tc.desc: Check the result is OK (by AsyncCallback) - */ - it('ACTS_ProcessManage_clearUpApplicationDataFA_1000', 0, async function (done) { - console.log('ACTS_ProcessManage_clearUpApplicationDataFA_1000 begin'); - abilityManager.clearUpApplicationData('', (err, data) => { - console.debug("====>ACTS_ProcessManage_clearUpApplicationDataFA_1000 '' result:====>" - + JSON.stringify(data)); - expect(err.code).assertEqual(0); - console.log('ACTS_ProcessManage_clearUpApplicationDataFA_1000 end'); - done(); - }); - }) - - /* - * @tc.number: ACTS_ProcessManage_clearUpApplicationDataFA_1100 - * @tc.name: Parameter is undefined - * @tc.desc: Check the result is OK (by AsyncCallback) - */ - it('ACTS_ProcessManage_clearUpApplicationDataFA_1100', 0, async function (done) { - console.log('ACTS_ProcessManage_clearUpApplicationDataFA_1100 begin'); - try { - var result = await abilityManager.clearUpApplicationData(undefined); - console.debug("====>ACTS_ProcessManage_clearUpApplicationDataFA_1100 undefined result:====>" - + JSON.stringify(result)); - expect(result == 0).assertEqual(false); - console.log('ACTS_ProcessManage_clearUpApplicationDataFA_1100 end'); - done(); - } - catch (err) { - console.debug("====>ACTS_ProcessManage_clearUpApplicationDataFA_1100 err:====>" - + JSON.stringify(err)); - done(); - } - }) - - /* - * @tc.number: ACTS_ProcessManage_clearUpApplicationDataFA_1200 - * @tc.name: Stop an application that doesn't exist - * @tc.desc: Check the result is OK (by AsyncCallback) - */ - it('ACTS_ProcessManage_clearUpApplicationDataFA_1200', 0, async function (done) { - console.log('ACTS_ProcessManage_clearUpApplicationDataFA_1200 begin'); - abilityManager.clearUpApplicationData("aa.bb.notExist", (err, data) => { - console.debug("====>ACTS_ProcessManage_clearUpApplicationDataFA_1200 aa.bb.notExist result:====>" - + JSON.stringify(data)); - expect(err.code).assertEqual(0); - console.log('ACTS_ProcessManage_clearUpApplicationDataFA_1200 end'); - done(); - }); - }) - - /* - * @tc.number: ACTS_ProcessManage_clearUpApplicationDataFA_1300 - * @tc.name: Stop an application that exists but is not started - * @tc.desc: Check the result is OK (by AsyncCallback) - */ - it('ACTS_ProcessManage_clearUpApplicationDataFA_1300', 0, async function (done) { - console.log('ACTS_ProcessManage_clearUpApplicationDataFA_1300 begin'); - abilityManager.clearUpApplicationData(systemABundleName, (err, data) => { - console.debug("====>ACTS_ProcessManage_clearUpApplicationDataFA_1300 without running result:====>" - + JSON.stringify(data)); - expect(err.code).assertEqual(0); - setTimeout(async function () { - fileio.opendir(uriSystemA).then(function (dir) { - console.info("ACTS_ProcessManage_clearUpApplicationDataFA_1300 opendir successfully:" - + JSON.stringify(dir)); - console.log('ACTS_ProcessManage_clearUpApplicationDataFA_1300 end'); - done(); - }).catch(function (err) { - console.info("ACTS_ProcessManage_clearUpApplicationDataFA_1300 opendir failed error:" + err); - console.info("ACTS_ProcessManage_clearUpApplicationDataFA_1300 opendir failed JSON error:" - + JSON.stringify(err)); - expect(err.code).assertEqual('2'); - console.log('ACTS_ProcessManage_clearUpApplicationDataFA_1300 end'); - done(); - }); - }, 4000); - }); - }) - - /* - * @tc.number: ACTS_ProcessManage_clearUpApplicationDataFA_1400 - * @tc.name: The system application cleans third-party application for ten times - * @tc.desc: Check the process was cleaned up (by AsyncCallback) - */ - it('ACTS_ProcessManage_clearUpApplicationDataFA_1400', 0, async function (done) { - console.log('ACTS_ProcessManage_clearUpApplicationDataFA_1400 begin'); - var subscriber; - await featureAbility.startAbility( - { - want: - { - bundleName: systemABundleName, - abilityName: systemAAbilityName, - action: "promiseCleanupTentimes", - parameters: { - testTarget: vendorABundleName - } - }, - } - ); - - await commonEvent.createSubscriber(subscribeInfo).then(async (data) => { - console.debug("====>ACTS_ProcessManage_clearUpApplicationDataFA_1400 Create Subscriber data====>" - + data); - subscriber = data; - console.debug("====>ACTS_ProcessManage_clearUpApplicationDataFA_1400 subscriber====>" - + JSON.stringify(subscriber)); - await commonEvent.subscribe(subscriber, subscribeCallBack); - }); - - async function subscribeCallBack(err, data) { - console.debug("====>ACTS_ProcessManage_clearUpApplicationDataFA_1400 Subscribe CallBack data:====>" - + JSON.stringify(data)); - expect(data.event).assertEqual(eventFromSystemA); - commonEvent.unsubscribe(subscriber, unSubscribeCallback); - setTimeout(async function () { - var processexist = await checkPromiseExistDelay(vendorAProcessName); - console.debug("====>ACTS_ProcessManage_clearUpApplicationDataFA_1400 processexist:====>" - + JSON.stringify(processexist)); - expect(processexist).assertEqual(false); - - var missionexist = await checkPromiseMissionExistDelay(vendorAAbilityName) - console.debug("====>ACTS_ProcessManage_clearUpApplicationDataFA_1400 missionexist:====>" - + JSON.stringify(missionexist)); - expect(missionexist).assertEqual(false); - - fileio.opendir(uriVendorA).then(function (dir) { - console.info("ACTS_ProcessManage_clearUpApplicationDataFA_1400 opendir successfully:" - + JSON.stringify(dir)); - }).catch(function (err) { - console.info("ACTS_ProcessManage_clearUpApplicationDataFA_1400 opendir failed error:" + err); - console.info("ACTS_ProcessManage_clearUpApplicationDataFA_1400 opendir failed JSON error:" - + JSON.stringify(err)); - expect(err.code).assertEqual('2'); - console.log('ACTS_ProcessManage_clearUpApplicationDataFA_1400 end'); - done(); - }); - }, 15000); - } - function unSubscribeCallback() { - console.debug("====>ACTS_ProcessManage_clearUpApplicationDataFA_1400 UnSubscribe CallBack====>"); - } - }) -}) \ No newline at end of file diff --git a/aafwk/aafwk_standard/amsprocessmanageapi7/actsprocessmanagejstest/entry/src/main/js/test/List.test.js b/aafwk/aafwk_standard/amsprocessmanageapi7/actsprocessmanagejstest/entry/src/main/js/test/List.test.js deleted file mode 100644 index 8b803e026d90c6786eee9514cff565e5e6f71ca7..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/amsprocessmanageapi7/actsprocessmanagejstest/entry/src/main/js/test/List.test.js +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Copyright (c) 2022 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -require('./ActsProcessManageJsTest.test.js') \ No newline at end of file diff --git a/aafwk/aafwk_standard/amsprocessmanageapi7/actsprocessmanagejstest/signature/openharmony_sx.p7b b/aafwk/aafwk_standard/amsprocessmanageapi7/actsprocessmanagejstest/signature/openharmony_sx.p7b deleted file mode 100755 index cc53179a48f88f20acc379c138a001e9a15838f6..0000000000000000000000000000000000000000 Binary files a/aafwk/aafwk_standard/amsprocessmanageapi7/actsprocessmanagejstest/signature/openharmony_sx.p7b and /dev/null differ diff --git a/aafwk/aafwk_standard/amsprocessmanageapi7/pmsystemappa/BUILD.gn b/aafwk/aafwk_standard/amsprocessmanageapi7/pmsystemappa/BUILD.gn deleted file mode 100644 index 7ccdba3c71f1b2335d956e601c98b70a9961db41..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/amsprocessmanageapi7/pmsystemappa/BUILD.gn +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright (C) 2022 Huawei Device Co., Ltd. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -import("//test/xts/tools/build/suite.gni") - -ohos_hap("ActsAmsProcessManageSystemAppAApi7") { - hap_name = "ActsAmsProcessManageSystemAppAApi7" - hap_profile = "./src/main/config.json" - subsystem_name = XTS_SUITENAME - final_hap_path = - "${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap" - testonly = true - deps = [ - ":hjs_demo_js_assets", - ":hjs_demo_resources", - ] - certificate_profile = "./signature/openharmony_sx.p7b" -} -ohos_js_assets("hjs_demo_js_assets") { - source_dir = "./src/main/js/default" -} -ohos_resources("hjs_demo_resources") { - sources = [ "./src/main/js/resources" ] - hap_profile = "./src/main/config.json" -} diff --git a/aafwk/aafwk_standard/amsprocessmanageapi7/pmsystemappa/signature/openharmony_sx.p7b b/aafwk/aafwk_standard/amsprocessmanageapi7/pmsystemappa/signature/openharmony_sx.p7b deleted file mode 100755 index cc53179a48f88f20acc379c138a001e9a15838f6..0000000000000000000000000000000000000000 Binary files a/aafwk/aafwk_standard/amsprocessmanageapi7/pmsystemappa/signature/openharmony_sx.p7b and /dev/null differ diff --git a/aafwk/aafwk_standard/amsprocessmanageapi7/pmsystemappa/src/main/config.json b/aafwk/aafwk_standard/amsprocessmanageapi7/pmsystemappa/src/main/config.json deleted file mode 100644 index 829eb86b1b8e255346717f35efb40221fe93a3df..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/amsprocessmanageapi7/pmsystemappa/src/main/config.json +++ /dev/null @@ -1,107 +0,0 @@ -{ - "app": { - "bundleName": "com.acts.pmsystemappaapi7", - "vendor": "example", - "version": { - "code": 1, - "name": "1.0" - }, - "apiVersion": { - "compatible": 4, - "target": 5, - "releaseType": "Beta1" - } - }, - "deviceConfig": { - "default": { - "process": "com.acts.pmsystemappaapi7" - } - }, - "module": { - "package": "com.acts.pmsystemappaapi7", - "name": ".MyApplication", - "deviceType": [ - "phone" - ], - "distro": { - "deliveryWithInstall": true, - "moduleName": "entry", - "moduleType": "entry" - }, - "abilities": [ - { - "skills": [ - { - "entities": [ - "entity.system.home" - ], - "actions": [ - "action.system.home" - ] - } - ], - "name": "com.acts.pmsystemappaapi7.MainAbility", - "visible": true, - "icon": "$media:icon", - "description": "$string:mainability_description", - "label": "$string:app_name", - "type": "page", - "launchType": "standard" - } - ], - "reqPermissions": [ - { - "name":"ohos.permission.GET_BUNDLE_INFO_PRIVILEGED", - "reason":"need use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED" - }, - { - "name":"ohos.permission.GET_BUNDLE_INFO", - "reason":"need use ohos.permission.GET_BUNDLE_INFO" - }, - { - "name":"ohos.permission.CHANGE_ABILITY_ENABLED_STATE", - "reason":"need use ohos.permission.CHANGE_ABILITY_ENABLED_STATE" - }, - { - "name":"ohos.permission.REMOVE_CACHE_FILES", - "reason":"need use ohos.permission.REMOVE_CACHE_FILES" - }, - { - "name":"ohos.permission.LISTEN_BUNDLE_CHANGE", - "reason":"need use ohos.permission.LISTEN_BUNDLE_CHANGE" - }, - { - "name":"ohos.permission.INSTALL_BUNDLE", - "reason":"need use ohos.permission.INSTALL_BUNDLE" - }, - { - "name":"ohos.permission.MANAGE_MISSIONS", - "reason":"need use ohos.permission.MANAGE_MISSIONS" - }, - { - "name":"ohos.permission.GET_RUNNING_INFO", - "reason":"need use ohos.permission.GET_RUNNING_INFO" - }, - { - "name":"ohos.permission.CLEAN_BACKGROUND_PROCESSES", - "reason":"need use ohos.permission.CLEAN_BACKGROUND_PROCESSES" - }, - { - "name":"ohos.permission.CLEAN_APPLICATION_DATA", - "reason":"need use ohos.permission.CLEAN_APPLICATION_DATA" - } - ], - "js": [ - { - "pages": [ - "pages/index/index" - ], - "name": "default", - "window": { - "designWidth": 720, - "autoDesignWidth": false - } - } - ] - } -} \ No newline at end of file diff --git a/aafwk/aafwk_standard/amsprocessmanageapi7/pmsystemappa/src/main/js/default/app.js b/aafwk/aafwk_standard/amsprocessmanageapi7/pmsystemappa/src/main/js/default/app.js deleted file mode 100644 index d47cf0cd38b846701aa9a2fe7a4e9596f79b9b0c..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/amsprocessmanageapi7/pmsystemappa/src/main/js/default/app.js +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) 2022 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -export default { - onCreate() { - console.info('ProcessManageSystemAppA onCreate'); - }, - onDestroy() { - console.info('ProcessManageSystemAppA onDestroy'); - }, - onShow() { - console.info('ProcessManageSystemAppA onShow'); - }, - onHide() { - console.info('ProcessManageSystemAppA onHide'); - } -}; diff --git a/aafwk/aafwk_standard/amsprocessmanageapi7/pmsystemappa/src/main/js/default/i18n/en-US.json b/aafwk/aafwk_standard/amsprocessmanageapi7/pmsystemappa/src/main/js/default/i18n/en-US.json deleted file mode 100644 index e63c70d978a3a53be988388c87182f81785e170c..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/amsprocessmanageapi7/pmsystemappa/src/main/js/default/i18n/en-US.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "strings": { - "hello": "Hello", - "world": "World" - } -} \ No newline at end of file diff --git a/aafwk/aafwk_standard/amsprocessmanageapi7/pmsystemappa/src/main/js/default/i18n/zh-CN.json b/aafwk/aafwk_standard/amsprocessmanageapi7/pmsystemappa/src/main/js/default/i18n/zh-CN.json deleted file mode 100644 index de6ee5748322f44942c1b003319d8e66c837675f..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/amsprocessmanageapi7/pmsystemappa/src/main/js/default/i18n/zh-CN.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "strings": { - "hello": "您好", - "world": "世界" - } -} \ No newline at end of file diff --git a/aafwk/aafwk_standard/amsprocessmanageapi7/pmsystemappa/src/main/js/default/pages/index/index.css b/aafwk/aafwk_standard/amsprocessmanageapi7/pmsystemappa/src/main/js/default/pages/index/index.css deleted file mode 100644 index 6fda792753f2e15f22b529c7b90a82185b2770bf..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/amsprocessmanageapi7/pmsystemappa/src/main/js/default/pages/index/index.css +++ /dev/null @@ -1,9 +0,0 @@ -.container { - flex-direction: column; - justify-content: center; - align-items: center; -} - -.title { - font-size: 100px; -} diff --git a/aafwk/aafwk_standard/amsprocessmanageapi7/pmsystemappa/src/main/js/default/pages/index/index.hml b/aafwk/aafwk_standard/amsprocessmanageapi7/pmsystemappa/src/main/js/default/pages/index/index.hml deleted file mode 100644 index f64b040a5ae394dbaa5e185e1ecd4f4556b92184..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/amsprocessmanageapi7/pmsystemappa/src/main/js/default/pages/index/index.hml +++ /dev/null @@ -1,5 +0,0 @@ -
- - {{ $t('strings.hello') }} {{ title }} - -
diff --git a/aafwk/aafwk_standard/amsprocessmanageapi7/pmsystemappa/src/main/js/default/pages/index/index.js b/aafwk/aafwk_standard/amsprocessmanageapi7/pmsystemappa/src/main/js/default/pages/index/index.js deleted file mode 100644 index 78cc2ff7ab4c8be632e9074cc8a845fbae7fbfd5..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/amsprocessmanageapi7/pmsystemappa/src/main/js/default/pages/index/index.js +++ /dev/null @@ -1,226 +0,0 @@ -/* - * Copyright (c) 2022 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import commonEvent from '@ohos.commonevent' -import abilityManager from '@ohos.application.appManager' -import featureAbility from '@ohos.ability.featureability' - -const injectRef = Object.getPrototypeOf(global) || global -injectRef.regeneratorRuntime = require('@babel/runtime/regenerator') - -var subscribeInfo = { - events: ["event_from_ProcessManage_SystemTest", - "event_SystemAppBToSystemAppA", - "event_VendorAppAToSystemAppA", - "event_SystemAppAMultiToSystemAppA", - "event_VendorAppServiceToSystemAppA" - ], -}; -var publishEventName = "event_from_ProcessManage_SystemAppA"; -var eventFromSystemAMulti = "event_SystemAppAMultiToSystemAppA"; -var testAction; -var testTarget; -var subscriber; -var systemABundleName = "com.acts.pmsystemappaapi7"; -var systemBBundleName = "com.acts.pmsystemappbapi7"; -var vendorABundleName = "com.acts.pmvendorappaapi7"; -var systemBAbilityName = "com.acts.pmsystemappbapi7.MainAbility"; -var vendorAAbilityName = "com.acts.pmvendorappaapi7.MainAbility"; -var multiAAbilityName = "com.acts.pmsystemappamultiapi7.MainAbility"; - -function onReceivedPublishCallBack() { - console.log("ACTS_ProcessManage SystemAppA onReceivedPublishCallBack"); -} - -function publishResultEvent(testResult) { - console.log("ACTS_ProcessManage SystemAppA publishResultEvent testAction:" + testAction); - console.log("ACTS_ProcessManage SystemAppA publishResultEvent testTarget:" + testTarget); - console.log("ACTS_ProcessManage SystemAppA publishResultEvent testResult:" + testResult); - let publishData = { data: testResult.toString() }; - console.log("ACTS_ProcessManage SystemAppA publishResultEvent publishData:" - + JSON.stringify(publishData)); - commonEvent.publish(publishEventName, publishData, onReceivedPublishCallBack); - -} -function onReceivedHandleCallback(err, data) { - publishResultEvent(data); - console.log("ACTS_ProcessManage SystemAppA onReceivedHandleCallback data:" - + JSON.stringify(data)); -} - -async function onShowProcess() { - - var abilityWant = await featureAbility.getWant(); - console.log("ACTS_ProcessManage SystemAppA onShowProcess abilityWant:" - + JSON.stringify(abilityWant)); - testAction = abilityWant.action; - console.log("ACTS_ProcessManage SystemAppA onShowProcess testAction:" + testAction); - testTarget = abilityWant.parameters.testTarget; - console.log("ACTS_ProcessManage SystemAppA onShowProcess testTarget:" + testTarget); - - - if (testTarget == systemABundleName) { - - if (testAction == "promiseKill") { - console.log("ACTS_ProcessManage SystemAppA onShowProcess testAction:" + testAction); - var result = await abilityManager.killProcessesByBundleName(testTarget); - console.log("ACTS_ProcessManage SystemAppA onShowProcess result:" + result); - publishResultEvent(result); - } else if (testAction == "asyncKill") { - console.log("ACTS_ProcessManage SystemAppA onShowProcess testAction:" + testAction); - abilityManager.killProcessesByBundleName(testTarget, onReceivedHandleCallback); - } else if (testAction == "promiseCleanup") { - console.log("ACTS_ProcessManage SystemAppA onShowProcess testAction:" + testAction); - var result = await abilityManager.clearUpApplicationData(testTarget); - console.log("ACTS_ProcessManage SystemAppA onShowProcess result:" + result); - publishResultEvent(result); - } else if (testAction == "asyncCleanup") { - console.log("ACTS_ProcessManage SystemAppA onShowProcess testAction:" + testAction); - abilityManager.clearUpApplicationData(testTarget, onReceivedHandleCallback); - } - - } - else { - try { - subscriber = await commonEvent.createSubscriber(subscribeInfo) - console.debug("ACTS_ProcessManage SystemAppA onShowProcess subscriber:" - + JSON.stringify(subscriber)); - commonEvent.subscribe(subscriber, subscribeCallBack); - } catch (err) { - console.debug("ACTS_ProcessManage SystemAppA onShowProcess err:" + err); - } - - if (testTarget == systemBBundleName) { - await featureAbility.startAbility( - { - want: - { - bundleName: systemBBundleName, - abilityName: systemBAbilityName, - }, - } - ); - } - else if (testTarget == vendorABundleName) { - await featureAbility.startAbility( - { - want: - { - bundleName: vendorABundleName, - abilityName: vendorAAbilityName, - }, - } - ); - } - else if (testTarget == multiAAbilityName) { - await featureAbility.startAbility( - { - want: - { - bundleName: systemABundleName, - abilityName: multiAAbilityName, - }, - } - ); - } - } - - async function subscribeCallBack(err, data) { - console.debug("ACTS_ProcessManage SystemAppA subscribeCallBack SubscribeCallBack data:====>" - + JSON.stringify(data)); - console.debug("ACTS_ProcessManage SystemAppA subscribeCallBack SubscribeCallBack data.event:====>" - + JSON.stringify(data.event)); - - if (data.event == eventFromSystemAMulti) { - testTarget = systemABundleName; - } - - if (testAction == "promiseKill") { - console.log("ACTS_ProcessManage SystemAppA subscribeCallBack testAction:" + testAction); - var result = await abilityManager.killProcessesByBundleName(testTarget); - console.log("ACTS_ProcessManage SystemAppA subscribeCallBack result:" + result); - publishResultEvent(result); - } else if (testAction == "asyncKill") { - console.log("ACTS_ProcessManage SystemAppA subscribeCallBack testAction:" + testAction); - await abilityManager.killProcessesByBundleName(testTarget, onReceivedHandleCallback); - } else if (testAction == "promiseCleanup") { - console.log("ACTS_ProcessManage SystemAppA subscribeCallBack testAction:" + testAction); - var result = await abilityManager.clearUpApplicationData(testTarget); - console.log("ACTS_ProcessManage SystemAppA subscribeCallBack result:" + result); - publishResultEvent(result); - } else if (testAction == "asyncCleanup") { - console.log("ACTS_ProcessManage SystemAppA subscribeCallBack testAction:" + testAction); - await abilityManager.clearUpApplicationData(testTarget, onReceivedHandleCallback); - } else if (testAction == "promiseCleanupTentimes") { - for (var i = 0; i < 10; i++) { - console.log("ACTS_ProcessManage SystemAppA subscribeCallBack testAction:" + testAction); - var result = await abilityManager.clearUpApplicationData(testTarget); - console.log("ACTS_ProcessManage SystemAppA subscribeCallBack result:" + result); - } - publishResultEvent(result); - } - } - -} - -export default { - data: { - title: "" - }, - onInit() { - console.info('ACTS_ProcessManage SystemAppA onInit'); - this.title = "ProcessManageSystemAppA"; - }, - onReady() { - console.info('ACTS_ProcessManage SystemAppA onReady'); - onShowProcess(); - }, - onActive() { - console.info('ACTS_ProcessManage SystemAppA onActive'); - }, - onShow() { - console.info('ACTS_ProcessManage SystemAppA onShow'); - - }, - onInactive() { - console.info('ACTS_ProcessManage SystemAppA onInactive'); - }, - onHide() { - console.info('ACTS_ProcessManage SystemAppA onHide'); - }, - onDestroy() { - console.info('ACTS_ProcessManage SystemAppA onDestroy'); - }, - onBackPress() { - console.info('ACTS_ProcessManage SystemAppA onBackPress'); - }, - onNewRequest() { - console.info('ACTS_ProcessManage SystemAppA onNewRequest'); - }, - onStartContinuation() { - console.info('ACTS_ProcessManage SystemAppA onStartContinuation'); - }, - onSaveData(value) { - console.info('ACTS_ProcessManage SystemAppA onSaveData:' + JSON.stringify(value)); - }, - onRestoreData(value) { - console.info('ACTS_ProcessManage SystemAppA onRestoreData:' + JSON.stringify(value)); - }, - onCompleteContinuation(code) { - console.info('ACTS_ProcessManage SystemAppA onCompleteContinuation:' + JSON.stringify(code)); - }, - onConfigurationUpdated(configuration) { - console.info('ACTS_ProcessManage SystemAppA onConfigurationUpdated:' + JSON.stringify(configuration)); - } -} \ No newline at end of file diff --git a/aafwk/aafwk_standard/amsprocessmanageapi7/pmsystemappa/src/main/js/resources/base/element/string.json b/aafwk/aafwk_standard/amsprocessmanageapi7/pmsystemappa/src/main/js/resources/base/element/string.json deleted file mode 100644 index fd60cdefa929070f1798c6e36f0502f1e1e219a4..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/amsprocessmanageapi7/pmsystemappa/src/main/js/resources/base/element/string.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "string": [ - { - "name": "app_name", - "value": "particlestartability" - }, - { - "name": "mainability_description", - "value": "JS_Phone_Empty Feature Ability" - } - ] -} \ No newline at end of file diff --git a/aafwk/aafwk_standard/amsprocessmanageapi7/pmsystemappa/src/main/js/resources/base/media/icon.png b/aafwk/aafwk_standard/amsprocessmanageapi7/pmsystemappa/src/main/js/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/aafwk/aafwk_standard/amsprocessmanageapi7/pmsystemappa/src/main/js/resources/base/media/icon.png and /dev/null differ diff --git a/aafwk/aafwk_standard/amsprocessmanageapi7/pmsystemappamulti/BUILD.gn b/aafwk/aafwk_standard/amsprocessmanageapi7/pmsystemappamulti/BUILD.gn deleted file mode 100644 index baff0f4476ee71ed672d77e18dfe2f0c9064cdba..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/amsprocessmanageapi7/pmsystemappamulti/BUILD.gn +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright (C) 2022 Huawei Device Co., Ltd. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -import("//test/xts/tools/build/suite.gni") - -ohos_hap("ActsAmsProcessManageSystemAppAMultiApi7") { - hap_name = "ActsAmsProcessManageSystemAppAMultiApi7" - hap_profile = "./src/main/config.json" - subsystem_name = XTS_SUITENAME - final_hap_path = - "${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap" - testonly = true - deps = [ - ":hjs_demo_js_assets", - ":hjs_demo_resources", - ] - certificate_profile = "./signature/openharmony_sx.p7b" -} -ohos_js_assets("hjs_demo_js_assets") { - source_dir = "./src/main/js/default" -} -ohos_resources("hjs_demo_resources") { - sources = [ "./src/main/js/resources" ] - hap_profile = "./src/main/config.json" -} diff --git a/aafwk/aafwk_standard/amsprocessmanageapi7/pmsystemappamulti/signature/openharmony_sx.p7b b/aafwk/aafwk_standard/amsprocessmanageapi7/pmsystemappamulti/signature/openharmony_sx.p7b deleted file mode 100755 index cc53179a48f88f20acc379c138a001e9a15838f6..0000000000000000000000000000000000000000 Binary files a/aafwk/aafwk_standard/amsprocessmanageapi7/pmsystemappamulti/signature/openharmony_sx.p7b and /dev/null differ diff --git a/aafwk/aafwk_standard/amsprocessmanageapi7/pmsystemappamulti/src/main/config.json b/aafwk/aafwk_standard/amsprocessmanageapi7/pmsystemappamulti/src/main/config.json deleted file mode 100644 index fcc970b486ca7375903bb2b247545043d1d84198..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/amsprocessmanageapi7/pmsystemappamulti/src/main/config.json +++ /dev/null @@ -1,107 +0,0 @@ -{ - "app": { - "bundleName": "com.acts.pmsystemappaapi7", - "vendor": "example", - "version": { - "code": 1, - "name": "1.0" - }, - "apiVersion": { - "compatible": 4, - "target": 5, - "releaseType": "Beta1" - } - }, - "deviceConfig": { - "default": { - "process": "com.acts.pmsystemappamultiapi7" - } - }, - "module": { - "package": "com.acts.pmsystemappamultiapi7", - "name": ".MyApplication", - "deviceType": [ - "phone" - ], - "distro": { - "deliveryWithInstall": true, - "moduleName": "secondEntry", - "moduleType": "feature" - }, - "abilities": [ - { - "skills": [ - { - "entities": [ - "entity.system.home" - ], - "actions": [ - "action.system.home" - ] - } - ], - "name": "com.acts.pmsystemappamultiapi7.MainAbility", - "visible": true, - "icon": "$media:icon", - "description": "$string:mainability_description", - "label": "$string:app_name", - "type": "page", - "launchType": "standard" - } - ], - "reqPermissions": [ - { - "name":"ohos.permission.GET_BUNDLE_INFO_PRIVILEGED", - "reason":"need use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED" - }, - { - "name":"ohos.permission.GET_BUNDLE_INFO", - "reason":"need use ohos.permission.GET_BUNDLE_INFO" - }, - { - "name":"ohos.permission.CHANGE_ABILITY_ENABLED_STATE", - "reason":"need use ohos.permission.CHANGE_ABILITY_ENABLED_STATE" - }, - { - "name":"ohos.permission.REMOVE_CACHE_FILES", - "reason":"need use ohos.permission.REMOVE_CACHE_FILES" - }, - { - "name":"ohos.permission.LISTEN_BUNDLE_CHANGE", - "reason":"need use ohos.permission.LISTEN_BUNDLE_CHANGE" - }, - { - "name":"ohos.permission.INSTALL_BUNDLE", - "reason":"need use ohos.permission.INSTALL_BUNDLE" - }, - { - "name":"ohos.permission.MANAGE_MISSIONS", - "reason":"need use ohos.permission.MANAGE_MISSIONS" - }, - { - "name":"ohos.permission.GET_RUNNING_INFO", - "reason":"need use ohos.permission.GET_RUNNING_INFO" - }, - { - "name":"ohos.permission.CLEAN_BACKGROUND_PROCESSES", - "reason":"need use ohos.permission.CLEAN_BACKGROUND_PROCESSES" - }, - { - "name":"ohos.permission.CLEAN_APPLICATION_DATA", - "reason":"need use ohos.permission.CLEAN_APPLICATION_DATA" - } - ], - "js": [ - { - "pages": [ - "pages/index/index" - ], - "name": "default", - "window": { - "designWidth": 720, - "autoDesignWidth": false - } - } - ] - } -} \ No newline at end of file diff --git a/aafwk/aafwk_standard/amsprocessmanageapi7/pmsystemappamulti/src/main/js/default/app.js b/aafwk/aafwk_standard/amsprocessmanageapi7/pmsystemappamulti/src/main/js/default/app.js deleted file mode 100644 index d2c2487707610d1e26f9cc8953d87e1507c2fcc1..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/amsprocessmanageapi7/pmsystemappamulti/src/main/js/default/app.js +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) 2022 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -export default { - onCreate() { - console.info('ProcessManageSystemAppB onCreate'); - }, - onDestroy() { - console.info('ProcessManageSystemAppB onDestroy'); - }, - onShow() { - console.info('ProcessManageSystemAppB onShow'); - }, - onHide() { - console.info('ProcessManageSystemAppB onHide'); - } -}; diff --git a/aafwk/aafwk_standard/amsprocessmanageapi7/pmsystemappamulti/src/main/js/default/i18n/en-US.json b/aafwk/aafwk_standard/amsprocessmanageapi7/pmsystemappamulti/src/main/js/default/i18n/en-US.json deleted file mode 100644 index e63c70d978a3a53be988388c87182f81785e170c..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/amsprocessmanageapi7/pmsystemappamulti/src/main/js/default/i18n/en-US.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "strings": { - "hello": "Hello", - "world": "World" - } -} \ No newline at end of file diff --git a/aafwk/aafwk_standard/amsprocessmanageapi7/pmsystemappamulti/src/main/js/default/i18n/zh-CN.json b/aafwk/aafwk_standard/amsprocessmanageapi7/pmsystemappamulti/src/main/js/default/i18n/zh-CN.json deleted file mode 100644 index de6ee5748322f44942c1b003319d8e66c837675f..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/amsprocessmanageapi7/pmsystemappamulti/src/main/js/default/i18n/zh-CN.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "strings": { - "hello": "您好", - "world": "世界" - } -} \ No newline at end of file diff --git a/aafwk/aafwk_standard/amsprocessmanageapi7/pmsystemappamulti/src/main/js/default/pages/index/index.css b/aafwk/aafwk_standard/amsprocessmanageapi7/pmsystemappamulti/src/main/js/default/pages/index/index.css deleted file mode 100644 index 6fda792753f2e15f22b529c7b90a82185b2770bf..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/amsprocessmanageapi7/pmsystemappamulti/src/main/js/default/pages/index/index.css +++ /dev/null @@ -1,9 +0,0 @@ -.container { - flex-direction: column; - justify-content: center; - align-items: center; -} - -.title { - font-size: 100px; -} diff --git a/aafwk/aafwk_standard/amsprocessmanageapi7/pmsystemappamulti/src/main/js/default/pages/index/index.hml b/aafwk/aafwk_standard/amsprocessmanageapi7/pmsystemappamulti/src/main/js/default/pages/index/index.hml deleted file mode 100644 index f64b040a5ae394dbaa5e185e1ecd4f4556b92184..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/amsprocessmanageapi7/pmsystemappamulti/src/main/js/default/pages/index/index.hml +++ /dev/null @@ -1,5 +0,0 @@ -
- - {{ $t('strings.hello') }} {{ title }} - -
diff --git a/aafwk/aafwk_standard/amsprocessmanageapi7/pmsystemappamulti/src/main/js/default/pages/index/index.js b/aafwk/aafwk_standard/amsprocessmanageapi7/pmsystemappamulti/src/main/js/default/pages/index/index.js deleted file mode 100644 index 81e9ef77f576f120ceabe3ef0749d5d078569403..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/amsprocessmanageapi7/pmsystemappamulti/src/main/js/default/pages/index/index.js +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright (c) 2022 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import commonEvent from '@ohos.commonevent' - -const injectRef = Object.getPrototypeOf(global) || global -injectRef.regeneratorRuntime = require('@babel/runtime/regenerator') - -var publishEventName = "event_SystemAppAMultiToSystemAppA"; - -function onReceivedPublishCallBack() { - console.log("ACTS_ProcessManage SystemAppAMulti onReceivedPublishCallBack"); -} - -export default { - data: { - title: "" - }, - onInit() { - console.info('ACTS_ProcessManage SystemAppAMulti onInit'); - this.title = "ACTS_ProcessManage SystemAppAMulti"; - }, - onReady() { - console.info('ACTS_ProcessManage SystemAppAMulti onReady'); - commonEvent.publish(publishEventName,onReceivedPublishCallBack); - }, - onActive() { - console.info('ACTS_ProcessManage SystemAppAMulti onActive'); - }, - onShow() { - console.info('ACTS_ProcessManage SystemAppAMulti onShow'); - }, - onInactive() { - console.info('ACTS_ProcessManage SystemAppAMulti onInactive'); - }, - onHide() { - console.info('ACTS_ProcessManage SystemAppAMulti onHide'); - }, - onDestroy() { - console.info('ACTS_ProcessManage SystemAppAMulti onDestroy'); - }, - onBackPress() { - console.info('ACTS_ProcessManage SystemAppAMulti onBackPress'); - }, - onNewRequest() { - console.info('ACTS_ProcessManage SystemAppAMulti onNewRequest'); - }, - onStartContinuation() { - console.info('ACTS_ProcessManage SystemAppAMulti onStartContinuation'); - }, - onSaveData(value) { - console.info('ACTS_ProcessManage SystemAppAMulti onSaveData:' + JSON.stringify(value)); - }, - onRestoreData(value) { - console.info('ACTS_ProcessManage SystemAppAMulti onRestoreData:' + JSON.stringify(value)); - }, - onCompleteContinuation(code) { - console.info('ACTS_ProcessManage SystemAppAMulti onCompleteContinuation:' + JSON.stringify(code)); - }, - onConfigurationUpdated(configuration) { - console.info('ACTS_ProcessManage SystemAppAMulti onConfigurationUpdated:' + JSON.stringify(configuration)); - } -} \ No newline at end of file diff --git a/aafwk/aafwk_standard/amsprocessmanageapi7/pmsystemappamulti/src/main/js/resources/base/element/string.json b/aafwk/aafwk_standard/amsprocessmanageapi7/pmsystemappamulti/src/main/js/resources/base/element/string.json deleted file mode 100644 index fd60cdefa929070f1798c6e36f0502f1e1e219a4..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/amsprocessmanageapi7/pmsystemappamulti/src/main/js/resources/base/element/string.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "string": [ - { - "name": "app_name", - "value": "particlestartability" - }, - { - "name": "mainability_description", - "value": "JS_Phone_Empty Feature Ability" - } - ] -} \ No newline at end of file diff --git a/aafwk/aafwk_standard/amsprocessmanageapi7/pmsystemappamulti/src/main/js/resources/base/media/icon.png b/aafwk/aafwk_standard/amsprocessmanageapi7/pmsystemappamulti/src/main/js/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/aafwk/aafwk_standard/amsprocessmanageapi7/pmsystemappamulti/src/main/js/resources/base/media/icon.png and /dev/null differ diff --git a/aafwk/aafwk_standard/amsprocessmanageapi7/pmsystemappb/BUILD.gn b/aafwk/aafwk_standard/amsprocessmanageapi7/pmsystemappb/BUILD.gn deleted file mode 100644 index 57a162361652284c9116d899171782d5c0baede7..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/amsprocessmanageapi7/pmsystemappb/BUILD.gn +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright (C) 2022 Huawei Device Co., Ltd. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -import("//test/xts/tools/build/suite.gni") - -ohos_hap("ActsAmsProcessManageSystemAppBApi7") { - hap_name = "ActsAmsProcessManageSystemAppBApi7" - hap_profile = "./src/main/config.json" - subsystem_name = XTS_SUITENAME - final_hap_path = - "${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap" - testonly = true - deps = [ - ":hjs_demo_js_assets", - ":hjs_demo_resources", - ] - certificate_profile = "./signature/openharmony_sx.p7b" -} -ohos_js_assets("hjs_demo_js_assets") { - source_dir = "./src/main/js/default" -} -ohos_resources("hjs_demo_resources") { - sources = [ "./src/main/js/resources" ] - hap_profile = "./src/main/config.json" -} diff --git a/aafwk/aafwk_standard/amsprocessmanageapi7/pmsystemappb/signature/openharmony_sx.p7b b/aafwk/aafwk_standard/amsprocessmanageapi7/pmsystemappb/signature/openharmony_sx.p7b deleted file mode 100755 index cc53179a48f88f20acc379c138a001e9a15838f6..0000000000000000000000000000000000000000 Binary files a/aafwk/aafwk_standard/amsprocessmanageapi7/pmsystemappb/signature/openharmony_sx.p7b and /dev/null differ diff --git a/aafwk/aafwk_standard/amsprocessmanageapi7/pmsystemappb/src/main/config.json b/aafwk/aafwk_standard/amsprocessmanageapi7/pmsystemappb/src/main/config.json deleted file mode 100644 index 9cc2e488d8c97b09a51d5cc8939f2fda9784da94..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/amsprocessmanageapi7/pmsystemappb/src/main/config.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "app": { - "bundleName": "com.acts.pmsystemappbapi7", - "vendor": "example", - "version": { - "code": 1, - "name": "1.0" - }, - "apiVersion": { - "compatible": 4, - "target": 5, - "releaseType": "Beta1" - } - }, - "deviceConfig": {}, - "module": { - "package": "com.acts.pmsystemappbapi7", - "name": ".MyApplication", - "deviceType": [ - "phone" - ], - "distro": { - "deliveryWithInstall": true, - "moduleName": "entry", - "moduleType": "entry" - }, - "abilities": [ - { - "skills": [ - { - "entities": [ - "entity.system.home" - ], - "actions": [ - "action.system.home" - ] - } - ], - "name": "com.acts.pmsystemappbapi7.MainAbility", - "visible": true, - "icon": "$media:icon", - "description": "$string:mainability_description", - "label": "$string:app_name", - "type": "page", - "launchType": "standard" - } - ], - "reqPermissions": [ - { - "name":"ohos.permission.GET_BUNDLE_INFO_PRIVILEGED", - "reason":"need use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED" - }, - { - "name":"ohos.permission.GET_BUNDLE_INFO", - "reason":"need use ohos.permission.GET_BUNDLE_INFO" - }, - { - "name":"ohos.permission.CHANGE_ABILITY_ENABLED_STATE", - "reason":"need use ohos.permission.CHANGE_ABILITY_ENABLED_STATE" - }, - { - "name":"ohos.permission.REMOVE_CACHE_FILES", - "reason":"need use ohos.permission.REMOVE_CACHE_FILES" - }, - { - "name":"ohos.permission.LISTEN_BUNDLE_CHANGE", - "reason":"need use ohos.permission.LISTEN_BUNDLE_CHANGE" - }, - { - "name":"ohos.permission.INSTALL_BUNDLE", - "reason":"need use ohos.permission.INSTALL_BUNDLE" - } - ], - "js": [ - { - "pages": [ - "pages/index/index" - ], - "name": "default", - "window": { - "designWidth": 720, - "autoDesignWidth": false - } - } - ] - } -} \ No newline at end of file diff --git a/aafwk/aafwk_standard/amsprocessmanageapi7/pmsystemappb/src/main/js/default/app.js b/aafwk/aafwk_standard/amsprocessmanageapi7/pmsystemappb/src/main/js/default/app.js deleted file mode 100644 index d2c2487707610d1e26f9cc8953d87e1507c2fcc1..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/amsprocessmanageapi7/pmsystemappb/src/main/js/default/app.js +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) 2022 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -export default { - onCreate() { - console.info('ProcessManageSystemAppB onCreate'); - }, - onDestroy() { - console.info('ProcessManageSystemAppB onDestroy'); - }, - onShow() { - console.info('ProcessManageSystemAppB onShow'); - }, - onHide() { - console.info('ProcessManageSystemAppB onHide'); - } -}; diff --git a/aafwk/aafwk_standard/amsprocessmanageapi7/pmsystemappb/src/main/js/default/i18n/en-US.json b/aafwk/aafwk_standard/amsprocessmanageapi7/pmsystemappb/src/main/js/default/i18n/en-US.json deleted file mode 100644 index e63c70d978a3a53be988388c87182f81785e170c..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/amsprocessmanageapi7/pmsystemappb/src/main/js/default/i18n/en-US.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "strings": { - "hello": "Hello", - "world": "World" - } -} \ No newline at end of file diff --git a/aafwk/aafwk_standard/amsprocessmanageapi7/pmsystemappb/src/main/js/default/i18n/zh-CN.json b/aafwk/aafwk_standard/amsprocessmanageapi7/pmsystemappb/src/main/js/default/i18n/zh-CN.json deleted file mode 100644 index de6ee5748322f44942c1b003319d8e66c837675f..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/amsprocessmanageapi7/pmsystemappb/src/main/js/default/i18n/zh-CN.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "strings": { - "hello": "您好", - "world": "世界" - } -} \ No newline at end of file diff --git a/aafwk/aafwk_standard/amsprocessmanageapi7/pmsystemappb/src/main/js/default/pages/index/index.css b/aafwk/aafwk_standard/amsprocessmanageapi7/pmsystemappb/src/main/js/default/pages/index/index.css deleted file mode 100644 index 6fda792753f2e15f22b529c7b90a82185b2770bf..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/amsprocessmanageapi7/pmsystemappb/src/main/js/default/pages/index/index.css +++ /dev/null @@ -1,9 +0,0 @@ -.container { - flex-direction: column; - justify-content: center; - align-items: center; -} - -.title { - font-size: 100px; -} diff --git a/aafwk/aafwk_standard/amsprocessmanageapi7/pmsystemappb/src/main/js/default/pages/index/index.hml b/aafwk/aafwk_standard/amsprocessmanageapi7/pmsystemappb/src/main/js/default/pages/index/index.hml deleted file mode 100644 index f64b040a5ae394dbaa5e185e1ecd4f4556b92184..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/amsprocessmanageapi7/pmsystemappb/src/main/js/default/pages/index/index.hml +++ /dev/null @@ -1,5 +0,0 @@ -
- - {{ $t('strings.hello') }} {{ title }} - -
diff --git a/aafwk/aafwk_standard/amsprocessmanageapi7/pmsystemappb/src/main/js/default/pages/index/index.js b/aafwk/aafwk_standard/amsprocessmanageapi7/pmsystemappb/src/main/js/default/pages/index/index.js deleted file mode 100644 index e5a9840f023e19fda7eb3aefcc5997675a289b3a..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/amsprocessmanageapi7/pmsystemappb/src/main/js/default/pages/index/index.js +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright (c) 2022 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import commonEvent from '@ohos.commonevent' - -const injectRef = Object.getPrototypeOf(global) || global -injectRef.regeneratorRuntime = require('@babel/runtime/regenerator') - -var publishEventName = "event_SystemAppBToSystemAppA"; - -function onReceivedPublishCallBack() { - console.log("ACTS_ProcessManage SystemAppB onReceivedPublishCallBack"); -} - -export default { - data: { - title: "" - }, - onInit() { - console.info('ACTS_ProcessManage SystemAppB onInit'); - this.title = "ACTS_ProcessManage SystemAppB"; - }, - onReady() { - console.info('ACTS_ProcessManage SystemAppB onReady'); - commonEvent.publish(publishEventName,onReceivedPublishCallBack); - }, - onActive() { - console.info('ACTS_ProcessManage SystemAppB onActive'); - }, - onShow() { - console.info('ACTS_ProcessManage SystemAppB onShow'); - }, - onInactive() { - console.info('ACTS_ProcessManage SystemAppB onInactive'); - }, - onHide() { - console.info('ACTS_ProcessManage SystemAppB onHide'); - }, - onDestroy() { - console.info('ACTS_ProcessManage SystemAppB onDestroy'); - }, - onBackPress() { - console.info('ACTS_ProcessManage SystemAppB onBackPress'); - }, - onNewRequest() { - console.info('ACTS_ProcessManage SystemAppB onNewRequest'); - }, - onStartContinuation() { - console.info('ACTS_ProcessManage SystemAppB onStartContinuation'); - }, - onSaveData(value) { - console.info('ACTS_ProcessManage SystemAppB onSaveData:' + JSON.stringify(value)); - }, - onRestoreData(value) { - console.info('ACTS_ProcessManage SystemAppB onRestoreData:' + JSON.stringify(value)); - }, - onCompleteContinuation(code) { - console.info('ACTS_ProcessManage SystemAppB onCompleteContinuation:' + JSON.stringify(code)); - }, - onConfigurationUpdated(configuration) { - console.info('ACTS_ProcessManage SystemAppB onConfigurationUpdated:' + JSON.stringify(configuration)); - } -} \ No newline at end of file diff --git a/aafwk/aafwk_standard/amsprocessmanageapi7/pmsystemappb/src/main/js/resources/base/element/string.json b/aafwk/aafwk_standard/amsprocessmanageapi7/pmsystemappb/src/main/js/resources/base/element/string.json deleted file mode 100644 index fd60cdefa929070f1798c6e36f0502f1e1e219a4..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/amsprocessmanageapi7/pmsystemappb/src/main/js/resources/base/element/string.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "string": [ - { - "name": "app_name", - "value": "particlestartability" - }, - { - "name": "mainability_description", - "value": "JS_Phone_Empty Feature Ability" - } - ] -} \ No newline at end of file diff --git a/aafwk/aafwk_standard/amsprocessmanageapi7/pmsystemappb/src/main/js/resources/base/media/icon.png b/aafwk/aafwk_standard/amsprocessmanageapi7/pmsystemappb/src/main/js/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/aafwk/aafwk_standard/amsprocessmanageapi7/pmsystemappb/src/main/js/resources/base/media/icon.png and /dev/null differ diff --git a/aafwk/aafwk_standard/amsprocessmanageapi7/pmvendorappa/BUILD.gn b/aafwk/aafwk_standard/amsprocessmanageapi7/pmvendorappa/BUILD.gn deleted file mode 100644 index f6380cdaba2d450f71745fc2aeb9a08816a8f78b..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/amsprocessmanageapi7/pmvendorappa/BUILD.gn +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright (C) 2022 Huawei Device Co., Ltd. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -import("//test/xts/tools/build/suite.gni") - -ohos_hap("ActsAmsProcessManageVendorAppAApi7") { - hap_name = "ActsAmsProcessManageVendorAppAApi7" - hap_profile = "./src/main/config.json" - subsystem_name = XTS_SUITENAME - final_hap_path = - "${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap" - testonly = true - deps = [ - ":hjs_demo_js_assets", - ":hjs_demo_resources", - ] - certificate_profile = "./signature/openharmony_sx.p7b" -} -ohos_js_assets("hjs_demo_js_assets") { - source_dir = "./src/main/js/default" -} -ohos_resources("hjs_demo_resources") { - sources = [ "./src/main/js/resources" ] - hap_profile = "./src/main/config.json" -} diff --git a/aafwk/aafwk_standard/amsprocessmanageapi7/pmvendorappa/signature/openharmony_sx.p7b b/aafwk/aafwk_standard/amsprocessmanageapi7/pmvendorappa/signature/openharmony_sx.p7b deleted file mode 100755 index f06e218defa7f707e22a3890903c574e1c498217..0000000000000000000000000000000000000000 Binary files a/aafwk/aafwk_standard/amsprocessmanageapi7/pmvendorappa/signature/openharmony_sx.p7b and /dev/null differ diff --git a/aafwk/aafwk_standard/amsprocessmanageapi7/pmvendorappa/src/main/config.json b/aafwk/aafwk_standard/amsprocessmanageapi7/pmvendorappa/src/main/config.json deleted file mode 100644 index 38a8588558fc0b664a90d8a23d9386d87b1d9f93..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/amsprocessmanageapi7/pmvendorappa/src/main/config.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "app": { - "bundleName": "com.acts.pmvendorappaapi7", - "vendor": "example", - "version": { - "code": 1, - "name": "1.0" - }, - "apiVersion": { - "compatible": 4, - "target": 5, - "releaseType": "Beta1" - } - }, - "deviceConfig": {}, - "module": { - "package": "com.acts.pmvendorappaapi7", - "name": ".MyApplication", - "deviceType": [ - "phone" - ], - "distro": { - "deliveryWithInstall": true, - "moduleName": "entry", - "moduleType": "entry" - }, - "abilities": [ - { - "skills": [ - { - "entities": [ - "entity.system.home" - ], - "actions": [ - "action.system.home" - ] - } - ], - "name": "com.acts.pmvendorappaapi7.MainAbility", - "visible": true, - "icon": "$media:icon", - "description": "$string:mainability_description", - "label": "$string:app_name", - "type": "page", - "launchType": "standard" - } - ], - "js": [ - { - "pages": [ - "pages/index/index" - ], - "name": "default", - "window": { - "designWidth": 720, - "autoDesignWidth": false - } - } - ] - } -} \ No newline at end of file diff --git a/aafwk/aafwk_standard/amsprocessmanageapi7/pmvendorappa/src/main/js/default/app.js b/aafwk/aafwk_standard/amsprocessmanageapi7/pmvendorappa/src/main/js/default/app.js deleted file mode 100644 index eee95cf27e3646d1a6e1515dc25b02c33c4df071..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/amsprocessmanageapi7/pmvendorappa/src/main/js/default/app.js +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) 2022 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -export default { - onCreate() { - console.info('ProcessManageVendorAppA onCreate'); - }, - onDestroy() { - console.info('ProcessManageVendorAppA onDestroy'); - }, - onShow() { - console.info('ProcessManageVendorAppA onShow'); - }, - onHide() { - console.info('ProcessManageVendorAppA onHide'); - } -}; diff --git a/aafwk/aafwk_standard/amsprocessmanageapi7/pmvendorappa/src/main/js/default/i18n/en-US.json b/aafwk/aafwk_standard/amsprocessmanageapi7/pmvendorappa/src/main/js/default/i18n/en-US.json deleted file mode 100644 index e63c70d978a3a53be988388c87182f81785e170c..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/amsprocessmanageapi7/pmvendorappa/src/main/js/default/i18n/en-US.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "strings": { - "hello": "Hello", - "world": "World" - } -} \ No newline at end of file diff --git a/aafwk/aafwk_standard/amsprocessmanageapi7/pmvendorappa/src/main/js/default/i18n/zh-CN.json b/aafwk/aafwk_standard/amsprocessmanageapi7/pmvendorappa/src/main/js/default/i18n/zh-CN.json deleted file mode 100644 index de6ee5748322f44942c1b003319d8e66c837675f..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/amsprocessmanageapi7/pmvendorappa/src/main/js/default/i18n/zh-CN.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "strings": { - "hello": "您好", - "world": "世界" - } -} \ No newline at end of file diff --git a/aafwk/aafwk_standard/amsprocessmanageapi7/pmvendorappa/src/main/js/default/pages/index/index.css b/aafwk/aafwk_standard/amsprocessmanageapi7/pmvendorappa/src/main/js/default/pages/index/index.css deleted file mode 100644 index 6fda792753f2e15f22b529c7b90a82185b2770bf..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/amsprocessmanageapi7/pmvendorappa/src/main/js/default/pages/index/index.css +++ /dev/null @@ -1,9 +0,0 @@ -.container { - flex-direction: column; - justify-content: center; - align-items: center; -} - -.title { - font-size: 100px; -} diff --git a/aafwk/aafwk_standard/amsprocessmanageapi7/pmvendorappa/src/main/js/default/pages/index/index.hml b/aafwk/aafwk_standard/amsprocessmanageapi7/pmvendorappa/src/main/js/default/pages/index/index.hml deleted file mode 100644 index f64b040a5ae394dbaa5e185e1ecd4f4556b92184..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/amsprocessmanageapi7/pmvendorappa/src/main/js/default/pages/index/index.hml +++ /dev/null @@ -1,5 +0,0 @@ -
- - {{ $t('strings.hello') }} {{ title }} - -
diff --git a/aafwk/aafwk_standard/amsprocessmanageapi7/pmvendorappa/src/main/js/default/pages/index/index.js b/aafwk/aafwk_standard/amsprocessmanageapi7/pmvendorappa/src/main/js/default/pages/index/index.js deleted file mode 100644 index bd639822c89178ead737f337dfe22d2329955343..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/amsprocessmanageapi7/pmvendorappa/src/main/js/default/pages/index/index.js +++ /dev/null @@ -1,107 +0,0 @@ -/* - * Copyright (c) 2022 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import commonEvent from '@ohos.commonevent' -import abilityManager from '@ohos.application.appManager' -import featureAbility from '@ohos.ability.featureability' - -const injectRef = Object.getPrototypeOf(global) || global -injectRef.regeneratorRuntime = require('@babel/runtime/regenerator') - -var publishEventName = "event_VendorAppAToSystemAppA"; -var publishEventNameVendor = "event_from_ProcessManage_VendorAppA"; -var testAction; -var testTarget; - -function onReceivedPublishCallBack() { - console.log("ACTS_ProcessManage VendorAppA onReceivedPublishCallBack"); -} - -function onReceivedHandleCallback(err, data) { - console.log("ACTS_ProcessManage VendorAppA onReceivedHandleCallback JSON.stringify data:" - + JSON.stringify(data)); - console.log("ACTS_ProcessManage VendorAppA onReceivedHandleCallback data:" - + data); - console.log("ACTS_ProcessManage VendorAppA onReceivedHandleCallback err:" - + err); - commonEvent.publish(publishEventNameVendor,onReceivedPublishCallBack); -} - -export default { - data: { - title: "" - }, - onInit() { - console.info('ACTS_ProcessManage VendorAppA onInit'); - this.title = "ACTS_ProcessManage VendorAppA"; - }, - async onReady() { - console.info('ACTS_ProcessManage VendorAppA onReady'); - var abilityWant = await featureAbility.getWant(); - console.log("ACTS_ProcessManage VendorAppA onShow abilityWant:" - + JSON.stringify(abilityWant)); - testAction = abilityWant.action; - console.log("ACTS_ProcessManage VendorAppA onShow testAction:" + testAction); - testTarget = abilityWant.parameters.testTarget; - console.log("ACTS_ProcessManage VendorAppA onShow testTarget:" + testTarget); - if (testAction == 'thirdpartykill') { - console.log("ACTS_ProcessManage VendorAppA onForeground testAction:" + testAction); - appManager.killProcessesByBundleName(testTarget, onReceivedHandleCallback); - } - if (testAction == 'thirdpartyclear') { - console.log("ACTS_ProcessManage VendorAppA onForeground testAction:" + testAction); - appManager.clearUpApplicationData(testTarget, onReceivedHandleCallback); - } - else{ - commonEvent.publish(publishEventName, onReceivedPublishCallBack); - } - - }, - onActive() { - console.info('ACTS_ProcessManage VendorAppA onActive'); - }, - onShow() { - console.info('ACTS_ProcessManage VendorAppA onShow'); - }, - onInactive() { - console.info('ACTS_ProcessManage VendorAppA onInactive'); - }, - onHide() { - console.info('ACTS_ProcessManage VendorAppA onHide'); - }, - onDestroy() { - console.info('ACTS_ProcessManage VendorAppA onDestroy'); - }, - onBackPress() { - console.info('ACTS_ProcessManage VendorAppA onBackPress'); - }, - onNewRequest() { - console.info('ACTS_ProcessManage VendorAppA onNewRequest'); - }, - onStartContinuation() { - console.info('ACTS_ProcessManage VendorAppA onStartContinuation'); - }, - onSaveData(value) { - console.info('ACTS_ProcessManage VendorAppA onSaveData:' + JSON.stringify(value)); - }, - onRestoreData(value) { - console.info('ACTS_ProcessManage VendorAppA onRestoreData:' + JSON.stringify(value)); - }, - onCompleteContinuation(code) { - console.info('ACTS_ProcessManage VendorAppA onCompleteContinuation:' + JSON.stringify(code)); - }, - onConfigurationUpdated(configuration) { - console.info('ACTS_ProcessManage VendorAppA onConfigurationUpdated:' + JSON.stringify(configuration)); - } -} diff --git a/aafwk/aafwk_standard/amsprocessmanageapi7/pmvendorappa/src/main/js/resources/base/element/string.json b/aafwk/aafwk_standard/amsprocessmanageapi7/pmvendorappa/src/main/js/resources/base/element/string.json deleted file mode 100644 index fd60cdefa929070f1798c6e36f0502f1e1e219a4..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/amsprocessmanageapi7/pmvendorappa/src/main/js/resources/base/element/string.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "string": [ - { - "name": "app_name", - "value": "particlestartability" - }, - { - "name": "mainability_description", - "value": "JS_Phone_Empty Feature Ability" - } - ] -} \ No newline at end of file diff --git a/aafwk/aafwk_standard/amsprocessmanageapi7/pmvendorappa/src/main/js/resources/base/media/icon.png b/aafwk/aafwk_standard/amsprocessmanageapi7/pmvendorappa/src/main/js/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/aafwk/aafwk_standard/amsprocessmanageapi7/pmvendorappa/src/main/js/resources/base/media/icon.png and /dev/null differ diff --git a/aafwk/aafwk_standard/fa/BUILD.gn b/aafwk/aafwk_standard/fa/BUILD.gn index 0349da2af1178fe3b5c4a461df27feef72744365..daef990a9b2ab2f3c49770000d3b6cc49580220e 100644 --- a/aafwk/aafwk_standard/fa/BUILD.gn +++ b/aafwk/aafwk_standard/fa/BUILD.gn @@ -28,7 +28,6 @@ group("fa") { "fa_missionmanager_test:FaMissionmanagerTest", "fa_movemissiontofront_test:FaMissionmanagerTest", "fa_state_test:FaStateTest", - "fa_statelistener_test:FaStatelistenerTest", "fa_sumstate_test:FaSumstateTest", "fa_taskmanager_test:FaTaskmanagerTest", "fa_taskswiting_test:FaTaskswitingTest", diff --git a/aafwk/aafwk_standard/fa/fa_applicationinfo_test/entry/src/main/js/MainAbility2/app.js b/aafwk/aafwk_standard/fa/fa_applicationinfo_test/entry/src/main/js/MainAbility2/app.js index cf0139056919f64d06efba9efcbe7fb09ca745e1..579f3f01e755b2168e7f4acdcf3b0c66cdfe76b1 100644 --- a/aafwk/aafwk_standard/fa/fa_applicationinfo_test/entry/src/main/js/MainAbility2/app.js +++ b/aafwk/aafwk_standard/fa/fa_applicationinfo_test/entry/src/main/js/MainAbility2/app.js @@ -13,36 +13,10 @@ * limitations under the License. */ -import featureAbility from '@ohos.ability.featureability' -import commonEvent from '@ohos.commonevent' export default { onCreate() { console.info("Application onCreate"); - - featureAbility.getWant((err,data) =>{ - console.log("---data: " +JSON.stringify(data) ) - console.log("---uri: " + data.uri) - if(data.uri != ""){ - console.log("want.uri" + JSON.stringify(data.uri)); - commonEvent.publish("uri", { - parameters:{ - uri: data.uri - } - }, () => { - console.log("MainAbility2 Publish CallBack data.uri") - }); - }else if(data.type != ""){ - console.log("want.type" + JSON.stringify(data.type)); - commonEvent.publish("type", { - parameters:{ - type: data.type - } - }, () => { - console.log("MainAbility2 Publish CallBack data.type") - }); - } - }) }, onDestroy() { diff --git a/aafwk/aafwk_standard/fa/fa_coverapi_test/entry/src/main/js/test/coverApiTest.js b/aafwk/aafwk_standard/fa/fa_coverapi_test/entry/src/main/js/test/coverApiTest.js index 651ba17f22c3b183d9bafef7a77263ce74914356..407553a7099059ac95855ea645def98ae3c4f4ea 100755 --- a/aafwk/aafwk_standard/fa/fa_coverapi_test/entry/src/main/js/test/coverApiTest.js +++ b/aafwk/aafwk_standard/fa/fa_coverapi_test/entry/src/main/js/test/coverApiTest.js @@ -45,80 +45,4 @@ describe('CoverApiTest', function () { done(); }) }); - - /* - * @tc.number SUB_AA_OpenHarmony_CoverApi_0700 - * @tc.name Verify that the data of nonexistent apps is cleared - * @tc.desc Function test - * @tc.level 0 - */ - it('SUB_AA_OpenHarmony_CoverApi_0700', 0, async function (done) { - console.log("SUB_AA_OpenHarmony_CoverApi_0700 --- start"); - appManager.clearUpApplicationData('com.example.coverapi') - .then((data) => { - console.info('SUB_AA_OpenHarmony_CoverApi_0700 successful. data: ' + JSON.stringify(data)); - expect(data == 0).assertTrue(); - done(); - }).catch((error) => { - console.error('SUB_AA_OpenHarmony_CoverApi_0700 failed. error: ' + JSON.stringify(error)); - expect().assertFalse(); - done(); - }) - }) - - /** - * @tc.number: SUB_AA_OpenHarmony_CoverApi_0500 - * @tc.name: wantConstant : Check specific enum - * @tc.desc: Check the return type of the interface (by Promise) - */ - it('SUB_AA_OpenHarmony_CoverApi_0800', 0, async function (done) { - console.log("SUB_AA_OpenHarmony_CoverApi_0800 --- start"); - - var Subscriber; - let id; - - function SubscribeCallBack(err, data) { - console.debug("SUB_AA_OpenHarmony_CoverApi_0800====>Subscribe CallBack data:====>" + JSON.stringify(data)); - expect(data.event == 'mainAbilityOnConfigurationUpdated').assertTrue(); - if (data.event == 'mainAbility_onConfigurationUpdated') { - clearTimeout(id); - commonEvent.unsubscribe(Subscriber, UnSubscribeCallback); - done(); - } - } - - commonEvent.createSubscriber(subscriberInfoMainAbility).then(async (data) => { - console.debug("SUB_AA_OpenHarmony_CoverApi_0800====>Create Subscriber====>"); - Subscriber = data; - await commonEvent.subscribe(Subscriber, SubscribeCallBack); - }) - - - function UnSubscribeCallback() { - console.debug("SUB_AA_OpenHarmony_CoverApi_0800====>UnSubscribe CallBack====>"); - done(); - } - - function timeout() { - expect().assertFail(); - console.debug('SUB_AA_OpenHarmony_CoverApi_0800 - timeout'); - commonEvent.unsubscribe(Subscriber, UnSubscribeCallback) - done(); - } - - id = setTimeout(timeout, START_ABILITY_TIMEOUT); - - var Configuration = { language: "en" }; - abilityManager.updateConfiguration(Configuration) - .then((data) => { - console.log("SUB_AA_OpenHarmony_CoverApi_0800 --- updateConfiguration " + JSON.stringify(data)); - done(); - }).catch((error) => { - console.error('SUB_AA_OpenHarmony_CoverApi_0800 failed. error: ' + JSON.stringify(error)); - done(); - }) - - console.log("SUB_AA_OpenHarmony_CoverApi_0800 --- end"); - }) - }) diff --git a/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/entry/src/main/js/test/AbilityDisableTest.js b/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/entry/src/main/js/test/AbilityDisableTest.js index a3b8feb2362839068843371b236bd0df1142d753..a2e34e5609739909a2629394c92003749505a1a7 100755 --- a/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/entry/src/main/js/test/AbilityDisableTest.js +++ b/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/entry/src/main/js/test/AbilityDisableTest.js @@ -93,40 +93,4 @@ describe('AbilityDisableTests', function () { }) done(); }); - - /* - * @tc.number SUB_AA_OpenHarmony_EqueryAbilityByWant_0300 - * @tc.name Call AbilityStateData to get abilityType - * @tc.desc Function test - * @tc.level 0 - */ - it("SUB_AA_OpenHarmony_EqueryAbilityByWant_0400", 0, async function (done) { - console.log("------------start SUB_AA_OpenHarmony_EqueryAbilityByWant_0400-------------"); - var registerId = appManager.registerApplicationStateObserver({ - onForegroundApplicationChanged: (data) => { - console.log("SUB_onForegroundApplicationChanged") - }, - onAbilityStateChanged: (data) => { - console.log("SUB_onAbilityStateChanged") - }, - onProcessCreated: (data) => { - console.log("SUB_onProcessCreated") - }, - onProcessDied: (data) => { - console.log("SUB_onProcessDied") - } - }) - console.log('SUB_AA_OpenHarmony_EqueryAbilityByWant_0400 registerId : ' + JSON.stringify(registerId)); - console.log('SUB_AA_OpenHarmony_EqueryAbilityByWant_0400 registerId : ' + typeof registerId); - expect(typeof(registerId) == "number").assertTrue(); - - await appManager.unregisterApplicationStateObserver(parseInt(registerId), async(err, data) => { - console.log("SUB_AA_OpenHarmony_StateListener_0200 err1:" - + JSON.stringify(err) + ",data: " + JSON.stringify(data)); - expect(err["code"] == "1").assertTrue(); - }) - done(); - }) - - }) \ No newline at end of file diff --git a/aafwk/aafwk_standard/fa/fa_statelistener_test/BUILD.gn b/aafwk/aafwk_standard/fa/fa_statelistener_test/BUILD.gn deleted file mode 100755 index 375c2ea880891f7501b34077a5c9d8ce209a19bf..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/fa/fa_statelistener_test/BUILD.gn +++ /dev/null @@ -1,31 +0,0 @@ -# Copyright (c) 2020-2021 Huawei Device Co., Ltd. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import("//test/xts/tools/build/suite.gni") - -ohos_js_hap_suite("FaStatelistenerTest") { - hap_profile = "./entry/src/main/config.json" - deps = [ - ":fa_statelistener_test_assets", - ":fa_statelistener_test_resources", - ] - certificate_profile = "./signature/openharmony_sx.p7b" - hap_name = "FaStatelistenerTest" -} -ohos_js_assets("fa_statelistener_test_assets") { - source_dir = "./entry/src/main/js/MainAbility" -} -ohos_resources("fa_statelistener_test_resources") { - sources = [ "./entry/src/main/resources" ] - hap_profile = "./entry/src/main/config.json" -} diff --git a/aafwk/aafwk_standard/fa/fa_statelistener_test/Test.json b/aafwk/aafwk_standard/fa/fa_statelistener_test/Test.json deleted file mode 100755 index 776b88009d046d24c37fefce8a86504d1b68d5d2..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/fa/fa_statelistener_test/Test.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "description" : "Configuration for hjunit demo Test", - "driver": { - "type" : "JSUnitTest", - "test-timeout": "180000", - "package": "com.example.actsabilitydistributetest", - "shell-timeout": "600000" - }, - "kits": [ - { - "test-file-name": [ - "ActsAbilityDistributeTest.hap" - ], - "type": "AppInstallKit", - "cleanup-apps": true - } - ] -} \ No newline at end of file diff --git a/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/config.json b/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/config.json deleted file mode 100755 index f357e08369537704ca0b7d7b007ddbde42151dd7..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/config.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "app": { - "bundleName": "com.example.fenxdy", - "vendor": "example", - "version": { - "code": 1000000, - "name": "1.0.0" - } - }, - "deviceConfig": {}, - "module": { - "package": "com.example.fenxdy", - "name": ".MyApplication", - "mainAbility": ".MainAbility", - "srcPath": "", - "deviceType": [ - "phone" - ], - "distro": { - "deliveryWithInstall": true, - "moduleName": "entry", - "moduleType": "entry", - "installationFree": false - }, - "abilities": [ - { - "skills": [ - { - "entities": [ - "entity.system.home" - ], - "actions": [ - "action.system.home" - ] - } - ], - "orientation": "unspecified", - "visible": true, - "srcPath": "MainAbility", - "name": ".MainAbility", - "srcLanguage": "js", - "icon": "$media:icon", - "description": "$string:description_mainability", - "formsEnabled": false, - "label": "$string:entry_MainAbility", - "type": "page", - "launchType": "standard" - }, - { - "orientation": "unspecified", - "srcPath": "MainAbility2", - "name": ".MainAbility2", - "srcLanguage": "js", - "icon": "$media:icon", - "description": "$string:description_mainability2", - "formsEnabled": false, - "label": "$string:entry_MainAbility2", - "type": "page", - "launchType": "standard" - } - ], - "js": [ - { - "pages": [ - "pages/index/index", - "pages/second/second" - ], - "name": ".MainAbility", - "window": { - "designWidth": 720, - "autoDesignWidth": false - } - }, - { - "pages": [ - "pages/index/index", - "pages/second/second" - ], - "name": ".MainAbility2", - "window": { - "designWidth": 720, - "autoDesignWidth": false - } - } - ] - } -} \ No newline at end of file diff --git a/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/MainAbility/app.js b/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/MainAbility/app.js deleted file mode 100755 index 50449ecbed6d3b8099f6f9a1fb66e29bbe2177f0..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/MainAbility/app.js +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright (c) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -export default { - onCreate() { - console.info("Application onCreate"); - }, - onDestroy() { - console.info("Application onDestroy"); - } -}; diff --git a/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/MainAbility/i18n/en-US.json b/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/MainAbility/i18n/en-US.json deleted file mode 100755 index 08e34eac912bf2651eefc20e26aa479b5e4e7ec2..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/MainAbility/i18n/en-US.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "strings": { - "hello": "Hello", - "world": "World", - "page": "Second Page", - "next": "Next Page", - "back": "Back" - }, - "Files": { - } -} \ No newline at end of file diff --git a/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/MainAbility/i18n/zh-CN.json b/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/MainAbility/i18n/zh-CN.json deleted file mode 100755 index 3dd53b3a8b808aec9396fa663cb00ef22ba61e0a..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/MainAbility/i18n/zh-CN.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "strings": { - "hello": "您好", - "world": "世界", - "page": "第二页", - "next": "下一页", - "back": "返回" - }, - "Files": { - } -} \ No newline at end of file diff --git a/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/MainAbility/pages/index/index.css b/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/MainAbility/pages/index/index.css deleted file mode 100755 index 737096ca1070d46824d8173dd029de7e4144f3a9..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/MainAbility/pages/index/index.css +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -.container { - display: flex; - flex-direction: column; - justify-content: center; - align-items: center; - left: 0px; - top: 0px; - width: 100%; - height: 100%; -} - -.title { - font-size: 60px; - text-align: center; - width: 100%; - height: 40%; - margin: 10px; -} - -.btn { - width: 50%; - height: 100px; - font-size: 40px; -} diff --git a/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/MainAbility/pages/index/index.hml b/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/MainAbility/pages/index/index.hml deleted file mode 100755 index fef38727f28b302a53d80ce8d1b7c4209cc26a71..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/MainAbility/pages/index/index.hml +++ /dev/null @@ -1,20 +0,0 @@ - -
- - {{ $t('strings.hello') }} {{ title }} {{text}} - - -
diff --git a/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/MainAbility/pages/index/index.js b/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/MainAbility/pages/index/index.js deleted file mode 100755 index 07ee10a61013a37c5b958e851fd7b73c722b6b9d..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/MainAbility/pages/index/index.js +++ /dev/null @@ -1,47 +0,0 @@ - -/* - * Copyright (c) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import router from '@system.router' -import {Core} from 'deccjsunit/index' -export default { - data: { - title: "", - text: "" - }, - onInit() { - this.title = this.$t('strings.world'); - this.text = "Nobody" - }, - onclick: function () { - router.replace({ - uri: "pages/second/second" - }) - }, - onShow() { - console.info('onShow finish') - const core = Core.getInstance() - core.init() - const configService = core.getDefaultService('config') - configService.setConfig(this) - require('../../../test/List.test') - core.execute() - } - - - -} - - - diff --git a/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/MainAbility/pages/second/second.css b/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/MainAbility/pages/second/second.css deleted file mode 100755 index abfc3a081ba2cdc2042d396f82c74dd03f2434e4..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/MainAbility/pages/second/second.css +++ /dev/null @@ -1,39 +0,0 @@ - -/* - * Copyright (c) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -.container { - display: flex; - flex-direction: column; - justify-content: center; - align-items: center; - left: 0px; - top: 0px; - width: 100%; - height: 100%; -} - -.title { - font-size: 60px; - text-align: center; - width: 100%; - height: 40%; - margin: 10px; -} - -.btn { - width: 50%; - height: 100px; - font-size: 40px; -} diff --git a/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/MainAbility/pages/second/second.hml b/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/MainAbility/pages/second/second.hml deleted file mode 100755 index 4503365d59184ec671bb489b6c2b64134daf0849..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/MainAbility/pages/second/second.hml +++ /dev/null @@ -1,20 +0,0 @@ - -
- - {{ $t('strings.page') }} - - -
diff --git a/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/MainAbility/pages/second/second.js b/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/MainAbility/pages/second/second.js deleted file mode 100755 index 55c229adf9b349ff9a374f8d91be5b5b31d7c6aa..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/MainAbility/pages/second/second.js +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (c) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import router from '@system.router' - -export default { - data: { - title: 'World' - }, - onclick: function () { - router.replace({ - uri: "pages/index/index" - }) - } -} diff --git a/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/MainAbility2/app.js b/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/MainAbility2/app.js deleted file mode 100755 index 50449ecbed6d3b8099f6f9a1fb66e29bbe2177f0..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/MainAbility2/app.js +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright (c) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -export default { - onCreate() { - console.info("Application onCreate"); - }, - onDestroy() { - console.info("Application onDestroy"); - } -}; diff --git a/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/MainAbility2/i18n/en-US.json b/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/MainAbility2/i18n/en-US.json deleted file mode 100755 index 08e34eac912bf2651eefc20e26aa479b5e4e7ec2..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/MainAbility2/i18n/en-US.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "strings": { - "hello": "Hello", - "world": "World", - "page": "Second Page", - "next": "Next Page", - "back": "Back" - }, - "Files": { - } -} \ No newline at end of file diff --git a/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/MainAbility2/i18n/zh-CN.json b/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/MainAbility2/i18n/zh-CN.json deleted file mode 100755 index 3dd53b3a8b808aec9396fa663cb00ef22ba61e0a..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/MainAbility2/i18n/zh-CN.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "strings": { - "hello": "您好", - "world": "世界", - "page": "第二页", - "next": "下一页", - "back": "返回" - }, - "Files": { - } -} \ No newline at end of file diff --git a/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/MainAbility2/pages/index/index.css b/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/MainAbility2/pages/index/index.css deleted file mode 100755 index abfc3a081ba2cdc2042d396f82c74dd03f2434e4..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/MainAbility2/pages/index/index.css +++ /dev/null @@ -1,39 +0,0 @@ - -/* - * Copyright (c) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -.container { - display: flex; - flex-direction: column; - justify-content: center; - align-items: center; - left: 0px; - top: 0px; - width: 100%; - height: 100%; -} - -.title { - font-size: 60px; - text-align: center; - width: 100%; - height: 40%; - margin: 10px; -} - -.btn { - width: 50%; - height: 100px; - font-size: 40px; -} diff --git a/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/MainAbility2/pages/index/index.hml b/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/MainAbility2/pages/index/index.hml deleted file mode 100755 index 83ae6b784af095aa173906f7aa7468eb2bf2e5e3..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/MainAbility2/pages/index/index.hml +++ /dev/null @@ -1,20 +0,0 @@ - -
- - {{ $t('strings.hello') }} {{ title }} - - -
diff --git a/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/MainAbility2/pages/index/index.js b/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/MainAbility2/pages/index/index.js deleted file mode 100755 index cc22dd2c86d5e7ed3e45bfdd2319fa6bb55dfb50..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/MainAbility2/pages/index/index.js +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import router from '@system.router' - -export default { - data: { - title: "" - }, - onInit() { - this.title = this.$t('strings.world'); - }, - onclick: function () { - router.replace({ - uri: "pages/second/second" - }) - } -} - - - diff --git a/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/MainAbility2/pages/second/second.css b/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/MainAbility2/pages/second/second.css deleted file mode 100755 index 737096ca1070d46824d8173dd029de7e4144f3a9..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/MainAbility2/pages/second/second.css +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -.container { - display: flex; - flex-direction: column; - justify-content: center; - align-items: center; - left: 0px; - top: 0px; - width: 100%; - height: 100%; -} - -.title { - font-size: 60px; - text-align: center; - width: 100%; - height: 40%; - margin: 10px; -} - -.btn { - width: 50%; - height: 100px; - font-size: 40px; -} diff --git a/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/MainAbility2/pages/second/second.hml b/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/MainAbility2/pages/second/second.hml deleted file mode 100755 index 4503365d59184ec671bb489b6c2b64134daf0849..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/MainAbility2/pages/second/second.hml +++ /dev/null @@ -1,20 +0,0 @@ - -
- - {{ $t('strings.page') }} - - -
diff --git a/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/MainAbility2/pages/second/second.js b/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/MainAbility2/pages/second/second.js deleted file mode 100755 index 55c229adf9b349ff9a374f8d91be5b5b31d7c6aa..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/MainAbility2/pages/second/second.js +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (c) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import router from '@system.router' - -export default { - data: { - title: 'World' - }, - onclick: function () { - router.replace({ - uri: "pages/index/index" - }) - } -} diff --git a/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/test/List.test.js b/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/test/List.test.js deleted file mode 100755 index fd96c69b6d305cdfa142993acef7ecf395f666a7..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/test/List.test.js +++ /dev/null @@ -1,18 +0,0 @@ - -/* - * Copyright (c) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - -require('./startFULL.test.js'); \ No newline at end of file diff --git a/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/test/startFULL.test.js b/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/test/startFULL.test.js deleted file mode 100755 index dc2b04339d54699895a58e35d75f5ad154b1d870..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/test/startFULL.test.js +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (c) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// @ts-nocheck -import appManager from '@ohos.application.appManager'; -import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index" - -var subscriberInfoMainAbility2 = { - events: ["SUB_AA_OpenHarmony_StateListener_0300_CommonEvent"], -}; - - -describe("appManagerTest", function () { - console.log("----appManagerTest is starting------"); - - /** - * @tc.number: SUB_AA_OpenHarmony_StateListener_0200 - * @tc.name: Re-call deregister listener interface validation - * @tc.desc: Function test - * @tc.level 0 - */ - it("SUB_AA_OpenHarmony_StateListener_0200", 0, async function (done) { - console.log("------------start SUB_AA_OpenHarmony_StateListener_0200-------------"); - var registerId = appManager.registerApplicationStateObserver({ - onForegroundApplicationChanged: (data) => { - console.log("SUB_onForegroundApplicationChanged") - }, - onAbilityStateChanged: (data) => { - console.log("SUB_onAbilityStateChanged") - }, - onProcessCreated: (data) => { - console.log("SUB_onProcessCreated") - }, - onProcessDied: (data) => { - console.log("SUB_onProcessDied") - } - }) - console.log('SUB_AA_OpenHarmony_StateListener_0200 registerId : ' + JSON.stringify(registerId)); - console.log('SUB_AA_OpenHarmony_StateListener_0200 registerId : ' + typeof registerId); - expect(typeof(registerId) == "number").assertTrue(); - - await appManager.unregisterApplicationStateObserver(registerId, async(err, data) => { - console.log("SUB_AA_OpenHarmony_StateListener_0200 err1:" - + JSON.stringify(err) + ",data: " + JSON.stringify(data)); - }) - await appManager.unregisterApplicationStateObserver(registerId, async(err, data) => { - console.log("SUB_AA_OpenHarmony_StateListener_0200 err2:" - + JSON.stringify(err) + ",data: " + JSON.stringify(data)); - expect(err.code == 1).assertTrue(); - done(); - }) - - }) - - -}) - - - - diff --git a/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/resources/base/element/string.json b/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/resources/base/element/string.json deleted file mode 100755 index 92f5ff8a48403b37a65f5b6f6e5fe285f277d21e..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/resources/base/element/string.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "string": [ - { - "name": "entry_MainAbility", - "value": "entry_MainAbility" - }, - { - "name": "description_mainability", - "value": "JS_Empty Ability" - }, - { - "name": "description_mainability2", - "value": "JS_Empty Ability" - }, - { - "name": "entry_MainAbility2", - "value": "entry_MainAbility2" - } - ] -} \ No newline at end of file diff --git a/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/resources/base/media/icon.png b/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/resources/base/media/icon.png deleted file mode 100755 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/resources/base/media/icon.png and /dev/null differ diff --git a/aafwk/aafwk_standard/fa/fa_statelistener_test/signature/openharmony_sx.p7b b/aafwk/aafwk_standard/fa/fa_statelistener_test/signature/openharmony_sx.p7b deleted file mode 100755 index 66b4457a8a81fb8d3356cf46d67226c850944858..0000000000000000000000000000000000000000 Binary files a/aafwk/aafwk_standard/fa/fa_statelistener_test/signature/openharmony_sx.p7b and /dev/null differ diff --git a/aafwk/aafwk_standard/fa/fa_sumstate_test/entry/src/main/js/test/startFULL.test.js b/aafwk/aafwk_standard/fa/fa_sumstate_test/entry/src/main/js/test/startFULL.test.js index e527a8a682dd853cf0d754cb24b586264084bf36..09ff72d3926c6725d888b5930860e6f3be6efbba 100644 --- a/aafwk/aafwk_standard/fa/fa_sumstate_test/entry/src/main/js/test/startFULL.test.js +++ b/aafwk/aafwk_standard/fa/fa_sumstate_test/entry/src/main/js/test/startFULL.test.js @@ -12,186 +12,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import appManager from '@ohos.application.appManager'; + import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index" -import featureAbility from '@ohos.ability.featureAbility'; -import abilityfeatureAbility from '@ohos.ability.featureAbility'; -var assistData -var arr1 = [] -var AbilityStateChanged1 = [] -var ForegroundApplication1 = [] -var testData -var appbefore -var appafter describe("appManagerTest", function () { console.log("---appManagerTest-- starting---"); - - /** - * @tc.number: SUB_AA_OpenHarmony_StateListener_3200 - * @tc.name: Verify the onProcessDied callback - * @tc.desc: Function test - * @tc.level 0 - */ - it("SUB_AA_OpenHarmony_StateListener_3200", 0, async function (done) { - console.log("---start SUB_AA_OpenHarmony_StateListener_3200-----"); - await sleep(1000) - console.log("---start SUB_AA_OpenHarmony_StateListener_3200-----"); - var rest = appManager.registerApplicationStateObserver({ - onForegroundApplicationChanged: (aapData) => { - console.log("SUB_onForegroundApplicationChanged" + JSON.stringify(aapData)) - ForegroundApplication1.push(aapData); - console.log('ForegroundApplication :' + JSON.stringify(ForegroundApplication1)) - }, - onAbilityStateChanged: (StateData) => { - console.log("==onAbilityStateChanged1==>" + JSON.stringify(StateData)) - AbilityStateChanged1.push(StateData) - console.log('AbilityStateChanged1:' + JSON.stringify(AbilityStateChanged1)) - }, - onProcessCreated: (CreateData) => { - console.log("SUB_onProcessCreated" + JSON.stringify(CreateData)) - arr1.push('onProcessCreated', CreateData) - console.log('arr2:' + JSON.stringify(arr1)) - }, - onProcessDied: (ProcessData) => { - console.log("SUB_onProcessDied" + JSON.stringify(ProcessData)) - arr1.push('onProcessDied', ProcessData) - console.log("SUB_onProcessDied" + JSON.stringify(arr1)) - console.log('arr3:' + JSON.stringify(arr1)) - } - }) - await sleep(400); - var want = { - "bundleName": "com.example.fzstatelistener", - "abilityName": "com.example.fzstatelistener.MainAbility" - } - await featureAbility.startAbility({ want }).then().catch(); - await sleep(1000); - console.log('AbilityStateChanged1===>' + JSON.stringify(AbilityStateChanged1)) - console.log('ForegroundApplication1===>' + JSON.stringify(ForegroundApplication1)) - checkArr(arr1, AbilityStateChanged1, ForegroundApplication1) - done(); - }) - - function checkArr(arr, AbilityStateChanged, ForegroundApplication) { - console.log('==app1==:' + AbilityStateChanged.length) - if (arr == [] || AbilityStateChanged == [] || ForegroundApplication == []) { - expect().assertFail() - } - console.log('==check process==>strat' + JSON.stringify(arr)) - let process = getProcessData(arr, 'onProcessCreated') - console.log(' processlist :' + JSON.stringify(process)) - for (let i = 0;i < process.length; i++) { - console.log('==check process==> process[i] :' + JSON.stringify(process[i])) - if (process[i].bundleName == 'com.example.fzstatelistener') { - assistData = process[i] - console.log('==assistData==>' + JSON.stringify(assistData)) - } - } - - checkProcessData(assistData) - console.log('==app==:' + AbilityStateChanged.length) - for (let i = 0;i < AbilityStateChanged.length; i++) { - console.log('==appState==> :' + JSON.stringify(AbilityStateChanged[i])) - if (AbilityStateChanged[i].bundleName == 'com.example.fzstatelistener') { - assistData = AbilityStateChanged[i] - console.log('==check assistData==> :' + JSON.stringify(assistData)) - } - else if (AbilityStateChanged[i].bundleName == 'com.example.sum_statelistener') { - testData = AbilityStateChanged[i] - console.log('==check testData==> :' + JSON.stringify(testData)) - - } - } - if (testData == undefined || assistData == undefined) { - console.log('testData||assistData is null') - expect().assertFail() - } - checkAbilityStateData(assistData) - checkAbilityStateData2(testData) - console.log('==app==:' + ForegroundApplication.length) - for (let i = 0;i < ForegroundApplication.length; i++) { - console.log('==abilityState==>' + JSON.stringify(ForegroundApplication[i])) - if (ForegroundApplication[i].bundleName == 'com.example.fzstatelistener') { - assistData = ForegroundApplication[i] - console.log('==check assistData2==> :' + JSON.stringify(assistData)) - - } - else if (ForegroundApplication[i].bundleName == 'com.example.sum_statelistener') { - testData = ForegroundApplication[i] - console.log('==check testData2==> :' + JSON.stringify(testData)) - } - } - if (testData == undefined || assistData == undefined) { - console.log('testData||assistData is null') - expect().assertFail() - } - checkAppStateData(assistData) - checkAppStateData2(testData) - } - - function checkAbilityStateData2(list) { - console.log('==checkAbilityStateData2==>' + JSON.stringify(list)) - expect('com.example.sum_statelistener').assertEqual(list.bundleName) - expect('com.example.sum_statelistener.MainAbility').assertEqual(list.abilityName) - expect(list.pid > 0).assertTrue() - expect(list.uid > 0).assertTrue() - expect(3).assertEqual(list.state) - } - - function checkAbilityStateData(list) { - console.log('==checkAbilityStateData==>' + JSON.stringify(list)) - expect('com.example.fzstatelistener').assertEqual(list.bundleName) - expect('com.example.fzstatelistener.MainAbility').assertEqual(list.abilityName) - expect(list.pid > 0).assertTrue() - expect(list.uid > 0).assertTrue() - expect(2).assertEqual(list.state) - } - - function checkAppStateData2(list) { - console.log('==checkAppStateData2==>' + JSON.stringify(list)) - expect('com.example.sum_statelistener').assertEqual(list.bundleName) - expect(list.uid > 0).assertTrue() - expect(3).assertEqual(list.state) - } - - function checkAppStateData(list) { - console.log('==checkAppStateData==>' + JSON.stringify(list)) - expect('com.example.fzstatelistener').assertEqual(list.bundleName) - expect(list.uid > 0).assertTrue() - expect(2).assertEqual(list.state) - } - - function checkProcessData(list) { - console.log('==dhhFdh==>' + JSON.stringify(list)) - expect('com.example.fzstatelistener').assertEqual(list.bundleName) - console.log('==list.bundleName==>' + JSON.stringify(list.bundleName)) - expect(list.pid > 0).assertTrue() - console.log('==list.pid==>' + JSON.stringify(list.pid)) - expect(list.uid > 0).assertTrue() - console.log('==list.uid==>' + JSON.stringify(list.uid)) - } - - function getProcessData(reslist, key) { - console.log('getProcessData---start' + JSON.stringify(reslist)) - var listofkey = []; - for (let i = 0;i < reslist.length; i++) { - console.log('==getProcessData==> reslist[i] : ' + JSON.stringify(reslist[i])) - var callback = reslist[i] - console.log('==callback==> : ' + JSON.stringify(callback)) - if (callback == key) { - listofkey.push(reslist[i+1]) - console.log('==reslist[i+1]==> : ' + JSON.stringify(reslist[i+1])) - } - } - console.log('getProcessData' + JSON.stringify(listofkey)) - return listofkey - } - - function sleep(time) { - return new Promise((resolve) => setTimeout(resolve, time)) - } - }) diff --git a/aafwk/aafwk_standard/featureability/actsfeatureabilitytest/entry/src/main/js/test/StartAbilityJsunit.test.js b/aafwk/aafwk_standard/featureability/actsfeatureabilitytest/entry/src/main/js/test/StartAbilityJsunit.test.js index db47e0cbf4d3c7f98e8f1991e1b79dee83053125..9272b34069f5f927aadef4060fd970b5da3ccc2e 100644 --- a/aafwk/aafwk_standard/featureability/actsfeatureabilitytest/entry/src/main/js/test/StartAbilityJsunit.test.js +++ b/aafwk/aafwk_standard/featureability/actsfeatureabilitytest/entry/src/main/js/test/StartAbilityJsunit.test.js @@ -62,52 +62,6 @@ describe('ConnectAbilityTest', function () { }) }) - /* - * @tc.number: SUB_AA_JsApi_StartAbility_0300 - * @tc.name: testAbility0300. - * @tc.desc: StartAbility-want only configure the bundleName and abilityName-abilityName - * values to be wrong values. - */ - it("SUB_AA_JsApi_StartAbility_0300", 0, async function (done) { - let parameter = { - 'want': { - 'bundleName': bundleName, - 'abilityName': 'com.example.mytestw.TwoAbility1111' - } - } - await featureAbility.startAbility(parameter).then((data) => { - console.log('testAbility0300 data: ' + JSON.stringify(data)) - expect().assertFail() - }).catch((error) => { - console.log('testAbility0300 error: ' + JSON.stringify(error)) - expect(errCode1).assertEqual(error.code) - }) - done() - }) - - /* - * @tc.number: SUB_AA_JsApi_StartAbility_0400 - * @tc.name: testAbility0400. - * @tc.desc: StartAbility-want only configure the bundleName and abilityName-bundleName - * values to be wrong values. - */ - it("SUB_AA_JsApi_StartAbility_0400", 0, async function (done) { - let parameter = { - 'want': { - 'bundleName': 'com.example.mytestw.TwoAbility1111', - 'abilityName': mainAbilityName - } - } - await featureAbility.startAbility(parameter).then((data) => { - console.log('testAbility0400 data: ' + JSON.stringify(data)) - expect().assertFail() - }).catch((error) => { - console.log('testAbility0400 error: ' + JSON.stringify(error)) - expect(errCode1).assertEqual(error.code) - }) - done() - }) - /* * @tc.number: SUB_AA_JsApi_StartAbility_0500 * @tc.name: testAbility0500. diff --git a/aafwk/aafwk_standard/lanuageConfigapi7/ActslanguageconfigAppATest/BUILD.gn b/aafwk/aafwk_standard/lanuageConfigapi7/ActslanguageconfigAppATest/BUILD.gn deleted file mode 100644 index ad4e9d0377062ff6cc2546919ea6d8657ff0ebbf..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/lanuageConfigapi7/ActslanguageconfigAppATest/BUILD.gn +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright (c) 2022 Huawei Device Co., Ltd. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import("//test/xts/tools/build/suite.gni") - -ohos_hap("ActslanguageconfigAppATest") { - hap_name = "ActslanguageconfigAppATest" - hap_profile = "./src/main/config.json" - subsystem_name = XTS_SUITENAME - final_hap_path = - "${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap" - testonly = true - deps = [ - ":hjs_demo_js_assets", - ":hjs_demo_resources", - ] - certificate_profile = "./signature/openharmony_sx.p7b" -} -ohos_js_assets("hjs_demo_js_assets") { - source_dir = "./src/main/js/default" -} -ohos_resources("hjs_demo_resources") { - sources = [ "./src/main/js/resources" ] - hap_profile = "./src/main/config.json" -} diff --git a/aafwk/aafwk_standard/lanuageConfigapi7/ActslanguageconfigAppATest/signature/openharmony_sx.p7b b/aafwk/aafwk_standard/lanuageConfigapi7/ActslanguageconfigAppATest/signature/openharmony_sx.p7b deleted file mode 100644 index cc53179a48f88f20acc379c138a001e9a15838f6..0000000000000000000000000000000000000000 Binary files a/aafwk/aafwk_standard/lanuageConfigapi7/ActslanguageconfigAppATest/signature/openharmony_sx.p7b and /dev/null differ diff --git a/aafwk/aafwk_standard/lanuageConfigapi7/ActslanguageconfigAppATest/src/main/config.json b/aafwk/aafwk_standard/lanuageConfigapi7/ActslanguageconfigAppATest/src/main/config.json deleted file mode 100644 index 2c3e93c92637459c41f4be0798fb65c6b3bae4b1..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/lanuageConfigapi7/ActslanguageconfigAppATest/src/main/config.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "app": { - "bundleName": "com.example.actslanguageconfigappatest", - "vendor": "example", - "version": { - "code": 1, - "name": "1.0" - }, - "apiVersion": { - "compatible": 4, - "target": 5, - "releaseType": "Beta1" - } - }, - "deviceConfig": {}, - "module": { - "package": "com.example.actslanguageconfigappatest", - "name": ".MyApplication", - "deviceType": [ - "phone" - ], - "distro": { - "deliveryWithInstall": true, - "moduleName": "entry", - "moduleType": "entry" - }, - "abilities": [ - { - "skills": [ - { - "entities": [ - "entity.system.home" - ], - "actions": [ - "action.system.home" - ] - } - ], - "name": "com.example.actslanguageconfigappatest.MainAbility", - "visible": true, - "icon": "$media:icon", - "description": "$string:mainability_description", - "label": "$string:app_name", - "type": "page", - "launchType": "standard" - } - ], - "reqPermissions": [ - { - "name":"ohos.permission.GET_BUNDLE_INFO_PRIVILEGED", - "reason":"need use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED" - }, - { - "name":"ohos.permission.GET_BUNDLE_INFO", - "reason":"need use ohos.permission.GET_BUNDLE_INFO" - }, - { - "name":"ohos.permission.CHANGE_ABILITY_ENABLED_STATE", - "reason":"need use ohos.permission.CHANGE_ABILITY_ENABLED_STATE" - }, - { - "name":"ohos.permission.REMOVE_CACHE_FILES", - "reason":"need use ohos.permission.REMOVE_CACHE_FILES" - }, - { - "name":"ohos.permission.LISTEN_BUNDLE_CHANGE", - "reason":"need use ohos.permission.LISTEN_BUNDLE_CHANGE" - }, - { - "name":"ohos.permission.INSTALL_BUNDLE", - "reason":"need use ohos.permission.INSTALL_BUNDLE" - } - ], - "js": [ - { - "pages": [ - "pages/index/index" - ], - "name": "default", - "window": { - "designWidth": 720, - "autoDesignWidth": false - } - } - ] - } -} \ No newline at end of file diff --git a/aafwk/aafwk_standard/lanuageConfigapi7/ActslanguageconfigAppATest/src/main/js/default/app.js b/aafwk/aafwk_standard/lanuageConfigapi7/ActslanguageconfigAppATest/src/main/js/default/app.js deleted file mode 100644 index d2c2487707610d1e26f9cc8953d87e1507c2fcc1..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/lanuageConfigapi7/ActslanguageconfigAppATest/src/main/js/default/app.js +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) 2022 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -export default { - onCreate() { - console.info('ProcessManageSystemAppB onCreate'); - }, - onDestroy() { - console.info('ProcessManageSystemAppB onDestroy'); - }, - onShow() { - console.info('ProcessManageSystemAppB onShow'); - }, - onHide() { - console.info('ProcessManageSystemAppB onHide'); - } -}; diff --git a/aafwk/aafwk_standard/lanuageConfigapi7/ActslanguageconfigAppATest/src/main/js/default/i18n/en-US.json b/aafwk/aafwk_standard/lanuageConfigapi7/ActslanguageconfigAppATest/src/main/js/default/i18n/en-US.json deleted file mode 100644 index e63c70d978a3a53be988388c87182f81785e170c..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/lanuageConfigapi7/ActslanguageconfigAppATest/src/main/js/default/i18n/en-US.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "strings": { - "hello": "Hello", - "world": "World" - } -} \ No newline at end of file diff --git a/aafwk/aafwk_standard/lanuageConfigapi7/ActslanguageconfigAppATest/src/main/js/default/i18n/zh-CN.json b/aafwk/aafwk_standard/lanuageConfigapi7/ActslanguageconfigAppATest/src/main/js/default/i18n/zh-CN.json deleted file mode 100644 index de6ee5748322f44942c1b003319d8e66c837675f..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/lanuageConfigapi7/ActslanguageconfigAppATest/src/main/js/default/i18n/zh-CN.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "strings": { - "hello": "您好", - "world": "世界" - } -} \ No newline at end of file diff --git a/aafwk/aafwk_standard/lanuageConfigapi7/ActslanguageconfigAppATest/src/main/js/default/pages/index/index.css b/aafwk/aafwk_standard/lanuageConfigapi7/ActslanguageconfigAppATest/src/main/js/default/pages/index/index.css deleted file mode 100644 index 6fda792753f2e15f22b529c7b90a82185b2770bf..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/lanuageConfigapi7/ActslanguageconfigAppATest/src/main/js/default/pages/index/index.css +++ /dev/null @@ -1,9 +0,0 @@ -.container { - flex-direction: column; - justify-content: center; - align-items: center; -} - -.title { - font-size: 100px; -} diff --git a/aafwk/aafwk_standard/lanuageConfigapi7/ActslanguageconfigAppATest/src/main/js/default/pages/index/index.hml b/aafwk/aafwk_standard/lanuageConfigapi7/ActslanguageconfigAppATest/src/main/js/default/pages/index/index.hml deleted file mode 100644 index f64b040a5ae394dbaa5e185e1ecd4f4556b92184..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/lanuageConfigapi7/ActslanguageconfigAppATest/src/main/js/default/pages/index/index.hml +++ /dev/null @@ -1,5 +0,0 @@ -
- - {{ $t('strings.hello') }} {{ title }} - -
diff --git a/aafwk/aafwk_standard/lanuageConfigapi7/ActslanguageconfigAppATest/src/main/js/default/pages/index/index.js b/aafwk/aafwk_standard/lanuageConfigapi7/ActslanguageconfigAppATest/src/main/js/default/pages/index/index.js deleted file mode 100644 index 904528c4da4238b733887983e22cbb480b2ae549..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/lanuageConfigapi7/ActslanguageconfigAppATest/src/main/js/default/pages/index/index.js +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (c) 2022 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import commonEvent from '@ohos.commonevent' - -const injectRef = Object.getPrototypeOf(global) || global -injectRef.regeneratorRuntime = require('@babel/runtime/regenerator') - -function onReceivedPublishCallBack(){ - console.log("========Publish CallBack UpdateLanguageFinish========"); -} - - -export default { - data: { - title: "" - }, - onInit() { - console.info('ACTS_ProcessManage SystemAppB onInit'); - this.title = "ACTS_ProcessManage SystemAppB"; - }, - onReady() { - console.info('ACTS_ProcessManage SystemAppB onReady'); - commonEvent.publish('UpdateLanguageFinish',onReceivedPublishCallBack); - }, - onActive() { - console.info('ACTS_ProcessManage SystemAppB onActive'); - }, - onShow() { - console.info('ACTS_ProcessManage SystemAppB onShow'); - }, - - onDestroy() { - console.info('ACTS_ProcessManage SystemAppB onDestroy'); - }, - onConfigurationUpdated(config) { - console.log("Acts_LanguageConfigAppA onConfigurationUpdated called" + JSON.stringify(config)); - console.log("Acts_LanguageConfigAppA configuration:" + - JSON.stringify(globalThis.abilityContext.configuration)); - - }, - onCompleteContinuation(code) { - console.info('ACTS_ProcessManage SystemAppB onCompleteContinuation:' + JSON.stringify(code)); - }, - onConfigurationUpdated(configuration) { - console.info('ACTS_ProcessManage SystemAppB onConfigurationUpdated:' + JSON.stringify(configuration)); - } -} \ No newline at end of file diff --git a/aafwk/aafwk_standard/lanuageConfigapi7/ActslanguageconfigAppATest/src/main/js/resources/base/element/string.json b/aafwk/aafwk_standard/lanuageConfigapi7/ActslanguageconfigAppATest/src/main/js/resources/base/element/string.json deleted file mode 100644 index fd60cdefa929070f1798c6e36f0502f1e1e219a4..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/lanuageConfigapi7/ActslanguageconfigAppATest/src/main/js/resources/base/element/string.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "string": [ - { - "name": "app_name", - "value": "particlestartability" - }, - { - "name": "mainability_description", - "value": "JS_Phone_Empty Feature Ability" - } - ] -} \ No newline at end of file diff --git a/aafwk/aafwk_standard/lanuageConfigapi7/ActslanguageconfigAppATest/src/main/js/resources/base/media/icon.png b/aafwk/aafwk_standard/lanuageConfigapi7/ActslanguageconfigAppATest/src/main/js/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/aafwk/aafwk_standard/lanuageConfigapi7/ActslanguageconfigAppATest/src/main/js/resources/base/media/icon.png and /dev/null differ diff --git a/aafwk/aafwk_standard/lanuageConfigapi7/BUILD.gn b/aafwk/aafwk_standard/lanuageConfigapi7/BUILD.gn deleted file mode 100644 index 8216954d3eb908ab83eb36e4d4e7c160aeb4c5d6..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/lanuageConfigapi7/BUILD.gn +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright (c) 2022 Huawei Device Co., Ltd. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import("//test/xts/tools/build/suite.gni") - -group("lanuageConfigapi7") { - testonly = true - if (is_standard_system) { - deps = [ - "ActslanguageconfigAppATest:ActslanguageconfigAppATest", - "LanguageConfigTestApi7:LanguageConfigTestApi7", - ] - } -} diff --git a/aafwk/aafwk_standard/lanuageConfigapi7/LanguageConfigTestApi7/BUILD.gn b/aafwk/aafwk_standard/lanuageConfigapi7/LanguageConfigTestApi7/BUILD.gn deleted file mode 100644 index 41b6b888a0d4eba7ae881b061bc93aa86798ea83..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/lanuageConfigapi7/LanguageConfigTestApi7/BUILD.gn +++ /dev/null @@ -1,31 +0,0 @@ -# Copyright (c) 2022 Huawei Device Co., Ltd. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import("//test/xts/tools/build/suite.gni") - -ohos_js_hap_suite("LanguageConfigTestApi7") { - hap_name = "ActsLanguageConfigTestApi7Test" - hap_profile = "./entry/src/main/config.json" - deps = [ - ":hjs_demo_js_assets", - ":hjs_demo_resources", - ] - certificate_profile = "./signature/openharmony_sx.p7b" -} -ohos_js_assets("hjs_demo_js_assets") { - source_dir = "./entry/src/main/js/default" -} -ohos_resources("hjs_demo_resources") { - sources = [ "./entry/src/main/js/resources" ] - hap_profile = "./entry/src/main/config.json" -} diff --git a/aafwk/aafwk_standard/lanuageConfigapi7/LanguageConfigTestApi7/Test.json b/aafwk/aafwk_standard/lanuageConfigapi7/LanguageConfigTestApi7/Test.json deleted file mode 100644 index 6d95ce6aaeea4d1ad2c0e9be96873791aa6928ee..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/lanuageConfigapi7/LanguageConfigTestApi7/Test.json +++ /dev/null @@ -1,38 +0,0 @@ - -{ - "description": "Configuration for hjunit demo Tests", - "driver": { - "type": "JSUnitTest", - "test-timeout": "120000", - "package": "com.example.languageconfigtestapi7", - "shell-timeout": "60000" - }, - "kits": [ - { - "test-file-name": [ - "ActsLanguageConfigTestApi7Test.hap" - ], - "type": "AppInstallKit", - "cleanup-apps": true - }, - { - "type": "ShellKit", - "run-command": [ - "remount", - "mkdir /data/test" - ] - }, - { - "type": "PushKit", - "push": [ - "ActslanguageconfigAppATest.hap->/data/test/ActslanguageconfigAppATest.hap"] - }, - { - "type": "ShellKit", - "run-command": [ - "chmod 777 /data/test/*.hap" - ] - } - ] -} - diff --git a/aafwk/aafwk_standard/lanuageConfigapi7/LanguageConfigTestApi7/entry/src/main/config.json b/aafwk/aafwk_standard/lanuageConfigapi7/LanguageConfigTestApi7/entry/src/main/config.json deleted file mode 100644 index 8e9b5b2a5a2fef425fe191a4bb191db69249c5f7..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/lanuageConfigapi7/LanguageConfigTestApi7/entry/src/main/config.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "app": { - "bundleName": "com.example.languageconfigtestapi7", - "vendor": "example", - "version": { - "code": 1, - "name": "1.0" - }, - "apiVersion": { - "compatible": 4, - "target": 5, - "releaseType": "Beta1" - } - }, - "deviceConfig": {}, - "module": { - "package": "com.example.languageconfigtestapi7", - "name": ".MyApplication", - "deviceType": [ - "phone" - ], - "distro": { - "deliveryWithInstall": true, - "moduleName": "entry", - "moduleType": "entry" - }, - "abilities": [ - { - "skills": [ - { - "entities": [ - "entity.system.home" - ], - "actions": [ - "action.system.home" - ] - } - ], - "name": "com.example.languageconfigtestapi7.MainAbility", - "icon": "$media:icon", - "description": "$string:mainability_description", - "label": "$string:app_name", - "type": "page", - "launchType": "singleton", - "visible": true - } - ], - "reqPermissions": [ - { - "name":"ohos.permission.GET_BUNDLE_INFO_PRIVILEGED", - "reason":"need use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED" - }, - { - "name":"ohos.permission.GET_BUNDLE_INFO", - "reason":"need use ohos.permission.GET_BUNDLE_INFO" - }, - { - "name":"ohos.permission.CHANGE_ABILITY_ENABLED_STATE", - "reason":"need use ohos.permission.CHANGE_ABILITY_ENABLED_STATE" - }, - { - "name":"ohos.permission.REMOVE_CACHE_FILES", - "reason":"need use ohos.permission.REMOVE_CACHE_FILES" - }, - { - "name":"ohos.permission.LISTEN_BUNDLE_CHANGE", - "reason":"need use ohos.permission.LISTEN_BUNDLE_CHANGE" - }, - { - "name":"ohos.permission.INSTALL_BUNDLE", - "reason":"need use ohos.permission.INSTALL_BUNDLE" - } - ], - "js": [ - { - "pages": [ - "pages/index/index" - ], - "name": "default", - "window": { - "designWidth": 720, - "autoDesignWidth": false - } - } - ] - } -} \ No newline at end of file diff --git a/aafwk/aafwk_standard/lanuageConfigapi7/LanguageConfigTestApi7/entry/src/main/js/default/app.js b/aafwk/aafwk_standard/lanuageConfigapi7/LanguageConfigTestApi7/entry/src/main/js/default/app.js deleted file mode 100644 index 11ca2c1d6428bbb29c4a01126536132868c5df26..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/lanuageConfigapi7/LanguageConfigTestApi7/entry/src/main/js/default/app.js +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) 2022 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -export default { - onCreate() { - console.info('ActsProcessManageJsTest onCreate'); - }, - onDestroy() { - console.info('ActsProcessManageJsTest onDestroy'); - }, - onShow() { - console.info('ActsProcessManageJsTest onShow'); - }, - onHide() { - console.info('ActsProcessManageJsTest onHide'); - } -}; diff --git a/aafwk/aafwk_standard/lanuageConfigapi7/LanguageConfigTestApi7/entry/src/main/js/default/i18n/en-US.json b/aafwk/aafwk_standard/lanuageConfigapi7/LanguageConfigTestApi7/entry/src/main/js/default/i18n/en-US.json deleted file mode 100644 index e63c70d978a3a53be988388c87182f81785e170c..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/lanuageConfigapi7/LanguageConfigTestApi7/entry/src/main/js/default/i18n/en-US.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "strings": { - "hello": "Hello", - "world": "World" - } -} \ No newline at end of file diff --git a/aafwk/aafwk_standard/lanuageConfigapi7/LanguageConfigTestApi7/entry/src/main/js/default/i18n/zh-CN.json b/aafwk/aafwk_standard/lanuageConfigapi7/LanguageConfigTestApi7/entry/src/main/js/default/i18n/zh-CN.json deleted file mode 100644 index de6ee5748322f44942c1b003319d8e66c837675f..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/lanuageConfigapi7/LanguageConfigTestApi7/entry/src/main/js/default/i18n/zh-CN.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "strings": { - "hello": "您好", - "world": "世界" - } -} \ No newline at end of file diff --git a/aafwk/aafwk_standard/lanuageConfigapi7/LanguageConfigTestApi7/entry/src/main/js/default/pages/index/index.css b/aafwk/aafwk_standard/lanuageConfigapi7/LanguageConfigTestApi7/entry/src/main/js/default/pages/index/index.css deleted file mode 100644 index deea888af8213f7c4b666ecf923b9301ee9ecedd..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/lanuageConfigapi7/LanguageConfigTestApi7/entry/src/main/js/default/pages/index/index.css +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) 2022 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - .container { - flex-direction: column; - justify-content: center; - align-items: center; -} - -.title { - font-size: 100px; -} - -.btn { - width: 200px; - height: 80px; -} diff --git a/aafwk/aafwk_standard/lanuageConfigapi7/LanguageConfigTestApi7/entry/src/main/js/default/pages/index/index.hml b/aafwk/aafwk_standard/lanuageConfigapi7/LanguageConfigTestApi7/entry/src/main/js/default/pages/index/index.hml deleted file mode 100644 index 9d0db6ceb7a92ebd17248840ef45516428333fa2..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/lanuageConfigapi7/LanguageConfigTestApi7/entry/src/main/js/default/pages/index/index.hml +++ /dev/null @@ -1,6 +0,0 @@ -
- - {{ $t('strings.hello') }} {{ title }} - - -
diff --git a/aafwk/aafwk_standard/lanuageConfigapi7/LanguageConfigTestApi7/entry/src/main/js/default/pages/index/index.js b/aafwk/aafwk_standard/lanuageConfigapi7/LanguageConfigTestApi7/entry/src/main/js/default/pages/index/index.js deleted file mode 100644 index a6d4c3ea607cf4251f2008ad271f48a0874e1ba2..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/lanuageConfigapi7/LanguageConfigTestApi7/entry/src/main/js/default/pages/index/index.js +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright (c) 2022 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { Core, ExpectExtend } from 'deccjsunit/index' - -const injectRef = Object.getPrototypeOf(global) || global -injectRef.regeneratorRuntime = require('@babel/runtime/regenerator') - -export default { - data: { - title: "", - testTime: 0 - }, - onInit() { - console.info('ActsProcessManageJsTest onInit'); - this.title = this.$t('strings.world'); - }, - onShow() { - console.info('ActsProcessManageJsTest onShow'); - console.info('ActsProcessManageJsTest testTime' + this.testTime); - if (this.testTime == 0) { - const core = Core.getInstance() - const expectExtend = new ExpectExtend({ - 'id': 'extend' - }) - core.addService('expect', expectExtend) - core.init() - const configService = core.getDefaultService('config') - this.timeout = 30000; - configService.setConfig(this) - - require('../../../test/List.test') - core.execute() - } - this.testTime++; - }, - onReady() { - console.info('ActsProcessManageJsTest onReady'); - }, - onActive() { - console.info('ActsProcessManageJsTest onActive'); - }, - onInactive() { - console.info('ActsProcessManageJsTest onInactive'); - }, - onHide() { - console.info('ActsProcessManageJsTest onHide'); - }, - onDestroy() { - console.info('ActsProcessManageJsTest onDestroy'); - }, - onBackPress() { - console.info('ActsProcessManageJsTest onBackPress'); - }, - onNewRequest() { - console.info('ActsProcessManageJsTest onNewRequest'); - }, - onStartContinuation() { - console.info('ActsProcessManageJsTest onStartContinuation'); - }, - onSaveData(value) { - console.info('ActsProcessManageJsTest onSaveData:' + JSON.stringify(value)); - }, - onRestoreData(value) { - console.info('ActsProcessManageJsTest onRestoreData:' + JSON.stringify(value)); - }, - onCompleteContinuation(code) { - console.info('ActsProcessManageJsTest onCompleteContinuation:' + JSON.stringify(code)); - }, - onConfigurationUpdated(configuration) { - console.info('ActsProcessManageJsTest onConfigurationUpdated:' + JSON.stringify(configuration)); - } -} diff --git a/aafwk/aafwk_standard/lanuageConfigapi7/LanguageConfigTestApi7/entry/src/main/js/resources/base/element/string.json b/aafwk/aafwk_standard/lanuageConfigapi7/LanguageConfigTestApi7/entry/src/main/js/resources/base/element/string.json deleted file mode 100644 index 03574a36c533357eef7fc0acc5e21af14f4e5f67..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/lanuageConfigapi7/LanguageConfigTestApi7/entry/src/main/js/resources/base/element/string.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "string": [ - { - "name": "app_name", - "value": "actsparticleabilitytest" - }, - { - "name": "mainability_description", - "value": "JS_Phone_Empty Feature Ability" - } - ] -} \ No newline at end of file diff --git a/aafwk/aafwk_standard/lanuageConfigapi7/LanguageConfigTestApi7/entry/src/main/js/resources/base/media/icon.png b/aafwk/aafwk_standard/lanuageConfigapi7/LanguageConfigTestApi7/entry/src/main/js/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/aafwk/aafwk_standard/lanuageConfigapi7/LanguageConfigTestApi7/entry/src/main/js/resources/base/media/icon.png and /dev/null differ diff --git a/aafwk/aafwk_standard/lanuageConfigapi7/LanguageConfigTestApi7/entry/src/main/js/test/List.test.js b/aafwk/aafwk_standard/lanuageConfigapi7/LanguageConfigTestApi7/entry/src/main/js/test/List.test.js deleted file mode 100644 index 2da59da1b342f8c6db78527e89d0bc13e7e424a9..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/lanuageConfigapi7/LanguageConfigTestApi7/entry/src/main/js/test/List.test.js +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Copyright (c) 2022 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -require('./lanuageConfigapi7.test.js') \ No newline at end of file diff --git a/aafwk/aafwk_standard/lanuageConfigapi7/LanguageConfigTestApi7/entry/src/main/js/test/lanuageConfigapi7.test.js b/aafwk/aafwk_standard/lanuageConfigapi7/LanguageConfigTestApi7/entry/src/main/js/test/lanuageConfigapi7.test.js deleted file mode 100644 index 7449100aaec47648d93789b5c83e49415628a5bb..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/lanuageConfigapi7/LanguageConfigTestApi7/entry/src/main/js/test/lanuageConfigapi7.test.js +++ /dev/null @@ -1,161 +0,0 @@ -/* - * Copyright (c) 2022 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index" -import commonEvent from '@ohos.commonevent' -import bundle from '@ohos.bundle' -import missionManager from '@ohos.application.missionManager' -import abilityManager from '@ohos.application.abilityManager' -import featureAbility from '@ohos.ability.featureability' - -var subscriberInfoMultiInstance = { - events: ["UpdateLanguageFinish"] -}; -const BUNDLE_PATHS = [['/data/test/ActslanguageconfigAppATest.hap']]; -const BUNDLE_NAMES = ['com.example.actslanguageconfigappatest']; -const BUNDLE_COUNT = 1; -const START_ABILITY_TIMEOUT = 5000; -const MAX_MISSION_NUM = 1024; - -async function startAbilityProcess(parameters) { - let bundleName; - let abilityName; - - let idx = parameters.nextStep; - switch (parameters.step[idx]) { - case "StartA1": - bundleName = "com.example.actslanguageconfigappatest"; - abilityName = "com.example.actslanguageconfigappatest.MainAbility"; - break; - - default: - break; - } - parameters.nextStep = ++idx; - await featureAbility.startAbility({ - want: { - bundleName: bundleName, - abilityName: abilityName, - parameters: parameters - } - - }) -} - - -function getMissionId() { - return new Promise(async (resolve, reject) => { - var missionId = -1; - var missionInfos = await missionManager.getMissionInfos('', MAX_MISSION_NUM); - for (let i = 0; i < missionInfos.length; i++) { - console.log('getMissionId result: ' + i + '= ' + JSON.stringify(missionInfos[i])) - if ((missionInfos[i].want.abilityName == "com.example.languageconfigtestapi7.MainAbility") && - (missionInfos[i].runningState == 0)) { - missionId = missionInfos[i].missionId; - break; - } - } - console.log('======>Acts_getMissionId resolve missionId<=======' + missionId); - resolve(missionId); - }) -} - -describe('ActsAbilityTest', function () { - beforeEach(async (done) => { - console.log('======>Acts_beforeEach ininin<======='); - let installer = await bundle.getBundleInstaller(); - var count = 0; - - for (let i = 0; i < BUNDLE_COUNT; i++) { - installer.install(BUNDLE_PATHS[i], { - userId: 100, - installFlag: 1, - isKeepData: false - }, (err, data) => { - count++; - console.log('======>Acts_beforeEach install finish <=======' + err.code); - console.log('======>Acts_beforeEach install finish <=======' + data.status); - console.log('======>Acts_beforeEach install finish <=======' + data.statusMessage); - if (count == BUNDLE_COUNT) { - setTimeout(() => { - done(); - }, 1000) - } - }) - } - }) - - /* - * @tc.number: Acts_UpdateConfigurationFA_0100 - * @tc.name: Connects a service ability, which is used to start a cloned page ability. - * @tc.desc: Check the event data of executor page ability publishes - */ - it('Acts_UpdateConfigurationFA_0100', 0, async function (done) { - console.log('Acts_UpdateConfigurationFA_0100====Acts_Subscribe CallBack data:====>" + JSON.stringify(data)); - - expect(data.event).assertEqual("UpdateLanguageFinish"); - clearTimeout(id); - console.log('Acts_UpdateConfigurationFA_0100 start set lang'); - commonEvent.unsubscribe(subscriber, unSubscribeCallback); - } - - commonEvent.createSubscriber(subscriberInfoMultiInstance).then(async (data) => { - console.debug("Acts_====>Create Subscriber====>"); - subscriber = data; - commonEvent.subscribe(subscriber, subscribeCallBack); - }) - - function unSubscribeCallback() { - - setTimeout( function () { - console.debug("Acts_====>UnSubscribe CallBack====>"); - done(); - }, 2000); - - } - - function timeout() { - expect().assertFail(); - console.log('Acts_StartLanguageConfigTester timeout'); - commonEvent.unsubscribe(subscriber, unSubscribeCallback); - } - - id = setTimeout(timeout, START_ABILITY_TIMEOUT); - console.log('Acts_Start LanguageConfigTester Acts_UpdateConfigurationFA_0100 timer id : ' + id); - - console.log('Acts_LanguageConfigTester Acts_UpdateConfigurationFA_0100 start Ability'); - startAbilityProcess({ - startId: 0, - stepNum: 1, - nextStep: 0, - step: ["StartA1"] - }); - }) - - -}) diff --git a/aafwk/aafwk_standard/lanuageConfigapi7/LanguageConfigTestApi7/signature/openharmony_sx.p7b b/aafwk/aafwk_standard/lanuageConfigapi7/LanguageConfigTestApi7/signature/openharmony_sx.p7b deleted file mode 100644 index cc53179a48f88f20acc379c138a001e9a15838f6..0000000000000000000000000000000000000000 Binary files a/aafwk/aafwk_standard/lanuageConfigapi7/LanguageConfigTestApi7/signature/openharmony_sx.p7b and /dev/null differ diff --git a/aafwk/aafwk_standard/want/actsgetwantalltest/entry/src/main/js/test/ActsGetWantAllTest.js b/aafwk/aafwk_standard/want/actsgetwantalltest/entry/src/main/js/test/ActsGetWantAllTest.js index 81d0cd64dfc62a42555e2b28270031d15ced0f89..22364ce4a8295232777645b3af8fd3893f55d9c8 100755 --- a/aafwk/aafwk_standard/want/actsgetwantalltest/entry/src/main/js/test/ActsGetWantAllTest.js +++ b/aafwk/aafwk_standard/want/actsgetwantalltest/entry/src/main/js/test/ActsGetWantAllTest.js @@ -415,7 +415,6 @@ describe('ActsGetWantTest', function () { entities: ["entity1"], type: "MIMETYPE", uri: "key={true,true,false}", - flags: wantConstant.Flags.FLAG_AUTH_PERSISTABLE_URI_PERMISSION , parameters: { mykey0: 0.1, @@ -436,7 +435,6 @@ describe('ActsGetWantTest', function () { expect(data.want.entities[0]).assertEqual("entity1"); expect(data.want.type).assertEqual("MIMETYPE"); expect(data.want.uri).assertEqual("key={true,true,false}"); - expect(data.want.flags).assertEqual(wantConstant.Flags.FLAG_AUTH_PERSISTABLE_URI_PERMISSION ); expect(data.want.parameters.mykey0).assertEqual(0.1); expect(data.want.parameters.mykey1[0]).assertEqual(0.1); expect(data.want.parameters.mykey1[1]).assertEqual(0.2); @@ -470,7 +468,6 @@ describe('ActsGetWantTest', function () { entities: ["entity1"], type: "MIMETYPE", uri: "key={true,true,false}", - flags: wantConstant.Flags.FLAG_AUTH_PREFIX_URI_PERMISSION , parameters: { mykey0: 0.1, @@ -491,7 +488,6 @@ describe('ActsGetWantTest', function () { expect(data.want.entities[0]).assertEqual("entity1"); expect(data.want.type).assertEqual("MIMETYPE"); expect(data.want.uri).assertEqual("key={true,true,false}"); - expect(data.want.flags).assertEqual(wantConstant.Flags.FLAG_AUTH_PREFIX_URI_PERMISSION ); expect(data.want.parameters.mykey0).assertEqual(0.1); expect(data.want.parameters.mykey1[0]).assertEqual(0.1); expect(data.want.parameters.mykey1[1]).assertEqual(0.2); @@ -635,7 +631,6 @@ describe('ActsGetWantTest', function () { entities: ["entity1"], type: "MIMETYPE", uri: "key={true,true,false}", - flags: wantConstant.Flags.FLAG_ABILITY_CONTINUATION_REVERSIBLE, parameters: { mykey0: 0.1, @@ -656,62 +651,6 @@ describe('ActsGetWantTest', function () { expect(data.want.entities[0]).assertEqual("entity1"); expect(data.want.type).assertEqual("MIMETYPE"); expect(data.want.uri).assertEqual("key={true,true,false}"); - expect(data.want.flags).assertEqual(wantConstant.Flags.FLAG_ABILITY_CONTINUATION_REVERSIBLE); - expect(data.want.parameters.mykey0).assertEqual(0.1); - expect(data.want.parameters.mykey1[0]).assertEqual(0.1); - expect(data.want.parameters.mykey1[1]).assertEqual(0.2); - expect(data.want.parameters.mykey1[2]).assertEqual(0.0000000003); - expect(data.want.parameters.mykey2).assertEqual("[a, b, c]"); - expect(data.want.parameters.mykey3).assertEqual("str"); - expect(data.want.parameters.mykey4[0]).assertEqual(false); - expect(data.want.parameters.mykey4[1]).assertEqual(true); - expect(data.want.parameters.mykey4[2]).assertEqual(false); - expect(data.want.parameters.mykey5[0]).assertEqual("str"); - expect(data.want.parameters.mykey5[1]).assertEqual("STR"); - expect(data.want.parameters.mykey5[2]).assertEqual("helloopenharmonyhelloopenharmonyhelloopenharmony"); - console.info('====> setTimeout before done.=====>') - setTimeout(()=>{ - done(); - }, TIMEOUT_NUMBER); - }) - }) - // @tc.number: ACTS_GetWant_1500 - // @tc.name: getWant : get want in current ability - // @tc.desc:Start the ability through startabilityforresult, - // and then use terminateselfwithresult to return the data - it('ACTS_GetWant_1500', 0, async function (done) { - featureAbility.startAbilityForResult({ - want: - { - deviceId: "", - bundleName: "com.example.actsgetwantalltesthap", - abilityName: "com.example.actsgetwantalltesthap.MainAbility", - action: "action1", - entities: ["entity1"], - type: "MIMETYPE", - uri: "key={true,true,false}", - flags: wantConstant.Flags.FLAG_INSTALL_ON_DEMAND, - parameters: - { - mykey0: 0.1, - mykey1: [0.1, 0.2, 0.0000000003], - mykey2: "[a, b, c]", - mykey3: "str", - mykey4: [false, true, false], - mykey5: ["str", "STR", "helloopenharmonyhelloopenharmonyhelloopenharmony"], - }, - }, - }, - (err, data) => { - console.info('====> ACTS_StartAbilityForResult_1500 start ability=====>' + JSON.stringify(data)) - expect(data.want.deviceId).assertEqual(""); - expect(data.want.bundleName).assertEqual("com.example.actsgetwantalltesthap"); - expect(data.want.abilityName).assertEqual("com.example.actsgetwantalltesthap.MainAbility"); - expect(data.want.action).assertEqual("action1"); - expect(data.want.entities[0]).assertEqual("entity1"); - expect(data.want.type).assertEqual("MIMETYPE"); - expect(data.want.uri).assertEqual("key={true,true,false}"); - expect(data.want.flags).assertEqual(wantConstant.Flags.FLAG_INSTALL_ON_DEMAND); expect(data.want.parameters.mykey0).assertEqual(0.1); expect(data.want.parameters.mykey1[0]).assertEqual(0.1); expect(data.want.parameters.mykey1[1]).assertEqual(0.2); @@ -730,6 +669,7 @@ describe('ActsGetWantTest', function () { }, TIMEOUT_NUMBER); }) }) + // @tc.number: ACTS_GetWant_1600 // @tc.name: getWant : get want in current ability // @tc.desc:Start the ability through startabilityforresult, @@ -895,61 +835,6 @@ describe('ActsGetWantTest', function () { }, TIMEOUT_NUMBER); }) }) - // @tc.number: ACTS_GetWant_1900 - // @tc.name: getWant : get want in current ability - // @tc.desc:Start the ability through startabilityforresult, - // and then use terminateselfwithresult to return the data - it('ACTS_GetWant_1900', 0, async function (done) { - featureAbility.startAbilityForResult({ - want: - { - deviceId: "", - bundleName: "com.example.actsgetwantalltesthap", - abilityName: "com.example.actsgetwantalltesthap.MainAbility", - action: "action1", - entities: ["entity1"], - type: "MIMETYPE", - uri: "key={true,true,false}", - flags: wantConstant.Flags.FLAG_ABILITY_MISSION_TOP , - parameters: - { - mykey0: 0.1, - mykey1: [0.1, 0.2, 0.0000000003], - mykey2: "[a, b, c]", - mykey3: "str", - mykey4: [false, true, false], - mykey5: ["str", "STR", "helloopenharmonyhelloopenharmonyhelloopenharmony"], - }, - }, - }, - (err, data) => { - console.info('====> ACTS_StartAbilityForResult_1900 start ability=====>' + JSON.stringify(data)) - expect(data.want.deviceId).assertEqual(""); - expect(data.want.bundleName).assertEqual("com.example.actsgetwantalltesthap"); - expect(data.want.abilityName).assertEqual("com.example.actsgetwantalltesthap.MainAbility"); - expect(data.want.action).assertEqual("action1"); - expect(data.want.entities[0]).assertEqual("entity1"); - expect(data.want.type).assertEqual("MIMETYPE"); - expect(data.want.uri).assertEqual("key={true,true,false}"); - expect(data.want.flags).assertEqual(wantConstant.Flags.FLAG_ABILITY_MISSION_TOP ); - expect(data.want.parameters.mykey0).assertEqual(0.1); - expect(data.want.parameters.mykey1[0]).assertEqual(0.1); - expect(data.want.parameters.mykey1[1]).assertEqual(0.2); - expect(data.want.parameters.mykey1[2]).assertEqual(0.0000000003); - expect(data.want.parameters.mykey2).assertEqual("[a, b, c]"); - expect(data.want.parameters.mykey3).assertEqual("str"); - expect(data.want.parameters.mykey4[0]).assertEqual(false); - expect(data.want.parameters.mykey4[1]).assertEqual(true); - expect(data.want.parameters.mykey4[2]).assertEqual(false); - expect(data.want.parameters.mykey5[0]).assertEqual("str"); - expect(data.want.parameters.mykey5[1]).assertEqual("STR"); - expect(data.want.parameters.mykey5[2]).assertEqual("helloopenharmonyhelloopenharmonyhelloopenharmony"); - console.info('====> setTimeout before done.=====>') - setTimeout(()=>{ - done(); - }, TIMEOUT_NUMBER); - }) - }) /* * @tc.number ACTS_GetWant_2000