diff --git a/aafwk/aafwk_standard/BUILD.gn b/aafwk/aafwk_standard/BUILD.gn index 95da9f254a84dde300ef299d3fbe53ae7e50d168..4a2f61fc01450957d5842b16048a2d0587d908be 100755 --- a/aafwk/aafwk_standard/BUILD.gn +++ b/aafwk/aafwk_standard/BUILD.gn @@ -21,6 +21,7 @@ group("aafwk_standard") { "actsabilitydelegatorcase:ActsAbilityDelegatorCaseTest", "actsabilitylifecyclestatenew:ActsAbilityLifecycleStateNewTest", "actsabilitymanageretstest:ActsAbilityManagerEtsTest", + "actsfwkdataaccessortest:dataability", "actsstserviceabilityclientcase:ActsStServiceAbilityClientCaseTest", "amsdatauriutils:ActsAmsDataUriUtilsTest", "amsgetabilityprocessinfo:amsgetabilityprocessinfo", diff --git a/aafwk/aafwk_standard/actsfwkdataaccessortest/BUILD.gn b/aafwk/aafwk_standard/actsfwkdataaccessortest/BUILD.gn index 8a0cb63e2257253be6570f26257eea4c35eb5db0..b8fa6d834e1a72e3ac8d904c748d7f4141200039 100644 --- a/aafwk/aafwk_standard/actsfwkdataaccessortest/BUILD.gn +++ b/aafwk/aafwk_standard/actsfwkdataaccessortest/BUILD.gn @@ -17,7 +17,6 @@ group("dataability") { testonly = true if (is_standard_system) { deps = [ - "actsdataabilityrelyhap:ActsDataAbilityRelyHap", "actsfwkdataaccessortest:ActsFWKDataAccessorTest", ] } diff --git a/aafwk/aafwk_standard/actsfwkdataaccessortest/actsdataabilityrelyhap/BUILD.gn b/aafwk/aafwk_standard/actsfwkdataaccessortest/actsdataabilityrelyhap/BUILD.gn deleted file mode 100644 index 74400d3f39848e1081bad10ac982a0a30d898b78..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/actsfwkdataaccessortest/actsdataabilityrelyhap/BUILD.gn +++ /dev/null @@ -1,39 +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("ActsDataAbilityRelyHap") { - hap_name = "ActsDataAbilityRelyHap" - hap_profile = "entry/src/main/config.json" - subsystem_name = XTS_SUITENAME - final_hap_path = - "${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap" - testonly = true - deps = [ - ":dataability_resources", - ":dataability_ts_assets", - ] - certificate_profile = "signature/openharmony_sx.p7b" -} - -ohos_js_assets("dataability_ts_assets") { - source_dir = "entry/src/main/ets" - hap_profile = "entry/src/main/config.json" - ets2abc = true -} - -ohos_resources("dataability_resources") { - sources = [ "entry/src/main/resources" ] - hap_profile = "entry/src/main/config.json" -} diff --git a/aafwk/aafwk_standard/actsfwkdataaccessortest/actsdataabilityrelyhap/entry/src/main/config.json b/aafwk/aafwk_standard/actsfwkdataaccessortest/actsdataabilityrelyhap/entry/src/main/config.json deleted file mode 100644 index ef953c581f15db7cc2c07bb3d7e1692c3af4c46d..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/actsfwkdataaccessortest/actsdataabilityrelyhap/entry/src/main/config.json +++ /dev/null @@ -1,97 +0,0 @@ -{ - "app": { - "bundleName": "com.amsst.stdataability", - "vendor": "test", - "version": { - "code": 1000110, - "name": "1.1.1" - }, - "apiVersion": { - "compatible": 9, - "target": 9 - } - }, - "deviceConfig": {}, - "module": { - "package": "com.amsst.stdataability", - "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": "ets", - "icon": "$media:icon", - "description": "$string:description_mainability", - "formsEnabled": false, - "label": "$string:entry_MainAbility", - "type": "page", - "launchType": "standard" - }, - { - "srcPath": "TestDataAbility", - "name": ".TestDataAbility", - "icon": "$media:icon", - "srcLanguage": "ets", - "description": "$string:description_testdataability", - "type": "data", - "visible": true, - "uri": "dataability://com.example.myapplication.DataAbility" - }, - { - "srcPath": "TestDataAbility2", - "name": ".TestDataAbility2", - "icon": "$media:icon", - "srcLanguage": "ets", - "description": "$string:description_testdataability", - "type": "data", - "visible": true, - "uri": "dataability://com.example.myapplication.DataAbility2" - } - ], - "js": [ - { - "mode": { - "syntax": "ets", - "type": "pageAbility" - }, - "pages": [ - "pages/index", - "pages/second" - ], - "name": ".MainAbility", - "window": { - "designWidth": 720, - "autoDesignWidth": false - } - } - ], - "defPermissions": [ - { - "name": "com.ohos.screenlock.DataAbilityShellProvider.PROVIDER" - } - ] - } -} diff --git a/aafwk/aafwk_standard/actsfwkdataaccessortest/actsdataabilityrelyhap/entry/src/main/ets/AbilityStage.ts b/aafwk/aafwk_standard/actsfwkdataaccessortest/actsdataabilityrelyhap/entry/src/main/ets/AbilityStage.ts deleted file mode 100644 index d5ebbe661dc5aa73cb877d8a4c9d829ca6cf4b2b..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/actsfwkdataaccessortest/actsdataabilityrelyhap/entry/src/main/ets/AbilityStage.ts +++ /dev/null @@ -1,21 +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 AbilityStage from "@ohos.application.AbilitySatage" - -export default class MyAbilityStage extends AbilityStage { - onCreate() { - console.log("MyAbilityStage onCreate"); - } -} \ No newline at end of file diff --git a/aafwk/aafwk_standard/actsfwkdataaccessortest/actsdataabilityrelyhap/entry/src/main/ets/MainAbility/MainAbility.ts b/aafwk/aafwk_standard/actsfwkdataaccessortest/actsdataabilityrelyhap/entry/src/main/ets/MainAbility/MainAbility.ts deleted file mode 100644 index c89305ea6db4b5ac3f7286b9657f6f7ca8074c72..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/actsfwkdataaccessortest/actsdataabilityrelyhap/entry/src/main/ets/MainAbility/MainAbility.ts +++ /dev/null @@ -1,44 +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 Ability from '@ohos.application.Ability' -export default class MainAbility extends Ability { - onCreate(want, launchParam) { - console.log("jws onCreate"); - } - - onDestroy() { - console.log("jws onDestroy"); - } - - onWindowStageCreate(windowStage) { - console.log("jws onWindowStageCreate"); - } - - onWindowStageDestroy() { - console.log("jws onWindowStageDestroy"); - } - - onForeground() { - console.log("jws onForeground"); - } - - onBackground() { - console.log("jws onBackground"); - } - - call(){ - - } -} \ No newline at end of file diff --git a/aafwk/aafwk_standard/actsfwkdataaccessortest/actsdataabilityrelyhap/entry/src/main/ets/MainAbility/app.ets b/aafwk/aafwk_standard/actsfwkdataaccessortest/actsdataabilityrelyhap/entry/src/main/ets/MainAbility/app.ets deleted file mode 100644 index eef2fff6d169b8c305daa2acd8db6eb913b31f4e..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/actsfwkdataaccessortest/actsdataabilityrelyhap/entry/src/main/ets/MainAbility/app.ets +++ /dev/null @@ -1,22 +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('Application onCreate') - }, - onDestroy() { - console.info('Application onDestroy') - }, -} \ No newline at end of file diff --git a/aafwk/aafwk_standard/actsfwkdataaccessortest/actsdataabilityrelyhap/entry/src/main/ets/MainAbility/pages/index.ets b/aafwk/aafwk_standard/actsfwkdataaccessortest/actsdataabilityrelyhap/entry/src/main/ets/MainAbility/pages/index.ets deleted file mode 100644 index 6b4120bd91a94160e64b02ba8b7b89b413c39389..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/actsfwkdataaccessortest/actsdataabilityrelyhap/entry/src/main/ets/MainAbility/pages/index.ets +++ /dev/null @@ -1,38 +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} from 'deccjsunit/index' - -@Entry -@Component -struct Index { - aboutToAppear() { - console.info('onShow finish') - const core = Core.getInstance() - core.init() - const configService = core.getDefaultService('config') - configService.setConfig(this) - core.execute() - } - - build() { - Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { - Text('Hello World') - .fontSize(50) - .fontWeight(FontWeight.Bold) - } - .width('100%') - .height('100%') - } -} \ No newline at end of file diff --git a/aafwk/aafwk_standard/actsfwkdataaccessortest/actsdataabilityrelyhap/entry/src/main/ets/MainAbility/pages/second.ets b/aafwk/aafwk_standard/actsfwkdataaccessortest/actsdataabilityrelyhap/entry/src/main/ets/MainAbility/pages/second.ets deleted file mode 100644 index 65bb9463e1707757f7cb1cdca3d1b7da5dc63170..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/actsfwkdataaccessortest/actsdataabilityrelyhap/entry/src/main/ets/MainAbility/pages/second.ets +++ /dev/null @@ -1,43 +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 router from '@system.router'; - -@Entry -@Component -struct Second { - private content: string = "Second Page" - - build() { - Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { - Text(`${this.content}`) - .fontSize(50) - .fontWeight(FontWeight.Bold) - Button() { - Text('back to index') - .fontSize(20) - .fontWeight(FontWeight.Bold) - }.type(ButtonType.Capsule) - .margin({ - top: 20 - }) - .backgroundColor('#0D9FFB') - .onClick(() => { - router.back() - }) - } - .width('100%') - .height('100%') - } -} \ No newline at end of file diff --git a/aafwk/aafwk_standard/actsfwkdataaccessortest/actsdataabilityrelyhap/entry/src/main/ets/TestDataAbility/data.ts b/aafwk/aafwk_standard/actsfwkdataaccessortest/actsdataabilityrelyhap/entry/src/main/ets/TestDataAbility/data.ts deleted file mode 100644 index bc472bcb26f454ccd2a9413f3a69a9ee3526bb69..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/actsfwkdataaccessortest/actsdataabilityrelyhap/entry/src/main/ets/TestDataAbility/data.ts +++ /dev/null @@ -1,253 +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 dataAbility from '@ohos.data.dataability' -import featureAbility from '@ohos.ability.featureAbility' -import fileio from '@ohos.fileio' -import dataRdb from '@ohos.data.rdb' - -const TABLE_NAME = 'book' -const STORE_CONFIG = { name: 'book.db', encryptKey: new Uint8Array([]) } -const SQL_CREATE_TABLE = 'CREATE TABLE IF NOT EXISTS book' + - '(id INTEGER PRIMARY KEY AUTOINCREMENT, name TEXT NOT NULL, age INTEGER, introduction TEXT NOT NULL)' -let rdbStore: any = undefined -const TAG = 'ACTS_ DataAbility.data' - -let defaultReturn = 1; -let returnError = 0; -let returnError1 = -1; -let returnError2 = -2; -let returnError3 = -3; -let dataAbilityUri = ("dataability:///com.example.myapplication.DataAbility"); - -export default { - - onInitialized(abilityInfo) { - console.debug('ACTS_ DataAbility onInitialized,abilityInfo=' + abilityInfo.bundleName) - dataRdb.getRdbStore(STORE_CONFIG, 1, (err, store) => { - console.debug('ACTS_ [data]getRdbStoreThen') - store.executeSql(SQL_CREATE_TABLE, []) - rdbStore = store - }); - }, - - insert(uri, valueBucket, callback) { - console.debug(TAG + ' insert start 1121') - console.debug(TAG + ' valueBucket json=>' + JSON.stringify(valueBucket)) - - let err = "Error Uri" - if (uri != dataAbilityUri) { - console.debug(TAG + ' uri != dataAbilityUri') - callback(err, returnError1); - } - - console.debug(TAG + ' valueBucket.age =>' + valueBucket.age) - console.debug(TAG + ' valueBucket.name =>' + valueBucket.name) - console.debug(TAG + ' valueBucket.salary =>' + valueBucket.salary) - if (valueBucket.age != 24) { - err = "Error age" - callback(err, returnError2); - } - if (valueBucket.name != "ActsDataAbilityHelperTest") { - err = "Error name" - callback(err, returnError2); - } - if (valueBucket.salary != 2024.20) { - err = "Error salary" - callback(err, returnError2); - } - - err = "Error insert" - console.debug(TAG + ' rdbStore.insert ') - rdbStore.insert(TABLE_NAME, valueBucket, function (err, resultSet) { - console.log(TAG + "insert callback resultSet:" + resultSet - + " ,json=" + JSON.stringify(resultSet) + ' ,err' + err) - callback(err, defaultReturn); - }) - }, - - query(uri, columns, predicates, callback) { - console.debug(TAG + ' query start') - - let err = "Error Uri" - if (uri != dataAbilityUri) { - console.debug(TAG + ' uri != dataAbilityUri') - callback(err, returnError1); - } - - let rdbPredicates = dataAbility.createRdbPredicates(TABLE_NAME, predicates) - rdbStore.query(rdbPredicates, columns, callback) - }, - - update(uri, valueBucket, predicates, callback) { - console.debug(TAG + 'update start') - - let err = "Error Uri" - if (uri != dataAbilityUri) { - console.debug(TAG + ' uri != dataAbilityUri') - callback(err, returnError1); - } - - console.debug(TAG + ' valueBucket.age =>' + valueBucket.age) - console.debug(TAG + ' valueBucket.name =>' + valueBucket.name) - console.debug(TAG + ' valueBucket.salary =>' + valueBucket.salary) - if (valueBucket.age != 24) { - err = "Error age" - callback(err, returnError2); - } - if (valueBucket.name != "ActsDataAbilityHelperTest") { - err = "Error name" - callback(err, returnError2); - } - if (valueBucket.salary != 2024.20) { - err = "Error salary" - callback(err, returnError2); - } - - err = "Error update" - let rdbPredicates = dataAbility.createRdbPredicates(TABLE_NAME, predicates) - rdbStore.update(valueBucket, rdbPredicates, function (err, resultSet) { - console.log(TAG + "insert callback resultSet:" + resultSet - + " ,json=" + JSON.stringify(resultSet) + ' ,err' + err) - callback(err, defaultReturn); - }) - }, - - delete(uri, predicates, callback) { - console.debug(TAG + 'delete start') - - let err = "Error Uri" - if (uri != dataAbilityUri) { - console.debug(TAG + ' uri != dataAbilityUri') - callback(err, returnError1); - } - - let rdbPredicates = dataAbility.createRdbPredicates(TABLE_NAME, predicates) - rdbStore.delete(rdbPredicates, function (err, resultSet) { - console.log(TAG + "insert callback resultSet:" + resultSet - + " ,json=" + JSON.stringify(resultSet) + ' ,err' + err) - callback(err, defaultReturn); - }) - }, - call(uri, method, arg, extras, callback) { - console.debug(TAG + 'call start') - console.debug(TAG + 'uri---->' + uri) - console.debug(TAG + 'method---->' + uri) - }, - - batchInsert(uri, values, callback) { - let err = "Error Uri" - if (uri != dataAbilityUri) { - console.debug(TAG + ' uri != dataAbilityUri') - callback(err, returnError1); - } - - for (var j = 0; j < values.length; j++) { - rdbStore.insert("EMPLOYEE", values[j], function (err, ret) { - console.log(TAG + "batchInsert callback ret:" + JSON.stringify(ret)) - }) - } - console.log(TAG + "batchInsert values.length:" + values.length + ' ,json=' + JSON.stringify(values.length)) - callback(err, values.length); - }, - - getType(uri, callback) { - console.info(TAG + '==================== DataAbility test interface by getType ================'); - let err = "Error Uri" - if (uri != dataAbilityUri) { - console.debug(TAG + ' uri != dataAbilityUri') - callback(err, returnError1); - } - callback("success", uri); - }, - - getFileTypes(uri, mimeTypeFilter, callback) { - console.info(TAG + '==================== DataAbility test interface by GetFileTypes ================'); - let err = "Error Uri" - if (uri != dataAbilityUri) { - console.debug(TAG + ' uri != dataAbilityUri') - callback(err, returnError1); - } - let type1 = " "; - let type2 = " "; - let type3 = " "; - let types; - if (mimeTypeFilter == "*/*") { - type1 = ("hap"); - type2 = ("jpg"); - type3 = ("image/png"); - types = [type1, type2, type3]; - } else if (mimeTypeFilter == "image/*") { - type1 = ("image/png"); - types = [type1]; - } else if (mimeTypeFilter == "*/jpg") { - type1 = ("jpg"); - types = [type1]; - } - - console.log(TAG + "GetFileTypes callback ret:" + JSON.stringify(types)) - callback("success", types); - }, - - openFile(uri, mode, callback) { - console.info(TAG + '==================== DataAbility test interface by openFile ================'); - let defaultReturn = 1; - let returnError1 = -1; - - let err = "Error Uri" - if (uri != dataAbilityUri) { - console.debug(TAG + ' uri != dataAbilityUri') - callback(err, returnError1); - } - if (!(mode == ("r") || mode == ("w") || mode == ("wt") || mode == ("wa") || - mode == ("rw") || mode == ("rwt"))) { - if (mode == ("A1@k#4%$,.<>)(oioiu*((*&(&*giIGT^%&^Ug;sdfk;losd*7873iug8%&^$&%]ERFUy&^%&&R7")) { - defaultReturn = returnError2; - } else - defaultReturn = returnError3; - } - console.info(TAG + " path = /data/test "); - let path = "/data/test" - fileio.stat(path).then(function (stat) { - console.info(TAG + "openFile getFileInfo successfully callback ret:" + JSON.stringify(stat)); - }).catch(function (err) { - console.info(TAG + "openFile getFileInfo failed with error callback ret:" + err); - defaultReturn = returnError1; - }); - console.info(TAG + " path ==>" + path); - callback("success", defaultReturn); - }, - - normalizeUri(uri, callback) { - console.info(TAG + '==================== DataAbility test interface by normalizeUri ================'); - let err = "Error Uri" - if (uri != dataAbilityUri) { - console.debug(TAG + ' uri != dataAbilityUri') - callback(err, ""); - } - callback("success", uri); - }, - - denormalizeUri(uri, callback) { - console.info(TAG + '==================== DataAbility test interface by denormalizeUri ================'); - console.info(TAG + "denormalizeUri uri:" + JSON.stringify(uri)); - - let err = "Error Uri" - if (uri != dataAbilityUri) { - console.debug(TAG + ' uri != dataAbilityUri') - callback(err, ""); - } - callback("success", uri); - } -}; \ No newline at end of file diff --git a/aafwk/aafwk_standard/actsfwkdataaccessortest/actsdataabilityrelyhap/entry/src/main/ets/TestDataAbility2/data.ts b/aafwk/aafwk_standard/actsfwkdataaccessortest/actsdataabilityrelyhap/entry/src/main/ets/TestDataAbility2/data.ts deleted file mode 100644 index 1efa7ced163d2d4edca3c4b7ad3c695babb1a888..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/actsfwkdataaccessortest/actsdataabilityrelyhap/entry/src/main/ets/TestDataAbility2/data.ts +++ /dev/null @@ -1,253 +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 dataAbility from '@ohos.data.dataability' -import featureAbility from '@ohos.ability.featureAbility' -import fileio from '@ohos.fileio' -import dataRdb from '@ohos.data.rdb' - -const TABLE_NAME = 'book' -const STORE_CONFIG = { name: 'book.db', encryptKey: new Uint8Array([]) } -const SQL_CREATE_TABLE = 'CREATE TABLE IF NOT EXISTS book' + - '(id INTEGER PRIMARY KEY AUTOINCREMENT, name TEXT NOT NULL, age INTEGER, introduction TEXT NOT NULL)' -let rdbStore: any = undefined -const TAG = 'ACTS_ DataAbility.data' - -let defaultReturn = 1; -let returnError = 0; -let returnError1 = -1; -let returnError2 = -2; -let returnError3 = -3; -let dataAbilityUri = ("dataability:///com.example.myapplication.DataAbility2"); - -export default { - - onInitialized(abilityInfo) { - console.debug('ACTS_ DataAbility onInitialized,abilityInfo=' + abilityInfo.bundleName) - dataRdb.getRdbStore(STORE_CONFIG, 1, (err, store) => { - console.debug('ACTS_ [data]getRdbStoreThen') - store.executeSql(SQL_CREATE_TABLE, []) - rdbStore = store - }); - }, - - insert(uri, valueBucket, callback) { - console.debug(TAG + ' insert start 1121') - console.debug(TAG + ' valueBucket json=>' + JSON.stringify(valueBucket)) - - let err = "Error Uri" - if (uri != dataAbilityUri) { - console.debug(TAG + ' uri != dataAbilityUri') - callback(err, returnError1); - } - - console.debug(TAG + ' valueBucket.age =>' + valueBucket.age) - console.debug(TAG + ' valueBucket.name =>' + valueBucket.name) - console.debug(TAG + ' valueBucket.salary =>' + valueBucket.salary) - if (valueBucket.age != 24) { - err = "Error age" - callback(err, returnError2); - } - if (valueBucket.name != "ActsDataAbilityHelperTest") { - err = "Error name" - callback(err, returnError2); - } - if (valueBucket.salary != 2024.20) { - err = "Error salary" - callback(err, returnError2); - } - - err = "Error insert" - console.debug(TAG + ' rdbStore.insert ') - rdbStore.insert(TABLE_NAME, valueBucket, function (err, resultSet) { - console.log(TAG + "insert callback resultSet:" + resultSet - + " ,json=" + JSON.stringify(resultSet) + ' ,err' + err) - callback(err, defaultReturn); - }) - }, - - query(uri, columns, predicates, callback) { - console.debug(TAG + ' query start') - - let err = "Error Uri" - if (uri != dataAbilityUri) { - console.debug(TAG + ' uri != dataAbilityUri') - callback(err, returnError1); - } - - let rdbPredicates = dataAbility.createRdbPredicates(TABLE_NAME, predicates) - rdbStore.query(rdbPredicates, columns, callback) - }, - - update(uri, valueBucket, predicates, callback) { - console.debug(TAG + 'update start') - - let err = "Error Uri" - if (uri != dataAbilityUri) { - console.debug(TAG + ' uri != dataAbilityUri') - callback(err, returnError1); - } - - console.debug(TAG + ' valueBucket.age =>' + valueBucket.age) - console.debug(TAG + ' valueBucket.name =>' + valueBucket.name) - console.debug(TAG + ' valueBucket.salary =>' + valueBucket.salary) - if (valueBucket.age != 24) { - err = "Error age" - callback(err, returnError2); - } - if (valueBucket.name != "ActsDataAbilityHelperTest") { - err = "Error name" - callback(err, returnError2); - } - if (valueBucket.salary != 2024.20) { - err = "Error salary" - callback(err, returnError2); - } - - err = "Error update" - let rdbPredicates = dataAbility.createRdbPredicates(TABLE_NAME, predicates) - rdbStore.update(valueBucket, rdbPredicates, function (err, resultSet) { - console.log(TAG + "insert callback resultSet:" + resultSet - + " ,json=" + JSON.stringify(resultSet) + ' ,err' + err) - callback(err, defaultReturn); - }) - }, - - delete(uri, predicates, callback) { - console.debug(TAG + 'delete start') - - let err = "Error Uri" - if (uri != dataAbilityUri) { - console.debug(TAG + ' uri != dataAbilityUri') - callback(err, returnError1); - } - - let rdbPredicates = dataAbility.createRdbPredicates(TABLE_NAME, predicates) - rdbStore.delete(rdbPredicates, function (err, resultSet) { - console.log(TAG + "insert callback resultSet:" + resultSet - + " ,json=" + JSON.stringify(resultSet) + ' ,err' + err) - callback(err, defaultReturn); - }) - }, - call(uri, method, arg, extras, callback) { - console.debug(TAG + 'call start') - console.debug(TAG + 'uri---->' + uri) - console.debug(TAG + 'method---->' + uri) - }, - - batchInsert(uri, values, callback) { - let err = "Error Uri" - if (uri != dataAbilityUri) { - console.debug(TAG + ' uri != dataAbilityUri') - callback(err, returnError1); - } - - for (var j = 0; j < values.length; j++) { - rdbStore.insert("EMPLOYEE", values[j], function (err, ret) { - console.log(TAG + "batchInsert callback ret:" + JSON.stringify(ret)) - }) - } - console.log(TAG + "batchInsert values.length:" + values.length + ' ,json=' + JSON.stringify(values.length)) - callback(err, values.length); - }, - - getType(uri, callback) { - console.info(TAG + '==================== DataAbility test interface by getType ================'); - let err = "Error Uri" - if (uri != dataAbilityUri) { - console.debug(TAG + ' uri != dataAbilityUri') - callback(err, returnError1); - } - callback("success", uri); - }, - - getFileTypes(uri, mimeTypeFilter, callback) { - console.info(TAG + '==================== DataAbility test interface by GetFileTypes ================'); - let err = "Error Uri" - if (uri != dataAbilityUri) { - console.debug(TAG + ' uri != dataAbilityUri') - callback(err, returnError1); - } - let type1 = " "; - let type2 = " "; - let type3 = " "; - let types; - if (mimeTypeFilter == "*/*") { - type1 = ("hap"); - type2 = ("jpg"); - type3 = ("image/png"); - types = [type1, type2, type3]; - } else if (mimeTypeFilter == "image/*") { - type1 = ("image/png"); - types = [type1]; - } else if (mimeTypeFilter == "*/jpg") { - type1 = ("jpg"); - types = [type1]; - } - - console.log(TAG + "GetFileTypes callback ret:" + JSON.stringify(types)) - callback("success", types); - }, - - openFile(uri, mode, callback) { - console.info(TAG + '==================== DataAbility test interface by openFile ================'); - let defaultReturn = 1; - let returnError1 = -1; - - let err = "Error Uri" - if (uri != dataAbilityUri) { - console.debug(TAG + ' uri != dataAbilityUri') - callback(err, returnError1); - } - if (!(mode == ("r") || mode == ("w") || mode == ("wt") || mode == ("wa") || - mode == ("rw") || mode == ("rwt"))) { - if (mode == ("A1@k#4%$,.<>)(oioiu*((*&(&*giIGT^%&^Ug;sdfk;losd*7873iug8%&^$&%]ERFUy&^%&&R7")) { - defaultReturn = returnError2; - } else - defaultReturn = returnError3; - } - console.info(TAG + " path = /data/test "); - let path = "/data/test" - fileio.stat(path).then(function (stat) { - console.info(TAG + "openFile getFileInfo successfully callback ret:" + JSON.stringify(stat)); - }).catch(function (err) { - console.info(TAG + "openFile getFileInfo failed with error callback ret:" + err); - defaultReturn = returnError1; - }); - console.info(TAG + " path ==>" + path); - callback("success", defaultReturn); - }, - - normalizeUri(uri, callback) { - console.info(TAG + '==================== DataAbility test interface by normalizeUri ================'); - let err = "Error Uri" - if (uri != dataAbilityUri) { - console.debug(TAG + ' uri != dataAbilityUri') - callback(err, ""); - } - callback("success", uri); - }, - - denormalizeUri(uri, callback) { - console.info(TAG + '==================== DataAbility test interface by denormalizeUri ================'); - console.info(TAG + "denormalizeUri uri:" + JSON.stringify(uri)); - - let err = "Error Uri" - if (uri != dataAbilityUri) { - console.debug(TAG + ' uri != dataAbilityUri') - callback(err, ""); - } - callback("success", uri); - } -}; \ No newline at end of file diff --git a/aafwk/aafwk_standard/actsfwkdataaccessortest/actsdataabilityrelyhap/entry/src/main/resources/base/element/string.json b/aafwk/aafwk_standard/actsfwkdataaccessortest/actsdataabilityrelyhap/entry/src/main/resources/base/element/string.json deleted file mode 100644 index 22c139ebd13a685e9ce52a84ea2b625e18d8db40..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/actsfwkdataaccessortest/actsdataabilityrelyhap/entry/src/main/resources/base/element/string.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "string": [ - { - "name": "entry_MainAbility", - "value": "ServiceExtAbility" - }, - { - "name": "description_mainability", - "value": "eTS_Empty Ability" - }, - { - "name": "description_serviceextability", - "value": "hap sample empty service" - }, - { - "name": "description_dataability", - "value": "hap sample empty provider" - }, - { - "name": "description_mainability2", - "value": "eTS_Empty Ability" - }, - { - "name": "entry_MainAbility2", - "value": "entry_MainAbility2" - }, - { - "name": "description_testdataability", - "value": "hap sample empty provider" - }, - { - "name": "permreason_dataability", - "value": "request dataability premission" - } - ] -} \ No newline at end of file diff --git a/aafwk/aafwk_standard/actsfwkdataaccessortest/actsdataabilityrelyhap/entry/src/main/resources/base/media/icon.png b/aafwk/aafwk_standard/actsfwkdataaccessortest/actsdataabilityrelyhap/entry/src/main/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/aafwk/aafwk_standard/actsfwkdataaccessortest/actsdataabilityrelyhap/entry/src/main/resources/base/media/icon.png and /dev/null differ diff --git a/aafwk/aafwk_standard/actsfwkdataaccessortest/actsdataabilityrelyhap/signature/openharmony_sx.p7b b/aafwk/aafwk_standard/actsfwkdataaccessortest/actsdataabilityrelyhap/signature/openharmony_sx.p7b deleted file mode 100644 index 66b4457a8a81fb8d3356cf46d67226c850944858..0000000000000000000000000000000000000000 Binary files a/aafwk/aafwk_standard/actsfwkdataaccessortest/actsdataabilityrelyhap/signature/openharmony_sx.p7b and /dev/null differ diff --git a/aafwk/aafwk_standard/actsfwkdataaccessortest/actsfwkdataaccessortest/Test.json b/aafwk/aafwk_standard/actsfwkdataaccessortest/actsfwkdataaccessortest/Test.json index 26277c340b28cc78ab0fbd9ef45a8d97275228d0..9866397aff0b6cff39d20f7af98054368d9e7ed8 100644 --- a/aafwk/aafwk_standard/actsfwkdataaccessortest/actsfwkdataaccessortest/Test.json +++ b/aafwk/aafwk_standard/actsfwkdataaccessortest/actsfwkdataaccessortest/Test.json @@ -9,8 +9,7 @@ "kits": [ { "test-file-name": [ - "ActsFWKDataAccessorTest.hap", - "ActsDataAbilityRelyHap.hap" + "ActsFWKDataAccessorTest.hap" ], "type": "AppInstallKit", "cleanup-apps": true diff --git a/aafwk/aafwk_standard/actsfwkdataaccessortest/actsfwkdataaccessortest/entry/src/main/js/test/DataAbilityHelperJsSt.test.js b/aafwk/aafwk_standard/actsfwkdataaccessortest/actsfwkdataaccessortest/entry/src/main/js/test/DataAbilityHelperJsSt.test.js index a0c94f156a0a475468797244a41c63748c040d15..1bac0a031c765b8faa51e5360f045eec31465758 100644 --- a/aafwk/aafwk_standard/actsfwkdataaccessortest/actsfwkdataaccessortest/entry/src/main/js/test/DataAbilityHelperJsSt.test.js +++ b/aafwk/aafwk_standard/actsfwkdataaccessortest/actsfwkdataaccessortest/entry/src/main/js/test/DataAbilityHelperJsSt.test.js @@ -13,20 +13,11 @@ * limitations under the License. */ import featureAbility from '@ohos.ability.featureAbility' -import ohosDataAbility from '@ohos.data.dataability' import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index' describe('ActsDataAbilityHelperTest', function () { let dataAbilityUri = ("dataability:///com.example.myapplication.DataAbility"); - let dataAbilityUri2 = ("dataability:///com.example.myapplication.DataAbility2"); - let dataAbilityUri3 = ("dataability:///com.example.myapplication.DataAbility3"); let DAHelper; - let gSetTimeout = 500; - var valueBucket = { - "name": "ActsDataAbilityHelperTest", - "age": 24, - "salary": 2024.20, - } beforeAll(async (done) => { console.debug('= ACTS_beforeAll ====: ' + DAHelper) - let valueBucketM - try { - DAHelper.insert(dataAbilityUri, valueBucketM) - .then(function (data) { - console.debug("=ACTS_Insert_0100 then data====>" - + ("json data 【") + JSON.stringify(data) + (" 】")); - expect(data).assertEqual(-2); - console.log('ACTS_Insert_0100====" - + ("json err 【") + JSON.stringify(err) + (" 】 ")); - expect(false).assertTrue(); - console.log('ACTS_Insert_0100====:' + err); - expect(false).assertTrue(); - console.log('ACTS_Insert_0100====: ' + DAHelper) - let valueBucketM = 'undefined'; - try { - await DAHelper.insert(dataAbilityUri, valueBucketM, - (err, data) => { - console.debug("=ACTS_Insert_0200 err,data=======>" - + ("json err【") + JSON.stringify(err) + (" 】data【") + data + (" 】;")); - expect(data).assertEqual(-2); - console.log('ACTS_Insert_0200====:' + err); - console.log('ACTS_Insert_0200==== { - console.debug("=ACTS_Insert_0300 then data====>" - + ("json data 【") + JSON.stringify(data) + (" 】")); - expect(data).assertEqual(1); - console.log('ACTS_Insert_0300==== { - console.debug("=ACTS_Insert_0300 catch err ====>" - + ("json err 【") + JSON.stringify(err) + (" 】 ")); - console.log('ACTS_Insert_0300====:' + err); - console.log('ACTS_Insert_0300====: ' + DAHelper) - try { - await DAHelper.insert(dataAbilityUri, valueBucket, - (err, data) => { - console.debug("=ACTS_Insert_0400 err,data=======>" - + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;")); - expect(data).assertEqual(1); - console.log('ACTS_Insert_0400====:' + err); - console.log('ACTS_Insert_0400==== { - console.debug("=ACTS_Insert_0500 then data====>" - + ("json data 【") + JSON.stringify(data) + (" 】")); - expect(data).assertEqual(0); - console.log('ACTS_Insert_0500==== { - console.debug("=ACTS_Insert_0500 catch err ====>" - + ("json err 【") + JSON.stringify(err) + (" 】 ")); - console.log('ACTS_Insert_0500====:' + err); - console.log('ACTS_Insert_0500====: ' + DAHelper) - try { - await DAHelper.insert(undefined, valueBucket, - (err, data) => { - console.debug("=ACTS_Insert_0600 err,data=======>" - + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;")); - expect(err.code).assertEqual(-1); - expect(data).assertEqual(0); - console.log('ACTS_Insert_0600====:' + err); - console.log('ACTS_Insert_0600==== { - console.debug("=ACTS_Insert_0700 then data====>" - + ("json data 【") + JSON.stringify(data) + (" 】")); - expect(data).assertEqual(1); - - currentAlertTimeout = setTimeout(() => { - console.log('ACTS_Insert_0700==== { - console.debug("=ACTS_Insert_0700 catch err ====>" - + ("json err 【") + JSON.stringify(err) + (" 】 ")); - console.log('ACTS_Insert_0700====:' + err); - console.log('ACTS_Insert_0700====: ' + DAHelper) - var currentAlertTimeout; - try { - function onAsyncCallbackInsert0800(err) { - clearTimeout(currentAlertTimeout); - expect(err.code).assertEqual(0); - console.log('ACTS_Insert_0800==== { - console.debug("=ACTS_Insert_0800 err,data=======>" - + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;")); - expect(data).assertEqual(1); - - currentAlertTimeout = setTimeout(() => { - console.log('ACTS_Insert_0800====:' + err); - console.log('ACTS_Insert_0800==== { - console.debug("=ACTS_Insert_0900 then data====>" - + ("json data 【") + JSON.stringify(data) + (" 】")); - expect(data).assertEqual(0); - console.log('ACTS_Insert_0900==== { - console.debug("=ACTS_Insert_0900 catch err ====>" - + ("json err 【") + JSON.stringify(err) + (" 】 ")); - console.log('ACTS_Insert_0900====:' + err); - console.log('ACTS_Insert_0900====: ' + DAHelper) - try { - await DAHelper.insert(123456, valueBucket, - (err, data) => { - console.debug("=ACTS_Insert_1000 err,data=======>" - + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;")); - expect(err.code).assertEqual(-1); - expect(data).assertEqual(0); - console.log('ACTS_Insert_1000====:' + err); - console.log('ACTS_Insert_1000==== { - console.debug("=ACTS_Insert_1100 then data====>" - + ("json data 【") + JSON.stringify(data) + (" 】")); - expect(data).assertEqual(-1); - console.log('ACTS_Insert_1100==== { - console.debug("=ACTS_Insert_1100 catch err ====>" - + ("json err 【") + JSON.stringify(err) + (" 】 ")); - console.log('ACTS_Insert_1100====:' + err); - console.log('ACTS_Insert_1100====: ' + DAHelper) - try { - await DAHelper.insert(dataAbilityUri2, valueBucket, - (err, data) => { - console.debug("=ACTS_Insert_1200 err,data=======>" - + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;")); - expect(data).assertEqual(-1); - console.log('ACTS_Insert_1200====:' + err); - console.log('ACTS_Insert_1200==== { - console.debug("=ACTS_Insert_1300 then data====>" - + ("json data 【") + JSON.stringify(data) + (" 】")); - expect(data).assertEqual(-1); - console.log('ACTS_Insert_1300==== { - console.debug("=ACTS_Insert_1300 catch err ====>" - + ("json err 【") + JSON.stringify(err) + (" 】 ")); - console.log('ACTS_Insert_1300====:' + err); - console.log('ACTS_Insert_1300====: ' + DAHelper) - try { - await DAHelper.insert("errorUri", valueBucket, - (err, data) => { - console.debug("=ACTS_Insert_1400 err,data=======>" - + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;")); - expect(data).assertEqual(-1); - console.log('ACTS_Insert_1400====:' + err); - console.log('ACTS_Insert_1400==== { - console.debug("=ACTS_Insert_1500 then data====>" - + ("json data 【") + JSON.stringify(data) + (" 】")); - expect(data).assertEqual(-2); - console.log('ACTS_Insert_1500==== { - console.debug("=ACTS_Insert_1500 catch err ====>" - + ("json err 【") + JSON.stringify(err) + (" 】 ")); - console.log('ACTS_Insert_1500====:' + err); - console.log('ACTS_Insert_1500====: ' + DAHelper) - var valueBucketK = {}; - try { - await DAHelper.insert(dataAbilityUri, valueBucketK, - (err, data) => { - console.debug("=ACTS_Insert_1600 err,data=======>" - + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;")); - expect(data).assertEqual(-2); - console.log('ACTS_Insert_1600====:' + err); - console.log('ACTS_Insert_1600====: ' + DAHelper) - var valueBucketM; - try { - DAHelper.batchInsert( - dataAbilityUri, - valueBucketM - ).then((data) => { - console.debug("=ACTS_BatchInsert_0100 then data====>" - + ("json data 【") + JSON.stringify(data) + (" 】; ====>")); - expect(data).assertEqual(0); - console.log('ACTS_BatchInsert_0100==== { - console.debug("=ACTS_BatchInsert_0100 catch err ====>" - + ("json err 【") + JSON.stringify(err) + (" 】 ")); - console.log('ACTS_BatchInsert_0100====:' + err); - console.log('ACTS_BatchInsert_0100====: ' + DAHelper) - var valueBucketM; - try { - await DAHelper.batchInsert( - dataAbilityUri, - valueBucketM, - (err, data) => { - console.debug("=ACTS_BatchInsert_0200 err,data=======>" - + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;")); - expect(data).assertEqual(0); - console.log('ACTS_BatchInsert_0200====:' + err); - console.log('ACTS_BatchInsert_0200====: ' + DAHelper) - var valueBucketArray = new Array({}, {}, {}) - try { - DAHelper.batchInsert( - dataAbilityUri, - valueBucketArray, - ).then((data) => { - console.debug("=ACTS_BatchInsert_0300 then data====>" - + ("json data 【") + JSON.stringify(data) + (" 】; ====>")); - expect(data).assertEqual(3); - console.log('ACTS_BatchInsert_0300==== { - console.debug("=ACTS_BatchInsert_0300 catch err ====>" - + ("json err 【") + JSON.stringify(err) + (" 】 ")); - console.log('ACTS_BatchInsert_0300====:' + err); - console.log('ACTS_BatchInsert_0300====: ' + DAHelper) - var valueBucketArray = new Array({}, {}, {}) - try { - await DAHelper.batchInsert( - dataAbilityUri, - valueBucketArray, - (err, data) => { - console.debug("=ACTS_BatchInsert_0400 err,data=======>" - + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;")); - expect(data).assertEqual(3); - console.log('ACTS_BatchInsert_0400====:' + err); - console.log('ACTS_BatchInsert_0400====: ' + DAHelper) - try { - var valueBucketArray = new Array({ "name": "ActsDataAbilityHelperTest", "age": 24, "salary": 2024.20, }, - { "name": "ActsDataAbilityHelperTest", "age": 24, "salary": 2024.20, }, - { "name": "ActsDataAbilityHelperTest", "age": 24, "salary": 2024.20, }) - - DAHelper.batchInsert( - dataAbilityUri, - valueBucketArray, - ).then((data) => { - console.debug("=ACTS_BatchInsert_0500 BatchInsert Promise then data====>" - + ("json data 【") + JSON.stringify(data) + (" 】")); - expect(data).assertEqual(3); - console.log('ACTS_BatchInsert_0500==== { - console.debug("=ACTS_BatchInsert_0500 BatchInsert Promise catch err ====>" - + ("json err 【") + JSON.stringify(err) + (" 】 ")); - console.log('ACTS_BatchInsert_0500====:' + err); - console.log('ACTS_BatchInsert_0500====: ' + DAHelper) - var valueBucketArray = new Array({ "name": "ActsDataAbilityHelperTest", "age": 24, "salary": 2024.20, }, - { "name": "ActsDataAbilityHelperTest", "age": 24, "salary": 2024.20, }, - { "name": "ActsDataAbilityHelperTest", "age": 24, "salary": 2024.20, }) - try { - await DAHelper.batchInsert( - dataAbilityUri, - valueBucketArray, - (err, data) => { - console.debug("=ACTS_BatchInsert_0600 err,data=======>" - + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;")); - expect(data).assertEqual(3); - console.log('ACTS_BatchInsert_0600====:' + err); - console.log('ACTS_BatchInsert_0600====: ' + DAHelper) - try { - var valueBucketArray = new Array({ "name": "ActsDataAbilityHelperTest", "age": 24, "salary": 2024.20, }, - { "name": "ActsDataAbilityHelperTest", "age": 24, "salary": 2024.20, }, - { "name": "ActsDataAbilityHelperTest", "age": 24, "salary": 2024.20, }) - - DAHelper.batchInsert( - dataAbilityUri2, - valueBucketArray, - ).then((data) => { - console.debug("=ACTS_BatchInsert_0700 BatchInsert Promise then data====>" - + ("json data 【") + JSON.stringify(data) + (" 】")); - expect(data).assertEqual(-1); - console.log('ACTS_BatchInsert_0700==== { - console.debug("=ACTS_BatchInsert_0700 BatchInsert Promise catch err ====>" - + ("json err 【") + JSON.stringify(err) + (" 】 ")); - console.log('ACTS_BatchInsert_0700====:' + err); - console.log('ACTS_BatchInsert_0700====: ' + DAHelper) - var valueBucketArray = new Array({ "name": "ActsDataAbilityHelperTest", "age": 24, "salary": 2024.20, }, - { "name": "ActsDataAbilityHelperTest", "age": 24, "salary": 2024.20, }, - { "name": "ActsDataAbilityHelperTest", "age": 24, "salary": 2024.20, }) - try { - await DAHelper.batchInsert( - dataAbilityUri2, - valueBucketArray, - (err, data) => { - console.debug("=ACTS_BatchInsert_0800 err,data=======>" - + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;")); - expect(data).assertEqual(-1); - console.log('ACTS_BatchInsert_0800====:' + err); - console.log('ACTS_BatchInsert_0800====: ' + DAHelper) - try { - var valueBucketArray = new Array({ "name": "ActsDataAbilityHelperTest", "age": 24, "salary": 2024.20, }, - { "name": "ActsDataAbilityHelperTest", "age": 24, "salary": 2024.20, }, - { "name": "ActsDataAbilityHelperTest", "age": 24, "salary": 2024.20, }) - - DAHelper.batchInsert( - undefined, - valueBucketArray, - ).then((data) => { - console.debug("=ACTS_BatchInsert_0900 BatchInsert Promise then data====>" - + ("json data 【") + JSON.stringify(data) + (" 】")); - expect(data).assertEqual(0); - console.log('ACTS_BatchInsert_0900==== { - console.debug("=ACTS_BatchInsert_0900 BatchInsert Promise catch err ====>" - + ("json err 【") + JSON.stringify(err) + (" 】 ")); - console.log('ACTS_BatchInsert_0900====:' + err); - console.log('ACTS_BatchInsert_0900====: ' + DAHelper) - var valueBucketArray = new Array({ "name": "ActsDataAbilityHelperTest", "age": 24, "salary": 2024.20, }, - { "name": "ActsDataAbilityHelperTest", "age": 24, "salary": 2024.20, }, - { "name": "ActsDataAbilityHelperTest", "age": 24, "salary": 2024.20, }) - try { - await DAHelper.batchInsert( - undefined, - valueBucketArray, - (err, data) => { - console.debug("=ACTS_BatchInsert_1000 err,data=======>" - + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;")); - expect(err.code).assertEqual(-1); - console.log('ACTS_BatchInsert_1000====:' + err); - console.log('ACTS_BatchInsert_1000====: ' + DAHelper) - try { - var valueBucketArray = new Array({ "name": "ActsDataAbilityHelperTest", "age": 24, "salary": 2024.20, }, - { "name": "ActsDataAbilityHelperTest", "age": 24, "salary": 2024.20, }, - { "name": "ActsDataAbilityHelperTest", "age": 24, "salary": 2024.20, }) - - DAHelper.batchInsert( - "error", - valueBucketArray, - ).then((data) => { - console.debug("=ACTS_BatchInsert_1100 BatchInsert Promise then data====>" - + ("json data 【") + JSON.stringify(data) + (" 】")); - expect(data).assertEqual(-1); - console.log('ACTS_BatchInsert_1100==== { - console.debug("=ACTS_BatchInsert_1100 BatchInsert Promise catch err ====>" - + ("json err 【") + JSON.stringify(err) + (" 】 ")); - console.log('ACTS_BatchInsert_1100====:' + err); - console.log('ACTS_BatchInsert_1100====: ' + DAHelper) - var valueBucketArray = new Array({ "name": "ActsDataAbilityHelperTest", "age": 24, "salary": 2024.20, }, - { "name": "ActsDataAbilityHelperTest", "age": 24, "salary": 2024.20, }, - { "name": "ActsDataAbilityHelperTest", "age": 24, "salary": 2024.20, }) - try { - await DAHelper.batchInsert( - "error", - valueBucketArray, - (err, data) => { - console.debug("=ACTS_BatchInsert_1200 err,data=======>" - + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;")); - expect(data).assertEqual(-1); - console.log('ACTS_BatchInsert_1200====:' + err); - console.log('ACTS_BatchInsert_1200====: ' + DAHelper) - try { - var valueBucketArray = new Array({ "name": "ActsDataAbilityHelperTest", "age": 24, "salary": 2024.20, }, - { "name": "ActsDataAbilityHelperTest", "age": 24, "salary": 2024.20, }, - { "name": "ActsDataAbilityHelperTest", "age": 24, "salary": 2024.20, }) - - DAHelper.batchInsert( - 123456, - valueBucketArray, - ).then((data) => { - console.debug("=ACTS_BatchInsert_1300 BatchInsert Promise then data====>" - + ("json data 【") + JSON.stringify(data) + (" 】")); - expect(data).assertEqual(0); - console.log('ACTS_BatchInsert_1300==== { - console.debug("=ACTS_BatchInsert_1300 BatchInsert Promise catch err ====>" - + ("json err 【") + JSON.stringify(err) + (" 】 ")); - console.log('ACTS_BatchInsert_1300====:' + err); - console.log('ACTS_BatchInsert_1300====: ' + DAHelper) - var valueBucketArray = new Array({ "name": "ActsDataAbilityHelperTest", "age": 24, "salary": 2024.20, }, - { "name": "ActsDataAbilityHelperTest", "age": 24, "salary": 2024.20, }, - { "name": "ActsDataAbilityHelperTest", "age": 24, "salary": 2024.20, }) - try { - await DAHelper.batchInsert( - 123456, - valueBucketArray, - (err, data) => { - console.debug("=ACTS_BatchInsert_1400 err,data=======>" - + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;")); - expect(err.code).assertEqual(-1); - console.log('ACTS_BatchInsert_1400====:' + err); - console.log('ACTS_BatchInsert_1400====: ' + DAHelper) - try { - DAHelper.batchInsert( - dataAbilityUri, - valueBucket, - ).then((data) => { - console.debug("=ACTS_BatchInsert_1500 BatchInsert Promise then data====>" - + ("json data 【") + JSON.stringify(data) + (" 】")); - expect(data).assertEqual(0); - console.log('ACTS_BatchInsert_1500==== { - console.debug("=ACTS_BatchInsert_1500 BatchInsert Promise catch err ====>" - + ("json err 【") + JSON.stringify(err) + (" 】 ")); - console.log('ACTS_BatchInsert_1500====:' + err); - console.log('ACTS_BatchInsert_1500====: ' + DAHelper) - try { - await DAHelper.batchInsert( - dataAbilityUri, - valueBucket, - (err, data) => { - console.debug("=ACTS_BatchInsert_1600 err,data=======>" - + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;")); - expect(data).assertEqual(0); - console.log('ACTS_BatchInsert_1600====:' + err); - console.log('ACTS_BatchInsert_1600====" - + ("json queryPromise 【") + JSON.stringify(queryPromise) + (" 】 ") + " , " + queryPromise); - expect(typeof (queryPromise)).assertEqual("object"); - console.log('ACTS_Query_0100====:' + err); - console.log('ACTS_Query_0100==== { - console.debug("=ACTS_Query_0200 query err,data=======>" - + ("json err【") + JSON.stringify(err) + (" 】json data【") - + JSON.stringify(data) + (" 】;") + " , " + data); - expect(typeof (data)).assertEqual("object"); - console.log('ACTS_Query_0200====:' + err); - console.log('ACTS_Query_0200====" - + ("json queryPromise 【") + JSON.stringify(queryPromise) + (" 】 ") + " , " + queryPromise); - expect(typeof (queryPromise)).assertEqual("object"); - console.log('ACTS_Query_0300====:' + err); - console.log('ACTS_Query_0300==== { - console.debug("=ACTS_Query_0400 query err,data=======>" - + ("json err【") + JSON.stringify(err) + (" 】json data【") - + JSON.stringify(data) + (" 】;") + " , " + data); - expect(typeof (data)).assertEqual("object"); - console.log('ACTS_Query_0400====:' + err); - console.log('ACTS_Query_0400====" - + ("json queryPromise 【") + JSON.stringify(queryPromise) + (" 】 ") + " , " + queryPromise); - expect(typeof (queryPromise)).assertEqual("object"); - console.log('ACTS_Query_0500====:' + err); - console.log('ACTS_Query_0500==== { - console.debug("=ACTS_Query_0600 query err,data=======>" - + ("json err【") + JSON.stringify(err) + (" 】json data【") - + JSON.stringify(data) + (" 】;") + " , " + data); - expect(typeof (data)).assertEqual("object"); - console.log('ACTS_Query_0600====:' + err); - console.log('ACTS_Query_0600====" - + ("json queryPromise 【") + JSON.stringify(queryPromise) + (" 】 ") + " , " + queryPromise); - expect(typeof (queryPromise)).assertEqual("object"); - console.log('ACTS_Query_0700====:' + err); - console.log('ACTS_Query_0700==== { - console.debug("=ACTS_Query_0800 query err,data=======>" - + ("json err【") + JSON.stringify(err) + (" 】json data【") - + JSON.stringify(data) + (" 】;") + " , " + data); - expect(typeof (data)).assertEqual("object"); - console.log('ACTS_Query_0800====:' + err); - console.log('ACTS_Query_0800====" - + ("json queryPromise 【") + JSON.stringify(queryPromise) + (" 】 ") + " , " + queryPromise); - expect(typeof (queryPromise)).assertEqual("object"); - console.log('ACTS_Query_0900====:' + err); - console.log('ACTS_Query_0900==== { - console.debug("=ACTS_Query_1000 query err,data=======>" - + ("json err【") + JSON.stringify(err) + (" 】json data【") - + JSON.stringify(data) + (" 】;") + " , " + data); - expect(typeof (data)).assertEqual("object"); - console.log('ACTS_Query_1000====:' + err); - console.log('ACTS_Query_1000====" - + ("json queryPromise 【") + JSON.stringify(queryPromise) + (" 】 ") + " , " + queryPromise); - expect(typeof (queryPromise)).assertEqual("object"); - console.log('ACTS_Query_1100====:' + err); - console.log('ACTS_Query_1100==== { - console.debug("=ACTS_Query_1200 query err,data=======>" - + ("json err【") + JSON.stringify(err) + (" 】json data【") - + JSON.stringify(data) + (" 】;") + " , " + data); - expect(typeof (data)).assertEqual("object"); - console.log('ACTS_Query_1200====:' + err); - console.log('ACTS_Query_1200====" - + ("json queryPromise 【") + JSON.stringify(queryPromise) + (" 】 ") + " , " + queryPromise); - expect(typeof (queryPromise)).assertEqual("object"); - console.log('ACTS_Query_1300====:' + err); - console.log('ACTS_Query_1300==== { - console.debug("=ACTS_Query_1400 query err,data=======>" - + ("json err【") + JSON.stringify(err) + (" 】json data【") - + JSON.stringify(data) + (" 】;") + " , " + data); - expect(typeof (data)).assertEqual("object"); - console.log('ACTS_Query_1400====:' + err); - console.log('ACTS_Query_1400====: ' + DAHelper) - try { - let valueBucketNull = {}; - let predicates = new ohosDataAbility.DataAbilityPredicates(); - console.debug("=ACTS_Update_0100 predicates====>" - + ("json predicates 【") + JSON.stringify(predicates) + (" 】") + " , " + predicates); - DAHelper.update( - dataAbilityUri, - valueBucketNull, - predicates - ).then((data) => { - console.debug("=ACTS_Update_0100 then data====>" - + ("json data 【") + JSON.stringify(data) + (" 】")); - expect(data).assertEqual(-2); - console.log('ACTS_Update_0100==== { - console.debug("=ACTS_Update_0100 catch err ====>" - + ("json err 【") + JSON.stringify(err) + (" 】 ")); - expect(false).assertTrue(); - console.log('ACTS_Update_0100====:' + err); - expect(false).assertTrue(); - console.log('ACTS_Update_0100====" - + ("json predicates 【") + JSON.stringify(predicates) + (" 】") + " , " + predicates); - await DAHelper.update( - dataAbilityUri, - valueBucketNull, - predicates, - (err, data) => { - console.debug("=ACTS_Update_0200 err,data=======>" - + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;")); - expect(data).assertEqual(-2); - console.log('ACTS_Update_0200====:' + err); - expect(false).assertTrue(); - console.log('ACTS_Update_0200====: ' + DAHelper) - try { - let predicates = new ohosDataAbility.DataAbilityPredicates(); - predicates.equalTo('contact_id', 1); - predicates.limitAs(10); - predicates.orderByAsc("order_by_class"); - predicates.offsetAs(1); - console.debug("=ACTS_Update_0300 predicates====>" - + ("json predicates 【") + JSON.stringify(predicates) + (" 】") + " , " + predicates); - DAHelper.update( - dataAbilityUri, - valueBucket, - predicates - ).then((data) => { - console.debug("=ACTS_Update_0300 then data====>" - + ("json data 【") + JSON.stringify(data) + (" 】")); - expect(data).assertEqual(1); - console.log('ACTS_Update_0300==== { - console.debug("=ACTS_Update_0300 catch err ====>" - + ("json err 【") + JSON.stringify(err) + (" 】 ")); - console.log('ACTS_Update_0300====:' + err); - console.log('ACTS_Update_0300====: ' + DAHelper) - try { - let predicates = new ohosDataAbility.DataAbilityPredicates(); - predicates.equalTo('contact_id', 1); - predicates.limitAs(10); - predicates.orderByAsc("order_by_class"); - predicates.offsetAs(1); - console.debug("=ACTS_Update_0400 predicates====>" - + ("json predicates 【") + JSON.stringify(predicates) + (" 】") + " , " + predicates); - await DAHelper.update( - dataAbilityUri, - valueBucket, - predicates, - (err, data) => { - console.debug("=ACTS_Update_0400 err,data=======>" - + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;")); - expect(data).assertEqual(1); - console.log('ACTS_Update_0400====:' + err); - console.log('ACTS_Update_0400====: ' + DAHelper) - try { - let predicates = new ohosDataAbility.DataAbilityPredicates(); - predicates.equalTo('contact_id', 1); - predicates.limitAs(10); - predicates.orderByAsc("order_by_class"); - predicates.offsetAs(1); - console.debug("=ACTS_Update_0500 predicates====>" - + ("json predicates 【") + JSON.stringify(predicates) + (" 】") + " , " + predicates); - DAHelper.update( - undefined, - valueBucket, - predicates - ).then((data) => { - console.debug("=ACTS_Update_0500 then data====>" - + ("json data 【") + JSON.stringify(data) + (" 】")); - expect(data).assertEqual(0); - console.log('ACTS_Update_0500==== { - console.debug("=ACTS_Update_0500 catch err ====>" - + ("json err 【") + JSON.stringify(err) + (" 】 ")); - console.log('ACTS_Update_0500====:' + err); - console.log('ACTS_Update_0500====: ' + DAHelper) - try { - let predicates = new ohosDataAbility.DataAbilityPredicates(); - predicates.equalTo('contact_id', 1); - predicates.limitAs(10); - predicates.orderByAsc("order_by_class"); - predicates.offsetAs(1); - console.debug("=ACTS_Update_0600 predicates====>" - + ("json predicates 【") + JSON.stringify(predicates) + (" 】") + " , " + predicates); - await DAHelper.update( - undefined, - valueBucket, - predicates, - (err, data) => { - console.debug("=ACTS_Update_0600 err,data=======>" - + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;")); - expect(err.code).assertEqual(-1); - expect(data).assertEqual(0); - console.log('ACTS_Update_0600====:' + err); - console.log('ACTS_Update_0600====: ' + DAHelper) - var currentAlertTimeout; - try { - function onAsyncCallbackUpdate0700(err) { - expect(err.code).assertEqual(0); - clearTimeout(currentAlertTimeout); - console.log('ACTS_Update_0700====" - + ("json predicates 【") + JSON.stringify(predicates) + (" 】") + " , " + predicates); - DAHelper.update( - dataAbilityUri, - valueBucket, - predicates - ).then((data) => { - console.debug("=ACTS_Update_0700 then data====>" - + ("json data 【") + JSON.stringify(data) + (" 】")); - expect(data).assertEqual(1); - currentAlertTimeout = setTimeout(() => { - console.log('ACTS_Update_0700==== { - console.debug("=ACTS_Update_0700 catch err ====>" - + ("json err 【") + JSON.stringify(err) + (" 】 ") + err); - console.log('ACTS_Update_0700====:' + err); - console.log('ACTS_Update_0700====: ' + DAHelper) - var currentAlertTimeout; - try { - function onAsyncCallbackUpdate0800(err) { - expect(err.code).assertEqual(0); - clearTimeout(currentAlertTimeout); - console.log('ACTS_Update_0800====" - + ("json predicates 【") + JSON.stringify(predicates) + (" 】") + " , " + predicates); - await DAHelper.update( - dataAbilityUri, - valueBucket, - predicates, - (err, data) => { - console.debug("=ACTS_Update_0800 err,data=======>" - + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;")); - expect(data).assertEqual(1); - currentAlertTimeout = setTimeout(() => { - console.log('ACTS_Update_0800====:' + err); - console.log('ACTS_Update_0800====: ' + DAHelper) - try { - let predicates = new ohosDataAbility.DataAbilityPredicates(); - predicates.equalTo('contact_id', 1); - predicates.limitAs(10); - predicates.orderByAsc("order_by_class"); - predicates.offsetAs(1); - console.debug("=ACTS_Update_0900 predicates====>" - + ("json predicates 【") + JSON.stringify(predicates) + (" 】") + " , " + predicates); - DAHelper.update( - 123456, - valueBucket, - predicates - ).then((data) => { - console.debug("=ACTS_Update_0900 then data====>" - + ("json data 【") + JSON.stringify(data) + (" 】")); - expect(data).assertEqual(0); - console.log('ACTS_Update_0900==== { - console.debug("=ACTS_Update_0900 catch err ====>" - + ("json err 【") + JSON.stringify(err) + (" 】 ")); - console.log('ACTS_Update_0900====:' + err); - console.log('ACTS_Update_0900====: ' + DAHelper) - try { - let predicates = new ohosDataAbility.DataAbilityPredicates(); - predicates.equalTo('contact_id', 1); - predicates.limitAs(10); - predicates.orderByAsc("order_by_class"); - predicates.offsetAs(1); - console.debug("=ACTS_Update_1000 predicates====>" - + ("json predicates 【") + JSON.stringify(predicates) + (" 】") + " , " + predicates); - await DAHelper.update( - 123456, - valueBucket, - predicates, - (err, data) => { - console.debug("=ACTS_Update_1000 err,data=======>" - + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;")); - expect(err.code).assertEqual(-1); - expect(data).assertEqual(0); - console.log('ACTS_Update_1000====:' + err); - console.log('ACTS_Update_1000====: ' + DAHelper) - try { - let predicates = new ohosDataAbility.DataAbilityPredicates(); - predicates.equalTo('contact_id', 1); - predicates.limitAs(10); - predicates.orderByAsc("order_by_class"); - predicates.offsetAs(1); - console.debug("=ACTS_Update_1100 predicates====>" - + ("json predicates 【") + JSON.stringify(predicates) + (" 】") + " , " + predicates); - DAHelper.update( - dataAbilityUri2, - valueBucket, - predicates - ).then((data) => { - console.debug("=ACTS_Update_1100 then data====>" - + ("json data 【") + JSON.stringify(data) + (" 】")); - expect(data).assertEqual(-1); - console.log('ACTS_Update_1100==== { - console.debug("=ACTS_Update_1100 catch err ====>" - + ("json err 【") + JSON.stringify(err) + (" 】 ")); - console.log('ACTS_Update_1100====:' + err); - console.log('ACTS_Update_1100====: ' + DAHelper) - try { - let predicates = new ohosDataAbility.DataAbilityPredicates(); - predicates.equalTo('contact_id', 1); - predicates.limitAs(10); - predicates.orderByAsc("order_by_class"); - predicates.offsetAs(1); - console.debug("=ACTS_Update_1200 predicates====>" - + ("json predicates 【") + JSON.stringify(predicates) + (" 】") + " , " + predicates); - await DAHelper.update( - dataAbilityUri2, - valueBucket, - predicates, - (err, data) => { - console.debug("=ACTS_Update_1200 err,data=======>" - + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;")); - expect(data).assertEqual(-1); - console.log('ACTS_Update_1200====:' + err); - console.log('ACTS_Update_1200====: ' + DAHelper) - try { - let predicates = new ohosDataAbility.DataAbilityPredicates(); - predicates.equalTo('contact_id', 1); - predicates.limitAs(10); - predicates.orderByAsc("order_by_class"); - predicates.offsetAs(1); - console.debug("=ACTS_Update_1300 predicates====>" - + ("json predicates 【") + JSON.stringify(predicates) + (" 】") + " , " + predicates); - DAHelper.update( - "error_uri", - valueBucket, - predicates - ).then((data) => { - console.debug("=ACTS_Update_1300 then data====>" - + ("json data 【") + JSON.stringify(data) + (" 】")); - expect(data).assertEqual(-1); - console.log('ACTS_Update_1300==== { - console.debug("=ACTS_Update_1300 catch err ====>" - + ("json err 【") + JSON.stringify(err) + (" 】 ")); - console.log('ACTS_Update_1300====:' + err); - console.log('ACTS_Update_1300====: ' + DAHelper) - try { - let predicates = new ohosDataAbility.DataAbilityPredicates(); - predicates.equalTo('contact_id', 1); - predicates.limitAs(10); - predicates.orderByAsc("order_by_class"); - predicates.offsetAs(1); - console.debug("=ACTS_Update_1400 predicates====>" - + ("json predicates 【") + JSON.stringify(predicates) + (" 】") + " , " + predicates); - await DAHelper.update( - "error_uri", - valueBucket, - predicates, - (err, data) => { - console.debug("=ACTS_Update_1400 err,data=======>" - + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;")); - expect(data).assertEqual(-1); - console.log('ACTS_Update_1400====:' + err); - console.log('ACTS_Update_1400====: ' + DAHelper) - try { - let predicates = new ohosDataAbility.DataAbilityPredicates(); - console.debug("=ACTS_Delete_0100 predicates====>" - + ("json predicates 【") + JSON.stringify(predicates) + (" 】") + " , " + predicates); - DAHelper.delete( - dataAbilityUri, - predicates - ).then((data) => { - console.debug("=ACTS_Delete_0100 then data====>" - + ("json data 【") + JSON.stringify(data) + (" 】")); - expect(data).assertEqual(1); - console.log('ACTS_Delete_0100==== { - console.debug("=ACTS_Delete_0100 catch err ====>" - + ("json err 【") + JSON.stringify(err) + (" 】 ")); - expect(false).assertTrue(); - console.log('ACTS_Delete_0100====:' + err); - expect(false).assertTrue(); - console.log('ACTS_Delete_0100====: ' + DAHelper) - try { - let predicates = new ohosDataAbility.DataAbilityPredicates(); - console.debug("=ACTS_Delete_0200 predicates====>" - + ("json predicates 【") + JSON.stringify(predicates) + (" 】") + " , " + predicates); - await DAHelper.delete( - dataAbilityUri, - predicates, - (err, data) => { - console.debug("=ACTS_Delete_0200 err,data=======>" - + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;")); - expect(data).assertEqual(1); - console.log('ACTS_Delete_0200====:' + err); - expect(false).assertTrue(); - console.log('ACTS_Delete_0200====" - + ("json predicates 【") + JSON.stringify(predicates) + (" 】") + " , " + predicates); - DAHelper.delete( - dataAbilityUri, - predicates - ).then((data) => { - console.debug("=ACTS_Delete_0300 then data====>" - + ("json data 【") + JSON.stringify(data) + (" 】")); - expect(data).assertEqual(1); - console.log('ACTS_Delete_0300==== { - console.debug("=ACTS_Delete_0300 catch err ====>" - + ("json err 【") + JSON.stringify(err) + (" 】 ")); - console.log('ACTS_Delete_0300====:' + err); - expect(false).assertTrue(); - console.log('ACTS_Delete_0300====: ' + DAHelper) - try { - let predicates = new ohosDataAbility.DataAbilityPredicates(); - predicates.equalTo('contact_id', 1); - predicates.limitAs(10); - predicates.orderByAsc("order_by_class"); - predicates.offsetAs(1); - console.debug("=ACTS_Delete_0400 predicates====>" - + ("json predicates 【") + JSON.stringify(predicates) + (" 】") + " , " + predicates); - await DAHelper.delete( - dataAbilityUri, - predicates, - (err, data) => { - console.debug("=ACTS_Delete_0400 err,data=======>" - + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;")); - expect(data).assertEqual(1); - console.log('ACTS_Delete_0400====:' + err); - console.log('ACTS_Delete_0400====" - + ("json predicates 【") + JSON.stringify(predicates) + (" 】") + " , " + predicates); - DAHelper.delete( - undefined, - predicates - ).then((data) => { - console.debug("=ACTS_Delete_0500 then data====>" - + ("json data 【") + JSON.stringify(data) + (" 】")); - expect(data).assertEqual(0); - console.log('ACTS_Delete_0500==== { - console.debug("=ACTS_Delete_0500 catch err ====>" - + ("json err 【") + JSON.stringify(err) + (" 】 ")); - console.log('ACTS_Delete_0500====:' + err); - expect(false).assertTrue(); - console.log('ACTS_Delete_0500====: ' + DAHelper) - try { - let predicates = new ohosDataAbility.DataAbilityPredicates(); - predicates.equalTo('contact_id', 1); - predicates.limitAs(10); - predicates.orderByAsc("order_by_class"); - predicates.offsetAs(1); - console.debug("=ACTS_Delete_0600 predicates====>" - + ("json predicates 【") + JSON.stringify(predicates) + (" 】") + " , " + predicates); - await DAHelper.delete( - undefined, - predicates, - (err, data) => { - console.debug("=ACTS_Delete_0600 err,data=======>" - + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;")); - expect(err.code).assertEqual(-1); - expect(data).assertEqual(0); - console.log('ACTS_Delete_0600====:' + err); - console.log('ACTS_Delete_0600====" - + ("json predicates 【") + JSON.stringify(predicates) + (" 】") + " , " + predicates); - DAHelper.delete( - dataAbilityUri, - predicates - ).then((data) => { - console.debug("=ACTS_Delete_0700 then data====>" - + ("json data 【") + JSON.stringify(data) + (" 】")); - expect(data).assertEqual(1); - currentAlertTimeout = setTimeout(() => { - console.log('ACTS_Delete_0700==== { - console.debug("=ACTS_Delete_0700 catch err ====>" - + ("json err 【") + JSON.stringify(err) + (" 】 ")); - console.log('ACTS_Delete_0700====:' + err); - expect(false).assertTrue(); - console.log('ACTS_Delete_0700====: ' + DAHelper) - var currentAlertTimeout; - try { - function onAsyncCallbackDelete0800(err) { - expect(err.code).assertEqual(0); - clearTimeout(currentAlertTimeout); - console.log('ACTS_Delete_0800====" - + ("json predicates 【") + JSON.stringify(predicates) + (" 】") + " , " + predicates); - await DAHelper.delete( - dataAbilityUri, - predicates, - (err, data) => { - console.debug("=ACTS_Delete_0800 err,data=======>" - + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;")); - expect(data).assertEqual(1); - currentAlertTimeout = setTimeout(() => { - console.log('ACTS_Delete_0800====:' + err); - console.log('ACTS_Delete_0800====" - + ("json predicates 【") + JSON.stringify(predicates) + (" 】") + " , " + predicates); - DAHelper.delete( - dataAbilityUri2, - predicates - ).then((data) => { - console.debug("=ACTS_Delete_0900 then data====>" - + ("json data 【") + JSON.stringify(data) + (" 】")); - expect(data).assertEqual(-1); - console.log('ACTS_Delete_0900==== { - console.debug("=ACTS_Delete_0900 catch err ====>" - + ("json err 【") + JSON.stringify(err) + (" 】 ")); - console.log('ACTS_Delete_0900====:' + err); - expect(false).assertTrue(); - console.log('ACTS_Delete_0900====: ' + DAHelper) - try { - let predicates = new ohosDataAbility.DataAbilityPredicates(); - predicates.equalTo('contact_id', 1); - predicates.limitAs(10); - predicates.orderByAsc("order_by_class"); - predicates.offsetAs(1); - console.debug("=ACTS_Delete_1000 predicates====>" - + ("json predicates 【") + JSON.stringify(predicates) + (" 】") + " , " + predicates); - await DAHelper.delete( - dataAbilityUri2, - predicates, - (err, data) => { - console.debug("=ACTS_Delete_1000 err,data=======>" - + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;")); - expect(data).assertEqual(-1); - console.log('ACTS_Delete_1000====:' + err); - console.log('ACTS_Delete_1000====" - + ("json predicates 【") + JSON.stringify(predicates) + (" 】") + " , " + predicates); - DAHelper.delete( - "error", - predicates - ).then((data) => { - console.debug("=ACTS_Delete_1100 then data====>" - + ("json data 【") + JSON.stringify(data) + (" 】")); - expect(data).assertEqual(-1); - console.log('ACTS_Delete_1100==== { - console.debug("=ACTS_Delete_1100 catch err ====>" - + ("json err 【") + JSON.stringify(err) + (" 】 ")); - console.log('ACTS_Delete_1100====:' + err); - expect(false).assertTrue(); - console.log('ACTS_Delete_1100====: ' + DAHelper) - try { - let predicates = new ohosDataAbility.DataAbilityPredicates(); - predicates.equalTo('contact_id', 1); - predicates.limitAs(10); - predicates.orderByAsc("order_by_class"); - predicates.offsetAs(1); - console.debug("=ACTS_Delete_1200 predicates====>" - + ("json predicates 【") + JSON.stringify(predicates) + (" 】") + " , " + predicates); - await DAHelper.delete( - "error", - predicates, - (err, data) => { - console.debug("=ACTS_Delete_1200 err,data=======>" - + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;")); - expect(data).assertEqual(-1); - console.log('ACTS_Delete_1200====:' + err); - console.log('ACTS_Delete_1200====" - + ("json predicates 【") + JSON.stringify(predicates) + (" 】") + " , " + predicates); - DAHelper.delete( - 123456, - predicates - ).then((data) => { - console.debug("=ACTS_Delete_1300 then data====>" - + ("json data 【") + JSON.stringify(data) + (" 】")); - expect(data).assertEqual(0); - console.log('ACTS_Delete_1300==== { - console.debug("=ACTS_Delete_1300 catch err ====>" - + ("json err 【") + JSON.stringify(err) + (" 】 ")); - console.log('ACTS_Delete_1300====:' + err); - expect(false).assertTrue(); - console.log('ACTS_Delete_1300====: ' + DAHelper) - try { - let predicates = new ohosDataAbility.DataAbilityPredicates(); - predicates.equalTo('contact_id', 1); - predicates.limitAs(10); - predicates.orderByAsc("order_by_class"); - predicates.offsetAs(1); - console.debug("=ACTS_Delete_1400 predicates====>" - + ("json predicates 【") + JSON.stringify(predicates) + (" 】") + " , " + predicates); - await DAHelper.delete( - 123456, - predicates, - (err, data) => { - console.debug("=ACTS_Delete_1400 err,data=======>" - + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;")); - expect(err.code).assertEqual(-1); - console.log('ACTS_Delete_1400====:' + err); - console.log('ACTS_Delete_1400==== { - console.debug("=ACTS_GetFileTypes_0100 getFileTypes then data====>" - + ("json data 【") + JSON.stringify(data) + (" 】")); - console.log('DataAbilityHelper getFileTypes data.length ====>: ' + data.length); - expect(data.length).assertEqual(3); - for (var i = 0; i < data.length; i++) { - expect(typeof (data[i])).assertEqual("string"); - console.log('=ACTS_GetFileTypes_0100 for data[' + i + '] ====>: ' + data[i]) - if (i == 0) { - expect(data[i]).assertEqual("hap"); - } else if (i == 1) { - expect(data[i]).assertEqual("jpg"); - } else if (i == 2) { - expect(data[i]).assertEqual("image/png"); - } - } - console.log('ACTS_GetFileTypes_0100==== { - console.debug("=ACTS_GetFileTypes_0100 getFileTypes catch err ====>" - + ("json err 【") + JSON.stringify(err) + (" 】 ")); - console.log('ACTS_GetFileTypes_0100====: ' + promise) - } catch (err) { - console.error('=ACTS_GetFileTypes_0100 getFileTypes AsyncCallback catch(err)====>:' + err); - console.log('ACTS_GetFileTypes_0100====: ' + DAHelper) - let mimeTypeFilter = '*/*' - try { - await DAHelper.getFileTypes( - dataAbilityUri, - mimeTypeFilter, - (err, data) => { - console.debug("=ACTS_GetFileTypes_0200 getFileTypes err,data=======>" - + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;")); - console.log('=ACTS_GetFileTypes_0200 data.length ====>: ' + data.length); - expect(data.length).assertEqual(3); - for (var i = 0; i < data.length; i++) { - expect(typeof (data[i])).assertEqual("string"); - console.log('=ACTS_GetFileTypes_0200 for data ====>: ' + err.code + - " data[" + i + "]: " + data[i]); - if (i == 0) { - expect(data[i]).assertEqual("hap"); - } else if (i == 1) { - expect(data[i]).assertEqual("jpg"); - } else if (i == 2) { - expect(data[i]).assertEqual("image/png"); - } - } - console.log('ACTS_GetFileTypes_0200====:' + err); - console.log('ACTS_GetFileTypes_0200==== { - console.debug("=ACTS_GetFileTypes_0300 then data====>" - + ("json data 【") + JSON.stringify(data) + (" 】")); - console.log('DataAbilityHelper getFileTypes data.length ====>: ' + data.length); - expect(data.length).assertEqual(1); - for (var i = 0; i < data.length; i++) { - expect(typeof (data[i])).assertEqual("string"); - console.log('= =ACTS_GetFileTypes_0300 for data[' + i + '] ====>: ' + data[i]) - if (i == 0) { - expect(data[i]).assertEqual("image/png"); - } - } - console.log('ACTS_GetFileTypes_0300==== { - console.debug("=ACTS_GetFileTypes_0300 catch err ====>" - + ("json err 【") + JSON.stringify(err) + (" 】 ")); - console.log('DataAbilityHelper getFileTypes error ====>: ' + err) - console.log('ACTS_GetFileTypes_0300====: ' + promise) - } catch (err) { - console.error('=ACTS_GetFileTypes_0300 getFileTypes AsyncCallback catch(err)====>:' + err); - console.log('ACTS_GetFileTypes_0300====: ' + DAHelper) - let mimeTypeFilter = 'image/*' - try { - await DAHelper.getFileTypes( - dataAbilityUri, - mimeTypeFilter, - (err, data) => { - console.debug("=ACTS_GetFileTypes_0400 err,data=======>" - + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;")); - console.log('DataAbilityHelper getFileTypes data.length ====>: ' + data.length); - expect(data.length).assertEqual(1); - for (var i = 0; i < data.length; i++) { - expect(typeof (data[i])).assertEqual("string"); - console.log('=ACTS_GetFileTypes_0400 for ====>: ' - + err.code + " data[" + i + "]: " + data[i]); - if (i == 0) { - expect(data[i]).assertEqual("image/png"); - } - } - console.log('ACTS_GetFileTypes_0400====:' + err); - console.log('ACTS_GetFileTypes_0400==== { - console.debug("=ACTS_GetFileTypes_0500 then data====>" - + ("json data 【") + JSON.stringify(data) + (" 】")); - console.log('DataAbilityHelper getFileTypes data.length ====>: ' + data.length); - expect(data.length).assertEqual(1); - for (var i = 0; i < data.length; i++) { - expect(typeof (data[i])).assertEqual("string"); - console.log('=ACTS_GetFileTypes_0500 for data [' + i + '] ====>: ' + data[i]) - if (i == 0) { - expect(data[i]).assertEqual("jpg"); - } - } - console.log('ACTS_GetFileTypes_0500==== { - console.debug("=ACTS_GetFileTypes_0500 catch err ====>" - + ("json err 【") + JSON.stringify(err) + (" 】 ")); - console.log('DataAbilityHelper getFileTypes error ====>: ' + err) - console.log('ACTS_GetFileTypes_0500====: ' + promise) - } catch (err) { - console.error('=ACTS_GetFileTypes_0500 getFileTypes AsyncCallback catch(err)====>:' + err); - console.log('ACTS_GetFileTypes_0500====: ' + DAHelper) - let mimeTypeFilter = '*/jpg' - try { - await DAHelper.getFileTypes( - dataAbilityUri, - mimeTypeFilter, - (err, data) => { - console.debug("=ACTS_GetFileTypes_0600 err,data=======>" - + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;")); - console.log('=ACTS_GetFileTypes_0600 data.length ====>: ' + data.length); - expect(data.length).assertEqual(1); - for (var i = 0; i < data.length; i++) { - console.log('=ACTS_GetFileTypes_0600 for errCode ====>: ' + err.code + - " data[" + i + "]: " + data[i]); - if (i == 0) - expect(data[i]).assertEqual("jpg"); - } - console.log('ACTS_GetFileTypes_0600====:' + err); - console.log('ACTS_GetFileTypes_0600==== { - console.debug("=ACTS_GetFileTypes_0700 getFileTypes then data====>" - + ("json data 【") + JSON.stringify(data) + (" 】")); - console.log('DataAbilityHelper getFileTypes data.length ====>: ' + data.length); - expect(data.length).assertEqual(0); - console.log('ACTS_GetFileTypes_0700==== { - console.debug("=ACTS_GetFileTypes_0700 getFileTypes catch err ====>" - + ("json err 【") + JSON.stringify(err) + (" 】 ")); - console.log('ACTS_GetFileTypes_0700====: ' + promise) - } catch (err) { - console.error('=ACTS_GetFileTypes_0700 getFileTypes AsyncCallback catch(err)====>:' + err); - console.log('ACTS_GetFileTypes_0700====: ' + DAHelper) - let mimeTypeFilter = '*/*' - try { - await DAHelper.getFileTypes( - undefined, - mimeTypeFilter, - (err, data) => { - console.debug("=ACTS_GetFileTypes_0800 getFileTypes err,data=======>" - + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;")); - console.log('=ACTS_GetFileTypes_0800 data.length ====>: ' + data.length); - expect(data.length).assertEqual(0); - console.log('ACTS_GetFileTypes_0800====:' + err); - console.log('ACTS_GetFileTypes_0800==== { - console.debug("=ACTS_GetFileTypes_0900 getFileTypes then data====>" - + ("json data 【") + JSON.stringify(data) + (" 】")); - console.log('DataAbilityHelper getFileTypes data.length ====>: ' + data.length); - for (var i = 0; i < data.length; i++) { - expect(typeof (data[i])).assertEqual("string"); - console.log('=ACTS_GetFileTypes_0900 for data[' + i + '] ====>: ' + data[i]) - if (i == 0) { - expect(data[i]).assertEqual(""); - } - } - console.log('ACTS_GetFileTypes_0900==== { - console.debug("=ACTS_GetFileTypes_0900 getFileTypes catch err ====>" - + ("json err 【") + JSON.stringify(err) + (" 】 ")); - console.log('ACTS_GetFileTypes_0900====: ' + promise) - } catch (err) { - console.error('=ACTS_GetFileTypes_0900 getFileTypes AsyncCallback catch(err)====>:' + err); - console.log('ACTS_GetFileTypes_0900====: ' + DAHelper) - try { - await DAHelper.getFileTypes( - dataAbilityUri, - undefined, - (err, data) => { - console.debug("=ACTS_GetFileTypes_1000 getFileTypes err,data=======>" - + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;")); - console.log('=ACTS_GetFileTypes_1000 data.length ====>: ' + data.length); - for (var i = 0; i < data.length; i++) { - expect(typeof (data[i])).assertEqual("string"); - console.log('=ACTS_GetFileTypes_1000 for data ====>: ' + err.code + - " data[" + i + "]: " + data[i]); - if (i == 0) { - expect(data[i]).assertEqual(""); - } - } - console.log('ACTS_GetFileTypes_1000====:' + err); - console.log('ACTS_GetFileTypes_1000==== { - console.debug("=ACTS_GetFileTypes_1100 getFileTypes then data====>" - + ("json data 【") + JSON.stringify(data) + (" 】")); - console.log('DataAbilityHelper getFileTypes data.length ====>: ' + data.length); - expect(data.length).assertEqual(0); - console.log('ACTS_GetFileTypes_1100==== { - console.debug("=ACTS_GetFileTypes_1100 getFileTypes catch err ====>" - + ("json err 【") + JSON.stringify(err) + (" 】 ")); - console.log('ACTS_GetFileTypes_1100====: ' + promise) - } catch (err) { - console.error('=ACTS_GetFileTypes_1100 getFileTypes AsyncCallback catch(err)====>:' + err); - console.log('ACTS_GetFileTypes_1100====: ' + DAHelper) - let mimeTypeFilter = '*/*' - try { - await DAHelper.getFileTypes( - "error_uri", - mimeTypeFilter, - (err, data) => { - console.debug("=ACTS_GetFileTypes_1200 getFileTypes err,data=======>" - + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;")); - console.log('=ACTS_GetFileTypes_1200 data.length ====>: ' + data.length); - expect(data.length).assertEqual(0); - console.log('ACTS_GetFileTypes_1200====:' + err); - console.log('ACTS_GetFileTypes_1200==== { - console.debug("=ACTS_GetFileTypes_1300 getFileTypes then data====>" - + ("json data 【") + JSON.stringify(data) + (" 】")); - console.log('DataAbilityHelper getFileTypes data.length ====>: ' + data.length); - expect(data.length).assertEqual(0); - console.log('ACTS_GetFileTypes_1300==== { - console.debug("=ACTS_GetFileTypes_1300 getFileTypes catch err ====>" - + ("json err 【") + JSON.stringify(err) + (" 】 ")); - console.log('ACTS_GetFileTypes_1300====: ' + promise) - } catch (err) { - console.error('=ACTS_GetFileTypes_1300 getFileTypes AsyncCallback catch(err)====>:' + err); - console.log('ACTS_GetFileTypes_1300====: ' + DAHelper) - let mimeTypeFilter = '*/*' - try { - await DAHelper.getFileTypes( - 123456, - mimeTypeFilter, - (err, data) => { - console.debug("=ACTS_GetFileTypes_1400 getFileTypes err,data=======>" - + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;")); - console.log('=ACTS_GetFileTypes_1400 data.length ====>: ' + data.length); - expect(data.length).assertEqual(0); - console.log('ACTS_GetFileTypes_1400====:' + err); - console.log('ACTS_GetFileTypes_1400==== { - console.debug("=ACTS_GetFileTypes_1500 getFileTypes then data====>" - + ("json data 【") + JSON.stringify(data) + (" 】")); - console.log('DataAbilityHelper getFileTypes data.length ====>: ' + data.length); - expect(data.length).assertEqual(0); - console.log('ACTS_GetFileTypes_1500==== { - console.debug("=ACTS_GetFileTypes_1500 getFileTypes catch err ====>" - + ("json err 【") + JSON.stringify(err) + (" 】 ")); - console.log('ACTS_GetFileTypes_1500====: ' + promise) - } catch (err) { - console.error('=ACTS_GetFileTypes_1500 getFileTypes AsyncCallback catch(err)====>:' + err); - console.log('ACTS_GetFileTypes_1500====: ' + DAHelper) - let mimeTypeFilter = 'asdfasdEDF)(#@*7fasdf546546a1ds3v16a4sd6v54@*(e7'; - try { - await DAHelper.getFileTypes( - dataAbilityUri, - mimeTypeFilter, - (err, data) => { - console.debug("=ACTS_GetFileTypes_1600 getFileTypes err,data=======>" - + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;")); - console.log('=ACTS_GetFileTypes_1600 data.length ====>: ' + data.length); - expect(data.length).assertEqual(0); - console.log('ACTS_GetFileTypes_1600====:' + err); - console.log('ACTS_GetFileTypes_1600==== { - console.debug("=ACTS_GetFileTypes_1700 getFileTypes then data====>" - + ("json data 【") + JSON.stringify(data) + (" 】")); - console.log('DataAbilityHelper getFileTypes data.length ====>: ' + data.length); - expect(data.length).assertEqual(0); - console.log('ACTS_GetFileTypes_1700==== { - console.debug("=ACTS_GetFileTypes_1700 getFileTypes catch err ====>" - + ("json err 【") + JSON.stringify(err) + (" 】 ")); - console.log('ACTS_GetFileTypes_1700====: ' + promise) - } catch (err) { - console.error('=ACTS_GetFileTypes_1700 getFileTypes AsyncCallback catch(err)====>:' + err); - console.log('ACTS_GetFileTypes_1700====: ' + DAHelper) - let mimeTypeFilter = 'returnUndefined'; - try { - await DAHelper.getFileTypes( - dataAbilityUri, - mimeTypeFilter, - (err, data) => { - console.debug("=ACTS_GetFileTypes_1800 getFileTypes err,data=======>" - + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;")); - console.log('=ACTS_GetFileTypes_1800 data.length ====>: ' + data.length); - expect(data.length).assertEqual(0); - console.log('ACTS_GetFileTypes_1800====:' + err); - console.log('ACTS_GetFileTypes_1800==== { - console.debug("=ACTS_GetType_0100 then data====>" - + ("json data 【") + JSON.stringify(data) + (" 】")); - expect(data).assertEqual(dataAbilityUri); - console.log('ACTS_GetType_0100==== { - console.debug("=ACTS_GetType_0100 catch err ====>" - + ("json err 【") + JSON.stringify(err) + (" 】 ")); - console.log('ACTS_GetType_0100====: ' + promise) - } catch (err) { - console.error('=ACTS_GetType_0100 getType AsyncCallback catch(err)====>:' + err); - console.log('ACTS_GetType_0100====: ' + DAHelper) - try { - await DAHelper.getType( - dataAbilityUri, - (err, data) => { - console.debug("=ACTS_GetType_0200 err,data=======>" - + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;")); - expect(data).assertEqual(dataAbilityUri); - console.log('ACTS_GetType_0200====:' + err); - console.log('ACTS_GetType_0200==== { - console.debug("=ACTS_GetType_0300 then data====>" - + ("json data 【") + JSON.stringify(data) + (" 】")); - expect(data).assertEqual(""); - console.log('ACTS_GetType_0300==== { - console.debug("=ACTS_GetType_0300 catch err ====>" - + ("json err 【") + JSON.stringify(err) + (" 】 ")); - console.log('ACTS_GetType_0300====: ' + promise) - } catch (err) { - console.error('=ACTS_GetType_0300 getType AsyncCallback catch(err)====>:' + err); - console.log('ACTS_GetType_0300====: ' + DAHelper) - try { - await DAHelper.getType( - undefined, - (err, data) => { - console.debug("=ACTS_GetType_0400 err,data=======>" - + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;")); - expect(data).assertEqual(""); - console.log('ACTS_GetType_0400====:' + err); - console.log('ACTS_GetType_0400==== { - console.debug("=ACTS_GetType_0500 then data====>" - + ("json data 【") + JSON.stringify(data) + (" 】")); - expect(data).assertEqual(""); - console.log('ACTS_GetType_0500==== { - console.debug("=ACTS_GetType_0500 catch err ====>" - + ("json err 【") + JSON.stringify(err) + (" 】 ")); - console.log('ACTS_GetType_0500====: ' + promise) - } catch (err) { - console.error('=ACTS_GetType_0500 getType AsyncCallback catch(err)====>:' + err); - console.log('ACTS_GetType_0500====: ' + DAHelper) - try { - await DAHelper.getType( - 123456, - (err, data) => { - console.debug("=ACTS_GetType_0600 err,data=======>" - + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;")); - expect(data).assertEqual(""); - console.log('ACTS_GetType_0600====:' + err); - console.log('ACTS_GetType_0600==== { - console.debug("=ACTS_GetType_0700 then data====>" - + ("json data 【") + JSON.stringify(data) + (" 】")); - expect(data).assertEqual(""); - console.log('ACTS_GetType_0700==== { - console.debug("=ACTS_GetType_0700 catch err ====>" - + ("json err 【") + JSON.stringify(err) + (" 】 ")); - console.log('ACTS_GetType_0700====: ' + promise) - } catch (err) { - console.error('=ACTS_GetType_0700 getType AsyncCallback catch(err)====>:' + err); - console.log('ACTS_GetType_0700====: ' + DAHelper) - try { - await DAHelper.getType( - "error_uri", - (err, data) => { - console.debug("=ACTS_GetType_0800 err,data=======>" - + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;")); - expect(data).assertEqual(""); - console.log('ACTS_GetType_0800====:' + err); - console.log('ACTS_GetType_0800==== { - console.debug("=ACTS_GetType_0900 then data====>" - + ("json data 【") + JSON.stringify(data) + (" 】")); - expect(data).assertEqual(""); - console.log('ACTS_GetType_0900==== { - console.debug("=ACTS_GetType_0900 catch err ====>" - + ("json err 【") + JSON.stringify(err) + (" 】 ")); - console.log('ACTS_GetType_0900====: ' + promise) - } catch (err) { - console.error('=ACTS_GetType_0900 getType AsyncCallback catch(err)====>:' + err); - console.log('ACTS_GetType_0900====: ' + DAHelper) - try { - await DAHelper.getType( - dataAbilityUri3, - (err, data) => { - console.debug("=ACTS_GetType_1000 err,data=======>" - + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;")); - expect(data).assertEqual(""); - console.log('ACTS_GetType_1000====:' + err); - console.log('ACTS_GetType_1000==== { - console.debug("=ACTS_OpenFile_0100 then data====>" - + ("json data 【") + JSON.stringify(data) + (" 】")); - expect(typeof (data)).assertEqual("number") - ret = true - done(); - }).catch(err => { - console.debug("=ACTS_OpenFile_0100 catch err ====>" - + ("json err 【") + JSON.stringify(err) + (" 】 ")); - ret = false - expect(false).assertTrue(); - done(); - }); - } catch (err) { - console.error('=ACTS_OpenFile_0100 getType catch(err)====>:' + err); - ret = false - expect(false).assertTrue(); - done(); - } - setTimeout(function () { - console.log('setTimeout function====<'); - }, gSetTimeout); - console.log('ACTS_OpenFile_0100==== { - console.debug("=ACTS_OpenFile_0200 then data====>" - + ("json data 【") + JSON.stringify(data) + (" 】")); - expect(typeof (data)).assertEqual("number") - console.log('DataAbilityHelper ACTS_OpenFile_0200 OpenFile promise ====>: ' + data) - ret = true - done(); - }).catch(err => { - console.debug("=ACTS_OpenFile_0200 catch err ====>" - + ("json err 【") + JSON.stringify(err) + (" 】 ")); - ret = false - done(); - }); - } catch (err) { - console.error('=ACTS_OpenFile_0200 getType AsyncCallback catch(err)====>:' + err); - ret = false - expect(false).assertTrue(); - done(); - } - setTimeout(function () { - console.log('setTimeout function====<'); - }, gSetTimeout); - console.log('ACTS_OpenFile_0200==== { - console.debug("=ACTS_OpenFile_0300 then data====>" - + ("json data 【") + JSON.stringify(data) + (" 】")); - expect(typeof (data)).assertEqual("number") - console.log('DataAbilityHelper ACTS_OpenFile_0300 OpenFile promise ====>: ' + data) - ret = true - done(); - }).catch(err => { - console.debug("=ACTS_OpenFile_0300 catch err ====>" - + ("json err 【") + JSON.stringify(err) + (" 】 ")); - ret = false - expect(false).assertTrue(); - done(); - }); - } catch (err) { - console.error('=ACTS_OpenFile_0300 getType AsyncCallback catch(err)====>:' + err); - ret = false - expect(false).assertTrue(); - done(); - } - setTimeout(function () { - console.log('setTimeout function====<'); - }, gSetTimeout); - console.log('ACTS_OpenFile_0300==== { - console.debug("=ACTS_OpenFile_0400 then data====>" - + ("json data 【") + JSON.stringify(data) + (" 】")); - expect(typeof (data)).assertEqual("number") - console.log('DataAbilityHelper ACTS_OpenFile_0400 OpenFile promise ====>: ' + data) - ret = true - done(); - }).catch(err => { - console.debug("=ACTS_OpenFile_0400 catch err ====>" - + ("json err 【") + JSON.stringify(err) + (" 】 ")); - ret = false - expect(false).assertTrue(); - done(); - }); - } catch (err) { - console.error('=ACTS_OpenFile_0400 getType AsyncCallback catch(err)====>:' + err); - ret = false - expect(false).assertTrue(); - done(); - } - setTimeout(function () { - console.log('setTimeout function====<'); - }, gSetTimeout); - console.log('ACTS_OpenFile_0400==== { - console.debug("=ACTS_OpenFile_0500 then data====>" - + ("json data 【") + JSON.stringify(data) + (" 】")); - expect(typeof (data)).assertEqual("number") - console.log('DataAbilityHelper ACTS_OpenFile_0500 OpenFile promise ====>: ' + data) - ret = true - done(); - }).catch(err => { - console.debug("=ACTS_OpenFile_0500 catch err ====>" - + ("json err 【") + JSON.stringify(err) + (" 】 ")); - ret = false - expect(false).assertTrue(); - done(); - }); - } catch (err) { - console.error('=ACTS_OpenFile_0500 getType AsyncCallback catch(err)====>:' + err); - ret = false - expect(false).assertTrue(); - done(); - } - setTimeout(function () { - console.log('setTimeout function====<'); - }, gSetTimeout); - console.log('ACTS_OpenFile_0500==== { - console.debug("=ACTS_OpenFile_0600 then data====>" - + ("json data 【") + JSON.stringify(data) + (" 】")); - expect(typeof (data)).assertEqual("number") - console.log('DataAbilityHelper ACTS_OpenFile_0600 OpenFile promise ====>: ' + data) - ret = true - done(); - }).catch(err => { - console.debug("=ACTS_OpenFile_0600 catch err ====>" - + ("json err 【") + JSON.stringify(err) + (" 】 ")); - ret = false - expect(false).assertTrue(); - done(); - }); - } catch (err) { - console.error('=ACTS_OpenFile_0600 getType AsyncCallback catch(err)====>:' + err); - ret = false - expect(false).assertTrue(); - done(); - } - setTimeout(function () { - console.log('setTimeout function====<'); - }, gSetTimeout); - console.log('ACTS_OpenFile_0600====: ' + DAHelper) - var mode = "r"; - try { - DAHelper.openFile( - dataAbilityUri, - mode, - (err, data) => { - console.debug("=ACTS_OpenFile_0700 err,data=======>" - + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;")); - expect(typeof (data)).assertEqual("number"); - console.log('DataAbilityHelper ACTS_OpenFile_0700 OpenFile asyncCallback errCode ====>: ' - + err.code + " data: " + data); - ret = true - done(); - }, - ); - } catch (err) { - console.error('=ACTS_OpenFile_0700 getType AsyncCallback catch(err)====>:' + err); - ret = false - expect(false).assertTrue(); - done(); - } - setTimeout(function () { - console.log('setTimeout function====<'); - }, gSetTimeout); - console.log('ACTS_OpenFile_0700====: ' + DAHelper) - var mode = "w"; - try { - DAHelper.openFile( - dataAbilityUri, - mode, - (err, data) => { - console.debug("=ACTS_OpenFile_0800 err,data=======>" - + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;")); - expect(typeof (data)).assertEqual("number"); - console.log('DataAbilityHelper ACTS_OpenFile_0800 OpenFile asyncCallback errCode ====>: ' - + err.code + " data: " + data); - ret = true - done(); - }, - ); - } catch (err) { - console.error('=ACTS_OpenFile_0800 getType AsyncCallback catch(err)====>:' + err); - ret = false - expect(false).assertTrue(); - done(); - } - setTimeout(function () { - console.log('setTimeout function====<'); - }, gSetTimeout); - console.log('ACTS_OpenFile_0800====: ' + DAHelper) - var mode = "wt"; - try { - DAHelper.openFile( - dataAbilityUri, - mode, - (err, data) => { - console.debug("=ACTS_OpenFile_0900 err,data=======>" - + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;")); - expect(typeof (data)).assertEqual("number"); - console.log('DataAbilityHelper ACTS_OpenFile_0900 OpenFile asyncCallback errCode ====>: ' - + err.code + " data: " + data); - ret = true - done(); - }, - ); - } catch (err) { - console.error('=ACTS_OpenFile_0900 getType AsyncCallback catch(err)====>:' + err); - ret = false - expect(false).assertTrue(); - done(); - } - setTimeout(function () { - console.log('setTimeout function====<'); - }, gSetTimeout); - console.log('ACTS_OpenFile_0900====: ' + DAHelper) - var mode = "wa"; - try { - DAHelper.openFile( - dataAbilityUri, - mode, - (err, data) => { - console.debug("=ACTS_OpenFile_1000 err,data====>" - + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;")); - expect(typeof (data)).assertEqual("number"); - console.log('DataAbilityHelper ACTS_OpenFile_1000 OpenFile asyncCallback errCode ====>: ' - + err.code + " data: " + data); - ret = true - done(); - }, - ); - } catch (err) { - console.error('=ACTS_OpenFile_1000 getType AsyncCallback catch(err)====>:' + err); - ret = false - expect(false).assertTrue(); - done(); - } - setTimeout(function () { - console.log('setTimeout function====<'); - }, gSetTimeout); - console.log('ACTS_OpenFile_1000====: ' + DAHelper) - var mode = "rw"; - try { - DAHelper.openFile( - dataAbilityUri, - mode, - (err, data) => { - console.debug("=ACTS_OpenFile_1100 err,data=======>" - + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;")); - expect(typeof (data)).assertEqual("number"); - ret = true - done(); - }, - ); - } catch (err) { - console.error('=ACTS_OpenFile_1100 getType AsyncCallback catch(err)====>:' + err); - ret = false - expect(false).assertTrue(); - done(); - } - setTimeout(function () { - console.log('setTimeout function====<'); - }, gSetTimeout); - console.log('ACTS_OpenFile_1100====: ' + DAHelper) - var mode = "rwt"; - try { - DAHelper.openFile( - dataAbilityUri, - mode, - (err, data) => { - console.debug("=ACTS_OpenFile_1200 err,data=======>" - + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;")); - expect(typeof (data)).assertEqual("number"); - ret = true - done(); - }, - ); - } catch (err) { - console.error('=ACTS_OpenFile_1200 getType AsyncCallback catch(err)====>:' + err); - ret = false - expect(false).assertTrue(); - done(); - } - setTimeout(function () { - console.log('setTimeout function====<'); - }, gSetTimeout); - console.log('ACTS_OpenFile_1200==== { - console.debug("=ACTS_OpenFile_1300 then data====>" - + ("json data 【") + JSON.stringify(data) + (" 】")); - expect(data).assertEqual(0) - ret = true - done(); - }).catch(err => { - console.debug("=ACTS_OpenFile_1300 catch err ====>" - + ("json err 【") + JSON.stringify(err) + (" 】 ")); - ret = false - expect(false).assertTrue(); - done(); - }); - } catch (err) { - console.error('=ACTS_OpenFile_1300 getType catch(err)====>:' + err); - ret = false - expect(false).assertTrue(); - done(); - } - setTimeout(function () { - console.log('setTimeout function====<'); - }, gSetTimeout); - console.log('ACTS_OpenFile_1300====: ' + DAHelper) - var mode = "rwt"; - try { - DAHelper.openFile( - undefined, - mode, - (err, data) => { - console.debug("=ACTS_OpenFile_1400 err,data=======>" - + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;")); - expect(err.code).assertEqual(-1); - ret = true - done(); - }, - ); - } catch (err) { - console.error('=ACTS_OpenFile_1400 getType AsyncCallback catch(err)====>:' + err); - ret = false - expect(false).assertTrue(); - done(); - } - setTimeout(function () { - console.log('setTimeout function====<'); - }, gSetTimeout); - console.log('ACTS_OpenFile_1400==== { - console.debug("=ACTS_OpenFile_1500 then data====>" - + ("json data 【") + JSON.stringify(data) + (" 】")); - expect(data).assertEqual(-1) - console.log('ACTS_OpenFile_1500==== { - console.debug("=ACTS_OpenFile_1500 catch err ====>" - + ("json err 【") + JSON.stringify(err) + (" 】 ")); - console.log('ACTS_OpenFile_1500====:' + err); - console.log('ACTS_OpenFile_1500====: ' + DAHelper) - try { - DAHelper.openFile( - dataAbilityUri, - undefined, - (err, data) => { - console.debug("=ACTS_OpenFile_1600 err,data=======>" - + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;")); - expect(data).assertEqual(-1); - console.log('ACTS_OpenFile_1600====:' + err); - console.log('ACTS_OpenFile_1600==== { - console.debug("=ACTS_OpenFile_1700 then data====>" - + ("json data 【") + JSON.stringify(data) + (" 】")); - expect(data).assertEqual(-1) - console.log('ACTS_OpenFile_1700==== { - console.debug("=ACTS_OpenFile_1700 catch err ====>" - + ("json err 【") + JSON.stringify(err) + (" 】 ")); - console.log('ACTS_OpenFile_1700====:' + err); - console.log('ACTS_OpenFile_1700====: ' + DAHelper) - var mode = "A1@k#4%$,.<>)(oioiu*((*&(&*giIGT^%&^Ug;sdfk;losd*7873iug8%&^$&%]ERFUy&^%&&R7"; - try { - DAHelper.openFile( - dataAbilityUri, - mode, - (err, data) => { - console.debug("=ACTS_OpenFile_1800 err,data=======>" - + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;")); - expect(data).assertEqual(-1); - console.log('ACTS_OpenFile_1800====:' + err); - console.log('ACTS_OpenFile_1800==== { - console.debug("=ACTS_OpenFile_1900 then data====>" - + ("json data 【") + JSON.stringify(data) + (" 】")); - expect(data).assertEqual(-1) - console.log('ACTS_OpenFile_1900==== { - console.debug("=ACTS_OpenFile_1900 catch err ====>" - + ("json err 【") + JSON.stringify(err) + (" 】 ")); - console.log('ACTS_OpenFile_1900====:' + err); - console.log('ACTS_OpenFile_1900====: ' + DAHelper) - var mode = "rwt"; - try { - DAHelper.openFile( - dataAbilityUri2, - mode, - (err, data) => { - console.debug("=ACTS_OpenFile_2000 err,data=======>" - + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;")); - expect(data).assertEqual(-1); - console.log('ACTS_OpenFile_2000====:' + err); - console.log('ACTS_OpenFile_2000====: ' + DAHelper) - try { - DAHelper.normalizeUri( - dataAbilityUri, - ).then((data) => { - console.debug("=ACTS_NormalizeUri_0100 then data====>" - + ("json data 【") + JSON.stringify(data) + (" 】")); - expect(data).assertEqual(dataAbilityUri); - console.log('ACTS_NormalizeUri_0100==== { - console.debug("=ACTS_NormalizeUri_0100 catch err ====>" - + ("json err 【") + JSON.stringify(err) + (" 】 ")); - console.log('ACTS_NormalizeUri_0100====:' + err); - console.log('ACTS_NormalizeUri_0100====: ' + DAHelper) - try { - DAHelper.normalizeUri( - dataAbilityUri, - (err, data) => { - console.debug("=ACTS_NormalizeUri_0200 err,data=======>" - + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;")); - expect(typeof (data)).assertEqual("string"); - expect(data).assertEqual(dataAbilityUri); - console.log('ACTS_NormalizeUri_0200====:' + err); - console.log('ACTS_NormalizeUri_0200====: ' + DAHelper) - try { - DAHelper.normalizeUri( - undefined, - ).then((data) => { - console.debug("=ACTS_NormalizeUri_0300 then data====>" - + ("json data 【") + JSON.stringify(data) + (" 】")); - expect(data).assertEqual(""); - console.log('ACTS_NormalizeUri_0300==== { - console.debug("=ACTS_NormalizeUri_0300 catch err ====>" - + ("json err 【") + JSON.stringify(err) + (" 】 ")); - console.log('ACTS_NormalizeUri_0300====:' + err); - console.log('ACTS_NormalizeUri_0300====: ' + DAHelper) - try { - DAHelper.normalizeUri( - undefined, - (err, data) => { - console.debug("=ACTS_NormalizeUri_0400 err,data=======>" - + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;")); - expect(err.code).assertEqual(-1); - console.log('ACTS_NormalizeUri_0400====:' + err); - console.log('ACTS_NormalizeUri_0400====: ' + DAHelper) - try { - DAHelper.normalizeUri( - 123456, - ).then((data) => { - console.debug("=ACTS_NormalizeUri_0500 then data====>" - + ("json data 【") + JSON.stringify(data) + (" 】")); - expect(data).assertEqual(""); - console.log('ACTS_NormalizeUri_0500==== { - console.debug("=ACTS_NormalizeUri_0500 catch err ====>" - + ("json err 【") + JSON.stringify(err) + (" 】 ")); - console.log('ACTS_NormalizeUri_0500====:' + err); - console.log('ACTS_NormalizeUri_0500====: ' + DAHelper) - try { - DAHelper.normalizeUri( - 123456, - (err, data) => { - console.debug("=ACTS_NormalizeUri_0600 err,data=======>" - + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;")); - expect(err.code).assertEqual(-1); - console.log('ACTS_NormalizeUri_0600====:' + err); - console.log('ACTS_NormalizeUri_0600====: ' + DAHelper) - try { - DAHelper.normalizeUri( - "errorUri", - ).then((data) => { - console.debug("=ACTS_NormalizeUri_0700 then data====>" - + ("json data 【") + JSON.stringify(data) + (" 】")); - expect(data).assertEqual(""); - console.log('ACTS_NormalizeUri_0700==== { - console.debug("=ACTS_NormalizeUri_0700 catch err ====>" - + ("json err 【") + JSON.stringify(err) + (" 】 ")); - console.log('ACTS_NormalizeUri_0700====:' + err); - console.log('ACTS_NormalizeUri_0700====: ' + DAHelper) - try { - DAHelper.normalizeUri( - "errorUri", - (err, data) => { - console.debug("=ACTS_NormalizeUri_0800 err,data=======>" - + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;")); - expect(data).assertEqual(""); - console.log('ACTS_NormalizeUri_0800====:' + err); - console.log('ACTS_NormalizeUri_0800====: ' + DAHelper) - try { - DAHelper.normalizeUri( - dataAbilityUri3, - ).then((data) => { - console.debug("=ACTS_NormalizeUri_0900 then data====>" - + ("json data 【") + JSON.stringify(data) + (" 】")); - expect(data).assertEqual(""); - console.log('ACTS_NormalizeUri_0900==== { - console.debug("=ACTS_NormalizeUri_0900 catch err ====>" - + ("json err 【") + JSON.stringify(err) + (" 】 ")); - console.log('ACTS_NormalizeUri_0900====:' + err); - console.log('ACTS_NormalizeUri_0900====: ' + DAHelper) - try { - DAHelper.normalizeUri( - dataAbilityUri3, - (err, data) => { - console.debug("=ACTS_NormalizeUri_1000 err,data=======>" - + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;")); - expect(data).assertEqual(""); - console.log('ACTS_NormalizeUri_1000====:' + err); - console.log('ACTS_NormalizeUri_1000====: ' + DAHelper) - try { - DAHelper.denormalizeUri( - dataAbilityUri, - ).then((data) => { - console.debug("=ACTS_DenormalizeUri_0100 then data====>" - + ("json data 【") + JSON.stringify(data) + (" 】")); - expect(data).assertEqual(dataAbilityUri); - console.log('ACTS_DenormalizeUri_0100==== { - console.debug("=ACTS_DenormalizeUri_0100 catch err ====>" - + ("json err 【") + JSON.stringify(err) + (" 】 ")); - console.log('ACTS_DenormalizeUri_0100====:' + err); - console.log('ACTS_DenormalizeUri_0100====: ' + DAHelper) - try { - DAHelper.denormalizeUri( - dataAbilityUri, - (err, data) => { - console.debug("=ACTS_DenormalizeUri_0200 err,data=======>" - + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;")); - expect(data).assertEqual(dataAbilityUri); - console.log('ACTS_DenormalizeUri_0200====:' + err); - console.log('ACTS_DenormalizeUri_0200====: ' + DAHelper) - try { - DAHelper.denormalizeUri( - undefined, - ).then((data) => { - console.debug("=ACTS_DenormalizeUri_0300 then data====>" - + ("json data 【") + JSON.stringify(data) + (" 】")); - expect(data).assertEqual(""); - console.log('ACTS_DenormalizeUri_0300==== { - console.debug("=ACTS_DenormalizeUri_0300 catch err ====>" - + ("json err 【") + JSON.stringify(err) + (" 】 ")); - console.log('ACTS_DenormalizeUri_0300====:' + err); - console.log('ACTS_DenormalizeUri_0300====: ' + DAHelper) - try { - DAHelper.denormalizeUri( - undefined, - (err, data) => { - console.debug("=ACTS_DenormalizeUri_0400 err,data=======>" - + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;")); - expect(data).assertEqual(""); - console.log('ACTS_DenormalizeUri_0400====:' + err); - console.log('ACTS_DenormalizeUri_0400====: ' + DAHelper) - try { - DAHelper.denormalizeUri( - "error", - ).then((data) => { - console.debug("=ACTS_DenormalizeUri_0500 then data====>" - + ("json data 【") + JSON.stringify(data) + (" 】")); - expect(data).assertEqual(""); - console.log('ACTS_DenormalizeUri_0500==== { - console.debug("=ACTS_DenormalizeUri_0500 catch err ====>" - + ("json err 【") + JSON.stringify(err) + (" 】 ")); - console.log('ACTS_DenormalizeUri_0500====:' + err); - console.log('ACTS_DenormalizeUri_0500====: ' + DAHelper) - try { - DAHelper.denormalizeUri( - "error", - (err, data) => { - console.debug("=ACTS_DenormalizeUri_0600 err,data=======>" - + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;")); - expect(data).assertEqual(""); - console.log('ACTS_DenormalizeUri_0600====:' + err); - console.log('ACTS_DenormalizeUri_0600====: ' + DAHelper) - try { - DAHelper.denormalizeUri( - 123456, - ).then((data) => { - console.debug("=ACTS_DenormalizeUri_0700 then data====>" - + ("json data 【") + JSON.stringify(data) + (" 】")); - expect(data).assertEqual(""); - console.log('ACTS_DenormalizeUri_0700==== { - console.debug("=ACTS_DenormalizeUri_0700 catch err ====>" - + ("json err 【") + JSON.stringify(err) + (" 】 ")); - console.log('ACTS_DenormalizeUri_0700====:' + err); - console.log('ACTS_DenormalizeUri_0700====: ' + DAHelper) - try { - DAHelper.denormalizeUri( - 123456, - (err, data) => { - console.debug("=ACTS_DenormalizeUri_0800 err,data=======>" - + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;")); - expect(data).assertEqual(""); - console.log('ACTS_DenormalizeUri_0800====:' + err); - console.log('ACTS_DenormalizeUri_0800====: ' + DAHelper) - try { - DAHelper.denormalizeUri( - dataAbilityUri3, - ).then((data) => { - console.debug("=ACTS_DenormalizeUri_0900 then data====>" - + ("json data 【") + JSON.stringify(data) + (" 】")); - expect(data).assertEqual(""); - console.log('ACTS_DenormalizeUri_0900==== { - console.debug("=ACTS_DenormalizeUri_0900 catch err ====>" - + ("json err 【") + JSON.stringify(err) + (" 】 ")); - console.log('ACTS_DenormalizeUri_0900====:' + err); - console.log('ACTS_DenormalizeUri_0900====: ' + DAHelper) - try { - DAHelper.denormalizeUri( - dataAbilityUri3, - (err, data) => { - console.debug("=ACTS_DenormalizeUri_1000 err,data=======>" - + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;")); - expect(data).assertEqual(""); - console.log('ACTS_DenormalizeUri_1000====:' + err); - console.log('ACTS_DenormalizeUri_1000==== { - console.debug("=ACTS_OnOff_0100 err=======>" - + ("err【") + JSON.stringify(err) + (" 】") + " , " + err); - expect(err.code).assertEqual(0); - } - ); - } - } catch (err) { - console.error('=ACTS_OnOff_0100 catch(err)====>:' + err); - expect(false).assertTrue(); - console.log('ACTS_OnOff_0100===="); - expect(false).assertTrue(); - clearTimeout(currentAlertTimeout); - console.log('ACTS_OnOff_0200==== { - if (err.code != 0) { - console.debug("=ACTS_OnOff_0200 err=======>" - + ("err【") + JSON.stringify(err) + (" 】") + " , " + err); - expect(false).assertTrue(); - console.log('ACTS_OnOff_0200==== { - expect(err.code).assertEqual(0); - console.log('ACTS_OnOff_0200====:' + err); - expect(false).assertTrue(); - console.log('ACTS_OnOff_0200====" + caller); - if (flagCallback01 == 1 && flagCallback02 == 1 && flagCallback03 == 1) { - clearTimeout(currentAlertTimeout); - DAHelper.off("dataChange", dataAbilityUri, onAsyncCallback0301); - DAHelper.off("dataChange", dataAbilityUri, onAsyncCallback0302); - DAHelper.off("dataChange", dataAbilityUri, onAsyncCallback0303); - console.log('ACTS_OnOff_0300==== { - console.debug('ACTS_OnOff_0300====" - + flagCallback01 + flagCallback02 + flagCallback03); - } - } - try { - expect(typeof (DAHelper)).assertEqual("object"); - - DAHelper.on("dataChange", dataAbilityUri, onAsyncCallback0301); - DAHelper.on("dataChange", dataAbilityUri, onAsyncCallback0302); - DAHelper.on("dataChange", dataAbilityUri, onAsyncCallback0303); - - setTimeout(mySetTimeout, gSetTimeout); - function mySetTimeout() { - DAHelper.notifyChange( - dataAbilityUri, - (err) => { - expect(err.code).assertEqual(0); - waitDone("notifyChange"); - } - ); - } - } catch (err) { - console.error('=ACTS_OnOff_0300 catch(err)====>:' + err); - expect(false).assertTrue(); - console.log('ACTS_OnOff_0300====" - + ("json flagCallback02【") + JSON.stringify(flagCallback02) + (" 】") + " , " + flagCallback02); - expect(false).assertTrue(); - clearTimeout(currentAlertTimeout); - console.log('ACTS_OnOff_0400====" + caller); - if (flagCallback01 == 1 && flagCallback02 == 0 && flagCallback03 == 1) { - clearTimeout(currentAlertTimeout); - function mySetTimeout() { - DAHelper.off("dataChange", dataAbilityUri, onAsyncCallback0401); - DAHelper.off("dataChange", dataAbilityUri, onAsyncCallback0403); - console.log('ACTS_OnOff_0400==== { - console.debug('ACTS_OnOff_0400====" - + flagCallback01 + flagCallback02 + flagCallback03); - } - } - try { - expect(typeof (DAHelper)).assertEqual("object"); - - DAHelper.on("dataChange", dataAbilityUri, onAsyncCallback0401); - DAHelper.on("dataChange", dataAbilityUri, onAsyncCallback0402); - DAHelper.on("dataChange", dataAbilityUri, onAsyncCallback0403); - - DAHelper.off("dataChange", dataAbilityUri, onAsyncCallback0402); - - setTimeout(mySetTimeout, gSetTimeout); - function mySetTimeout() { - DAHelper.notifyChange( - dataAbilityUri, - (err) => { - expect(err.code).assertEqual(0); - waitDone("notifyChange"); - } - ); - } - } catch (err) { - console.error('=ACTS_OnOff_0400 catch(err)====>:' + err); - expect(false).assertTrue(); - console.log('ACTS_OnOff_0400====" - + ("json err【") + JSON.stringify(err) + (" 】") + " , " + err); - expect(false).assertTrue(); - clearTimeout(currentAlertTimeout); - console.log('ACTS_OnOff_0500====" - + ("json err【") + JSON.stringify(err) + (" 】") + " , " + err); - expect(false).assertTrue(); - clearTimeout(currentAlertTimeout); - console.log('ACTS_OnOff_0500====" - + ("json err") + JSON.stringify(err) + (" 】") + " , " + err); - expect(false).assertTrue(); - clearTimeout(currentAlertTimeout); - console.log('ACTS_OnOff_0500==== { - if (err.code != 0) { - console.debug("=ACTS_OnOff_0500 err=======>" - + ("err【") + JSON.stringify(err) + (" 】") + " , " + err); - expect(false).assertTrue(); - clearTimeout(currentAlertTimeout); - DAHelper.off("dataChange", dataAbilityUri, onAsyncCallback0501); - DAHelper.off("dataChange", dataAbilityUri, onAsyncCallback0502); - DAHelper.off("dataChange", dataAbilityUri, onAsyncCallback0503); - console.log('ACTS_OnOff_0500==== { - console.debug('ACTS_OnOff_0500====:' + err); - expect(false).assertTrue(); - console.log('ACTS_OnOff_0500====" + caller); - if (flagCallback01 == 2) { - DAHelper.off("dataChange", dataAbilityUri, onAsyncCallback0600); - DAHelper2.off("dataChange", dataAbilityUri2, onAsyncCallback0600); - console.log('ACTS_OnOff_0600====" + flagCallback01); - } - } - - setTimeout(mySetTimeout, gSetTimeout); - function mySetTimeout() { - DAHelper.notifyChange( - dataAbilityUri, - (err) => { - if (err.code != 0) { - console.debug("=ACTS_OnOff_0600 err=======>" - + ("err【") + JSON.stringify(err) + (" 】") + " , " + err); - expect(false).assertTrue(); - DAHelper.off("dataChange", dataAbilityUri, onAsyncCallback0600); - DAHelper2.off("dataChange", dataAbilityUri2, onAsyncCallback0600); - console.log('ACTS_OnOff_0600==== { - if (err.code != 0) { - console.debug("=ACTS_OnOff_0600 err=======>" - + ("err【") + JSON.stringify(err) + (" 】") + " , " + err); - expect(false).assertTrue(); - DAHelper.off("dataChange", dataAbilityUri, onAsyncCallback0600); - DAHelper2.off("dataChange", dataAbilityUri2, onAsyncCallback0600); - console.log('ACTS_OnOff_0600====:' + err); - expect(false).assertTrue(); - console.log('ACTS_OnOff_0600==== { - if (err.code != 0) { - console.debug("=ACTS_OnOff_0700 err=======>" - + ("err【") + JSON.stringify(err) + (" 】") + " , " + err); - expect(false).assertTrue(); - DAHelper.off("dataChange", dataAbilityUri, onAsyncCallback0700); - DAHelper2.off("dataChange", dataAbilityUri2, onAsyncCallback0700); - console.log('ACTS_OnOff_0700==== { - console.debug("=ACTS_OnOff_0700 err=======>" - + ("err【") + JSON.stringify(err) + (" 】") + " , " + err); - expect(err.code).assertEqual(0); - done(); - } - ); - } - } - ); - } - } catch (err) { - console.error('=ACTS_OnOff_0700 catch(err)====>:' + err); - expect(false).assertTrue(); - console.log('ACTS_OnOff_0700==== { - expect(err.code).assertEqual(0); - currentAlertTimeout = setTimeout(() => { - console.log('ACTS_OnOff_0800====:' + err); - expect(false).assertTrue(); - console.log('ACTS_OnOff_0800==== { - if (err.code != 0) { - console.debug("=ACTS_OnOff_0900 err=======>" - + ("err【") + JSON.stringify(err) + (" 】") + " , " + err); - expect(false).assertTrue(); - console.log('ACTS_OnOff_0900==== { - console.debug('ACTS_OnOff_0900====< else true'); - expect(false).assertTrue(); - console.log('ACTS_OnOff_0900====:' + err); - expect(false).assertTrue(); - console.log('ACTS_OnOff_0900==== { - currentAlertTimeout = setTimeout(() => { - expect(err.code).assertEqual(0); - console.log('ACTS_OnOff_1000====:' + err); - expect(false).assertTrue(); - console.log('ACTS_OnOff_1000===="); - expect(err.code).assertEqual(0); - clearTimeout(currentAlertTimeout); - DAHelper.off("dataChange", dataAbilityUri, onAsyncCallback1100); - console.log('ACTS_OnOff_1100==== { - if (err.code != 0) { - console.debug("=ACTS_OnOff_1100 err=======>" - + ("err【") + JSON.stringify(err) + (" 】") + " , " + err); - expect(false).assertTrue(); - console.log('ACTS_OnOff_1100==== { - console.debug('ACTS_OnOff_1100====:' + err); - expect(false).assertTrue(); - console.log('ACTS_OnOff_1100===="); - expect(false).assertTrue(); - clearTimeout(currentAlertTimeout); - console.log('ACTS_OnOff_1200==== { - if (err.code != 0) { - console.debug("=ACTS_OnOff_1200 err=======>" - + ("err【") + JSON.stringify(err) + (" 】") + " , " + err); - DAHelper.off("dataChange", dataAbilityUri, onAsyncCallback1200); - console.log('ACTS_OnOff_1200==== { - console.debug('ACTS_OnOff_1200====:' + err); - expect(false).assertTrue(); - console.log('ACTS_OnOff_1200==== { - expect(err.code).assertEqual(0); - setTimeout(() => { - console.log('ACTS_OnOff_1300====:' + err); - expect(false).assertTrue(); - console.log('ACTS_OnOff_1300===="); - expect(err.code).assertEqual(0); - DAHelper.off("dataChange", dataAbilityUri, onAsyncCallback1400); - console.log('ACTS_OnOff_1400==== { - console.debug("=ACTS_OnOff_1400 err=======>" - + ("err【") + JSON.stringify(err) + (" 】") + " , " + err); - } - ); - } - } catch (err) { - console.error('=ACTS_OnOff_1400 catch(err)====>:' + err); - expect(false).assertTrue(); - console.log('ACTS_OnOff_1400===="); - expect(false).assertTrue(); - } - DAHelper.on(undefined, dataAbilityUri, onAsyncCallback1500); - - setTimeout(mySetTimeout, gSetTimeout); - function mySetTimeout() { - DAHelper.notifyChange( - dataAbilityUri, - (err) => { - expect(err.code).assertEqual(0); - currentAlertTimeout = setTimeout(() => { - console.debug('ACTS_OnOff_1500====:' + err); - expect(false).assertTrue(); - console.log('ACTS_OnOff_1500===="); - expect(err.code).assertEqual(0); - clearTimeout(currentAlertTimeout); - DAHelper.off("dataChange", dataAbilityUri, onAsyncCallback1600); - console.log('ACTS_OnOff_1600==== { - if (err.code != 0) { - console.debug("=ACTS_OnOff_1600 err=======>" - + ("err【") + JSON.stringify(err) + (" 】") + " , " + err); - expect(false).assertTrue(); - console.log('ACTS_OnOff_1600==== { - console.debug('ACTS_OnOff_1600====:' + err); - expect(false).assertTrue(); - console.log('ACTS_OnOff_1600==== { - if (err.code != 0) { - console.debug("=ACTS_OnOff_1700 err=======>" - + ("err【") + JSON.stringify(err) + (" 】") + " , " + err); - expect(false).assertTrue(); - DAHelper.off("dataChange", dataAbilityUri, onAsyncCallback1700); - gSetTimeout = 500; - done(); - } else { - currentAlertTimeout = setTimeout(() => { - expect(err.code).assertEqual(0); - DAHelper.off("dataChange", dataAbilityUri, onAsyncCallback1700); - console.log('ACTS_OnOff_1700====:' + err); - expect(false).assertTrue(); - console.log('ACTS_OnOff_1700===="); - expect(err.code).assertEqual(0); - clearTimeout(currentAlertTimeout); - DAHelper.off("dataChange", dataAbilityUri, onAsyncCallback1800); - console.log('ACTS_OnOff_1800==== { - if (err.code != 0) { - console.debug("=ACTS_OnOff_1800 err=======>" - + ("err【") + JSON.stringify(err) + (" 】") + " , " + err); - expect(false).assertTrue(); - console.log('ACTS_OnOff_1800==== { - console.debug('ACTS_OnOff_1800====:' + err); - expect(false).assertTrue(); - console.log('ACTS_OnOff_1800==== { - console.debug("=ACTS_ExecuteBatch_Insert_0100 executeBatch then data====>" - + ("json data 【") + JSON.stringify(data) + (" 】") + " , " + data.length); - expect(data.length).assertEqual(0); - console.debug('ACTS_ExecuteBatch_Insert_0100==== { - console.debug("=ACTS_ExecuteBatch_Insert_0100 executeBatch catch err ====>" - + ("json err 【") + JSON.stringify(err) + (" 】 ") + " , " + err); - expect(false).assertTrue(); - console.debug('ACTS_ExecuteBatch_Insert_0100====:' - + ("json err 【") + JSON.stringify(err) + (" 】 ,") + err); - expect(false).assertTrue(); - console.debug('ACTS_ExecuteBatch_Insert_0100==== { - console.debug("=ACTS_ExecuteBatch_Insert_0200 executeBatch then data====>" - + ("json data 【") + JSON.stringify(data) + (" 】") + " , " + data.length); - expect(data.length).assertEqual(0); - console.debug('ACTS_ExecuteBatch_Insert_0200==== { - console.debug("=ACTS_ExecuteBatch_Insert_0200 executeBatch catch err ====>" - + ("json err 【") + JSON.stringify(err) + (" 】 ") + " , " + err); - expect(false).assertTrue(); - console.debug('ACTS_ExecuteBatch_Insert_0200====:' - + ("json err 【") + JSON.stringify(err) + (" 】 ,") + err); - expect(false).assertTrue(); - console.debug('ACTS_ExecuteBatch_Insert_0200==== { - console.debug("=ACTS_ExecuteBatch_Insert_0300 executeBatch then data====>" - + ("json data 【") + JSON.stringify(data) + (" 】") + " , " + data.length); - expect(data.length).assertEqual(0); - console.debug('ACTS_ExecuteBatch_Insert_0300==== { - console.debug("=ACTS_ExecuteBatch_Insert_0300 executeBatch catch err ====>" - + ("json err 【") + JSON.stringify(err) + (" 】 ") + " , " + err); - expect(false).assertTrue(); - console.debug('ACTS_ExecuteBatch_Insert_0300====:' - + ("json err 【") + JSON.stringify(err) + (" 】 ,") + err); - expect(false).assertTrue(); - console.debug('ACTS_ExecuteBatch_Insert_0300==== { - console.debug("=ACTS_ExecuteBatch_Insert_0400 executeBatch err,data====>" - + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) - + (" 】;") + data.length); - expect(err.code).assertEqual(0); - expect(data.length).assertEqual(0); - console.debug('ACTS_ExecuteBatch_Insert_0400====:' - + ("json err 【") + JSON.stringify(err) + (" 】 ,") + err); - expect(false).assertTrue(); - console.debug('ACTS_ExecuteBatch_Insert_0400==== { - console.debug("=ACTS_ExecuteBatch_Insert_0500 executeBatch err,data====>" - + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) - + (" 】;") + data.length); - expect(err.code).assertEqual(0); - expect(data.length).assertEqual(0); - console.debug('ACTS_ExecuteBatch_Insert_0500====:' - + ("json err 【") + JSON.stringify(err) + (" 】 ,") + err); - expect(false).assertTrue(); - console.debug('ACTS_ExecuteBatch_Insert_0500==== { - console.debug("=ACTS_ExecuteBatch_Insert_0600 executeBatch err,data====>" - + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) - + (" 】;") + data.length); - expect(data.length).assertEqual(0); - console.debug('ACTS_ExecuteBatch_Insert_0600====:' - + ("json err 【") + JSON.stringify(err) + (" 】 ,") + err); - expect(false).assertTrue(); - console.debug('ACTS_ExecuteBatch_Insert_0600==== { - console.debug("=ACTS_ExecuteBatch_Update_0100 executeBatch then data====>" - + ("json data 【") + JSON.stringify(DataAbilityResult) - + (" 】") + DataAbilityResult.length); - expect(DataAbilityResult.length).assertEqual(1); - for (var i = 0; i < DataAbilityResult.length; i++) { - console.debug('=ACTS_ExecuteBatch_Update_0100 for data[' + i + '].uri ====>: ' - + DataAbilityResult[i].uri) - expect(DataAbilityResult[i].uri).assertEqual(dataAbilityUri); - console.debug('=ACTS_ExecuteBatch_Update_0100 for data[' + i + '].count ====>: ' - + DataAbilityResult[i].count) - expect(DataAbilityResult[i].count).assertEqual(1); - } - console.debug('ACTS_ExecuteBatch_Update_0100==== { - console.debug("=ACTS_ExecuteBatch_Update_0100 executeBatch catch err ====>" - + ("json err 【") + JSON.stringify(err) + (" 】 ")); - expect(false).assertTrue(); - console.debug('ACTS_ExecuteBatch_Update_0100====:' - + ("json err 【") + JSON.stringify(err) + (" 】 ,") + err); - expect(false).assertTrue(); - console.debug('ACTS_ExecuteBatch_Update_0100==== { - console.debug("=ACTS_ExecuteBatch_Update_0200 executeBatch then data====>" - + ("json data 【") + JSON.stringify(DataAbilityResult) + (" 】") + DataAbilityResult.length); - expect(DataAbilityResult.length).assertEqual(2); - for (var i = 0; i < DataAbilityResult.length; i++) { - console.debug('=ACTS_ExecuteBatch_Update_0200 for data[' + i + '].uri ====>: ' - + DataAbilityResult[i].uri) - expect(DataAbilityResult[i].uri).assertEqual(dataAbilityUri); - console.debug('=ACTS_ExecuteBatch_Update_0200 for data[' + i + '].count ====>: ' - + DataAbilityResult[i].count) - expect(DataAbilityResult[i].count).assertEqual(1); - } - console.debug('ACTS_ExecuteBatch_Update_0200==== { - console.debug("=ACTS_ExecuteBatch_Update_0200 executeBatch catch err ====>" - + ("json err 【") + JSON.stringify(err) + (" 】 ")); - expect(false).assertTrue(); - console.debug('ACTS_ExecuteBatch_Update_0200====:' - + ("json err 【") + JSON.stringify(err) + (" 】 ,") + err); - expect(false).assertTrue(); - console.debug('ACTS_ExecuteBatch_Update_0200==== { - console.debug("=ACTS_ExecuteBatch_Update_0300 executeBatch then data====>" - + ("json data 【") + JSON.stringify(DataAbilityResult) + (" 】") - + DataAbilityResult.length); - expect(DataAbilityResult.length).assertEqual(1); - for (var i = 0; i < DataAbilityResult.length; i++) { - console.debug('=ACTS_ExecuteBatch_Update_0300 for data[' + i + '].uri ====>: ' - + DataAbilityResult[i].uri) - expect(DataAbilityResult[i].uri).assertEqual(dataAbilityUri); - console.debug('=ACTS_ExecuteBatch_Update_0300 for data[' + i + '].count ====>: ' - + DataAbilityResult[i].count) - expect(DataAbilityResult[i].count).assertEqual(1); - } - console.debug('ACTS_ExecuteBatch_Update_0300==== { - console.debug("=ACTS_ExecuteBatch_Update_0300 executeBatch catch err ====>" - + ("json err 【") + JSON.stringify(err) + (" 】 ")); - expect(false).assertTrue(); - console.debug('ACTS_ExecuteBatch_Update_0300====:' - + ("json err 【") + JSON.stringify(err) + (" 】 ,") + err); - expect(false).assertTrue(); - console.debug('ACTS_ExecuteBatch_Update_0300==== { - console.debug("=ACTS_ExecuteBatch_Update_0400 executeBatch err,data====>" - + ("json err【") + JSON.stringify(err) + (" 】json data【") - + JSON.stringify(DataAbilityResult) + (" 】;") + DataAbilityResult.length); - expect(DataAbilityResult.length).assertEqual(1); - for (var i = 0; i < DataAbilityResult.length; i++) { - console.debug('=ACTS_ExecuteBatch_Update_0400 for data[' + i + '].uri ====>: ' - + DataAbilityResult[i].uri) - expect(DataAbilityResult[i].uri).assertEqual(dataAbilityUri); - console.debug('=ACTS_ExecuteBatch_Update_0400 for data[' + i + '].count ====>: ' - + DataAbilityResult[i].count) - expect(DataAbilityResult[i].count).assertEqual(1); - } - console.debug('ACTS_ExecuteBatch_Update_0400====:' - + ("json err 【") + JSON.stringify(err) + (" 】 ,") + err); - expect(false).assertTrue(); - console.debug('ACTS_ExecuteBatch_Update_0400==== { - console.debug("=ACTS_ExecuteBatch_Update_0500 executeBatch err,data====>" - + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(DataAbilityResult) - + (" 】;") + DataAbilityResult.length); - expect(DataAbilityResult.length).assertEqual(2); - for (var i = 0; i < DataAbilityResult.length; i++) { - console.debug('=ACTS_ExecuteBatch_Update_0500 for data[' + i + '].uri ====>: ' - + DataAbilityResult[i].uri) - expect(DataAbilityResult[i].uri).assertEqual(dataAbilityUri); - console.debug('=ACTS_ExecuteBatch_Update_0500 for data[' + i + '].count ====>: ' - + DataAbilityResult[i].count) - expect(DataAbilityResult[i].count).assertEqual(1); - } - console.debug('ACTS_ExecuteBatch_Update_0500====:' - + ("json err 【") + JSON.stringify(err) + (" 】 ,") + err); - expect(false).assertTrue(); - console.debug('ACTS_ExecuteBatch_Update_0500==== { - console.debug("=ACTS_ExecuteBatch_Update_0600 executeBatch err,data====>" - + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(DataAbilityResult) - + (" 】;") + DataAbilityResult.length); - expect(DataAbilityResult.length).assertEqual(1); - for (var i = 0; i < DataAbilityResult.length; i++) { - console.debug('=ACTS_ExecuteBatch_Update_0600 for data[' + i + '].uri ====>: ' - + DataAbilityResult[i].uri) - expect(DataAbilityResult[i].uri).assertEqual(dataAbilityUri); - console.debug('=ACTS_ExecuteBatch_Update_0600 for data[' + i + '].count ====>: ' - + DataAbilityResult[i].count) - expect(DataAbilityResult[i].count).assertEqual(1); - } - console.debug('ACTS_ExecuteBatch_Update_0600====:' - + ("json err 【") + JSON.stringify(err) + (" 】 ,") + err); - expect(false).assertTrue(); - console.debug('ACTS_ExecuteBatch_Update_0600==== { - console.debug("=ACTS_ExecuteBatch_Assert_0100 executeBatch then data====>" - + ("json data 【") + JSON.stringify(data) + (" 】") + data.length); - expect(data.length).assertEqual(0); - console.debug('ACTS_ExecuteBatch_Assert_0100==== { - console.debug("=ACTS_ExecuteBatch_Assert_0100 executeBatch catch err ====>" - + ("json err 【") + JSON.stringify(err) + (" 】 ")); - expect(false).assertTrue(); - console.debug('ACTS_ExecuteBatch_Assert_0100====:' - + ("json err 【") + JSON.stringify(err) + (" 】 ,") + err); - expect(false).assertTrue(); - console.debug('ACTS_ExecuteBatch_Assert_0100==== { - console.debug("=ACTS_ExecuteBatch_Assert_0200 executeBatch then data====>" - + ("json data 【") + JSON.stringify(data) + (" 】") + data.length); - expect(data.length).assertEqual(0); - console.debug('ACTS_ExecuteBatch_Assert_0200==== { - console.debug("=ACTS_ExecuteBatch_Assert_0200 executeBatch catch err ====>" - + ("json err 【") + JSON.stringify(err) + (" 】 ")); - expect(false).assertTrue(); - console.debug('ACTS_ExecuteBatch_Assert_0200====:' - + ("json err 【") + JSON.stringify(err) + (" 】 ,") + err); - expect(false).assertTrue(); - console.debug('ACTS_ExecuteBatch_Assert_0200==== { - console.debug("=ACTS_ExecuteBatch_Assert_0300 executeBatch then data====>" - + ("json data 【") + JSON.stringify(DataAbilityResult) + (" 】") - + DataAbilityResult.length); - expect(DataAbilityResult.length).assertEqual(1); - for (var i = 0; i < DataAbilityResult.length; i++) { - console.debug('=ACTS_ExecuteBatch_Assert_0300 for data[' + i + '].uri ====>: ' - + DataAbilityResult[i].uri) - expect(DataAbilityResult[i].uri).assertEqual(""); - console.debug('=ACTS_ExecuteBatch_Assert_0300 for data[' + i + '].count ====>: ' - + DataAbilityResult[i].count) - expect(DataAbilityResult[i].count).assertEqual(0); - } - console.debug('ACTS_ExecuteBatch_Assert_0300==== { - console.debug("=ACTS_ExecuteBatch_Assert_0300 executeBatch catch err ====>" - + ("json err 【") + JSON.stringify(err) + (" 】 ")); - expect(false).assertTrue(); - console.debug('ACTS_ExecuteBatch_Assert_0300====:' - + ("json err 【") + JSON.stringify(err) + (" 】 ,") + err); - expect(false).assertTrue(); - console.debug('ACTS_ExecuteBatch_Assert_0300==== { - console.debug("=ACTS_ExecuteBatch_Assert_0400 executeBatch err,data====>" - + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) - + (" 】;") + data.length); - expect(data.length).assertEqual(0); - console.debug('ACTS_ExecuteBatch_Assert_0400====:' - + ("json err 【") + JSON.stringify(err) + (" 】 ,") + err); - expect(false).assertTrue(); - console.debug('ACTS_ExecuteBatch_Assert_0400==== { - console.debug("=ACTS_ExecuteBatch_Assert_0500 executeBatch err,data====>" - + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) - + (" 】;") + data.length); - expect(data.length).assertEqual(0); - console.debug('ACTS_ExecuteBatch_Assert_0500====:' - + ("json err 【") + JSON.stringify(err) + (" 】 ,") + err); - expect(false).assertTrue(); - console.debug('ACTS_ExecuteBatch_Assert_0500==== { - console.debug("=ACTS_ExecuteBatch_Assert_0600 executeBatch err,data====>" - + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) - + (" 】;") + data.length); - expect(data.length).assertEqual(1); - for (var i = 0; i < data.length; i++) { - console.debug('=ACTS_ExecuteBatch_Assert_0600 for data[' + i + '].uri ====>: ' - + data[i].uri) - expect(data[i].uri).assertEqual(""); - console.debug('=ACTS_ExecuteBatch_Assert_0600 for data[' + i + '].count ====>: ' - + data[i].count) - expect(data[i].count).assertEqual(0); - } - console.debug('ACTS_ExecuteBatch_Assert_0600====:' - + ("json err 【") + JSON.stringify(err) + (" 】 ,") + err); - expect(false).assertTrue(); - console.debug('ACTS_ExecuteBatch_Assert_0600==== { - console.debug("=ACTS_ExecuteBatch_Delete_0100 executeBatch then data====>" - + ("json data 【") + JSON.stringify(DataAbilityResult) + (" 】") + DataAbilityResult.length); - expect(DataAbilityResult.length).assertEqual(1); - for (var i = 0; i < DataAbilityResult.length; i++) { - console.debug('=ACTS_ExecuteBatch_Delete_0100 for data[' + i + '].uri ====>: ' - + DataAbilityResult[i].uri) - expect(DataAbilityResult[i].uri).assertEqual(dataAbilityUri); - console.debug('=ACTS_ExecuteBatch_Delete_0100 for data[' + i + '].count ====>: ' - + DataAbilityResult[i].count) - expect(DataAbilityResult[i].count).assertEqual(1); - } - console.debug('ACTS_ExecuteBatch_Delete_0100==== { - console.debug("=ACTS_ExecuteBatch_Delete_0100 executeBatch catch err ====>" - + ("json err 【") + JSON.stringify(err) + (" 】 ")); - expect(false).assertTrue(); - console.debug('ACTS_ExecuteBatch_Delete_0100====:' - + ("json err 【") + JSON.stringify(err) + (" 】 ,") + err); - expect(false).assertTrue(); - console.debug('ACTS_ExecuteBatch_Delete_0100==== { - console.debug("=ACTS_ExecuteBatch_Delete_0200 executeBatch then data====>" - + ("json data 【") + JSON.stringify(DataAbilityResult) + (" 】") + DataAbilityResult.length); - expect(DataAbilityResult.length).assertEqual(2); - for (var i = 0; i < DataAbilityResult.length; i++) { - console.debug('=ACTS_ExecuteBatch_Delete_0200 for data[' + i + '].uri ====>: ' - + DataAbilityResult[i].uri) - expect(DataAbilityResult[i].uri).assertEqual(dataAbilityUri); - console.debug('=ACTS_ExecuteBatch_Delete_0200 for data[' + i + '].count ====>: ' - + DataAbilityResult[i].count) - expect(DataAbilityResult[i].count).assertEqual(1); - } - console.debug('ACTS_ExecuteBatch_Delete_0200==== { - console.debug("=ACTS_ExecuteBatch_Delete_0200 executeBatch catch err ====>" - + ("json err 【") + JSON.stringify(err) + (" 】 ")); - expect(false).assertTrue(); - console.debug('ACTS_ExecuteBatch_Delete_0200====:' - + ("json err 【") + JSON.stringify(err) + (" 】 ,") + err); - expect(false).assertTrue(); - console.debug('ACTS_ExecuteBatch_Delete_0200==== { - console.debug("=ACTS_ExecuteBatch_Delete_0300 executeBatch then data====>" - + ("json data 【") + JSON.stringify(DataAbilityResult) + (" 】") + DataAbilityResult.length); - expect(DataAbilityResult.length).assertEqual(1); - for (var i = 0; i < DataAbilityResult.length; i++) { - console.debug('=ACTS_ExecuteBatch_Delete_0300 for data[' + i + '].uri ====>: ' - + DataAbilityResult[i].uri) - expect(DataAbilityResult[i].uri).assertEqual(dataAbilityUri); - console.debug('=ACTS_ExecuteBatch_Delete_0300 for data[' + i + '].count ====>: ' - + DataAbilityResult[i].count) - expect(DataAbilityResult[i].count).assertEqual(1); - } - console.debug('ACTS_ExecuteBatch_Delete_0300==== { - console.debug("=ACTS_ExecuteBatch_Delete_0300 executeBatch catch err ====>" - + ("json err 【") + JSON.stringify(err) + (" 】 ")); - expect(false).assertTrue(); - console.debug('ACTS_ExecuteBatch_Delete_0300====:' - + ("json err 【") + JSON.stringify(err) + (" 】 ,") + err); - expect(false).assertTrue(); - console.debug('ACTS_ExecuteBatch_Delete_0300==== { - console.debug("=ACTS_ExecuteBatch_Delete_0400 executeBatch err,data====>" - + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(DataAbilityResult) - + (" 】;") + DataAbilityResult.length); - expect(DataAbilityResult.length).assertEqual(1); - for (var i = 0; i < DataAbilityResult.length; i++) { - console.debug('=ACTS_ExecuteBatch_Delete_0400 for data[' + i + '].uri ====>: ' - + DataAbilityResult[i].uri) - expect(DataAbilityResult[i].uri).assertEqual(dataAbilityUri); - console.debug('=ACTS_ExecuteBatch_Delete_0400 for data[' + i + '].count ====>: ' - + DataAbilityResult[i].count) - expect(DataAbilityResult[i].count).assertEqual(1); - } - console.debug('ACTS_ExecuteBatch_Delete_0400====:' - + ("json err 【") + JSON.stringify(err) + (" 】 ,") + err); - expect(false).assertTrue(); - console.debug('ACTS_ExecuteBatch_Delete_0400==== { - console.debug("=ACTS_ExecuteBatch_Delete_0500 executeBatch err,data====>" - + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(DataAbilityResult) - + (" 】;") + DataAbilityResult.length); - expect(DataAbilityResult.length).assertEqual(2); - for (var i = 0; i < DataAbilityResult.length; i++) { - console.debug('=ACTS_ExecuteBatch_Delete_0500 for data[' + i + '].uri ====>: ' - + DataAbilityResult[i].uri) - expect(DataAbilityResult[i].uri).assertEqual(dataAbilityUri); - console.debug('=ACTS_ExecuteBatch_Delete_0500 for data[' + i + '].count ====>: ' - + DataAbilityResult[i].count) - expect(DataAbilityResult[i].count).assertEqual(1); - } - console.debug('ACTS_ExecuteBatch_Delete_0500====:' - + ("json err 【") + JSON.stringify(err) + (" 】 ,") + err); - expect(false).assertTrue(); - console.debug('ACTS_ExecuteBatch_Delete_0500==== { - console.debug("=ACTS_ExecuteBatch_Delete_0600 executeBatch err,data====>" - + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(DataAbilityResult) - + (" 】;") + DataAbilityResult.length); - expect(DataAbilityResult.length).assertEqual(1); - for (var i = 0; i < DataAbilityResult.length; i++) { - console.debug('=ACTS_ExecuteBatch_Delete_0600 for data[' + i + '].uri ====>: ' - + DataAbilityResult[i].uri) - expect(DataAbilityResult[i].uri).assertEqual(dataAbilityUri); - console.debug('=ACTS_ExecuteBatch_Delete_0600 for data[' + i + '].count ====>: ' - + DataAbilityResult[i].count) - expect(DataAbilityResult[i].count).assertEqual(1); - } - console.debug('ACTS_ExecuteBatch_Delete_0600====:' - + ("json err 【") + JSON.stringify(err) + (" 】 ,") + err); - expect(false).assertTrue(); - console.debug('ACTS_ExecuteBatch_Delete_0600==== { - console.debug("=ACTS_ExecuteBatch_0100 executeBatch then data====>" - + ("json data 【") + JSON.stringify(DataAbilityResult) + (" 】") + DataAbilityResult.length); - for (var i = 0; i < DataAbilityResult.length; i++) { - console.debug('=ACTS_ExecuteBatch_0100 for data[' + i + '].uri ====>: ' - + DataAbilityResult[i].uri) - expect(DataAbilityResult[i].uri).assertEqual(dataAbilityUri); - console.debug('=ACTS_ExecuteBatch_0100 for data[' + i + '].count ====>: ' - + DataAbilityResult[i].count) - expect(DataAbilityResult[i].count).assertEqual(1); - } - console.debug('ACTS_ExecuteBatch_0100==== { - console.debug("=ACTS_ExecuteBatch_0100 executeBatch catch err ====>" - + ("json err 【") + JSON.stringify(err) + (" 】 ")); - expect(false).assertTrue(); - console.debug('ACTS_ExecuteBatch_0100====:' - + ("json err 【") + JSON.stringify(err) + (" 】 ,") + err); - expect(false).assertTrue(); - console.debug('ACTS_ExecuteBatch_0100==== { - console.debug("=ACTS_ExecuteBatch_0200 executeBatch err,data====>" - + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(DataAbilityResult) - + (" 】;") + DataAbilityResult.length); - for (var i = 0; i < DataAbilityResult.length; i++) { - console.debug('=ACTS_ExecuteBatch_0200 for data[' + i + '].uri ====>: ' - + DataAbilityResult[i].uri) - expect(DataAbilityResult[i].uri).assertEqual(dataAbilityUri); - console.debug('=ACTS_ExecuteBatch_0200 for data[' + i + '].count ====>: ' - + DataAbilityResult[i].count) - expect(DataAbilityResult[i].count).assertEqual(1); - } - console.debug('ACTS_ExecuteBatch_0200====:' - + ("json err 【") + JSON.stringify(err) + (" 】 ,") + err); - expect(false).assertTrue(); - console.debug('ACTS_ExecuteBatch_0200==== { - console.debug("=ACTS_ExecuteBatch_0300 executeBatch then data====>" - + ("json data 【") + JSON.stringify(DataAbilityResult) + (" 】") + DataAbilityResult.length); - for (var i = 0; i < DataAbilityResult.length; i++) { - console.debug('=ACTS_ExecuteBatch_0300 for data[' + i + '].uri ====>: ' - + DataAbilityResult[i].uri) - console.debug('=ACTS_ExecuteBatch_0300 for data[' + i + '].count ====>: ' - + DataAbilityResult[i].count) - if (i == 2) { - expect(DataAbilityResult[i].uri).assertEqual(""); - expect(DataAbilityResult[i].count).assertEqual(0); - } else { - expect(DataAbilityResult[i].uri).assertEqual(dataAbilityUri); - expect(DataAbilityResult[i].count).assertEqual(1); - } - } - console.debug('ACTS_ExecuteBatch_0300==== { - console.debug("=ACTS_ExecuteBatch_0300 executeBatch catch err ====>" - + ("json err 【") + JSON.stringify(err) + (" 】 ")); - expect(false).assertTrue(); - console.debug('ACTS_ExecuteBatch_0300====:' - + ("json err 【") + JSON.stringify(err) + (" 】 ,") + err); - expect(false).assertTrue(); - console.debug('ACTS_ExecuteBatch_0300==== { - console.debug("=ACTS_ExecuteBatch_0400 executeBatch err,data====>" - + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(DataAbilityResult) - + (" 】;") + DataAbilityResult.length); - for (var i = 0; i < DataAbilityResult.length; i++) { - console.debug('=ACTS_ExecuteBatch_0400 for data[' + i + '].uri ====>: ' - + DataAbilityResult[i].uri) - console.debug('=ACTS_ExecuteBatch_0400 for data[' + i + '].count ====>: ' - + DataAbilityResult[i].count) - if (i == 2) { - expect(DataAbilityResult[i].uri).assertEqual(""); - expect(DataAbilityResult[i].count).assertEqual(0); - } else { - expect(DataAbilityResult[i].uri).assertEqual(dataAbilityUri); - expect(DataAbilityResult[i].count).assertEqual(1); - } - } - console.debug('ACTS_ExecuteBatch_0400====:' - + ("json err 【") + JSON.stringify(err) + (" 】 ,") + err); - expect(false).assertTrue(); - console.debug('ACTS_ExecuteBatch_0400==== { - console.debug("=ACTS_ExecuteBatch_0500 executeBatch then data====>" - + ("json data 【") + JSON.stringify(data) + (" 】") + data.length); - expect(data.length).assertEqual(0); - console.debug('ACTS_ExecuteBatch_0500==== { - console.debug("=ACTS_ExecuteBatch_0500 executeBatch catch err ====>" - + ("json err 【") + JSON.stringify(err) + (" 】 ")); - expect(false).assertTrue(); - console.debug('ACTS_ExecuteBatch_0500====:' - + ("json err 【") + JSON.stringify(err) + (" 】 ,") + err); - expect(false).assertTrue(); - console.debug('ACTS_ExecuteBatch_0500==== { - console.debug("=ACTS_ExecuteBatch_0600 executeBatch err,data====>" - + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) - + (" 】;") + data.length); - expect(data.length).assertEqual(0); - console.debug('ACTS_ExecuteBatch_0600====:' - + ("json err 【") + JSON.stringify(err) + (" 】 ,") + err); - expect(false).assertTrue(); - console.debug('ACTS_ExecuteBatch_0600==== { - console.debug("=ACTS_ExecuteBatch_0700 executeBatch then data====>" - + ("json data 【") + JSON.stringify(data) + (" 】") + data.length); - expect(data.length).assertEqual(0); - console.debug('ACTS_ExecuteBatch_0700==== { - console.debug("=ACTS_ExecuteBatch_0700 executeBatch catch err ====>" - + ("json err 【") + JSON.stringify(err) + (" 】 ")); - expect(false).assertTrue(); - console.debug('ACTS_ExecuteBatch_0700====:' - + ("json err 【") + JSON.stringify(err) + (" 】 ,") + err); - expect(false).assertTrue(); - console.debug('ACTS_ExecuteBatch_0700==== { - console.debug("=ACTS_ExecuteBatch_0800 executeBatch err,data====>" - + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) - + (" 】;") + data.length); - expect(data.length).assertEqual(0); - console.debug('ACTS_ExecuteBatch_0800====:' - + ("json err 【") + JSON.stringify(err) + (" 】 ,") + err); - expect(false).assertTrue(); - console.debug('ACTS_ExecuteBatch_0800==== { - console.debug("=ACTS_ExecuteBatch_0900 executeBatch then data====>" - + ("json data 【") + JSON.stringify(data) + (" 】") + data.length); - expect(data.length).assertEqual(0); - console.debug('ACTS_ExecuteBatch_0900==== { - console.debug("=ACTS_ExecuteBatch_0900 executeBatch catch err ====>" - + ("json err 【") + JSON.stringify(err) + (" 】 ")); - expect(false).assertTrue(); - console.debug('ACTS_ExecuteBatch_0900====:' - + ("json err 【") + JSON.stringify(err) + (" 】 ,") + err); - expect(false).assertTrue(); - console.debug('ACTS_ExecuteBatch_0900==== { - console.debug("=ACTS_ExecuteBatch_1000 executeBatch err,data====>" - + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) - + (" 】;") + data.length); - expect(data.length).assertEqual(0); - console.debug('ACTS_ExecuteBatch_1000====:' - + ("json err 【") + JSON.stringify(err) + (" 】 ,") + err); - expect(false).assertTrue(); - console.debug('ACTS_ExecuteBatch_1000==== { - console.debug("=ACTS_ExecuteBatch_1100 executeBatch then data====>" - + ("json data 【") + JSON.stringify(data) + (" 】") + data.length); - expect(data.length).assertEqual(0); - console.debug('ACTS_ExecuteBatch_1100==== { - console.debug("=ACTS_ExecuteBatch_1100 executeBatch catch err ====>" - + ("json err 【") + JSON.stringify(err) + (" 】 ")); - expect(false).assertTrue(); - console.debug('ACTS_ExecuteBatch_1100====:' - + ("json err 【") + JSON.stringify(err) + (" 】 ,") + err); - expect(false).assertTrue(); - console.debug('ACTS_ExecuteBatch_1100==== { - console.debug("=ACTS_ExecuteBatch_1200 executeBatch err,data====>" - + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) - + (" 】;") + data.length); - expect(data.length).assertEqual(0); - console.debug('ACTS_ExecuteBatch_1200====:' - + ("json err 【") + JSON.stringify(err) + (" 】 ,") + err); - expect(false).assertTrue(); - console.debug('ACTS_ExecuteBatch_1200====: ' + rDAHelper + " ,JSON. " + JSON.stringify(rDAHelper)); - expect(typeof (rDAHelper)).assertEqual("object"); - rDAHelper.release().then((data) => { - console.debug("=ACTS_Release_0100 then data====>" - + ("json data 【") + JSON.stringify(data) + (" 】") + " , " + data); - expect(data).assertEqual(true); - console.log('ACTS_Release_0100==== { - console.debug("=ACTS_Release_0100 catch err ====>" - + ("json err 【") + JSON.stringify(err) + (" 】 ")); - expect(false).assertTrue(); - console.log('ACTS_Release_0100====:' + err); - expect(false).assertTrue(); - console.log('ACTS_Release_0100====: ' + rDAHelper + " ,JSON. " + JSON.stringify(rDAHelper)); - expect(typeof (rDAHelper)).assertEqual("object"); - rDAHelper.release((err, data) => { - console.debug("=ACTS_Release_0200 err,data=======>" - + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;")); - console.log('featureAbility getDataAbilityHelper ACTS_Release_0200 data: ' + data) - expect(data).assertEqual(true); - console.log('ACTS_Release_0200====:' + err); - expect(false).assertTrue(); - console.log('ACTS_Release_0200====: ' + rDAHelper + " ,JSON. " + JSON.stringify(rDAHelper)); - expect(typeof (rDAHelper)).assertEqual("object"); - rDAHelper.release().then((data) => { - console.debug("=ACTS_Release_0300 then data====>" - + ("json data 【") + JSON.stringify(data) + (" 】") + " , " + data); - expect(data).assertEqual(true); - rDAHelper.release().then((data) => { - console.debug("=ACTS_Release_0300 then data====>" - + ("json data 【") + JSON.stringify(data) + (" 】") + " , " + data); - expect(data).assertEqual(false); - console.log('ACTS_Release_0300==== { - console.debug("=ACTS_Release_0300 catch err ====>" - + ("json err 【") + JSON.stringify(err) + (" 】 ")); - expect(false).assertTrue(); - console.log('ACTS_Release_0300==== { - console.debug("=ACTS_Release_0300 catch err ====>" - + ("json err 【") + JSON.stringify(err) + (" 】 ")); - expect(false).assertTrue(); - console.log('ACTS_Release_0300====:' + err); - expect(false).assertTrue(); - console.log('ACTS_Release_0300====: ' + rDAHelper + " ,JSON. " + JSON.stringify(rDAHelper)); - expect(typeof (rDAHelper)).assertEqual("object"); - rDAHelper.release((err, data) => { - console.debug("=ACTS_Release_0400 err,data=======>" - + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;")); - console.log('featureAbility getDataAbilityHelper ACTS_Release_0400 data: ' + data) - expect(data).assertEqual(true); - rDAHelper.release((err, data) => { - console.debug("=ACTS_Release_0400 err,data=======>" - + ("json err【") + JSON.stringify(err) + (" ,") + JSON.stringify(data) + (" 】;")); - console.log('featureAbility getDataAbilityHelper ACTS_Release_0400 data: ' + data) - expect(data).assertEqual(false); - console.log('ACTS_Release_0400====:' + err); - expect(false).assertTrue(); - console.log('ACTS_Release_0400==== - -
- - {{ $t('strings.hello') }} {{ title }} {{text}} - - -
diff --git a/aafwk/aafwk_standard/fa/faapplicationinfo/entry/src/main/js/MainAbility/pages/index/index.js b/aafwk/aafwk_standard/fa/faapplicationinfo/entry/src/main/js/MainAbility/pages/index/index.js deleted file mode 100644 index 3e9e350a6040cf669a4a4334a9d433941a9b44cb..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/fa/faapplicationinfo/entry/src/main/js/MainAbility/pages/index/index.js +++ /dev/null @@ -1,36 +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 {Core} from 'deccjsunit/index' - -export default { - data: { - title: "", - text: "" - }, - onInit() { - this.title = this.$t('strings.world'); - this.text = "MainAbility 1111" - }, - onShow() { - console.info('onShow finish') - const core = Core.getInstance() - core.init() - const configService = core.getDefaultService('config') - configService.setConfig(this) - require('../../../test/List.test.js') - core.execute(); - } -} \ No newline at end of file diff --git a/aafwk/aafwk_standard/fa/faapplicationinfo/entry/src/main/js/MainAbility2/app.js b/aafwk/aafwk_standard/fa/faapplicationinfo/entry/src/main/js/MainAbility2/app.js deleted file mode 100644 index 4d7b924de9ab853460183177c60502732dcf51c6..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/fa/faapplicationinfo/entry/src/main/js/MainAbility2/app.js +++ /dev/null @@ -1,25 +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("ApplicationMainAbility2 onCreate"); - }, - - onDestroy() { - console.info("Application onDestroy"); - } -}; diff --git a/aafwk/aafwk_standard/fa/faapplicationinfo/entry/src/main/js/MainAbility2/i18n/en-US.json b/aafwk/aafwk_standard/fa/faapplicationinfo/entry/src/main/js/MainAbility2/i18n/en-US.json deleted file mode 100644 index 08e34eac912bf2651eefc20e26aa479b5e4e7ec2..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/fa/faapplicationinfo/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/faapplicationinfo/entry/src/main/js/MainAbility2/i18n/zh-CN.json b/aafwk/aafwk_standard/fa/faapplicationinfo/entry/src/main/js/MainAbility2/i18n/zh-CN.json deleted file mode 100644 index 3dd53b3a8b808aec9396fa663cb00ef22ba61e0a..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/fa/faapplicationinfo/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/faapplicationinfo/entry/src/main/js/MainAbility2/pages/index/index.css b/aafwk/aafwk_standard/fa/faapplicationinfo/entry/src/main/js/MainAbility2/pages/index/index.css deleted file mode 100644 index 8b5cce53e8f61458e5a3005866217e0df1dfa133..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/fa/faapplicationinfo/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/faapplicationinfo/entry/src/main/js/MainAbility2/pages/index/index.hml b/aafwk/aafwk_standard/fa/faapplicationinfo/entry/src/main/js/MainAbility2/pages/index/index.hml deleted file mode 100644 index e4857299b06a30f43c2c0a9e9f2404c4b3fa78cb..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/fa/faapplicationinfo/entry/src/main/js/MainAbility2/pages/index/index.hml +++ /dev/null @@ -1,21 +0,0 @@ - - -
- - {{ $t('strings.hello') }} {{ title }} - - -
diff --git a/aafwk/aafwk_standard/fa/faapplicationinfo/entry/src/main/js/MainAbility2/pages/index/index.js b/aafwk/aafwk_standard/fa/faapplicationinfo/entry/src/main/js/MainAbility2/pages/index/index.js deleted file mode 100644 index f3fd01a5e589fb3dabd56508f3b66b5b0dbfd90e..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/fa/faapplicationinfo/entry/src/main/js/MainAbility2/pages/index/index.js +++ /dev/null @@ -1,69 +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 commonEvent from '@ohos.commonEvent' -import featureAbility from '@ohos.ability.featureAbility' - -let event = '' -let commonEventPublishData = '' - -function PublishCallBackOne() { - console.info("====>Publish CallBack SUB_AA_OpenHarmony_Want_0200_CommonEvent====>"); -} -function PublishCallBackTwo() { - console.info("====>Publish CallBack SUB_AA_OpenHarmony_Want_0300_CommonEvent====>"); -} - - - -export default { - data: { - title: '' - }, - onInit() { - this.title = this.$t('strings.world ApplicationMainAbility2'); - }, - onShow() { - console.info('======Start MainAbility2 onShow======'); - featureAbility.getWant( - (err, data) => { - if (data.uri == '{true,true,false}'){ - console.info("SUB_AA_OpenHarmony_Want_0200_StartAbility" + JSON - .stringify(data) + JSON.stringify(err)); - event = data.uri - commonEventPublishData = { - data: event, - } - commonEvent.publish('SUB_AA_OpenHarmony_Want_0200_CommonEvent', - commonEventPublishData, PublishCallBackOne); - } - if (data.type == 'MIMETYPE'){ - console.info("SUB_AA_OpenHarmony_Want_0300_StartAbility" + JSON - .stringify(data) + JSON.stringify(err)); - event = data.type - commonEventPublishData = { - data: event, - } - commonEvent.publish('SUB_AA_OpenHarmony_Want_0300_CommonEvent', - commonEventPublishData, PublishCallBackTwo); - - } - } - ) - }, - onReady() { - console.info('ApplicationInfo MainAbility2 onReady'); - }, -} \ No newline at end of file diff --git a/aafwk/aafwk_standard/fa/faapplicationinfo/entry/src/main/js/resources/base/element/string.json b/aafwk/aafwk_standard/fa/faapplicationinfo/entry/src/main/js/resources/base/element/string.json deleted file mode 100644 index 425cf6173c67c2ba92f95274b86903e6a494222b..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/fa/faapplicationinfo/entry/src/main/js/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/faapplicationinfo/entry/src/main/js/resources/base/media/icon.png b/aafwk/aafwk_standard/fa/faapplicationinfo/entry/src/main/js/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/aafwk/aafwk_standard/fa/faapplicationinfo/entry/src/main/js/resources/base/media/icon.png and /dev/null differ diff --git a/aafwk/aafwk_standard/fa/faapplicationinfo/entry/src/main/js/test/ApplicationInfoJsunit.test.js b/aafwk/aafwk_standard/fa/faapplicationinfo/entry/src/main/js/test/ApplicationInfoJsunit.test.js deleted file mode 100644 index c9b0173ad31bf14146dbc4180688d12162b978b5..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/fa/faapplicationinfo/entry/src/main/js/test/ApplicationInfoJsunit.test.js +++ /dev/null @@ -1,137 +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 featureAbility from '@ohos.ability.featureAbility' -import formBindingData from '@ohos.application.formBindingData' -import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index' - -var getCallingBundleUri = { - events: ['SUB_AA_OpenHarmony_Want_0200_CommonEvent'] -} - -var getCallingBundleType = { - events: ['SUB_AA_OpenHarmony_Want_0300_CommonEvent'] -} - -describe('ApplicationInfoTest', function () { - var TAG = '';- - - /* - * @tc.number SUB_AA_OpenHarmony_FormBase_1000 - * @tc.name Validate formbindingdata creation data - * @tc.desc Function test - * @tc.level 0 - */ - it('SUB_AA_OpenHarmony_FormBase_1000', 0, async function (done) { - console.info('------------start SUB_AA_OpenHarmony_FormBase_1000-------------'); - TAG = 'SUB_AA_OpenHarmony_FormBase_1000'; - var dataObj = { - temperature:"11c", - "time":"11:00", - "test":11, - "test3":true - } - var result = formBindingData.createFormBindingData(dataObj) - console.log(TAG + " result is : " + JSON.stringify(result)) - expect(JSON.stringify(result)). - assertEqual(JSON.stringify({"data":"{\"temperature\":\"11c\",\"time\":\"11:00\",\"test\":11,\"test3\":true}"})); - done(); - console.info('------------end SUB_AA_OpenHarmony_FormBase_1000-------------'); - }); - - /* - * @tc.number SUB_AA_OpenHarmony_Want_0200 - * @tc.name Switching the mission in the launcherlist to the foreground is not supported - * @tc.desc Function test - * @tc.level 0 - */ - it('SUB_AA_OpenHarmony_Want_0200', 0, async function (done) { - console.info('------------start SUB_AA_OpenHarmony_Want_0200-------------'); - TAG = 'SUB_AA_OpenHarmony_Want_0200'; - var Subscriber = ''; - - function SubscribeCallBackUri(err, data) { - console.info(TAG + ' Subscribe CallBack data:' + JSON.stringify(data) + JSON.stringify(err)); - expect(data.data == '{true,true,false}').assertTrue(); - commonEvent.unsubscribe(Subscriber, UnSubscribeCallback); - done(); - } - - function UnSubscribeCallback() { - console.debug(TAG + "====>UnSubscribe CallBack====>"); - done(); - } - - commonEvent.createSubscriber(getCallingBundleUri).then(async (data) => { - console.info(TAG + '====>Create Subscriber===='); - Subscriber = data; - console.info(TAG + '====>Create Subscriber====' + JSON.stringify(data) ); - await commonEvent.subscribe(Subscriber, SubscribeCallBackUri); - }); - - featureAbility.startAbility({ - want: { - abilityName: 'com.example.applicationinfo.MainAbility2', - bundleName: 'com.example.applicationinfo', - uri: '{true,true,false}' - } - }, (err, data) => { - console.info(TAG + ':startAbility success , err:' + JSON.stringify(err) + ',data:' + JSON.stringify(data)); - }); - console.info('------------end SUB_AA_OpenHarmony_Want_0200-------------'); - }); - - /* - * @tc.number SUB_AA_OpenHarmony_Want_0300 - * @tc.name Switching the mission in the launcherlist to the foreground is not supported - * @tc.desc Function test - * @tc.level 0 - */ - it('SUB_AA_OpenHarmony_Want_0300', 0, async function (done) { - console.info('------------start SUB_AA_OpenHarmony_Want_0300-------------'); - TAG = 'SUB_AA_OpenHarmony_Want_0300'; - var Subscriber = ''; - - function SubscribeCallBackType(err, data) { - console.info(TAG + ' Subscribe CallBack data:' + JSON.stringify(data) + JSON.stringify(err)); - expect(data.data == 'MIMETYPE').assertTrue(); - commonEvent.unsubscribe(Subscriber, UnSubscribeCallback); - done(); - } - - function UnSubscribeCallback() { - console.debug(TAG + "====>UnSubscribe CallBack====>"); - done(); - } - - commonEvent.createSubscriber(getCallingBundleType).then(async (data) => { - console.info(TAG + '====>Create Subscriber====>'); - Subscriber = data; - await commonEvent.subscribe(Subscriber, SubscribeCallBackType); - }); - - featureAbility.startAbility({ - want: { - abilityName: 'com.example.applicationinfo.MainAbility2', - bundleName: 'com.example.applicationinfo', - type: 'MIMETYPE', - } - }, (err, data) => { - console.info(TAG + ':startAbility success , err:' + JSON.stringify(err) + ',data:' + JSON.stringify(data)); - }); - console.info('------------end SUB_AA_OpenHarmony_Want_0300-------------'); - }) -}) \ No newline at end of file diff --git a/aafwk/aafwk_standard/fa/faapplicationinfo/entry/src/main/js/test/List.test.js b/aafwk/aafwk_standard/fa/faapplicationinfo/entry/src/main/js/test/List.test.js deleted file mode 100644 index df59d7bd31485fd5019a068084937a9c2b27fe63..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/fa/faapplicationinfo/entry/src/main/js/test/List.test.js +++ /dev/null @@ -1,15 +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('./ApplicationInfoJsunit.test.js') \ No newline at end of file diff --git a/aafwk/aafwk_standard/fa/faapplicationinfo/signature/openharmony_sx.p7b b/aafwk/aafwk_standard/fa/faapplicationinfo/signature/openharmony_sx.p7b deleted file mode 100644 index bf893c5fa3f7c335b731c76c5ad1b45620889f25..0000000000000000000000000000000000000000 Binary files a/aafwk/aafwk_standard/fa/faapplicationinfo/signature/openharmony_sx.p7b and /dev/null differ diff --git a/aafwk/aafwk_standard/fa/facoverapi/entry/src/main/js/test/JsCoverApi.test.js b/aafwk/aafwk_standard/fa/facoverapi/entry/src/main/js/test/JsCoverApi.test.js index 700fb02008477cc4c2bbbf3637dc51d2b72354f5..07a308ffcb99d292a5adec0fcf240c0699d897ba 100644 --- a/aafwk/aafwk_standard/fa/facoverapi/entry/src/main/js/test/JsCoverApi.test.js +++ b/aafwk/aafwk_standard/fa/facoverapi/entry/src/main/js/test/JsCoverApi.test.js @@ -14,9 +14,11 @@ */ import appManager from '@ohos.application.appManager'; +import formBindingData from '@ohos.application.formBindingData'; import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index"; describe('CoverApiTest', function () { + let TAG = ''; /* * @tc.number SUB_AA_OpenHarmony_CoverApi_0500 @@ -37,4 +39,27 @@ describe('CoverApiTest', function () { done(); }) }); + + /* + * @tc.number SUB_AA_OpenHarmony_FormBase_1000 + * @tc.name Validate formbindingdata creation data + * @tc.desc Function test + * @tc.level 0 + */ + it('SUB_AA_OpenHarmony_FormBase_1000', 0, async function (done) { + console.info('------------start SUB_AA_OpenHarmony_FormBase_1000-------------'); + TAG = 'SUB_AA_OpenHarmony_FormBase_1000'; + var dataObj = { + temperature:"11c", + "time":"11:00", + "test":11, + "test3":true + } + var result = formBindingData.createFormBindingData(dataObj) + console.log(TAG + " result is : " + JSON.stringify(result)) + expect(JSON.stringify(result)). + assertEqual(JSON.stringify({"data":"{\"temperature\":\"11c\",\"time\":\"11:00\",\"test\":11,\"test3\":true}"})); + done(); + console.info('------------end SUB_AA_OpenHarmony_FormBase_1000-------------'); + }); }) \ No newline at end of file diff --git a/aafwk/aafwk_standard/fa/faequeryabilitybywant/BUILD.gn b/aafwk/aafwk_standard/fa/faequeryabilitybywant/BUILD.gn deleted file mode 100644 index e5f6d1bbaa11decd96403ba5fef7a5466cc6d3c7..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/fa/faequeryabilitybywant/BUILD.gn +++ /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("//test/xts/tools/build/suite.gni") - -ohos_js_hap_suite("ActsEqueryabilitybywantTest") { - hap_profile = "./entry/src/main/config.json" - deps = [ - ":hjs_demo_js_assets", - ":hjs_demo_resources", - ] - certificate_profile = "./signature/openharmony_sx.p7b" - hap_name = "ActsEqueryabilitybywantTest" -} -ohos_js_assets("hjs_demo_js_assets") { - source_dir = "./entry/src/main/js" - hap_profile = "entry/src/main/config.json" -} -ohos_resources("hjs_demo_resources") { - sources = [ "./entry/src/main/js/resources" ] - hap_profile = "./entry/src/main/config.json" -} diff --git a/aafwk/aafwk_standard/fa/faequeryabilitybywant/Test.json b/aafwk/aafwk_standard/fa/faequeryabilitybywant/Test.json deleted file mode 100644 index dff3dbbbc1e57f1c72f65e802bc89e46952af49f..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/fa/faequeryabilitybywant/Test.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "description": "Configuration for hjunit demo Tests", - "driver": { - "type": "JSUnitTest", - "test-timeout": "300000", - "package": "com.example.abilitydisable", - "shell-timeout": "600000" - }, - "kits": [ - { - "test-file-name": [ - "ActsEqueryabilitybywantTest.hap" - ], - "type": "AppInstallKit", - "cleanup-apps": true - } - ] -} diff --git a/aafwk/aafwk_standard/fa/faequeryabilitybywant/entry/src/main/config.json b/aafwk/aafwk_standard/fa/faequeryabilitybywant/entry/src/main/config.json deleted file mode 100644 index 74a7653450c315ec8a79a49704f859e6a27a7e2e..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/fa/faequeryabilitybywant/entry/src/main/config.json +++ /dev/null @@ -1,144 +0,0 @@ -{ - "app": { - "bundleName": "com.example.abilitydisable", - "vendor": "example", - "version": { - "code": 1, - "name": "1.0" - }, - "apiVersion": { - "compatible": 4, - "target": 5, - "releaseType": "Beta1" - } - }, - "deviceConfig": {}, - "module": { - "package": "com.example.abilitydisable", - "name": ".MyApplication", - "deviceType": [ - "phone" - ], - "distro": { - "deliveryWithInstall": true, - "moduleName": "entry", - "moduleType": "entry", - "installationFree": true - }, - "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_MainAbility", - "type": "page", - "launchType": "standard" - }, - { - "orientation": "unspecified", - "srcPath": "MainAbility3", - "name": ".MainAbility3", - "srcLanguage": "js", - "icon": "$media:icon", - "description": "$string:description_mainability3", - "formsEnabled": false, - "label": "$string:entry_MainAbility", - "type": "page", - "launchType": "standard" - }, - { - "orientation": "unspecified", - "srcPath": "MainAbility4", - "name": ".MainAbility4", - "srcLanguage": "js", - "icon": "$media:icon", - "description": "$string:description_mainability4", - "formsEnabled": false, - "label": "$string:entry_MainAbility", - "type": "page", - "launchType": "standard" - }, - { - "srcPath": "ServiceAbility", - "name": ".ServiceAbility", - "icon": "$media:icon", - "srcLanguage": "js", - "description": "$string:description_serviceability", - "type": "service" - } - ], - "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 - } - }, - { - "pages": [ - "pages/index/index", - "pages/second/second" - ], - "name": ".MainAbility3", - "window": { - "designWidth": 720, - "autoDesignWidth": false - } - }, - { - "pages": [ - "pages/index/index", - "pages/second/second" - ], - "name": ".MainAbility4", - "window": { - "designWidth": 720, - "autoDesignWidth": false - } - } - ] - } -} \ No newline at end of file diff --git a/aafwk/aafwk_standard/fa/faequeryabilitybywant/entry/src/main/js/MainAbility/app.js b/aafwk/aafwk_standard/fa/faequeryabilitybywant/entry/src/main/js/MainAbility/app.js deleted file mode 100644 index 10ea3bb1104ae82203d0ecc7173d4d35a3a16f16..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/fa/faequeryabilitybywant/entry/src/main/js/MainAbility/app.js +++ /dev/null @@ -1,25 +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"); - }, - onForgeGround(){ - console.info("Application onForgeGround"); - } -}; diff --git a/aafwk/aafwk_standard/fa/faequeryabilitybywant/entry/src/main/js/MainAbility/i18n/en-US.json b/aafwk/aafwk_standard/fa/faequeryabilitybywant/entry/src/main/js/MainAbility/i18n/en-US.json deleted file mode 100644 index 08e34eac912bf2651eefc20e26aa479b5e4e7ec2..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/fa/faequeryabilitybywant/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/faequeryabilitybywant/entry/src/main/js/MainAbility/i18n/zh-CN.json b/aafwk/aafwk_standard/fa/faequeryabilitybywant/entry/src/main/js/MainAbility/i18n/zh-CN.json deleted file mode 100644 index 3dd53b3a8b808aec9396fa663cb00ef22ba61e0a..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/fa/faequeryabilitybywant/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/faequeryabilitybywant/entry/src/main/js/MainAbility/pages/index/index.css b/aafwk/aafwk_standard/fa/faequeryabilitybywant/entry/src/main/js/MainAbility/pages/index/index.css deleted file mode 100644 index 737096ca1070d46824d8173dd029de7e4144f3a9..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/fa/faequeryabilitybywant/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/faequeryabilitybywant/entry/src/main/js/MainAbility/pages/index/index.hml b/aafwk/aafwk_standard/fa/faequeryabilitybywant/entry/src/main/js/MainAbility/pages/index/index.hml deleted file mode 100644 index 9c27d02f668220192c6ceaa0c7e6a83f189bd7f0..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/fa/faequeryabilitybywant/entry/src/main/js/MainAbility/pages/index/index.hml +++ /dev/null @@ -1,20 +0,0 @@ - -
- - {{ $t('strings.hello') }} {{ title }} - - -
diff --git a/aafwk/aafwk_standard/fa/faequeryabilitybywant/entry/src/main/js/MainAbility/pages/index/index.js b/aafwk/aafwk_standard/fa/faequeryabilitybywant/entry/src/main/js/MainAbility/pages/index/index.js deleted file mode 100644 index e380f7fb9bc4e5abe4ac083b5b25bdf23c9abaae..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/fa/faequeryabilitybywant/entry/src/main/js/MainAbility/pages/index/index.js +++ /dev/null @@ -1,52 +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: "" - }, - onInit() { - this.title = 'yingyong1'; - }, - onclick: function () { - router.replace({ - uri: "pages/second/second" - }) - }, - onShow() { - console.info('onShow start') - const core = Core.getInstance() - console.info('onShow start1') - - core.init() - console.info('onShow start2') - - const configService = core.getDefaultService('config') - console.info('onShow start3') - - configService.setConfig(this) - console.info('onShow start4') - - require('../../../test/List.test') - console.info('onShow start5') - - core.execute() - } -} - - - diff --git a/aafwk/aafwk_standard/fa/faequeryabilitybywant/entry/src/main/js/MainAbility/pages/second/second.css b/aafwk/aafwk_standard/fa/faequeryabilitybywant/entry/src/main/js/MainAbility/pages/second/second.css deleted file mode 100644 index 737096ca1070d46824d8173dd029de7e4144f3a9..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/fa/faequeryabilitybywant/entry/src/main/js/MainAbility/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/faequeryabilitybywant/entry/src/main/js/MainAbility/pages/second/second.hml b/aafwk/aafwk_standard/fa/faequeryabilitybywant/entry/src/main/js/MainAbility/pages/second/second.hml deleted file mode 100644 index 232a295e9245fb2e09d7be62626850bfd281062a..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/fa/faequeryabilitybywant/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/faequeryabilitybywant/entry/src/main/js/MainAbility/pages/second/second.js b/aafwk/aafwk_standard/fa/faequeryabilitybywant/entry/src/main/js/MainAbility/pages/second/second.js deleted file mode 100644 index 55c229adf9b349ff9a374f8d91be5b5b31d7c6aa..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/fa/faequeryabilitybywant/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/faequeryabilitybywant/entry/src/main/js/MainAbility2/app.js b/aafwk/aafwk_standard/fa/faequeryabilitybywant/entry/src/main/js/MainAbility2/app.js deleted file mode 100644 index c432f74d63028e07036dc374b7799339497f4dc7..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/fa/faequeryabilitybywant/entry/src/main/js/MainAbility2/app.js +++ /dev/null @@ -1,37 +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"); - setTimeout(()=>{ - this.content.terminateSelf().then((data)=>{ - console.log("Application terminateSelf data:" + JSON.stringify(data) ) - }).catch((error)=>{ - console.log("Application terminateSelf data:" + JSON.stringify(error) ) - }) - },4000) - }, - onDestroy() { - console.info("Application onDestroy"); - } - - - - - - - - -}; diff --git a/aafwk/aafwk_standard/fa/faequeryabilitybywant/entry/src/main/js/MainAbility2/i18n/en-US.json b/aafwk/aafwk_standard/fa/faequeryabilitybywant/entry/src/main/js/MainAbility2/i18n/en-US.json deleted file mode 100644 index 08e34eac912bf2651eefc20e26aa479b5e4e7ec2..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/fa/faequeryabilitybywant/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/faequeryabilitybywant/entry/src/main/js/MainAbility2/i18n/zh-CN.json b/aafwk/aafwk_standard/fa/faequeryabilitybywant/entry/src/main/js/MainAbility2/i18n/zh-CN.json deleted file mode 100644 index 3dd53b3a8b808aec9396fa663cb00ef22ba61e0a..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/fa/faequeryabilitybywant/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/faequeryabilitybywant/entry/src/main/js/MainAbility2/pages/index/index.css b/aafwk/aafwk_standard/fa/faequeryabilitybywant/entry/src/main/js/MainAbility2/pages/index/index.css deleted file mode 100644 index 737096ca1070d46824d8173dd029de7e4144f3a9..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/fa/faequeryabilitybywant/entry/src/main/js/MainAbility2/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/faequeryabilitybywant/entry/src/main/js/MainAbility2/pages/index/index.hml b/aafwk/aafwk_standard/fa/faequeryabilitybywant/entry/src/main/js/MainAbility2/pages/index/index.hml deleted file mode 100644 index 83ae6b784af095aa173906f7aa7468eb2bf2e5e3..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/fa/faequeryabilitybywant/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/faequeryabilitybywant/entry/src/main/js/MainAbility2/pages/index/index.js b/aafwk/aafwk_standard/fa/faequeryabilitybywant/entry/src/main/js/MainAbility2/pages/index/index.js deleted file mode 100644 index 3f2aef42e1765f6b6525a547205650df5113fa7b..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/fa/faequeryabilitybywant/entry/src/main/js/MainAbility2/pages/index/index.js +++ /dev/null @@ -1,42 +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: "" - }, - onInit() { - this.title = 'yingyong2'; - }, - onclick: function () { - router.replace({ - uri: "pages/second/second" - }) - }, - onShow() { - console.info('onShow start') - 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/faequeryabilitybywant/entry/src/main/js/MainAbility2/pages/second/second.css b/aafwk/aafwk_standard/fa/faequeryabilitybywant/entry/src/main/js/MainAbility2/pages/second/second.css deleted file mode 100644 index 737096ca1070d46824d8173dd029de7e4144f3a9..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/fa/faequeryabilitybywant/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/faequeryabilitybywant/entry/src/main/js/MainAbility2/pages/second/second.hml b/aafwk/aafwk_standard/fa/faequeryabilitybywant/entry/src/main/js/MainAbility2/pages/second/second.hml deleted file mode 100644 index 4503365d59184ec671bb489b6c2b64134daf0849..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/fa/faequeryabilitybywant/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/faequeryabilitybywant/entry/src/main/js/MainAbility2/pages/second/second.js b/aafwk/aafwk_standard/fa/faequeryabilitybywant/entry/src/main/js/MainAbility2/pages/second/second.js deleted file mode 100644 index 55c229adf9b349ff9a374f8d91be5b5b31d7c6aa..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/fa/faequeryabilitybywant/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/faequeryabilitybywant/entry/src/main/js/MainAbility3/app.js b/aafwk/aafwk_standard/fa/faequeryabilitybywant/entry/src/main/js/MainAbility3/app.js deleted file mode 100644 index 0da0f36d6651025a1fd93b9c868e48fae3ae93f6..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/fa/faequeryabilitybywant/entry/src/main/js/MainAbility3/app.js +++ /dev/null @@ -1,31 +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 abilityFeatureAbility from '@ohos.ability.featureAbility'; - -export default { - onCreate() { - console.info("Application onCreate MainAbility3"); - setTimeout(()=>{ - abilityFeatureAbility.terminateSelf().then((data)=>{ - console.log("Application terminateSelf data:" + JSON.stringify(data) ) - }).catch((error)=>{ - console.log("Application terminateSelf data:" + JSON.stringify(error) ) - }) - },4000) - }, - onDestroy() { - console.info("Application onDestroy"); - } -}; diff --git a/aafwk/aafwk_standard/fa/faequeryabilitybywant/entry/src/main/js/MainAbility3/i18n/en-US.json b/aafwk/aafwk_standard/fa/faequeryabilitybywant/entry/src/main/js/MainAbility3/i18n/en-US.json deleted file mode 100644 index 08e34eac912bf2651eefc20e26aa479b5e4e7ec2..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/fa/faequeryabilitybywant/entry/src/main/js/MainAbility3/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/faequeryabilitybywant/entry/src/main/js/MainAbility3/i18n/zh-CN.json b/aafwk/aafwk_standard/fa/faequeryabilitybywant/entry/src/main/js/MainAbility3/i18n/zh-CN.json deleted file mode 100644 index 3dd53b3a8b808aec9396fa663cb00ef22ba61e0a..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/fa/faequeryabilitybywant/entry/src/main/js/MainAbility3/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/faequeryabilitybywant/entry/src/main/js/MainAbility3/pages/index/index.css b/aafwk/aafwk_standard/fa/faequeryabilitybywant/entry/src/main/js/MainAbility3/pages/index/index.css deleted file mode 100644 index 737096ca1070d46824d8173dd029de7e4144f3a9..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/fa/faequeryabilitybywant/entry/src/main/js/MainAbility3/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/faequeryabilitybywant/entry/src/main/js/MainAbility3/pages/index/index.hml b/aafwk/aafwk_standard/fa/faequeryabilitybywant/entry/src/main/js/MainAbility3/pages/index/index.hml deleted file mode 100644 index 9c27d02f668220192c6ceaa0c7e6a83f189bd7f0..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/fa/faequeryabilitybywant/entry/src/main/js/MainAbility3/pages/index/index.hml +++ /dev/null @@ -1,20 +0,0 @@ - -
- - {{ $t('strings.hello') }} {{ title }} - - -
diff --git a/aafwk/aafwk_standard/fa/faequeryabilitybywant/entry/src/main/js/MainAbility3/pages/index/index.js b/aafwk/aafwk_standard/fa/faequeryabilitybywant/entry/src/main/js/MainAbility3/pages/index/index.js deleted file mode 100644 index 539f7a8795ff62dafcf3b64bd0c3a5a363d1921d..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/fa/faequeryabilitybywant/entry/src/main/js/MainAbility3/pages/index/index.js +++ /dev/null @@ -1,42 +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: "" - }, - onInit() { - this.title = 'yingyong3'; - }, - onclick: function () { - router.replace({ - uri: "pages/second/second" - }) - }, - onShow() { - console.info('onShow start') - 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/faequeryabilitybywant/entry/src/main/js/MainAbility3/pages/second/second.css b/aafwk/aafwk_standard/fa/faequeryabilitybywant/entry/src/main/js/MainAbility3/pages/second/second.css deleted file mode 100644 index 737096ca1070d46824d8173dd029de7e4144f3a9..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/fa/faequeryabilitybywant/entry/src/main/js/MainAbility3/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/faequeryabilitybywant/entry/src/main/js/MainAbility3/pages/second/second.hml b/aafwk/aafwk_standard/fa/faequeryabilitybywant/entry/src/main/js/MainAbility3/pages/second/second.hml deleted file mode 100644 index 232a295e9245fb2e09d7be62626850bfd281062a..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/fa/faequeryabilitybywant/entry/src/main/js/MainAbility3/pages/second/second.hml +++ /dev/null @@ -1,20 +0,0 @@ - -
- - {{ $t('strings.page') }} - - -
diff --git a/aafwk/aafwk_standard/fa/faequeryabilitybywant/entry/src/main/js/MainAbility3/pages/second/second.js b/aafwk/aafwk_standard/fa/faequeryabilitybywant/entry/src/main/js/MainAbility3/pages/second/second.js deleted file mode 100644 index 55c229adf9b349ff9a374f8d91be5b5b31d7c6aa..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/fa/faequeryabilitybywant/entry/src/main/js/MainAbility3/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/faequeryabilitybywant/entry/src/main/js/MainAbility4/app.js b/aafwk/aafwk_standard/fa/faequeryabilitybywant/entry/src/main/js/MainAbility4/app.js deleted file mode 100644 index 911b14c23c120306ed0406cf704036085bf16653..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/fa/faequeryabilitybywant/entry/src/main/js/MainAbility4/app.js +++ /dev/null @@ -1,29 +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"); - setTimeout(()=>{ - this.content.terminateSelf().then((data)=>{ - console.log("Application terminateSelf data:" + JSON.stringify(data) ) - }).catch((error)=>{ - console.log("Application terminateSelf data:" + JSON.stringify(error) ) - }) - },4000) - }, - onDestroy() { - console.info("Application onDestroy"); - } -}; diff --git a/aafwk/aafwk_standard/fa/faequeryabilitybywant/entry/src/main/js/MainAbility4/i18n/en-US.json b/aafwk/aafwk_standard/fa/faequeryabilitybywant/entry/src/main/js/MainAbility4/i18n/en-US.json deleted file mode 100644 index 08e34eac912bf2651eefc20e26aa479b5e4e7ec2..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/fa/faequeryabilitybywant/entry/src/main/js/MainAbility4/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/faequeryabilitybywant/entry/src/main/js/MainAbility4/i18n/zh-CN.json b/aafwk/aafwk_standard/fa/faequeryabilitybywant/entry/src/main/js/MainAbility4/i18n/zh-CN.json deleted file mode 100644 index 3dd53b3a8b808aec9396fa663cb00ef22ba61e0a..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/fa/faequeryabilitybywant/entry/src/main/js/MainAbility4/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/faequeryabilitybywant/entry/src/main/js/MainAbility4/pages/index/index.css b/aafwk/aafwk_standard/fa/faequeryabilitybywant/entry/src/main/js/MainAbility4/pages/index/index.css deleted file mode 100644 index 737096ca1070d46824d8173dd029de7e4144f3a9..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/fa/faequeryabilitybywant/entry/src/main/js/MainAbility4/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/faequeryabilitybywant/entry/src/main/js/MainAbility4/pages/index/index.hml b/aafwk/aafwk_standard/fa/faequeryabilitybywant/entry/src/main/js/MainAbility4/pages/index/index.hml deleted file mode 100644 index 9c27d02f668220192c6ceaa0c7e6a83f189bd7f0..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/fa/faequeryabilitybywant/entry/src/main/js/MainAbility4/pages/index/index.hml +++ /dev/null @@ -1,20 +0,0 @@ - -
- - {{ $t('strings.hello') }} {{ title }} - - -
diff --git a/aafwk/aafwk_standard/fa/faequeryabilitybywant/entry/src/main/js/MainAbility4/pages/index/index.js b/aafwk/aafwk_standard/fa/faequeryabilitybywant/entry/src/main/js/MainAbility4/pages/index/index.js deleted file mode 100644 index 32a7c170b8cc255bb4dffb7bf64c16b9159538a0..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/fa/faequeryabilitybywant/entry/src/main/js/MainAbility4/pages/index/index.js +++ /dev/null @@ -1,42 +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: "" - }, - onInit() { - this.title = 'yingyong4'; - }, - onclick: function () { - router.replace({ - uri: "pages/second/second" - }) - }, - onShow() { - console.info('onShow start') - 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/faequeryabilitybywant/entry/src/main/js/MainAbility4/pages/second/second.css b/aafwk/aafwk_standard/fa/faequeryabilitybywant/entry/src/main/js/MainAbility4/pages/second/second.css deleted file mode 100644 index 737096ca1070d46824d8173dd029de7e4144f3a9..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/fa/faequeryabilitybywant/entry/src/main/js/MainAbility4/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/faequeryabilitybywant/entry/src/main/js/MainAbility4/pages/second/second.hml b/aafwk/aafwk_standard/fa/faequeryabilitybywant/entry/src/main/js/MainAbility4/pages/second/second.hml deleted file mode 100644 index 232a295e9245fb2e09d7be62626850bfd281062a..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/fa/faequeryabilitybywant/entry/src/main/js/MainAbility4/pages/second/second.hml +++ /dev/null @@ -1,20 +0,0 @@ - -
- - {{ $t('strings.page') }} - - -
diff --git a/aafwk/aafwk_standard/fa/faequeryabilitybywant/entry/src/main/js/MainAbility4/pages/second/second.js b/aafwk/aafwk_standard/fa/faequeryabilitybywant/entry/src/main/js/MainAbility4/pages/second/second.js deleted file mode 100644 index 55c229adf9b349ff9a374f8d91be5b5b31d7c6aa..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/fa/faequeryabilitybywant/entry/src/main/js/MainAbility4/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/faequeryabilitybywant/entry/src/main/js/ServiceAbility/service.js b/aafwk/aafwk_standard/fa/faequeryabilitybywant/entry/src/main/js/ServiceAbility/service.js deleted file mode 100644 index ccdcaa6a0802492216d3332f39f8e089e7334630..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/fa/faequeryabilitybywant/entry/src/main/js/ServiceAbility/service.js +++ /dev/null @@ -1,40 +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 { - onStart(want) { - console.info('ServiceAbility onStart'); - }, - onStop() { - console.info('ServiceAbility onStop'); - }, - onConnect(want) { - console.info('ServiceAbility onConnect'); - return {}; - }, - onReconnect(want) { - console.info('ServiceAbility onReconnect'); - }, - onDisconnect() { - console.info('ServiceAbility onDisconnect'); - }, - onCommand(want, restart, startId) { - console.info('ServiceAbility onCommand'); - }, - - onForeground(){ - console.info('ServiceAbility onForeground'); - }, - -}; \ No newline at end of file diff --git a/aafwk/aafwk_standard/fa/faequeryabilitybywant/entry/src/main/js/resources/base/element/string.json b/aafwk/aafwk_standard/fa/faequeryabilitybywant/entry/src/main/js/resources/base/element/string.json deleted file mode 100644 index 1d2808e5cc8d694e37f10acd62ce27334db762e6..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/fa/faequeryabilitybywant/entry/src/main/js/resources/base/element/string.json +++ /dev/null @@ -1,40 +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" - }, - { - "name": "description_mainability3", - "value": "JS_Empty Ability" - }, - { - "name": "entry_MainAbility3", - "value": "entry_MainAbility3" - }, - { - "name": "description_mainability4", - "value": "JS_Empty Ability" - }, - { - "name": "entry_MainAbility4", - "value": "entry_MainAbility4" - }, - { - "name": "description_serviceability", - "value": "hap sample empty service" - } - ] -} \ No newline at end of file diff --git a/aafwk/aafwk_standard/fa/faequeryabilitybywant/entry/src/main/js/resources/base/media/icon.png b/aafwk/aafwk_standard/fa/faequeryabilitybywant/entry/src/main/js/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/aafwk/aafwk_standard/fa/faequeryabilitybywant/entry/src/main/js/resources/base/media/icon.png and /dev/null differ diff --git a/aafwk/aafwk_standard/fa/faequeryabilitybywant/entry/src/main/js/test/JsAbilityDisable.test.js b/aafwk/aafwk_standard/fa/faequeryabilitybywant/entry/src/main/js/test/JsAbilityDisable.test.js deleted file mode 100644 index e3e3d3de74360d488b9d20ddac1c7d3045880aed..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/fa/faequeryabilitybywant/entry/src/main/js/test/JsAbilityDisable.test.js +++ /dev/null @@ -1,109 +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 bundleManager from '@ohos.bundle'; -import account from "@ohos.account.osAccount" -import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index' - -let userId; -describe('AbilityDisable', function () { - - /* - * @tc.number SUB_AA_OpenHarmony_EqueryAbilityByWant_0100 - * @tc.name Call queryAbilityByWant to get moduleName - * @tc.desc Function test - * @tc.level 0 - */ - it("SUB_AA_OpenHarmony_EqueryAbilityByWant_0100", 0, async function (done) { - console.info("------------------logMessage SUB_AA_OpenHarmony_EqueryAbilityByWant_0100-------------------"); - let accountManager = account.getAccountManager(); - let bundleFlags=bundleManager.BundleFlag.GET_ABILITY_INFO_WITH_PERMISSION; - await accountManager.getOsAccountLocalIdFromProcess().then((data)=>{ - console.log("success get userId:" + JSON.stringify(data)); - userId = data; - }).catch((err)=>{ - console.log("+++++++++++++" + JSON.stringify(err)); - }) - let want={ - bundleName:"com.example.abilitydisable", - abilityName:"com.example.abilitydisable.MainAbility" - }; - bundleManager.queryAbilityByWant(want,bundleFlags,userId,(err, data) => { - console.log('SUB_AA_OpenHarmony_Clear_0100 queryAbilityByWant errCode : ' - + JSON.stringify(err) + " data: " + JSON.stringify(data)); - for(var i=0;i{ - console.log("success get userId:" + JSON.stringify(data)); - userId = data; - }).catch((err)=>{ - console.log("+++++++++++++" + JSON.stringify(err)); - }) - let want={ - bundleName:"com.example.abilitydisable", - abilityName:"com.example.abilitydisable.MainAbility" - }; - bundleManager.queryAbilityByWant(want,bundleFlags,userId,(err, data) => { - console.log('SUB_AA_OpenHarmony_EqueryAbilityByWant_0200 queryAbilityByWant errCode : ' - + JSON.stringify(err) + " data: " + JSON.stringify(data)); - for(var i=0;i{ - console.log("success get userId:" + JSON.stringify(data)); - userId = data; - }).catch((err)=>{ - console.log("+++++++++++++" + JSON.stringify(err)); - }) - bundleManager.getApplicationInfo(bundleName, bundleFlags,userId,(err, data) => { - console.log('SUB_AA_OpenHarmony_EqueryAbilityByWant_0300 getapplicationInfo errCode : ' - + JSON.stringify(err) + " data: " + JSON.stringify(data)); - expect(data['name']).assertEqual("com.example.abilitydisable"); - }) - done(); - }); -}) \ No newline at end of file diff --git a/aafwk/aafwk_standard/fa/faequeryabilitybywant/entry/src/main/js/test/List.test.js b/aafwk/aafwk_standard/fa/faequeryabilitybywant/entry/src/main/js/test/List.test.js deleted file mode 100644 index 1c1f7fc58b57f36e31ce878f7f0dc264f6b5bf76..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/fa/faequeryabilitybywant/entry/src/main/js/test/List.test.js +++ /dev/null @@ -1,15 +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('./JsAbilityDisable.test.js') \ No newline at end of file diff --git a/aafwk/aafwk_standard/fa/faequeryabilitybywant/signature/openharmony_sx.p7b b/aafwk/aafwk_standard/fa/faequeryabilitybywant/signature/openharmony_sx.p7b deleted file mode 100644 index bf893c5fa3f7c335b731c76c5ad1b45620889f25..0000000000000000000000000000000000000000 Binary files a/aafwk/aafwk_standard/fa/faequeryabilitybywant/signature/openharmony_sx.p7b and /dev/null differ