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

!2130 xts测试套大小写整改

Merge pull request !2130 from chengxingzhen/master
...@@ -12,8 +12,8 @@ ...@@ -12,8 +12,8 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import featureAbility from '@ohos.ability.featureability' import featureAbility from '@ohos.ability.featureAbility'
import abilitymanager from '@ohos.app.abilitymanager' import abilityManager from '@ohos.app.abilityManager'
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index' import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index'
var WeightReasonCode = { var WeightReasonCode = {
...@@ -56,12 +56,12 @@ describe('ActsAmsCallBackFifthScene', function () { ...@@ -56,12 +56,12 @@ describe('ActsAmsCallBackFifthScene', function () {
beforeAll(async function (done) { beforeAll(async function (done) {
var maxnum = 10; var maxnum = 10;
var flag = 1; var flag = 1;
var data = await abilitymanager.queryRecentAbilityMissionInfos(maxnum, flag); var data = await abilityManager.queryRecentAbilityMissionInfos(maxnum, flag);
console.log('queryRecentAbilityMissionInfos data ' + JSON.stringify(data)); console.log('queryRecentAbilityMissionInfos data ' + JSON.stringify(data));
for (var i = 0; i < data.length; i++) { for (var i = 0; i < data.length; i++) {
if (data[i].baseAbility.bundleName != 'com.example.actsamscallbackfifthscene' && if (data[i].baseAbility.bundleName != 'com.example.actsamscallbackfifthscene' &&
data[i].topAbility.bundleName != 'com.example.actsamscallbackfifthscene') { data[i].topAbility.bundleName != 'com.example.actsamscallbackfifthscene') {
var info = abilitymanager.removeMission(data[i].id); var info = abilityManager.removeMission(data[i].id);
console.log(' removeMission data [' + info + ']'); console.log(' removeMission data [' + info + ']');
} }
} }
...@@ -134,7 +134,7 @@ describe('ActsAmsCallBackFifthScene', function () { ...@@ -134,7 +134,7 @@ describe('ActsAmsCallBackFifthScene', function () {
console.info("sleep begin"); console.info("sleep begin");
sleep(5000); sleep(5000);
console.info("sleep end"); console.info("sleep end");
abilitymanager.getAllRunningProcesses( abilityManager.getAllRunningProcesses(
(error, info) => { (error, info) => {
console.info('getAllRunningProcesses error.code \ console.info('getAllRunningProcesses error.code \
' + error.code + ', data length [' + info.length + ']'); ' + error.code + ', data length [' + info.length + ']');
...@@ -175,7 +175,7 @@ describe('ActsAmsCallBackFifthScene', function () { ...@@ -175,7 +175,7 @@ describe('ActsAmsCallBackFifthScene', function () {
it('Acts_Ams_test_7000', 0, async function (done) { it('Acts_Ams_test_7000', 0, async function (done) {
var maxnum = 10; var maxnum = 10;
var flag = 1; var flag = 1;
abilitymanager.queryRecentAbilityMissionInfos(maxnum, flag, abilityManager.queryRecentAbilityMissionInfos(maxnum, flag,
(error, data) => { (error, data) => {
console.info('queryRecentAbilityMissionInfos error.code : \ console.info('queryRecentAbilityMissionInfos error.code : \
' + error.code + ',data length [' + data.length + ']'); ' + error.code + ',data length [' + data.length + ']');
...@@ -222,7 +222,7 @@ describe('ActsAmsCallBackFifthScene', function () { ...@@ -222,7 +222,7 @@ describe('ActsAmsCallBackFifthScene', function () {
*/ */
it('Acts_Ams_test_6800', 0, async function (done) { it('Acts_Ams_test_6800', 0, async function (done) {
var maxnum = 10; var maxnum = 10;
abilitymanager.queryRunningAbilityMissionInfos(maxnum, abilityManager.queryRunningAbilityMissionInfos(maxnum,
(error, data) => { (error, data) => {
console.info('queryRunningAbilityMissionInfos error.code : \ console.info('queryRunningAbilityMissionInfos error.code : \
' + error.code + ',data length [' + data.length + ']'); ' + error.code + ',data length [' + data.length + ']');
...@@ -268,7 +268,7 @@ describe('ActsAmsCallBackFifthScene', function () { ...@@ -268,7 +268,7 @@ describe('ActsAmsCallBackFifthScene', function () {
* @tc.desc : Get All Active Processes Info(by CallBack) * @tc.desc : Get All Active Processes Info(by CallBack)
*/ */
it('Acts_Ams_test_9000', 0, async function (done) { it('Acts_Ams_test_9000', 0, async function (done) {
abilitymanager.getActiveProcessInfos( abilityManager.getActiveProcessInfos(
(error, info) => { (error, info) => {
console.info('getActiveProcessInfos error.code \ console.info('getActiveProcessInfos error.code \
' + error.code + ', data length [' + info.length + ']'); ' + error.code + ', data length [' + info.length + ']');
...@@ -299,7 +299,7 @@ describe('ActsAmsCallBackFifthScene', function () { ...@@ -299,7 +299,7 @@ describe('ActsAmsCallBackFifthScene', function () {
*/ */
it('Acts_Ams_test_10000', 0, async function (done) { it('Acts_Ams_test_10000', 0, async function (done) {
var maxnum = 10; var maxnum = 10;
abilitymanager.getActiveAbilityMissionInfos(maxnum, abilityManager.getActiveAbilityMissionInfos(maxnum,
(error, info) => { (error, info) => {
console.info('queryRecentAbilityMissionInfos error.code : \ console.info('queryRecentAbilityMissionInfos error.code : \
' + error.code + ',data length [' + info.length + ']'); ' + error.code + ',data length [' + info.length + ']');
...@@ -353,7 +353,7 @@ describe('ActsAmsCallBackFifthScene', function () { ...@@ -353,7 +353,7 @@ describe('ActsAmsCallBackFifthScene', function () {
*/ */
it('Acts_Ams_test_11000', 0, async function (done) { it('Acts_Ams_test_11000', 0, async function (done) {
var maxnum = 10; var maxnum = 10;
abilitymanager.getPreviousAbilityMissionInfos(maxnum, abilityManager.getPreviousAbilityMissionInfos(maxnum,
(error, info) => { (error, info) => {
console.info('queryRecentAbilityMissionInfos error.code : \ console.info('queryRecentAbilityMissionInfos error.code : \
' + error.code + ',data length [' + info.length + ']'); ' + error.code + ',data length [' + info.length + ']');
...@@ -407,8 +407,8 @@ describe('ActsAmsCallBackFifthScene', function () { ...@@ -407,8 +407,8 @@ describe('ActsAmsCallBackFifthScene', function () {
*/ */
it('Acts_Ams_test_7200', 0, async function (done) { it('Acts_Ams_test_7200', 0, async function (done) {
var maxnum = 10; var maxnum = 10;
var result = await abilitymanager.queryRunningAbilityMissionInfos(maxnum); var result = await abilityManager.queryRunningAbilityMissionInfos(maxnum);
abilitymanager.removeMission(result[1].id, abilityManager.removeMission(result[1].id,
(error, info) => { (error, info) => {
console.info('Acts_Ams_test_7200 removeMission error.code \ console.info('Acts_Ams_test_7200 removeMission error.code \
' + error.code + ',data [' + info + ']'); ' + error.code + ',data [' + info + ']');
...@@ -426,8 +426,8 @@ describe('ActsAmsCallBackFifthScene', function () { ...@@ -426,8 +426,8 @@ describe('ActsAmsCallBackFifthScene', function () {
*/ */
it('Acts_Ams_test_7600', 0, async function (done) { it('Acts_Ams_test_7600', 0, async function (done) {
var maxnum = 10; var maxnum = 10;
var result = await abilitymanager.queryRunningAbilityMissionInfos(maxnum); var result = await abilityManager.queryRunningAbilityMissionInfos(maxnum);
abilitymanager.moveMissionToTop(result[0].id, abilityManager.moveMissionToTop(result[0].id,
(error, info) => { (error, info) => {
console.info('Acts_Ams_test_7600 moveMissionToTop error.code \ console.info('Acts_Ams_test_7600 moveMissionToTop error.code \
' + error.code + ',data [' + info + ']'); ' + error.code + ',data [' + info + ']');
...@@ -445,8 +445,8 @@ describe('ActsAmsCallBackFifthScene', function () { ...@@ -445,8 +445,8 @@ describe('ActsAmsCallBackFifthScene', function () {
*/ */
it('Acts_Ams_test_12000', 0, async function (done) { it('Acts_Ams_test_12000', 0, async function (done) {
var maxnum = 10; var maxnum = 10;
var result = await abilitymanager.queryRunningAbilityMissionInfos(maxnum); var result = await abilityManager.queryRunningAbilityMissionInfos(maxnum);
abilitymanager.deleteMissions([result[0].id], abilityManager.deleteMissions([result[0].id],
(error, info) => { (error, info) => {
console.info('Acts_Ams_test_12000 deleteMissions error.code \ console.info('Acts_Ams_test_12000 deleteMissions error.code \
' + error.code + ',data [' + info + ']'); ' + error.code + ',data [' + info + ']');
...@@ -463,7 +463,7 @@ describe('ActsAmsCallBackFifthScene', function () { ...@@ -463,7 +463,7 @@ describe('ActsAmsCallBackFifthScene', function () {
* @tc.desc : Kill Processes By BundleName(by CallBack) * @tc.desc : Kill Processes By BundleName(by CallBack)
*/ */
it('Acts_Ams_test_8000', 0, async function (done) { it('Acts_Ams_test_8000', 0, async function (done) {
abilitymanager.killProcessesByBundleName('com.ix.verify.io', abilityManager.killProcessesByBundleName('com.ix.verify.io',
(error, info) => { (error, info) => {
console.info('Acts_Ams_test_8000 killProcessesByBundleName error.code: \ console.info('Acts_Ams_test_8000 killProcessesByBundleName error.code: \
' + error.code + ',data [' + info + ']'); ' + error.code + ',data [' + info + ']');
......
...@@ -12,8 +12,8 @@ ...@@ -12,8 +12,8 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import featureAbility from '@ohos.ability.featureability' import featureAbility from '@ohos.ability.featureAbility'
import abilitymanager from '@ohos.app.abilitymanager' import abilityManager from '@ohos.app.abilityManager'
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit' import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit'
var WeightReasonCode = { var WeightReasonCode = {
...@@ -53,12 +53,12 @@ describe('ActsAmsCallBackFirstScene', function () { ...@@ -53,12 +53,12 @@ describe('ActsAmsCallBackFirstScene', function () {
beforeAll(async function (done) { beforeAll(async function (done) {
var maxnum = 10; var maxnum = 10;
var flag = 1; var flag = 1;
var data = await abilitymanager.queryRecentAbilityMissionInfos(maxnum, flag); var data = await abilityManager.queryRecentAbilityMissionInfos(maxnum, flag);
console.log('queryRecentAbilityMissionInfos data ' + JSON.stringify(data)); console.log('queryRecentAbilityMissionInfos data ' + JSON.stringify(data));
for (var i = 0; i < data.length; i++) { for (var i = 0; i < data.length; i++) {
if (data[i].baseAbility.bundleName != 'com.example.actsamscallbackfirstscene' && if (data[i].baseAbility.bundleName != 'com.example.actsamscallbackfirstscene' &&
data[i].topAbility.bundleName != 'com.example.actsamscallbackfirstscene') { data[i].topAbility.bundleName != 'com.example.actsamscallbackfirstscene') {
var info = abilitymanager.removeMission(data[i].id); var info = abilityManager.removeMission(data[i].id);
console.log(' removeMission data [' + info + ']'); console.log(' removeMission data [' + info + ']');
} }
} }
...@@ -105,7 +105,7 @@ describe('ActsAmsCallBackFirstScene', function () { ...@@ -105,7 +105,7 @@ describe('ActsAmsCallBackFirstScene', function () {
console.info("sleep begin"); console.info("sleep begin");
sleep(5000); sleep(5000);
console.info("sleep end"); console.info("sleep end");
abilitymanager.getAllRunningProcesses( abilityManager.getAllRunningProcesses(
(error, info) => { (error, info) => {
console.info('getAllRunningProcesses error.code \ console.info('getAllRunningProcesses error.code \
' + error.code + ', data length [' + info.length + ']'); ' + error.code + ', data length [' + info.length + ']');
...@@ -145,7 +145,7 @@ describe('ActsAmsCallBackFirstScene', function () { ...@@ -145,7 +145,7 @@ describe('ActsAmsCallBackFirstScene', function () {
*/ */
it('Acts_Ams_test_0400', 0, async function (done) { it('Acts_Ams_test_0400', 0, async function (done) {
var maxnum = 10; var maxnum = 10;
abilitymanager.queryRunningAbilityMissionInfos(maxnum, abilityManager.queryRunningAbilityMissionInfos(maxnum,
(error, info) => { (error, info) => {
console.info('queryRecentAbilityMissionInfos error.code : \ console.info('queryRecentAbilityMissionInfos error.code : \
' + error.code + ',data length [' + info.length + ']'); ' + error.code + ',data length [' + info.length + ']');
...@@ -193,7 +193,7 @@ describe('ActsAmsCallBackFirstScene', function () { ...@@ -193,7 +193,7 @@ describe('ActsAmsCallBackFirstScene', function () {
it('Acts_Ams_test_0600', 0, async function (done) { it('Acts_Ams_test_0600', 0, async function (done) {
var maxnum = 10; var maxnum = 10;
var flag = 1; var flag = 1;
abilitymanager.queryRecentAbilityMissionInfos(maxnum, flag, abilityManager.queryRecentAbilityMissionInfos(maxnum, flag,
(error, info) => { (error, info) => {
console.info('queryRunningAbilityMissionInfos error.code : \ console.info('queryRunningAbilityMissionInfos error.code : \
' + error.code + ',data length [' + info.length + ']'); ' + error.code + ',data length [' + info.length + ']');
...@@ -239,7 +239,7 @@ describe('ActsAmsCallBackFirstScene', function () { ...@@ -239,7 +239,7 @@ describe('ActsAmsCallBackFirstScene', function () {
* @tc.desc : Get All Active Processes Info(by CallBack) * @tc.desc : Get All Active Processes Info(by CallBack)
*/ */
it('Acts_Ams_test_8600', 0, async function (done) { it('Acts_Ams_test_8600', 0, async function (done) {
abilitymanager.getActiveProcessInfos( abilityManager.getActiveProcessInfos(
(error, info) => { (error, info) => {
console.info('getActiveProcessInfos error.code \ console.info('getActiveProcessInfos error.code \
' + error.code + ', data length [' + info.length + ']'); ' + error.code + ', data length [' + info.length + ']');
...@@ -270,7 +270,7 @@ describe('ActsAmsCallBackFirstScene', function () { ...@@ -270,7 +270,7 @@ describe('ActsAmsCallBackFirstScene', function () {
*/ */
it('Acts_Ams_test_9600', 0, async function (done) { it('Acts_Ams_test_9600', 0, async function (done) {
var maxnum = 10; var maxnum = 10;
abilitymanager.getActiveAbilityMissionInfos(maxnum, abilityManager.getActiveAbilityMissionInfos(maxnum,
(error, info) => { (error, info) => {
console.info('queryRecentAbilityMissionInfos error.code : \ console.info('queryRecentAbilityMissionInfos error.code : \
' + error.code + ',data length [' + info.length + ']'); ' + error.code + ',data length [' + info.length + ']');
...@@ -324,7 +324,7 @@ describe('ActsAmsCallBackFirstScene', function () { ...@@ -324,7 +324,7 @@ describe('ActsAmsCallBackFirstScene', function () {
*/ */
it('Acts_Ams_test_10600', 0, async function (done) { it('Acts_Ams_test_10600', 0, async function (done) {
var maxnum = 10; var maxnum = 10;
abilitymanager.getPreviousAbilityMissionInfos(maxnum, abilityManager.getPreviousAbilityMissionInfos(maxnum,
(error, info) => { (error, info) => {
console.info('queryRecentAbilityMissionInfos error.code : \ console.info('queryRecentAbilityMissionInfos error.code : \
' + error.code + ',data length [' + info.length + ']'); ' + error.code + ',data length [' + info.length + ']');
...@@ -378,9 +378,9 @@ describe('ActsAmsCallBackFirstScene', function () { ...@@ -378,9 +378,9 @@ describe('ActsAmsCallBackFirstScene', function () {
*/ */
it('Acts_Ams_test_1400', 0, async function (done) { it('Acts_Ams_test_1400', 0, async function (done) {
var maxnum = 10; var maxnum = 10;
var result = await abilitymanager.queryRunningAbilityMissionInfos(maxnum); var result = await abilityManager.queryRunningAbilityMissionInfos(maxnum);
var missionID = result[0].id + 100; var missionID = result[0].id + 100;
abilitymanager.removeMissions([missionID], abilityManager.removeMissions([missionID],
(error, info) => { (error, info) => {
console.info('Acts_Ams_test_1400 removeMissions error.code \ console.info('Acts_Ams_test_1400 removeMissions error.code \
' + error.code + ',data [' + info + ']'); ' + error.code + ',data [' + info + ']');
...@@ -397,8 +397,8 @@ describe('ActsAmsCallBackFirstScene', function () { ...@@ -397,8 +397,8 @@ describe('ActsAmsCallBackFirstScene', function () {
*/ */
it('Acts_Ams_test_0800', 0, async function (done) { it('Acts_Ams_test_0800', 0, async function (done) {
var maxnum = 10; var maxnum = 10;
var result = await abilitymanager.queryRunningAbilityMissionInfos(maxnum); var result = await abilityManager.queryRunningAbilityMissionInfos(maxnum);
abilitymanager.removeMission(result[0].id, abilityManager.removeMission(result[0].id,
(error, info) => { (error, info) => {
console.info('Acts_Ams_test_0800 removeMission error.code \ console.info('Acts_Ams_test_0800 removeMission error.code \
' + error.code + ',data [' + info + ']'); ' + error.code + ',data [' + info + ']');
...@@ -414,7 +414,7 @@ describe('ActsAmsCallBackFirstScene', function () { ...@@ -414,7 +414,7 @@ describe('ActsAmsCallBackFirstScene', function () {
* @tc.desc : Kill Processes By BundleName(by CallBack) * @tc.desc : Kill Processes By BundleName(by CallBack)
*/ */
it('Acts_Ams_test_1600', 0, async function (done) { it('Acts_Ams_test_1600', 0, async function (done) {
abilitymanager.killProcessesByBundleName('com.ix.simulate.feature', abilityManager.killProcessesByBundleName('com.ix.simulate.feature',
(error, info) => { (error, info) => {
console.info('Acts_Ams_test_1600 killProcessesByBundleName error.code: \ console.info('Acts_Ams_test_1600 killProcessesByBundleName error.code: \
' + error.code + ',data [' + info + ']'); ' + error.code + ',data [' + info + ']');
...@@ -432,8 +432,8 @@ describe('ActsAmsCallBackFirstScene', function () { ...@@ -432,8 +432,8 @@ describe('ActsAmsCallBackFirstScene', function () {
*/ */
it('Acts_Ams_test_1200', 0, async function (done) { it('Acts_Ams_test_1200', 0, async function (done) {
var maxnum = 10; var maxnum = 10;
var result = await abilitymanager.queryRunningAbilityMissionInfos(maxnum); var result = await abilityManager.queryRunningAbilityMissionInfos(maxnum);
abilitymanager.moveMissionToTop(result[0].id, abilityManager.moveMissionToTop(result[0].id,
(error, info) => { (error, info) => {
console.info('Acts_Ams_test_1200 moveMissionToTop error.code \ console.info('Acts_Ams_test_1200 moveMissionToTop error.code \
' + error.code + ',data [' + info + ']'); ' + error.code + ',data [' + info + ']');
......
...@@ -12,8 +12,8 @@ ...@@ -12,8 +12,8 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import featureAbility from '@ohos.ability.featureability' import featureAbility from '@ohos.ability.featureAbility'
import abilitymanager from '@ohos.app.abilitymanager' import abilityManager from '@ohos.app.abilityManager'
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index' import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index'
var WeightReasonCode = { var WeightReasonCode = {
...@@ -59,12 +59,12 @@ describe('ActsAmsCallBackFourthScene', function () { ...@@ -59,12 +59,12 @@ describe('ActsAmsCallBackFourthScene', function () {
beforeAll(async function (done) { beforeAll(async function (done) {
var maxnum = 10; var maxnum = 10;
var flag = 1; var flag = 1;
var data = await abilitymanager.queryRecentAbilityMissionInfos(maxnum, flag); var data = await abilityManager.queryRecentAbilityMissionInfos(maxnum, flag);
console.log('queryRecentAbilityMissionInfos data ' + JSON.stringify(data)); console.log('queryRecentAbilityMissionInfos data ' + JSON.stringify(data));
for (var i = 0; i < data.length; i++) { for (var i = 0; i < data.length; i++) {
if (data[i].baseAbility.bundleName != 'com.example.actsamscallbackfourthscene' && if (data[i].baseAbility.bundleName != 'com.example.actsamscallbackfourthscene' &&
data[i].topAbility.bundleName != 'com.example.actsamscallbackfourthscene') { data[i].topAbility.bundleName != 'com.example.actsamscallbackfourthscene') {
var info = abilitymanager.removeMission(data[i].id); var info = abilityManager.removeMission(data[i].id);
console.log(' removeMission data [' + info + ']'); console.log(' removeMission data [' + info + ']');
} }
} }
...@@ -150,7 +150,7 @@ describe('ActsAmsCallBackFourthScene', function () { ...@@ -150,7 +150,7 @@ describe('ActsAmsCallBackFourthScene', function () {
console.info("sleep begin"); console.info("sleep begin");
sleep(5000); sleep(5000);
console.info("sleep end"); console.info("sleep end");
abilitymanager.getAllRunningProcesses( abilityManager.getAllRunningProcesses(
(error, info) => { (error, info) => {
console.info('getAllRunningProcesses error.code \ console.info('getAllRunningProcesses error.code \
' + error.code + ', data length [' + info.length + ']'); ' + error.code + ', data length [' + info.length + ']');
...@@ -192,7 +192,7 @@ describe('ActsAmsCallBackFourthScene', function () { ...@@ -192,7 +192,7 @@ describe('ActsAmsCallBackFourthScene', function () {
it('Acts_Ams_test_5400', 0, async function (done) { it('Acts_Ams_test_5400', 0, async function (done) {
var maxnum = 100; var maxnum = 100;
var flag = 1; var flag = 1;
abilitymanager.queryRecentAbilityMissionInfos(maxnum, flag, abilityManager.queryRecentAbilityMissionInfos(maxnum, flag,
(error, data) => { (error, data) => {
console.info('queryRecentAbilityMissionInfos error.code : \ console.info('queryRecentAbilityMissionInfos error.code : \
' + error.code + ',data length [' + data.length + ']'); ' + error.code + ',data length [' + data.length + ']');
...@@ -249,7 +249,7 @@ describe('ActsAmsCallBackFourthScene', function () { ...@@ -249,7 +249,7 @@ describe('ActsAmsCallBackFourthScene', function () {
*/ */
it('Acts_Ams_test_5200', 0, async function (done) { it('Acts_Ams_test_5200', 0, async function (done) {
var maxnum = 30; var maxnum = 30;
abilitymanager.queryRunningAbilityMissionInfos(maxnum, abilityManager.queryRunningAbilityMissionInfos(maxnum,
(error, data) => { (error, data) => {
console.info('queryRunningAbilityMissionInfos error.code : \ console.info('queryRunningAbilityMissionInfos error.code : \
' + error.code + ',data length [' + data.length + ']'); ' + error.code + ',data length [' + data.length + ']');
...@@ -305,7 +305,7 @@ describe('ActsAmsCallBackFourthScene', function () { ...@@ -305,7 +305,7 @@ describe('ActsAmsCallBackFourthScene', function () {
* @tc.desc : Get All Active Processes Info(by CallBack) * @tc.desc : Get All Active Processes Info(by CallBack)
*/ */
it('Acts_Ams_test_8900', 0, async function (done) { it('Acts_Ams_test_8900', 0, async function (done) {
abilitymanager.getActiveProcessInfos( abilityManager.getActiveProcessInfos(
(error, info) => { (error, info) => {
console.info('getActiveProcessInfos error.code \ console.info('getActiveProcessInfos error.code \
' + error.code + ', data length [' + info.length + ']'); ' + error.code + ', data length [' + info.length + ']');
...@@ -336,7 +336,7 @@ describe('ActsAmsCallBackFourthScene', function () { ...@@ -336,7 +336,7 @@ describe('ActsAmsCallBackFourthScene', function () {
*/ */
it('Acts_Ams_test_9900', 0, async function (done) { it('Acts_Ams_test_9900', 0, async function (done) {
var maxnum = 10; var maxnum = 10;
abilitymanager.getActiveAbilityMissionInfos(maxnum, abilityManager.getActiveAbilityMissionInfos(maxnum,
(error, info) => { (error, info) => {
console.info('queryRecentAbilityMissionInfos error.code : \ console.info('queryRecentAbilityMissionInfos error.code : \
' + error.code + ',data length [' + info.length + ']'); ' + error.code + ',data length [' + info.length + ']');
...@@ -390,7 +390,7 @@ describe('ActsAmsCallBackFourthScene', function () { ...@@ -390,7 +390,7 @@ describe('ActsAmsCallBackFourthScene', function () {
*/ */
it('Acts_Ams_test_10900', 0, async function (done) { it('Acts_Ams_test_10900', 0, async function (done) {
var maxnum = 10; var maxnum = 10;
abilitymanager.getPreviousAbilityMissionInfos(maxnum, abilityManager.getPreviousAbilityMissionInfos(maxnum,
(error, info) => { (error, info) => {
console.info('queryRecentAbilityMissionInfos error.code : \ console.info('queryRecentAbilityMissionInfos error.code : \
' + error.code + ',data length [' + info.length + ']'); ' + error.code + ',data length [' + info.length + ']');
...@@ -444,8 +444,8 @@ describe('ActsAmsCallBackFourthScene', function () { ...@@ -444,8 +444,8 @@ describe('ActsAmsCallBackFourthScene', function () {
*/ */
it('Acts_Ams_test_5600', 0, async function (done) { it('Acts_Ams_test_5600', 0, async function (done) {
var maxnum = 30; var maxnum = 30;
var result = await abilitymanager.queryRunningAbilityMissionInfos(maxnum); var result = await abilityManager.queryRunningAbilityMissionInfos(maxnum);
abilitymanager.removeMission(result[0].id, abilityManager.removeMission(result[0].id,
(error, info) => { (error, info) => {
console.info('Acts_Ams_test_5600 removeMission error.code \ console.info('Acts_Ams_test_5600 removeMission error.code \
' + error.code + ',data [' + info + ']'); ' + error.code + ',data [' + info + ']');
...@@ -463,8 +463,8 @@ describe('ActsAmsCallBackFourthScene', function () { ...@@ -463,8 +463,8 @@ describe('ActsAmsCallBackFourthScene', function () {
*/ */
it('Acts_Ams_test_6000', 0, async function (done) { it('Acts_Ams_test_6000', 0, async function (done) {
var maxnum = 30; var maxnum = 30;
var result = await abilitymanager.queryRunningAbilityMissionInfos(maxnum); var result = await abilityManager.queryRunningAbilityMissionInfos(maxnum);
abilitymanager.moveMissionToTop(result[1].id, abilityManager.moveMissionToTop(result[1].id,
(error, info) => { (error, info) => {
console.info('Acts_Ams_test_6000 moveMissionToTop error.code \ console.info('Acts_Ams_test_6000 moveMissionToTop error.code \
' + error.code + ',data [' + info + ']'); ' + error.code + ',data [' + info + ']');
...@@ -481,7 +481,7 @@ describe('ActsAmsCallBackFourthScene', function () { ...@@ -481,7 +481,7 @@ describe('ActsAmsCallBackFourthScene', function () {
* @tc.desc : Kill Processes By BundleName(by CallBack) * @tc.desc : Kill Processes By BundleName(by CallBack)
*/ */
it('Acts_Ams_test_6400', 0, async function (done) { it('Acts_Ams_test_6400', 0, async function (done) {
abilitymanager.killProcessesByBundleName('xxxxxxxxx', abilityManager.killProcessesByBundleName('xxxxxxxxx',
(error, info) => { (error, info) => {
console.info('Acts_Ams_test_6400 killProcessesByBundleName error.code \ console.info('Acts_Ams_test_6400 killProcessesByBundleName error.code \
' + error.code + ',data [' + info + ']'); ' + error.code + ',data [' + info + ']');
...@@ -499,8 +499,8 @@ describe('ActsAmsCallBackFourthScene', function () { ...@@ -499,8 +499,8 @@ describe('ActsAmsCallBackFourthScene', function () {
*/ */
it('Acts_Ams_test_11900', 0, async function (done) { it('Acts_Ams_test_11900', 0, async function (done) {
var maxnum = 30; var maxnum = 30;
var result = await abilitymanager.queryRunningAbilityMissionInfos(maxnum); var result = await abilityManager.queryRunningAbilityMissionInfos(maxnum);
abilitymanager.deleteMissions([result[1].id, result[0].id], abilityManager.deleteMissions([result[1].id, result[0].id],
(error, info) => { (error, info) => {
console.info('Acts_Ams_test_11900 deleteMissions error.code: \ console.info('Acts_Ams_test_11900 deleteMissions error.code: \
' + error.code + ',data [' + info + ']'); ' + error.code + ',data [' + info + ']');
......
...@@ -12,8 +12,8 @@ ...@@ -12,8 +12,8 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import featureAbility from '@ohos.ability.featureability' import featureAbility from '@ohos.ability.featureAbility'
import abilitymanager from '@ohos.app.abilitymanager' import abilityManager from '@ohos.app.abilityManager'
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit' import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit'
var WeightReasonCode = { var WeightReasonCode = {
...@@ -55,12 +55,12 @@ describe('ActsAmsCallBackSecondScene', function () { ...@@ -55,12 +55,12 @@ describe('ActsAmsCallBackSecondScene', function () {
beforeAll(async function (done) { beforeAll(async function (done) {
var maxnum = 10; var maxnum = 10;
var flag = 1; var flag = 1;
var data = await abilitymanager.queryRecentAbilityMissionInfos(maxnum, flag); var data = await abilityManager.queryRecentAbilityMissionInfos(maxnum, flag);
console.log('queryRecentAbilityMissionInfos data ' + JSON.stringify(data)); console.log('queryRecentAbilityMissionInfos data ' + JSON.stringify(data));
for (var i = 0; i < data.length; i++) { for (var i = 0; i < data.length; i++) {
if (data[i].baseAbility.bundleName != 'com.example.actsamscallbacksecondscene' && if (data[i].baseAbility.bundleName != 'com.example.actsamscallbacksecondscene' &&
data[i].topAbility.bundleName != 'com.example.actsamscallbacksecondscene') { data[i].topAbility.bundleName != 'com.example.actsamscallbacksecondscene') {
var info = abilitymanager.removeMission(data[i].id); var info = abilityManager.removeMission(data[i].id);
console.log(' removeMission data [' + info + ']'); console.log(' removeMission data [' + info + ']');
} }
} }
...@@ -120,7 +120,7 @@ describe('ActsAmsCallBackSecondScene', function () { ...@@ -120,7 +120,7 @@ describe('ActsAmsCallBackSecondScene', function () {
console.info("sleep begin"); console.info("sleep begin");
sleep(5000); sleep(5000);
console.info("sleep end"); console.info("sleep end");
abilitymanager.getAllRunningProcesses( abilityManager.getAllRunningProcesses(
(error, info) => { (error, info) => {
console.info('getAllRunningProcesses error.code \ console.info('getAllRunningProcesses error.code \
' + error.code + ', data length [' + info.length + ']'); ' + error.code + ', data length [' + info.length + ']');
...@@ -160,7 +160,7 @@ describe('ActsAmsCallBackSecondScene', function () { ...@@ -160,7 +160,7 @@ describe('ActsAmsCallBackSecondScene', function () {
*/ */
it('Acts_Ams_test_2000', 0, async function (done) { it('Acts_Ams_test_2000', 0, async function (done) {
var maxnum = 20; var maxnum = 20;
abilitymanager.queryRunningAbilityMissionInfos(maxnum, abilityManager.queryRunningAbilityMissionInfos(maxnum,
(error, info) => { (error, info) => {
console.info('queryRecentAbilityMissionInfos error.code : \ console.info('queryRecentAbilityMissionInfos error.code : \
' + error.code + ',data length [' + info.length + ']'); ' + error.code + ',data length [' + info.length + ']');
...@@ -208,7 +208,7 @@ describe('ActsAmsCallBackSecondScene', function () { ...@@ -208,7 +208,7 @@ describe('ActsAmsCallBackSecondScene', function () {
it('Acts_Ams_test_2200', 0, async function (done) { it('Acts_Ams_test_2200', 0, async function (done) {
var maxnum = 20; var maxnum = 20;
var flag = 1; var flag = 1;
abilitymanager.queryRecentAbilityMissionInfos(maxnum, flag, abilityManager.queryRecentAbilityMissionInfos(maxnum, flag,
(error, info) => { (error, info) => {
console.info('queryRunningAbilityMissionInfos error.code : \ console.info('queryRunningAbilityMissionInfos error.code : \
' + error.code + ',data length [' + info.length + ']'); ' + error.code + ',data length [' + info.length + ']');
...@@ -254,7 +254,7 @@ describe('ActsAmsCallBackSecondScene', function () { ...@@ -254,7 +254,7 @@ describe('ActsAmsCallBackSecondScene', function () {
* @tc.desc : Get All Active Processes Info(by CallBack) * @tc.desc : Get All Active Processes Info(by CallBack)
*/ */
it('Acts_Ams_test_8700', 0, async function (done) { it('Acts_Ams_test_8700', 0, async function (done) {
abilitymanager.getActiveProcessInfos( abilityManager.getActiveProcessInfos(
(error, info) => { (error, info) => {
console.info('getActiveProcessInfos error.code \ console.info('getActiveProcessInfos error.code \
' + error.code + ', data length [' + info.length + ']'); ' + error.code + ', data length [' + info.length + ']');
...@@ -285,7 +285,7 @@ describe('ActsAmsCallBackSecondScene', function () { ...@@ -285,7 +285,7 @@ describe('ActsAmsCallBackSecondScene', function () {
*/ */
it('Acts_Ams_test_9700', 0, async function (done) { it('Acts_Ams_test_9700', 0, async function (done) {
var maxnum = 10; var maxnum = 10;
abilitymanager.getActiveAbilityMissionInfos(maxnum, abilityManager.getActiveAbilityMissionInfos(maxnum,
(error, info) => { (error, info) => {
console.info('queryRecentAbilityMissionInfos error.code : \ console.info('queryRecentAbilityMissionInfos error.code : \
' + error.code + ',data length [' + info.length + ']'); ' + error.code + ',data length [' + info.length + ']');
...@@ -339,7 +339,7 @@ describe('ActsAmsCallBackSecondScene', function () { ...@@ -339,7 +339,7 @@ describe('ActsAmsCallBackSecondScene', function () {
*/ */
it('Acts_Ams_test_10700', 0, async function (done) { it('Acts_Ams_test_10700', 0, async function (done) {
var maxnum = 10; var maxnum = 10;
abilitymanager.getPreviousAbilityMissionInfos(maxnum, abilityManager.getPreviousAbilityMissionInfos(maxnum,
(error, info) => { (error, info) => {
console.info('queryRecentAbilityMissionInfos error.code : \ console.info('queryRecentAbilityMissionInfos error.code : \
' + error.code + ',data length [' + info.length + ']'); ' + error.code + ',data length [' + info.length + ']');
...@@ -393,8 +393,8 @@ describe('ActsAmsCallBackSecondScene', function () { ...@@ -393,8 +393,8 @@ describe('ActsAmsCallBackSecondScene', function () {
*/ */
it('Acts_Ams_test_2400', 0, async function (done) { it('Acts_Ams_test_2400', 0, async function (done) {
var maxnum = 20; var maxnum = 20;
var result = await abilitymanager.queryRunningAbilityMissionInfos(maxnum); var result = await abilityManager.queryRunningAbilityMissionInfos(maxnum);
abilitymanager.removeMission(result[1].id, abilityManager.removeMission(result[1].id,
(error, info) => { (error, info) => {
console.info('Acts_Ams_test_2400 removeMission error.code \ console.info('Acts_Ams_test_2400 removeMission error.code \
' + error.code + ',data [' + info + ']'); ' + error.code + ',data [' + info + ']');
...@@ -411,8 +411,8 @@ describe('ActsAmsCallBackSecondScene', function () { ...@@ -411,8 +411,8 @@ describe('ActsAmsCallBackSecondScene', function () {
*/ */
it('Acts_Ams_test_2800', 0, async function (done) { it('Acts_Ams_test_2800', 0, async function (done) {
var maxnum = 20; var maxnum = 20;
var result = await abilitymanager.queryRunningAbilityMissionInfos(maxnum); var result = await abilityManager.queryRunningAbilityMissionInfos(maxnum);
abilitymanager.moveMissionToTop(result[0].id, abilityManager.moveMissionToTop(result[0].id,
(error, info) => { (error, info) => {
console.info('Acts_Ams_test_2800 moveMissionToTop error.code \ console.info('Acts_Ams_test_2800 moveMissionToTop error.code \
' + error.code + ',data [' + info + ']'); ' + error.code + ',data [' + info + ']');
...@@ -428,7 +428,7 @@ describe('ActsAmsCallBackSecondScene', function () { ...@@ -428,7 +428,7 @@ describe('ActsAmsCallBackSecondScene', function () {
* @tc.desc : Kill Processes By BundleName(by CallBack) * @tc.desc : Kill Processes By BundleName(by CallBack)
*/ */
it('Acts_Ams_test_3200', 0, async function (done) { it('Acts_Ams_test_3200', 0, async function (done) {
abilitymanager.killProcessesByBundleName('XXXXXXXXXXXX', abilityManager.killProcessesByBundleName('XXXXXXXXXXXX',
(error, info) => { (error, info) => {
console.info('Acts_Ams_test_3200 killProcessesByBundleName error.code: \ console.info('Acts_Ams_test_3200 killProcessesByBundleName error.code: \
' + error.code + ',data [' + info + ']'); ' + error.code + ',data [' + info + ']');
...@@ -445,8 +445,8 @@ describe('ActsAmsCallBackSecondScene', function () { ...@@ -445,8 +445,8 @@ describe('ActsAmsCallBackSecondScene', function () {
*/ */
it('Acts_Ams_test_3000', 0, async function (done) { it('Acts_Ams_test_3000', 0, async function (done) {
var maxnum = 20; var maxnum = 20;
var result = await abilitymanager.queryRunningAbilityMissionInfos(maxnum); var result = await abilityManager.queryRunningAbilityMissionInfos(maxnum);
abilitymanager.removeMissions([result[0].id], abilityManager.removeMissions([result[0].id],
(error, info) => { (error, info) => {
console.info('Acts_Ams_test_3000 removeMissions error.code \ console.info('Acts_Ams_test_3000 removeMissions error.code \
' + error.code + ',data [' + info + ']'); ' + error.code + ',data [' + info + ']');
......
...@@ -12,8 +12,8 @@ ...@@ -12,8 +12,8 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import featureAbility from '@ohos.ability.featureability' import featureAbility from '@ohos.ability.featureAbility'
import abilitymanager from '@ohos.app.abilitymanager' import abilityManager from '@ohos.app.abilityManager'
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index' import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index'
var WeightReasonCode = { var WeightReasonCode = {
...@@ -53,12 +53,12 @@ describe('ActsAmsCallBackThirdScene', function () { ...@@ -53,12 +53,12 @@ describe('ActsAmsCallBackThirdScene', function () {
beforeAll(async function (done) { beforeAll(async function (done) {
var maxnum = 10; var maxnum = 10;
var flag = 1; var flag = 1;
var data = await abilitymanager.queryRecentAbilityMissionInfos(maxnum, flag); var data = await abilityManager.queryRecentAbilityMissionInfos(maxnum, flag);
console.log('queryRecentAbilityMissionInfos data ' + JSON.stringify(data)); console.log('queryRecentAbilityMissionInfos data ' + JSON.stringify(data));
for (var i = 0; i < data.length; i++) { for (var i = 0; i < data.length; i++) {
if (data[i].baseAbility.bundleName != 'com.example.actsamscallbackthirdscene' && if (data[i].baseAbility.bundleName != 'com.example.actsamscallbackthirdscene' &&
data[i].topAbility.bundleName != 'com.example.actsamscallbackthirdscene') { data[i].topAbility.bundleName != 'com.example.actsamscallbackthirdscene') {
var info = abilitymanager.removeMission(data[i].id); var info = abilityManager.removeMission(data[i].id);
console.log(' removeMission data [' + info + ']'); console.log(' removeMission data [' + info + ']');
} }
} }
...@@ -118,7 +118,7 @@ describe('ActsAmsCallBackThirdScene', function () { ...@@ -118,7 +118,7 @@ describe('ActsAmsCallBackThirdScene', function () {
console.info("sleep begin"); console.info("sleep begin");
sleep(5000); sleep(5000);
console.info("sleep end"); console.info("sleep end");
abilitymanager.getAllRunningProcesses( abilityManager.getAllRunningProcesses(
(error, info) => { (error, info) => {
console.info('getAllRunningProcesses error.code \ console.info('getAllRunningProcesses error.code \
' + error.code + ', data length [' + info.length + ']'); ' + error.code + ', data length [' + info.length + ']');
...@@ -158,7 +158,7 @@ describe('ActsAmsCallBackThirdScene', function () { ...@@ -158,7 +158,7 @@ describe('ActsAmsCallBackThirdScene', function () {
*/ */
it('Acts_Ams_test_3600', 0, async function (done) { it('Acts_Ams_test_3600', 0, async function (done) {
var maxnum = 20; var maxnum = 20;
abilitymanager.queryRunningAbilityMissionInfos(maxnum, abilityManager.queryRunningAbilityMissionInfos(maxnum,
(error, info) => { (error, info) => {
console.info('queryRecentAbilityMissionInfos error.code : \ console.info('queryRecentAbilityMissionInfos error.code : \
' + error.code + ',data length [' + info.length + ']'); ' + error.code + ',data length [' + info.length + ']');
...@@ -206,7 +206,7 @@ describe('ActsAmsCallBackThirdScene', function () { ...@@ -206,7 +206,7 @@ describe('ActsAmsCallBackThirdScene', function () {
it('Acts_Ams_test_3800', 0, async function (done) { it('Acts_Ams_test_3800', 0, async function (done) {
var maxnum = 20; var maxnum = 20;
var flag = 2; var flag = 2;
abilitymanager.queryRecentAbilityMissionInfos(maxnum, flag, abilityManager.queryRecentAbilityMissionInfos(maxnum, flag,
(error, info) => { (error, info) => {
console.info('queryRunningAbilityMissionInfos error.code : \ console.info('queryRunningAbilityMissionInfos error.code : \
' + error.code + ',data length [' + info.length + ']'); ' + error.code + ',data length [' + info.length + ']');
...@@ -252,7 +252,7 @@ describe('ActsAmsCallBackThirdScene', function () { ...@@ -252,7 +252,7 @@ describe('ActsAmsCallBackThirdScene', function () {
* @tc.desc : Get All Active Processes Info(by CallBack) * @tc.desc : Get All Active Processes Info(by CallBack)
*/ */
it('Acts_Ams_test_8800', 0, async function (done) { it('Acts_Ams_test_8800', 0, async function (done) {
abilitymanager.getActiveProcessInfos( abilityManager.getActiveProcessInfos(
(error, info) => { (error, info) => {
console.info('getActiveProcessInfos error.code \ console.info('getActiveProcessInfos error.code \
' + error.code + ', data length [' + info.length + ']'); ' + error.code + ', data length [' + info.length + ']');
...@@ -283,7 +283,7 @@ describe('ActsAmsCallBackThirdScene', function () { ...@@ -283,7 +283,7 @@ describe('ActsAmsCallBackThirdScene', function () {
*/ */
it('Acts_Ams_test_9800', 0, async function (done) { it('Acts_Ams_test_9800', 0, async function (done) {
var maxnum = 10; var maxnum = 10;
abilitymanager.getActiveAbilityMissionInfos(maxnum, abilityManager.getActiveAbilityMissionInfos(maxnum,
(error, info) => { (error, info) => {
console.info('queryRecentAbilityMissionInfos error.code : \ console.info('queryRecentAbilityMissionInfos error.code : \
' + error.code + ',data length [' + info.length + ']'); ' + error.code + ',data length [' + info.length + ']');
...@@ -337,7 +337,7 @@ describe('ActsAmsCallBackThirdScene', function () { ...@@ -337,7 +337,7 @@ describe('ActsAmsCallBackThirdScene', function () {
*/ */
it('Acts_Ams_test_10800', 0, async function (done) { it('Acts_Ams_test_10800', 0, async function (done) {
var maxnum = 10; var maxnum = 10;
abilitymanager.getPreviousAbilityMissionInfos(maxnum, abilityManager.getPreviousAbilityMissionInfos(maxnum,
(error, info) => { (error, info) => {
console.info('queryRecentAbilityMissionInfos error.code : \ console.info('queryRecentAbilityMissionInfos error.code : \
' + error.code + ',data length [' + info.length + ']'); ' + error.code + ',data length [' + info.length + ']');
...@@ -391,8 +391,8 @@ describe('ActsAmsCallBackThirdScene', function () { ...@@ -391,8 +391,8 @@ describe('ActsAmsCallBackThirdScene', function () {
*/ */
it('Acts_Ams_test_4000', 0, async function (done) { it('Acts_Ams_test_4000', 0, async function (done) {
var maxnum = 20; var maxnum = 20;
var result = await abilitymanager.queryRunningAbilityMissionInfos(maxnum); var result = await abilityManager.queryRunningAbilityMissionInfos(maxnum);
abilitymanager.removeMission(result[1].id, abilityManager.removeMission(result[1].id,
(error, info) => { (error, info) => {
console.info('Acts_Ams_test_4000 removeMission error.code \ console.info('Acts_Ams_test_4000 removeMission error.code \
' + error.code + ',data [' + info + ']'); ' + error.code + ',data [' + info + ']');
...@@ -409,8 +409,8 @@ describe('ActsAmsCallBackThirdScene', function () { ...@@ -409,8 +409,8 @@ describe('ActsAmsCallBackThirdScene', function () {
*/ */
it('Acts_Ams_test_4400', 0, async function (done) { it('Acts_Ams_test_4400', 0, async function (done) {
var maxnum = 20; var maxnum = 20;
var result = await abilitymanager.queryRunningAbilityMissionInfos(maxnum); var result = await abilityManager.queryRunningAbilityMissionInfos(maxnum);
abilitymanager.moveMissionToTop(result[0].id, abilityManager.moveMissionToTop(result[0].id,
(error, info) => { (error, info) => {
console.info('Acts_Ams_test_4400 moveMissionToTop error.code \ console.info('Acts_Ams_test_4400 moveMissionToTop error.code \
' + error.code + ',data [' + info + ']'); ' + error.code + ',data [' + info + ']');
...@@ -427,8 +427,8 @@ describe('ActsAmsCallBackThirdScene', function () { ...@@ -427,8 +427,8 @@ describe('ActsAmsCallBackThirdScene', function () {
*/ */
it('Acts_Ams_test_11800', 0, async function (done) { it('Acts_Ams_test_11800', 0, async function (done) {
var maxnum = 10; var maxnum = 10;
var result = await abilitymanager.queryRunningAbilityMissionInfos(maxnum); var result = await abilityManager.queryRunningAbilityMissionInfos(maxnum);
abilitymanager.deleteMissions([result[0].id], abilityManager.deleteMissions([result[0].id],
(error, info) => { (error, info) => {
console.info('Acts_Ams_test_11800 deleteMissions error.code \ console.info('Acts_Ams_test_11800 deleteMissions error.code \
' + error.code + ',data [' + info + ']'); ' + error.code + ',data [' + info + ']');
...@@ -444,7 +444,7 @@ describe('ActsAmsCallBackThirdScene', function () { ...@@ -444,7 +444,7 @@ describe('ActsAmsCallBackThirdScene', function () {
* @tc.desc : Kill Processes By BundleName(by CallBack) * @tc.desc : Kill Processes By BundleName(by CallBack)
*/ */
it('Acts_Ams_test_4800', 0, async function (done) { it('Acts_Ams_test_4800', 0, async function (done) {
abilitymanager.killProcessesByBundleName('xxxxxxxxxxx', abilityManager.killProcessesByBundleName('xxxxxxxxxxx',
(error, info) => { (error, info) => {
console.info('Acts_Ams_test_4800 killProcessesByBundleName error.code: \ console.info('Acts_Ams_test_4800 killProcessesByBundleName error.code: \
' + error.code + ',data [' + info + ']'); ' + error.code + ',data [' + info + ']');
......
...@@ -12,8 +12,8 @@ ...@@ -12,8 +12,8 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import featureAbility from '@ohos.ability.featureability' import featureAbility from '@ohos.ability.featureAbility'
import abilitymanager from '@ohos.app.abilitymanager' import abilityManager from '@ohos.app.abilityManager'
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index' import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index'
var WeightReasonCode = { var WeightReasonCode = {
...@@ -56,12 +56,12 @@ describe('ActsAmsTestFifthScene', function () { ...@@ -56,12 +56,12 @@ describe('ActsAmsTestFifthScene', function () {
beforeAll(async function (done) { beforeAll(async function (done) {
var maxnum = 10; var maxnum = 10;
var flag = 1; var flag = 1;
var data = await abilitymanager.queryRecentAbilityMissionInfos(maxnum, flag); var data = await abilityManager.queryRecentAbilityMissionInfos(maxnum, flag);
console.log('queryRecentAbilityMissionInfos data ' + JSON.stringify(data)); console.log('queryRecentAbilityMissionInfos data ' + JSON.stringify(data));
for (var i = 0; i < data.length; i++) { for (var i = 0; i < data.length; i++) {
if (data[i].baseAbility.bundleName != 'com.example.actsamstestfifthscene' && if (data[i].baseAbility.bundleName != 'com.example.actsamstestfifthscene' &&
data[i].topAbility.bundleName != 'com.example.actsamstestfifthscene') { data[i].topAbility.bundleName != 'com.example.actsamstestfifthscene') {
var info = abilitymanager.removeMission(data[i].id); var info = abilityManager.removeMission(data[i].id);
console.log(' removeMission data [' + info + ']'); console.log(' removeMission data [' + info + ']');
} }
} }
...@@ -149,7 +149,7 @@ describe('ActsAmsTestFifthScene', function () { ...@@ -149,7 +149,7 @@ describe('ActsAmsTestFifthScene', function () {
console.info("sleep begin"); console.info("sleep begin");
sleep(5000); sleep(5000);
console.info("sleep end"); console.info("sleep end");
var info = await abilitymanager.getAllRunningProcesses(); var info = await abilityManager.getAllRunningProcesses();
console.info('getAllRunningProcesses data length [' + info.length + ']'); console.info('getAllRunningProcesses data length [' + info.length + ']');
console.info('Acts_Ams_test_6500 getAllRunningProcesses JSON String: ' + JSON.stringify(info)); console.info('Acts_Ams_test_6500 getAllRunningProcesses JSON String: ' + JSON.stringify(info));
expect(Array.isArray(info)).assertEqual(true); expect(Array.isArray(info)).assertEqual(true);
...@@ -186,13 +186,13 @@ describe('ActsAmsTestFifthScene', function () { ...@@ -186,13 +186,13 @@ describe('ActsAmsTestFifthScene', function () {
*/ */
it('Acts_Ams_test_7500', 0, async function (done) { it('Acts_Ams_test_7500', 0, async function (done) {
var maxnum = 10; var maxnum = 10;
var result = await abilitymanager.queryRunningAbilityMissionInfos(maxnum); var result = await abilityManager.queryRunningAbilityMissionInfos(maxnum);
var info = await abilitymanager.moveMissionToTop(result[1].id); var info = await abilityManager.moveMissionToTop(result[1].id);
console.info('Acts_Ams_test_7500 moveMissionToTop data [' + info + ']'); console.info('Acts_Ams_test_7500 moveMissionToTop data [' + info + ']');
expect(typeof (info)).assertEqual("number"); expect(typeof (info)).assertEqual("number");
expect(info).assertEqual(0); expect(info).assertEqual(0);
sleep(1000); sleep(1000);
var ret = await abilitymanager.queryRunningAbilityMissionInfos(maxnum); var ret = await abilityManager.queryRunningAbilityMissionInfos(maxnum);
expect(result[1].baseAbility.bundleName).assertEqual(ret[0].baseAbility.bundleName); expect(result[1].baseAbility.bundleName).assertEqual(ret[0].baseAbility.bundleName);
expect(result[1].topAbility.bundleName).assertEqual(ret[0].topAbility.bundleName); expect(result[1].topAbility.bundleName).assertEqual(ret[0].topAbility.bundleName);
done(); done();
...@@ -207,7 +207,7 @@ describe('ActsAmsTestFifthScene', function () { ...@@ -207,7 +207,7 @@ describe('ActsAmsTestFifthScene', function () {
it('Acts_Ams_test_6900', 0, async function (done) { it('Acts_Ams_test_6900', 0, async function (done) {
var maxnum = 10; var maxnum = 10;
var flag = 1; var flag = 1;
var data = await abilitymanager.queryRecentAbilityMissionInfos(maxnum, flag); var data = await abilityManager.queryRecentAbilityMissionInfos(maxnum, flag);
console.info(' queryRecentAbilityMissionInfos data length [' + data.length + ']'); console.info(' queryRecentAbilityMissionInfos data length [' + data.length + ']');
console.info('Acts_Ams_test_6900 queryRecentAbilityMissionInfos data ' + JSON.stringify(data)); console.info('Acts_Ams_test_6900 queryRecentAbilityMissionInfos data ' + JSON.stringify(data));
expect(Array.isArray(data)).assertEqual(true); expect(Array.isArray(data)).assertEqual(true);
...@@ -249,7 +249,7 @@ describe('ActsAmsTestFifthScene', function () { ...@@ -249,7 +249,7 @@ describe('ActsAmsTestFifthScene', function () {
* @tc.desc : Get All Active Processes Info(by Promise) * @tc.desc : Get All Active Processes Info(by Promise)
*/ */
it('Acts_Ams_test_8500', 0, async function (done) { it('Acts_Ams_test_8500', 0, async function (done) {
var info = await abilitymanager.getActiveProcessInfos(); var info = await abilityManager.getActiveProcessInfos();
console.info('Acts_Ams_test_8500 getActiveProcessInfos JSON String: ' + JSON.stringify(info)); console.info('Acts_Ams_test_8500 getActiveProcessInfos JSON String: ' + JSON.stringify(info));
expect(Array.isArray(info)).assertEqual(true); expect(Array.isArray(info)).assertEqual(true);
expect(info.length).assertLarger(0); expect(info.length).assertLarger(0);
...@@ -276,7 +276,7 @@ describe('ActsAmsTestFifthScene', function () { ...@@ -276,7 +276,7 @@ describe('ActsAmsTestFifthScene', function () {
*/ */
it('Acts_Ams_test_9500', 0, async function (done) { it('Acts_Ams_test_9500', 0, async function (done) {
var upperLimit = 20; var upperLimit = 20;
var data = await abilitymanager.getActiveAbilityMissionInfos(upperLimit); var data = await abilityManager.getActiveAbilityMissionInfos(upperLimit);
console.info('Acts_Ams_test_9500 getActiveAbilityMissionInfos data ' + JSON.stringify(data)); console.info('Acts_Ams_test_9500 getActiveAbilityMissionInfos data ' + JSON.stringify(data));
expect(Array.isArray(data)).assertEqual(true); expect(Array.isArray(data)).assertEqual(true);
expect(data.length).assertEqual(3); expect(data.length).assertEqual(3);
...@@ -325,7 +325,7 @@ describe('ActsAmsTestFifthScene', function () { ...@@ -325,7 +325,7 @@ describe('ActsAmsTestFifthScene', function () {
*/ */
it('Acts_Ams_test_10500', 0, async function (done) { it('Acts_Ams_test_10500', 0, async function (done) {
var upperLimit = 20; var upperLimit = 20;
var data = await abilitymanager.getPreviousAbilityMissionInfos(upperLimit); var data = await abilityManager.getPreviousAbilityMissionInfos(upperLimit);
console.info('Acts_Ams_test_10500 getPreviousAbilityMissionInfos data ' + JSON.stringify(data)); console.info('Acts_Ams_test_10500 getPreviousAbilityMissionInfos data ' + JSON.stringify(data));
expect(Array.isArray(data)).assertEqual(true); expect(Array.isArray(data)).assertEqual(true);
expect(data.length).assertEqual(3); expect(data.length).assertEqual(3);
...@@ -374,7 +374,7 @@ describe('ActsAmsTestFifthScene', function () { ...@@ -374,7 +374,7 @@ describe('ActsAmsTestFifthScene', function () {
*/ */
it('Acts_Ams_test_6700', 0, async function (done) { it('Acts_Ams_test_6700', 0, async function (done) {
var maxnum = 10; var maxnum = 10;
var data = await abilitymanager.queryRunningAbilityMissionInfos(maxnum); var data = await abilityManager.queryRunningAbilityMissionInfos(maxnum);
console.info('queryRunningAbilityMissionInfos data length [' + data.length + ']'); console.info('queryRunningAbilityMissionInfos data length [' + data.length + ']');
console.info('Acts_Ams_test_6700 queryRunningAbilityMissionInfos data ' + JSON.stringify(data)); console.info('Acts_Ams_test_6700 queryRunningAbilityMissionInfos data ' + JSON.stringify(data));
expect(Array.isArray(data)).assertEqual(true); expect(Array.isArray(data)).assertEqual(true);
...@@ -417,8 +417,8 @@ describe('ActsAmsTestFifthScene', function () { ...@@ -417,8 +417,8 @@ describe('ActsAmsTestFifthScene', function () {
*/ */
it('Acts_Ams_test_11500', 0, async function (done) { it('Acts_Ams_test_11500', 0, async function (done) {
var maxnum = 20; var maxnum = 20;
var result = await abilitymanager.queryRunningAbilityMissionInfos(maxnum); var result = await abilityManager.queryRunningAbilityMissionInfos(maxnum);
var info = await abilitymanager.deleteMissions([result[1].id]); var info = await abilityManager.deleteMissions([result[1].id]);
console.info('Acts_Ams_test_11500 deleteMissions data [' + info + ']'); console.info('Acts_Ams_test_11500 deleteMissions data [' + info + ']');
expect(info).assertEqual(0); expect(info).assertEqual(0);
done(); done();
...@@ -431,7 +431,7 @@ describe('ActsAmsTestFifthScene', function () { ...@@ -431,7 +431,7 @@ describe('ActsAmsTestFifthScene', function () {
* @tc.desc : Kill Processes By BundleName(by Promise) * @tc.desc : Kill Processes By BundleName(by Promise)
*/ */
it('Acts_Ams_test_7900', 0, async function (done) { it('Acts_Ams_test_7900', 0, async function (done) {
var info = await abilitymanager.killProcessesByBundleName('com.ix.verify.io'); var info = await abilityManager.killProcessesByBundleName('com.ix.verify.io');
console.info('Acts_Ams_test_7900 killProcessesByBundleName data [' + info + ']'); console.info('Acts_Ams_test_7900 killProcessesByBundleName data [' + info + ']');
expect(typeof (info)).assertEqual("number"); expect(typeof (info)).assertEqual("number");
expect(info).assertEqual(0); expect(info).assertEqual(0);
......
...@@ -12,8 +12,8 @@ ...@@ -12,8 +12,8 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import featureAbility from '@ohos.ability.featureability' import featureAbility from '@ohos.ability.featureAbility'
import abilitymanager from '@ohos.app.abilitymanager' import abilityManager from '@ohos.app.abilityManager'
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index' import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index'
var WeightReasonCode = { var WeightReasonCode = {
...@@ -53,12 +53,12 @@ describe('ActsAmsTestFirstScene', function () { ...@@ -53,12 +53,12 @@ describe('ActsAmsTestFirstScene', function () {
beforeAll(async function (done) { beforeAll(async function (done) {
var maxnum = 10; var maxnum = 10;
var flag = 1; var flag = 1;
var data = await abilitymanager.queryRecentAbilityMissionInfos(maxnum, flag); var data = await abilityManager.queryRecentAbilityMissionInfos(maxnum, flag);
console.log('queryRecentAbilityMissionInfos data ' + JSON.stringify(data)); console.log('queryRecentAbilityMissionInfos data ' + JSON.stringify(data));
for (var i = 0; i < data.length; i++) { for (var i = 0; i < data.length; i++) {
if (data[i].baseAbility.bundleName != 'com.example.actsamstestfirstscene' && if (data[i].baseAbility.bundleName != 'com.example.actsamstestfirstscene' &&
data[i].topAbility.bundleName != 'com.example.actsamstestfirstscene') { data[i].topAbility.bundleName != 'com.example.actsamstestfirstscene') {
var info = abilitymanager.removeMission(data[i].id); var info = abilityManager.removeMission(data[i].id);
console.log(' removeMission data [' + info + ']'); console.log(' removeMission data [' + info + ']');
} }
} }
...@@ -110,7 +110,7 @@ describe('ActsAmsTestFirstScene', function () { ...@@ -110,7 +110,7 @@ describe('ActsAmsTestFirstScene', function () {
console.info("sleep begin"); console.info("sleep begin");
sleep(5000); sleep(5000);
console.info("sleep end"); console.info("sleep end");
var info = await abilitymanager.getAllRunningProcesses(); var info = await abilityManager.getAllRunningProcesses();
console.info('Acts_Ams_test_0100 getAllRunningProcesses JSON String: ' + JSON.stringify(info)); console.info('Acts_Ams_test_0100 getAllRunningProcesses JSON String: ' + JSON.stringify(info));
expect(Array.isArray(info)).assertEqual(true); expect(Array.isArray(info)).assertEqual(true);
expect(info.length).assertLarger(0); expect(info.length).assertLarger(0);
...@@ -146,8 +146,8 @@ describe('ActsAmsTestFirstScene', function () { ...@@ -146,8 +146,8 @@ describe('ActsAmsTestFirstScene', function () {
*/ */
it('Acts_Ams_test_1100', 0, async function (done) { it('Acts_Ams_test_1100', 0, async function (done) {
var maxnum = 10; var maxnum = 10;
var result = await abilitymanager.queryRunningAbilityMissionInfos(maxnum); var result = await abilityManager.queryRunningAbilityMissionInfos(maxnum);
var info = await abilitymanager.moveMissionToTop(result[0].id); var info = await abilityManager.moveMissionToTop(result[0].id);
console.info('Acts_Ams_test_1100 moveMissionToTop data [' + info + ']'); console.info('Acts_Ams_test_1100 moveMissionToTop data [' + info + ']');
expect(info).assertEqual(0); expect(info).assertEqual(0);
done(); done();
...@@ -161,7 +161,7 @@ describe('ActsAmsTestFirstScene', function () { ...@@ -161,7 +161,7 @@ describe('ActsAmsTestFirstScene', function () {
*/ */
it('Acts_Ams_test_0300', 0, async function (done) { it('Acts_Ams_test_0300', 0, async function (done) {
var maxnum = 10; var maxnum = 10;
var data = await abilitymanager.queryRunningAbilityMissionInfos(maxnum); var data = await abilityManager.queryRunningAbilityMissionInfos(maxnum);
console.info('Acts_Ams_test_0300 queryRunningAbilityMissionInfos data ' + JSON.stringify(data)); console.info('Acts_Ams_test_0300 queryRunningAbilityMissionInfos data ' + JSON.stringify(data));
expect(Array.isArray(data)).assertEqual(true); expect(Array.isArray(data)).assertEqual(true);
expect(data.length).assertEqual(2); expect(data.length).assertEqual(2);
...@@ -205,7 +205,7 @@ describe('ActsAmsTestFirstScene', function () { ...@@ -205,7 +205,7 @@ describe('ActsAmsTestFirstScene', function () {
it('Acts_Ams_test_0500', 0, async function (done) { it('Acts_Ams_test_0500', 0, async function (done) {
var maxnum = 10; var maxnum = 10;
var flag = 1; var flag = 1;
var data = await abilitymanager.queryRecentAbilityMissionInfos(maxnum, flag); var data = await abilityManager.queryRecentAbilityMissionInfos(maxnum, flag);
console.info('Acts_Ams_test_0500 queryRecentAbilityMissionInfos data ' + JSON.stringify(data)); console.info('Acts_Ams_test_0500 queryRecentAbilityMissionInfos data ' + JSON.stringify(data));
expect(Array.isArray(data)).assertEqual(true); expect(Array.isArray(data)).assertEqual(true);
expect(data.length).assertEqual(2); expect(data.length).assertEqual(2);
...@@ -246,7 +246,7 @@ describe('ActsAmsTestFirstScene', function () { ...@@ -246,7 +246,7 @@ describe('ActsAmsTestFirstScene', function () {
* @tc.desc : Get All Active Processes Info(by Promise) * @tc.desc : Get All Active Processes Info(by Promise)
*/ */
it('Acts_Ams_test_8100', 0, async function (done) { it('Acts_Ams_test_8100', 0, async function (done) {
var info = await abilitymanager.getActiveProcessInfos(); var info = await abilityManager.getActiveProcessInfos();
console.info('Acts_Ams_test_8100 getActiveProcessInfos JSON String: ' + JSON.stringify(info)); console.info('Acts_Ams_test_8100 getActiveProcessInfos JSON String: ' + JSON.stringify(info));
expect(Array.isArray(info)).assertEqual(true); expect(Array.isArray(info)).assertEqual(true);
expect(info.length).assertLarger(0); expect(info.length).assertLarger(0);
...@@ -273,7 +273,7 @@ describe('ActsAmsTestFirstScene', function () { ...@@ -273,7 +273,7 @@ describe('ActsAmsTestFirstScene', function () {
*/ */
it('Acts_Ams_test_9100', 0, async function (done) { it('Acts_Ams_test_9100', 0, async function (done) {
var upperLimit = 20; var upperLimit = 20;
var data = await abilitymanager.getActiveAbilityMissionInfos(upperLimit); var data = await abilityManager.getActiveAbilityMissionInfos(upperLimit);
console.info('Acts_Ams_test_9100 getActiveAbilityMissionInfos data ' + JSON.stringify(data)); console.info('Acts_Ams_test_9100 getActiveAbilityMissionInfos data ' + JSON.stringify(data));
expect(Array.isArray(data)).assertEqual(true); expect(Array.isArray(data)).assertEqual(true);
expect(data.length).assertEqual(2); expect(data.length).assertEqual(2);
...@@ -322,7 +322,7 @@ describe('ActsAmsTestFirstScene', function () { ...@@ -322,7 +322,7 @@ describe('ActsAmsTestFirstScene', function () {
*/ */
it('Acts_Ams_test_10100', 0, async function (done) { it('Acts_Ams_test_10100', 0, async function (done) {
var upperLimit = 20; var upperLimit = 20;
var data = await abilitymanager.getPreviousAbilityMissionInfos(upperLimit); var data = await abilityManager.getPreviousAbilityMissionInfos(upperLimit);
console.info('Acts_Ams_test_10100 getPreviousAbilityMissionInfos data ' + JSON.stringify(data)); console.info('Acts_Ams_test_10100 getPreviousAbilityMissionInfos data ' + JSON.stringify(data));
expect(Array.isArray(data)).assertEqual(true); expect(Array.isArray(data)).assertEqual(true);
expect(data.length).assertEqual(2); expect(data.length).assertEqual(2);
...@@ -371,8 +371,8 @@ describe('ActsAmsTestFirstScene', function () { ...@@ -371,8 +371,8 @@ describe('ActsAmsTestFirstScene', function () {
*/ */
it('Acts_Ams_test_0700', 0, async function (done) { it('Acts_Ams_test_0700', 0, async function (done) {
var maxnum = 10; var maxnum = 10;
var result = await abilitymanager.queryRunningAbilityMissionInfos(maxnum); var result = await abilityManager.queryRunningAbilityMissionInfos(maxnum);
var info = await abilitymanager.removeMission(result[0].id); var info = await abilityManager.removeMission(result[0].id);
console.info('Acts_Ams_test_0700 removeMission data [' + info + ']'); console.info('Acts_Ams_test_0700 removeMission data [' + info + ']');
expect(info).assertEqual(0); expect(info).assertEqual(0);
done(); done();
...@@ -386,10 +386,10 @@ describe('ActsAmsTestFirstScene', function () { ...@@ -386,10 +386,10 @@ describe('ActsAmsTestFirstScene', function () {
*/ */
it('Acts_Ams_test_11100', 0, async function (done) { it('Acts_Ams_test_11100', 0, async function (done) {
var maxnum = 10; var maxnum = 10;
var result = await abilitymanager.queryRunningAbilityMissionInfos(maxnum); var result = await abilityManager.queryRunningAbilityMissionInfos(maxnum);
expect(result.length).assertEqual(1); expect(result.length).assertEqual(1);
var missionID = result[0].id + 1; var missionID = result[0].id + 1;
var info = await abilitymanager.deleteMissions([missionID]); var info = await abilityManager.deleteMissions([missionID]);
console.info('Acts_Ams_test_11100 deleteMissions data [' + info + ']'); console.info('Acts_Ams_test_11100 deleteMissions data [' + info + ']');
expect(info).assertLarger(0); expect(info).assertLarger(0);
done(); done();
...@@ -402,7 +402,7 @@ describe('ActsAmsTestFirstScene', function () { ...@@ -402,7 +402,7 @@ describe('ActsAmsTestFirstScene', function () {
* @tc.desc : Kill Processes By BundleName(by Promise) * @tc.desc : Kill Processes By BundleName(by Promise)
*/ */
it('Acts_Ams_test_1500', 0, async function (done) { it('Acts_Ams_test_1500', 0, async function (done) {
var info = await abilitymanager.killProcessesByBundleName('com.ix.simulate.feature'); var info = await abilityManager.killProcessesByBundleName('com.ix.simulate.feature');
console.info('Acts_Ams_test_1500 killProcessesByBundleName data [' + info + ']'); console.info('Acts_Ams_test_1500 killProcessesByBundleName data [' + info + ']');
expect(info).assertEqual(0); expect(info).assertEqual(0);
done(); done();
......
...@@ -12,8 +12,8 @@ ...@@ -12,8 +12,8 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import featureAbility from '@ohos.ability.featureability' import featureAbility from '@ohos.ability.featureAbility'
import abilitymanager from '@ohos.app.abilitymanager' import abilityManager from '@ohos.app.abilityManager'
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index' import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index'
var WeightReasonCode = { var WeightReasonCode = {
...@@ -58,12 +58,12 @@ describe('ActsAmsTestFourthScene', function () { ...@@ -58,12 +58,12 @@ describe('ActsAmsTestFourthScene', function () {
beforeAll(async function (done) { beforeAll(async function (done) {
var maxnum = 10; var maxnum = 10;
var flag = 1; var flag = 1;
var data = await abilitymanager.queryRecentAbilityMissionInfos(maxnum, flag); var data = await abilityManager.queryRecentAbilityMissionInfos(maxnum, flag);
console.log('queryRecentAbilityMissionInfos data ' + JSON.stringify(data)); console.log('queryRecentAbilityMissionInfos data ' + JSON.stringify(data));
for (var i = 0; i < data.length; i++) { for (var i = 0; i < data.length; i++) {
if (data[i].baseAbility.bundleName != 'com.example.actsamstestfourthscene' && if (data[i].baseAbility.bundleName != 'com.example.actsamstestfourthscene' &&
data[i].topAbility.bundleName != 'com.example.actsamstestfourthscene') { data[i].topAbility.bundleName != 'com.example.actsamstestfourthscene') {
var info = abilitymanager.removeMission(data[i].id); var info = abilityManager.removeMission(data[i].id);
console.log(' removeMission data [' + info + ']'); console.log(' removeMission data [' + info + ']');
} }
} }
...@@ -169,7 +169,7 @@ describe('ActsAmsTestFourthScene', function () { ...@@ -169,7 +169,7 @@ describe('ActsAmsTestFourthScene', function () {
console.info("sleep begin"); console.info("sleep begin");
sleep(5000); sleep(5000);
console.info("sleep end"); console.info("sleep end");
var info = await abilitymanager.getAllRunningProcesses(); var info = await abilityManager.getAllRunningProcesses();
console.info('getAllRunningProcesses data length [' + info.length + ']'); console.info('getAllRunningProcesses data length [' + info.length + ']');
console.info('Acts_Ams_test_4900 getAllRunningProcesses JSON String: ' + JSON.stringify(info)); console.info('Acts_Ams_test_4900 getAllRunningProcesses JSON String: ' + JSON.stringify(info));
expect(Array.isArray(info)).assertEqual(true); expect(Array.isArray(info)).assertEqual(true);
...@@ -205,7 +205,7 @@ describe('ActsAmsTestFourthScene', function () { ...@@ -205,7 +205,7 @@ describe('ActsAmsTestFourthScene', function () {
* @tc.desc : Get All Active Processes Info(by Promise) * @tc.desc : Get All Active Processes Info(by Promise)
*/ */
it('Acts_Ams_test_8400', 0, async function (done) { it('Acts_Ams_test_8400', 0, async function (done) {
var info = await abilitymanager.getActiveProcessInfos(); var info = await abilityManager.getActiveProcessInfos();
console.info('Acts_Ams_test_8400 getActiveProcessInfos JSON String: ' + JSON.stringify(info)); console.info('Acts_Ams_test_8400 getActiveProcessInfos JSON String: ' + JSON.stringify(info));
expect(Array.isArray(info)).assertEqual(true); expect(Array.isArray(info)).assertEqual(true);
expect(info.length).assertLarger(0); expect(info.length).assertLarger(0);
...@@ -233,7 +233,7 @@ describe('ActsAmsTestFourthScene', function () { ...@@ -233,7 +233,7 @@ describe('ActsAmsTestFourthScene', function () {
it('Acts_Ams_test_5300', 0, async function (done) { it('Acts_Ams_test_5300', 0, async function (done) {
var maxnum = 100; var maxnum = 100;
var flag = 1; var flag = 1;
var data = await abilitymanager.queryRecentAbilityMissionInfos(maxnum, flag); var data = await abilityManager.queryRecentAbilityMissionInfos(maxnum, flag);
console.info(' queryRecentAbilityMissionInfos data length [' + data.length + ']'); console.info(' queryRecentAbilityMissionInfos data length [' + data.length + ']');
expect(Array.isArray(data)).assertEqual(true); expect(Array.isArray(data)).assertEqual(true);
expect(data.length).assertEqual(4); expect(data.length).assertEqual(4);
...@@ -286,7 +286,7 @@ describe('ActsAmsTestFourthScene', function () { ...@@ -286,7 +286,7 @@ describe('ActsAmsTestFourthScene', function () {
*/ */
it('Acts_Ams_test_5100', 0, async function (done) { it('Acts_Ams_test_5100', 0, async function (done) {
var maxnum = 30; var maxnum = 30;
var data = await abilitymanager.queryRunningAbilityMissionInfos(maxnum); var data = await abilityManager.queryRunningAbilityMissionInfos(maxnum);
console.info('queryRunningAbilityMissionInfos data length [' + data.length + ']'); console.info('queryRunningAbilityMissionInfos data length [' + data.length + ']');
expect(Array.isArray(data)).assertEqual(true); expect(Array.isArray(data)).assertEqual(true);
expect(data.length).assertEqual(4); expect(data.length).assertEqual(4);
...@@ -339,7 +339,7 @@ describe('ActsAmsTestFourthScene', function () { ...@@ -339,7 +339,7 @@ describe('ActsAmsTestFourthScene', function () {
*/ */
it('Acts_Ams_test_9400', 0, async function (done) { it('Acts_Ams_test_9400', 0, async function (done) {
var upperLimit = 20; var upperLimit = 20;
var data = await abilitymanager.getActiveAbilityMissionInfos(upperLimit); var data = await abilityManager.getActiveAbilityMissionInfos(upperLimit);
console.info('Acts_Ams_test_9400 getActiveAbilityMissionInfos data ' + JSON.stringify(data)); console.info('Acts_Ams_test_9400 getActiveAbilityMissionInfos data ' + JSON.stringify(data));
expect(Array.isArray(data)).assertEqual(true); expect(Array.isArray(data)).assertEqual(true);
expect(data.length).assertEqual(4); expect(data.length).assertEqual(4);
...@@ -388,7 +388,7 @@ describe('ActsAmsTestFourthScene', function () { ...@@ -388,7 +388,7 @@ describe('ActsAmsTestFourthScene', function () {
*/ */
it('Acts_Ams_test_10400', 0, async function (done) { it('Acts_Ams_test_10400', 0, async function (done) {
var upperLimit = 20; var upperLimit = 20;
var data = await abilitymanager.getPreviousAbilityMissionInfos(upperLimit); var data = await abilityManager.getPreviousAbilityMissionInfos(upperLimit);
console.info('Acts_Ams_test_10400 getPreviousAbilityMissionInfos data ' + JSON.stringify(data)); console.info('Acts_Ams_test_10400 getPreviousAbilityMissionInfos data ' + JSON.stringify(data));
expect(Array.isArray(data)).assertEqual(true); expect(Array.isArray(data)).assertEqual(true);
expect(data.length).assertEqual(4); expect(data.length).assertEqual(4);
...@@ -437,8 +437,8 @@ describe('ActsAmsTestFourthScene', function () { ...@@ -437,8 +437,8 @@ describe('ActsAmsTestFourthScene', function () {
*/ */
it('Acts_Ams_test_5500', 0, async function (done) { it('Acts_Ams_test_5500', 0, async function (done) {
var maxnum = 30; var maxnum = 30;
var result = await abilitymanager.queryRunningAbilityMissionInfos(maxnum); var result = await abilityManager.queryRunningAbilityMissionInfos(maxnum);
var info = await abilitymanager.removeMission(result[0].id); var info = await abilityManager.removeMission(result[0].id);
console.info('Acts_Ams_test_5500 removeMission data [' + info + ']'); console.info('Acts_Ams_test_5500 removeMission data [' + info + ']');
expect(typeof (info)).assertEqual("number"); expect(typeof (info)).assertEqual("number");
expect(info).assertEqual(0); expect(info).assertEqual(0);
...@@ -453,8 +453,8 @@ describe('ActsAmsTestFourthScene', function () { ...@@ -453,8 +453,8 @@ describe('ActsAmsTestFourthScene', function () {
*/ */
it('Acts_Ams_test_5900', 0, async function (done) { it('Acts_Ams_test_5900', 0, async function (done) {
var maxnum = 30; var maxnum = 30;
var result = await abilitymanager.queryRunningAbilityMissionInfos(maxnum); var result = await abilityManager.queryRunningAbilityMissionInfos(maxnum);
var info = await abilitymanager.moveMissionToTop(result[0].id); var info = await abilityManager.moveMissionToTop(result[0].id);
console.info('Acts_Ams_test_5900 moveMissionToTop data [' + info + ']'); console.info('Acts_Ams_test_5900 moveMissionToTop data [' + info + ']');
expect(typeof (info)).assertEqual("number"); expect(typeof (info)).assertEqual("number");
expect(info).assertEqual(0); expect(info).assertEqual(0);
...@@ -469,8 +469,8 @@ describe('ActsAmsTestFourthScene', function () { ...@@ -469,8 +469,8 @@ describe('ActsAmsTestFourthScene', function () {
*/ */
it('Acts_Ams_test_6100', 0, async function (done) { it('Acts_Ams_test_6100', 0, async function (done) {
var maxnum = 30; var maxnum = 30;
var result = await abilitymanager.queryRunningAbilityMissionInfos(maxnum); var result = await abilityManager.queryRunningAbilityMissionInfos(maxnum);
var info = await abilitymanager.removeMissions([result[0].id, result[1].id]); var info = await abilityManager.removeMissions([result[0].id, result[1].id]);
console.info('Acts_Ams_test_6100 removeMissions data [' + info + ']'); console.info('Acts_Ams_test_6100 removeMissions data [' + info + ']');
expect(typeof (info)).assertEqual("number"); expect(typeof (info)).assertEqual("number");
expect(info).assertEqual(0); expect(info).assertEqual(0);
...@@ -484,7 +484,7 @@ describe('ActsAmsTestFourthScene', function () { ...@@ -484,7 +484,7 @@ describe('ActsAmsTestFourthScene', function () {
* @tc.desc : Kill Processes By BundleName(by Promise) * @tc.desc : Kill Processes By BundleName(by Promise)
*/ */
it('Acts_Ams_test_6300', 0, async function (done) { it('Acts_Ams_test_6300', 0, async function (done) {
var info = await abilitymanager.killProcessesByBundleName('xxxxxxxxxxxx'); var info = await abilityManager.killProcessesByBundleName('xxxxxxxxxxxx');
console.info('Acts_Ams_test_6300 killProcessesByBundleName data [' + info + ']'); console.info('Acts_Ams_test_6300 killProcessesByBundleName data [' + info + ']');
expect(typeof (info)).assertEqual("number"); expect(typeof (info)).assertEqual("number");
expect(info).assertEqual(2097215); expect(info).assertEqual(2097215);
......
...@@ -12,8 +12,8 @@ ...@@ -12,8 +12,8 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import featureAbility from '@ohos.ability.featureability' import featureAbility from '@ohos.ability.featureAbility'
import abilitymanager from '@ohos.app.abilitymanager' import abilityManager from '@ohos.app.abilityManager'
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index' import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index'
var WeightReasonCode = { var WeightReasonCode = {
...@@ -55,12 +55,12 @@ describe('ActsAmsTestSecondScene', function () { ...@@ -55,12 +55,12 @@ describe('ActsAmsTestSecondScene', function () {
beforeAll(async function (done) { beforeAll(async function (done) {
var maxnum = 10; var maxnum = 10;
var flag = 1; var flag = 1;
var data = await abilitymanager.queryRecentAbilityMissionInfos(maxnum, flag); var data = await abilityManager.queryRecentAbilityMissionInfos(maxnum, flag);
console.log('queryRecentAbilityMissionInfos data ' + JSON.stringify(data)); console.log('queryRecentAbilityMissionInfos data ' + JSON.stringify(data));
for (var i = 0; i < data.length; i++) { for (var i = 0; i < data.length; i++) {
if (data[i].baseAbility.bundleName != 'com.example.actsamstestsecondscene' && if (data[i].baseAbility.bundleName != 'com.example.actsamstestsecondscene' &&
data[i].topAbility.bundleName != 'com.example.actsamstestsecondscene') { data[i].topAbility.bundleName != 'com.example.actsamstestsecondscene') {
var info = abilitymanager.removeMission(data[i].id); var info = abilityManager.removeMission(data[i].id);
console.log(' removeMission data [' + info + ']'); console.log(' removeMission data [' + info + ']');
} }
} }
...@@ -130,7 +130,7 @@ describe('ActsAmsTestSecondScene', function () { ...@@ -130,7 +130,7 @@ describe('ActsAmsTestSecondScene', function () {
console.info("sleep begin"); console.info("sleep begin");
sleep(5000); sleep(5000);
console.info("sleep end"); console.info("sleep end");
var info = await abilitymanager.getAllRunningProcesses(); var info = await abilityManager.getAllRunningProcesses();
console.info('Acts_Ams_test_1700 getAllRunningProcesses JSON String: ' + JSON.stringify(info)); console.info('Acts_Ams_test_1700 getAllRunningProcesses JSON String: ' + JSON.stringify(info));
expect(Array.isArray(info)).assertEqual(true); expect(Array.isArray(info)).assertEqual(true);
expect(info.length).assertLarger(0); expect(info.length).assertLarger(0);
...@@ -166,8 +166,8 @@ describe('ActsAmsTestSecondScene', function () { ...@@ -166,8 +166,8 @@ describe('ActsAmsTestSecondScene', function () {
*/ */
it('Acts_Ams_test_2700', 0, async function (done) { it('Acts_Ams_test_2700', 0, async function (done) {
var maxnum = 20; var maxnum = 20;
var result = await abilitymanager.queryRunningAbilityMissionInfos(maxnum); var result = await abilityManager.queryRunningAbilityMissionInfos(maxnum);
var info = await abilitymanager.moveMissionToTop(result[0].id); var info = await abilityManager.moveMissionToTop(result[0].id);
console.info('Acts_Ams_test_2700 moveMissionToTop data [' + info + ']'); console.info('Acts_Ams_test_2700 moveMissionToTop data [' + info + ']');
expect(info).assertEqual(0); expect(info).assertEqual(0);
done(); done();
...@@ -181,7 +181,7 @@ describe('ActsAmsTestSecondScene', function () { ...@@ -181,7 +181,7 @@ describe('ActsAmsTestSecondScene', function () {
*/ */
it('Acts_Ams_test_1900', 0, async function (done) { it('Acts_Ams_test_1900', 0, async function (done) {
var maxnum = 20; var maxnum = 20;
var data = await abilitymanager.queryRunningAbilityMissionInfos(maxnum); var data = await abilityManager.queryRunningAbilityMissionInfos(maxnum);
console.info('queryRunningAbilityMissionInfos data length [' + data.length + ']'); console.info('queryRunningAbilityMissionInfos data length [' + data.length + ']');
console.info('Acts_Ams_test_1900 queryRunningAbilityMissionInfos data ' + JSON.stringify(data)); console.info('Acts_Ams_test_1900 queryRunningAbilityMissionInfos data ' + JSON.stringify(data));
expect(Array.isArray(data)).assertEqual(true); expect(Array.isArray(data)).assertEqual(true);
...@@ -225,7 +225,7 @@ describe('ActsAmsTestSecondScene', function () { ...@@ -225,7 +225,7 @@ describe('ActsAmsTestSecondScene', function () {
it('Acts_Ams_test_2100', 0, async function (done) { it('Acts_Ams_test_2100', 0, async function (done) {
var maxnum = 20; var maxnum = 20;
var flag = 1; var flag = 1;
var data = await abilitymanager.queryRecentAbilityMissionInfos(maxnum, flag); var data = await abilityManager.queryRecentAbilityMissionInfos(maxnum, flag);
console.info(' queryRecentAbilityMissionInfos data length [' + data.length + ']'); console.info(' queryRecentAbilityMissionInfos data length [' + data.length + ']');
console.info('Acts_Ams_test_2100 queryRecentAbilityMissionInfos data ' + JSON.stringify(data)); console.info('Acts_Ams_test_2100 queryRecentAbilityMissionInfos data ' + JSON.stringify(data));
expect(Array.isArray(data)).assertEqual(true); expect(Array.isArray(data)).assertEqual(true);
...@@ -267,7 +267,7 @@ describe('ActsAmsTestSecondScene', function () { ...@@ -267,7 +267,7 @@ describe('ActsAmsTestSecondScene', function () {
* @tc.desc : Get All Active Processes Info(by Promise) * @tc.desc : Get All Active Processes Info(by Promise)
*/ */
it('Acts_Ams_test_8200', 0, async function (done) { it('Acts_Ams_test_8200', 0, async function (done) {
var info = await abilitymanager.getActiveProcessInfos(); var info = await abilityManager.getActiveProcessInfos();
console.info('Acts_Ams_test_8200 getActiveProcessInfos JSON String: ' + JSON.stringify(info)); console.info('Acts_Ams_test_8200 getActiveProcessInfos JSON String: ' + JSON.stringify(info));
expect(Array.isArray(info)).assertEqual(true); expect(Array.isArray(info)).assertEqual(true);
expect(info.length).assertLarger(0); expect(info.length).assertLarger(0);
...@@ -294,7 +294,7 @@ describe('ActsAmsTestSecondScene', function () { ...@@ -294,7 +294,7 @@ describe('ActsAmsTestSecondScene', function () {
*/ */
it('Acts_Ams_test_9200', 0, async function (done) { it('Acts_Ams_test_9200', 0, async function (done) {
var upperLimit = 20; var upperLimit = 20;
var data = await abilitymanager.getActiveAbilityMissionInfos(upperLimit); var data = await abilityManager.getActiveAbilityMissionInfos(upperLimit);
console.info('Acts_Ams_test_9200 getActiveAbilityMissionInfos data ' + JSON.stringify(data)); console.info('Acts_Ams_test_9200 getActiveAbilityMissionInfos data ' + JSON.stringify(data));
expect(Array.isArray(data)).assertEqual(true); expect(Array.isArray(data)).assertEqual(true);
expect(data.length).assertEqual(3); expect(data.length).assertEqual(3);
...@@ -343,7 +343,7 @@ describe('ActsAmsTestSecondScene', function () { ...@@ -343,7 +343,7 @@ describe('ActsAmsTestSecondScene', function () {
*/ */
it('Acts_Ams_test_10200', 0, async function (done) { it('Acts_Ams_test_10200', 0, async function (done) {
var upperLimit = 20; var upperLimit = 20;
var data = await abilitymanager.getPreviousAbilityMissionInfos(upperLimit); var data = await abilityManager.getPreviousAbilityMissionInfos(upperLimit);
console.info('Acts_Ams_test_10200 getPreviousAbilityMissionInfos data ' + JSON.stringify(data)); console.info('Acts_Ams_test_10200 getPreviousAbilityMissionInfos data ' + JSON.stringify(data));
expect(Array.isArray(data)).assertEqual(true); expect(Array.isArray(data)).assertEqual(true);
expect(data.length).assertEqual(3); expect(data.length).assertEqual(3);
...@@ -392,8 +392,8 @@ describe('ActsAmsTestSecondScene', function () { ...@@ -392,8 +392,8 @@ describe('ActsAmsTestSecondScene', function () {
*/ */
it('Acts_Ams_test_11200', 0, async function (done) { it('Acts_Ams_test_11200', 0, async function (done) {
var maxnum = 20; var maxnum = 20;
var result = await abilitymanager.queryRunningAbilityMissionInfos(maxnum); var result = await abilityManager.queryRunningAbilityMissionInfos(maxnum);
var info = await abilitymanager.deleteMissions([result[0].id]); var info = await abilityManager.deleteMissions([result[0].id]);
console.info('Acts_Ams_test_11200 deleteMissions data [' + info + ']'); console.info('Acts_Ams_test_11200 deleteMissions data [' + info + ']');
expect(info).assertEqual(0); expect(info).assertEqual(0);
done(); done();
...@@ -407,8 +407,8 @@ describe('ActsAmsTestSecondScene', function () { ...@@ -407,8 +407,8 @@ describe('ActsAmsTestSecondScene', function () {
*/ */
it('Acts_Ams_test_2300', 0, async function (done) { it('Acts_Ams_test_2300', 0, async function (done) {
var maxnum = 20; var maxnum = 20;
var result = await abilitymanager.queryRunningAbilityMissionInfos(maxnum); var result = await abilityManager.queryRunningAbilityMissionInfos(maxnum);
var info = await abilitymanager.removeMission(result[0].id); var info = await abilityManager.removeMission(result[0].id);
console.info('Acts_Ams_test_2300 removeMission data [' + info + ']'); console.info('Acts_Ams_test_2300 removeMission data [' + info + ']');
expect(info).assertEqual(0); expect(info).assertEqual(0);
done(); done();
...@@ -421,7 +421,7 @@ describe('ActsAmsTestSecondScene', function () { ...@@ -421,7 +421,7 @@ describe('ActsAmsTestSecondScene', function () {
* @tc.desc : Kill Processes By BundleName(by Promise) * @tc.desc : Kill Processes By BundleName(by Promise)
*/ */
it('Acts_Ams_test_3100', 0, async function (done) { it('Acts_Ams_test_3100', 0, async function (done) {
var info = await abilitymanager.killProcessesByBundleName('XXXXXXXXXXXX'); var info = await abilityManager.killProcessesByBundleName('XXXXXXXXXXXX');
console.info('Acts_Ams_test_3100 killProcessesByBundleName data [' + info + ']'); console.info('Acts_Ams_test_3100 killProcessesByBundleName data [' + info + ']');
expect(info).assertEqual(2097215); expect(info).assertEqual(2097215);
done(); done();
......
...@@ -12,8 +12,8 @@ ...@@ -12,8 +12,8 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import featureAbility from '@ohos.ability.featureability' import featureAbility from '@ohos.ability.featureAbility'
import abilitymanager from '@ohos.app.abilitymanager' import abilityManager from '@ohos.app.abilityManager'
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index' import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index'
var WeightReasonCode = { var WeightReasonCode = {
...@@ -55,12 +55,12 @@ describe('ActsAmsTestThirdScene', function () { ...@@ -55,12 +55,12 @@ describe('ActsAmsTestThirdScene', function () {
beforeAll(async function (done) { beforeAll(async function (done) {
var maxnum = 10; var maxnum = 10;
var flag = 1; var flag = 1;
var data = await abilitymanager.queryRecentAbilityMissionInfos(maxnum, flag); var data = await abilityManager.queryRecentAbilityMissionInfos(maxnum, flag);
console.log('queryRecentAbilityMissionInfos data ' + JSON.stringify(data)); console.log('queryRecentAbilityMissionInfos data ' + JSON.stringify(data));
for (var i = 0; i < data.length; i++) { for (var i = 0; i < data.length; i++) {
if (data[i].baseAbility.bundleName != 'com.example.actsamstestthirdscene' && if (data[i].baseAbility.bundleName != 'com.example.actsamstestthirdscene' &&
data[i].topAbility.bundleName != 'com.example.actsamstestthirdscene') { data[i].topAbility.bundleName != 'com.example.actsamstestthirdscene') {
var info = abilitymanager.removeMission(data[i].id); var info = abilityManager.removeMission(data[i].id);
console.log(' removeMission data [' + info + ']'); console.log(' removeMission data [' + info + ']');
} }
} }
...@@ -130,7 +130,7 @@ describe('ActsAmsTestThirdScene', function () { ...@@ -130,7 +130,7 @@ describe('ActsAmsTestThirdScene', function () {
console.info("sleep begin"); console.info("sleep begin");
sleep(5000); sleep(5000);
console.info("sleep end"); console.info("sleep end");
var info = await abilitymanager.getAllRunningProcesses(); var info = await abilityManager.getAllRunningProcesses();
console.info('Acts_Ams_test_3300 getAllRunningProcesses JSON String: ' + JSON.stringify(info)); console.info('Acts_Ams_test_3300 getAllRunningProcesses JSON String: ' + JSON.stringify(info));
expect(Array.isArray(info)).assertEqual(true); expect(Array.isArray(info)).assertEqual(true);
expect(info.length).assertLarger(0); expect(info.length).assertLarger(0);
...@@ -166,7 +166,7 @@ describe('ActsAmsTestThirdScene', function () { ...@@ -166,7 +166,7 @@ describe('ActsAmsTestThirdScene', function () {
*/ */
it('Acts_Ams_test_3500', 0, async function (done) { it('Acts_Ams_test_3500', 0, async function (done) {
var maxnum = 20; var maxnum = 20;
var data = await abilitymanager.queryRunningAbilityMissionInfos(maxnum); var data = await abilityManager.queryRunningAbilityMissionInfos(maxnum);
console.info('Acts_Ams_test_3500 queryRunningAbilityMissionInfos data ' + JSON.stringify(data)); console.info('Acts_Ams_test_3500 queryRunningAbilityMissionInfos data ' + JSON.stringify(data));
expect(Array.isArray(data)).assertEqual(true); expect(Array.isArray(data)).assertEqual(true);
expect(data.length).assertEqual(3); expect(data.length).assertEqual(3);
...@@ -209,7 +209,7 @@ describe('ActsAmsTestThirdScene', function () { ...@@ -209,7 +209,7 @@ describe('ActsAmsTestThirdScene', function () {
it('Acts_Ams_test_3700', 0, async function (done) { it('Acts_Ams_test_3700', 0, async function (done) {
var maxnum = 20; var maxnum = 20;
var flag = 2; var flag = 2;
var data = await abilitymanager.queryRecentAbilityMissionInfos(maxnum, flag); var data = await abilityManager.queryRecentAbilityMissionInfos(maxnum, flag);
console.info('Acts_Ams_test_3700 queryRecentAbilityMissionInfos data ' + JSON.stringify(data)); console.info('Acts_Ams_test_3700 queryRecentAbilityMissionInfos data ' + JSON.stringify(data));
expect(Array.isArray(data)).assertEqual(true); expect(Array.isArray(data)).assertEqual(true);
expect(data.length).assertEqual(3); expect(data.length).assertEqual(3);
...@@ -250,7 +250,7 @@ describe('ActsAmsTestThirdScene', function () { ...@@ -250,7 +250,7 @@ describe('ActsAmsTestThirdScene', function () {
* @tc.desc : Get All Active Processes Info(by Promise) * @tc.desc : Get All Active Processes Info(by Promise)
*/ */
it('Acts_Ams_test_8300', 0, async function (done) { it('Acts_Ams_test_8300', 0, async function (done) {
var info = await abilitymanager.getActiveProcessInfos(); var info = await abilityManager.getActiveProcessInfos();
console.info('Acts_Ams_test_8300 getActiveProcessInfos JSON String: ' + JSON.stringify(info)); console.info('Acts_Ams_test_8300 getActiveProcessInfos JSON String: ' + JSON.stringify(info));
expect(Array.isArray(info)).assertEqual(true); expect(Array.isArray(info)).assertEqual(true);
expect(info.length).assertLarger(0); expect(info.length).assertLarger(0);
...@@ -277,7 +277,7 @@ describe('ActsAmsTestThirdScene', function () { ...@@ -277,7 +277,7 @@ describe('ActsAmsTestThirdScene', function () {
*/ */
it('Acts_Ams_test_9300', 0, async function (done) { it('Acts_Ams_test_9300', 0, async function (done) {
var upperLimit = 20; var upperLimit = 20;
var data = await abilitymanager.getActiveAbilityMissionInfos(upperLimit); var data = await abilityManager.getActiveAbilityMissionInfos(upperLimit);
console.info('Acts_Ams_test_9300 getActiveAbilityMissionInfos data ' + JSON.stringify(data)); console.info('Acts_Ams_test_9300 getActiveAbilityMissionInfos data ' + JSON.stringify(data));
expect(Array.isArray(data)).assertEqual(true); expect(Array.isArray(data)).assertEqual(true);
expect(data.length).assertEqual(3); expect(data.length).assertEqual(3);
...@@ -326,7 +326,7 @@ describe('ActsAmsTestThirdScene', function () { ...@@ -326,7 +326,7 @@ describe('ActsAmsTestThirdScene', function () {
*/ */
it('Acts_Ams_test_10300', 0, async function (done) { it('Acts_Ams_test_10300', 0, async function (done) {
var upperLimit = 20; var upperLimit = 20;
var data = await abilitymanager.getPreviousAbilityMissionInfos(upperLimit); var data = await abilityManager.getPreviousAbilityMissionInfos(upperLimit);
console.info('Acts_Ams_test_10300 getPreviousAbilityMissionInfos data ' + JSON.stringify(data)); console.info('Acts_Ams_test_10300 getPreviousAbilityMissionInfos data ' + JSON.stringify(data));
expect(Array.isArray(data)).assertEqual(true); expect(Array.isArray(data)).assertEqual(true);
expect(data.length).assertEqual(3); expect(data.length).assertEqual(3);
...@@ -375,8 +375,8 @@ describe('ActsAmsTestThirdScene', function () { ...@@ -375,8 +375,8 @@ describe('ActsAmsTestThirdScene', function () {
*/ */
it('Acts_Ams_test_3900', 0, async function (done) { it('Acts_Ams_test_3900', 0, async function (done) {
var maxnum = 20; var maxnum = 20;
var result = await abilitymanager.queryRunningAbilityMissionInfos(maxnum); var result = await abilityManager.queryRunningAbilityMissionInfos(maxnum);
var info = await abilitymanager.removeMission(result[1].id); var info = await abilityManager.removeMission(result[1].id);
console.info('Acts_Ams_test_3900 removeMission data [' + info + ']'); console.info('Acts_Ams_test_3900 removeMission data [' + info + ']');
expect(info).assertEqual(0); expect(info).assertEqual(0);
done(); done();
...@@ -390,8 +390,8 @@ describe('ActsAmsTestThirdScene', function () { ...@@ -390,8 +390,8 @@ describe('ActsAmsTestThirdScene', function () {
*/ */
it('Acts_Ams_test_4300', 0, async function (done) { it('Acts_Ams_test_4300', 0, async function (done) {
var maxnum = 20; var maxnum = 20;
var result = await abilitymanager.queryRunningAbilityMissionInfos(maxnum); var result = await abilityManager.queryRunningAbilityMissionInfos(maxnum);
var info = await abilitymanager.moveMissionToTop(result[0].id); var info = await abilityManager.moveMissionToTop(result[0].id);
console.info('Acts_Ams_test_4300 moveMissionToTop data [' + info + ']'); console.info('Acts_Ams_test_4300 moveMissionToTop data [' + info + ']');
expect(info).assertEqual(0); expect(info).assertEqual(0);
done(); done();
...@@ -405,8 +405,8 @@ describe('ActsAmsTestThirdScene', function () { ...@@ -405,8 +405,8 @@ describe('ActsAmsTestThirdScene', function () {
*/ */
it('Acts_Ams_test_4500', 0, async function (done) { it('Acts_Ams_test_4500', 0, async function (done) {
var maxnum = 20; var maxnum = 20;
var result = await abilitymanager.queryRunningAbilityMissionInfos(maxnum); var result = await abilityManager.queryRunningAbilityMissionInfos(maxnum);
var info = await abilitymanager.removeMissions([result[0].id]); var info = await abilityManager.removeMissions([result[0].id]);
console.info('Acts_Ams_test_4500 removeMissions data [' + info + ']'); console.info('Acts_Ams_test_4500 removeMissions data [' + info + ']');
expect(info).assertEqual(0); expect(info).assertEqual(0);
done(); done();
...@@ -419,7 +419,7 @@ describe('ActsAmsTestThirdScene', function () { ...@@ -419,7 +419,7 @@ describe('ActsAmsTestThirdScene', function () {
* @tc.desc : Kill Processes By BundleName(by Promise) * @tc.desc : Kill Processes By BundleName(by Promise)
*/ */
it('Acts_Ams_test_4700', 0, async function (done) { it('Acts_Ams_test_4700', 0, async function (done) {
var info = await abilitymanager.killProcessesByBundleName('XXXXXXXX'); var info = await abilityManager.killProcessesByBundleName('XXXXXXXX');
console.info('Acts_Ams_test_4700 killProcessesByBundleName data [' + info + ']'); console.info('Acts_Ams_test_4700 killProcessesByBundleName data [' + info + ']');
expect(info).assertEqual(2097215); expect(info).assertEqual(2097215);
done(); done();
......
...@@ -12,8 +12,8 @@ ...@@ -12,8 +12,8 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import featureAbility from '@ohos.ability.featureability' import featureAbility from '@ohos.ability.featureAbility'
import abilitymanager from '@ohos.app.abilitymanager' import abilityManager from '@ohos.app.abilityManager'
import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index' import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index'
describe('ActsAmsCallBackSixth Scene', function () { describe('ActsAmsCallBackSixth Scene', function () {
...@@ -51,7 +51,7 @@ describe('ActsAmsCallBackSixth Scene', function () { ...@@ -51,7 +51,7 @@ describe('ActsAmsCallBackSixth Scene', function () {
* @tc.desc : Clear Missions(by CallBack) * @tc.desc : Clear Missions(by CallBack)
*/ */
it('Acts_Ams_test_12200', 0, async function (done) { it('Acts_Ams_test_12200', 0, async function (done) {
abilitymanager.clearMissions( abilityManager.clearMissions(
(error,info) => { (error,info) => {
console.info('Acts_Ams_test_12200 clearMissions error.code ' + error.code + ',data [' + info + ']' ); console.info('Acts_Ams_test_12200 clearMissions error.code ' + error.code + ',data [' + info + ']' );
expect(typeof(info)).assertEqual("number"); expect(typeof(info)).assertEqual("number");
......
...@@ -12,8 +12,8 @@ ...@@ -12,8 +12,8 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import featureAbility from '@ohos.ability.featureability' import featureAbility from '@ohos.ability.featureAbility'
import abilitymanager from '@ohos.app.abilitymanager' import abilityManager from '@ohos.app.abilityManager'
import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index' import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index'
describe('ActsAmsCallBackSixth Scene', function () { describe('ActsAmsCallBackSixth Scene', function () {
...@@ -51,7 +51,7 @@ describe('ActsAmsCallBackSixth Scene', function () { ...@@ -51,7 +51,7 @@ describe('ActsAmsCallBackSixth Scene', function () {
* @tc.desc : Clear Missions(by Promise) * @tc.desc : Clear Missions(by Promise)
*/ */
it('Acts_Ams_test_12100', 0, async function (done) { it('Acts_Ams_test_12100', 0, async function (done) {
var info = await abilitymanager.clearMissions(); var info = await abilityManager.clearMissions();
console.info('Acts_Ams_test_12100 clearMissions data [' + info + ']'); console.info('Acts_Ams_test_12100 clearMissions data [' + info + ']');
expect(typeof(info)).assertEqual("number"); expect(typeof(info)).assertEqual("number");
expect(info).assertEqual(0); expect(info).assertEqual(0);
......
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
* limitations under the License. * limitations under the License.
*/ */
import abilityManager from '@ohos.app.abilityManager' import abilityManager from '@ohos.app.abilityManager'
import featureAbility from '@ohos.ability.featureability' import featureAbility from '@ohos.ability.featureAbility'
import commonEvent from '@ohos.commonevent' import commonEvent from '@ohos.commonEvent'
import image from '@ohos.multimedia.image' import image from '@ohos.multimedia.image'
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index' import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index'
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import commonEvent from '@ohos.commonevent' import commonEvent from '@ohos.commonEvent'
export default { export default {
data: { data: {
title: "" title: ""
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import commonEvent from '@ohos.commonevent' import commonEvent from '@ohos.commonEvent'
export default { export default {
data: { data: {
title: "" title: ""
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import dataUriUtils from '@ohos.ability.datauriutils' import dataUriUtils from '@ohos.ability.dataUriUtils'
import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index' import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index'
describe('ActsDataUriUtilsTest', function () { describe('ActsDataUriUtilsTest', function () {
......
...@@ -12,9 +12,9 @@ ...@@ -12,9 +12,9 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import featureAbility from '@ohos.ability.featureability' import featureAbility from '@ohos.ability.featureAbility'
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index' import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index'
import commonEvent from '@ohos.commonevent' import commonEvent from '@ohos.commonEvent'
describe('ActsAmsMultiPageApp', function () { describe('ActsAmsMultiPageApp', function () {
console.info('----ActsAmsMultiPageApp----'); console.info('----ActsAmsMultiPageApp----');
......
...@@ -13,9 +13,9 @@ ...@@ -13,9 +13,9 @@
* limitations under the License. * limitations under the License.
*/ */
import bundle from "@ohos.bundle" import bundle from "@ohos.bundle"
import featureAbility from '@ohos.ability.featureability' import featureAbility from '@ohos.ability.featureAbility'
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index' import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index'
import commonEvent from '@ohos.commonevent' import commonEvent from '@ohos.commonEvent'
describe('ActsAmsMultiPageAppConnectService', function () { describe('ActsAmsMultiPageAppConnectService', function () {
......
...@@ -15,8 +15,8 @@ ...@@ -15,8 +15,8 @@
import file from '@system.file' import file from '@system.file'
import {Core, ExpectExtend} from 'deccjsunit/index' import {Core, ExpectExtend} from 'deccjsunit/index'
import rpc from "@ohos.rpc" import rpc from "@ohos.rpc"
import commonEvent from '@ohos.commonevent' import commonEvent from '@ohos.commoneEvent'
import particleAbility from '@ohos.ability.particleability' import particleAbility from '@ohos.ability.particleAbility'
import bundle from "@ohos.bundle" import bundle from "@ohos.bundle"
......
...@@ -12,9 +12,9 @@ ...@@ -12,9 +12,9 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import featureAbility from '@ohos.ability.featureability' import featureAbility from '@ohos.ability.featureAbility'
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index' import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index'
import commonEvent from '@ohos.commonevent' import commonEvent from '@ohos.commonEvent'
var subscriberInfoStartAbility = { var subscriberInfoStartAbility = {
events: ["ACTS_StartAbility_CommonEvent"], events: ["ACTS_StartAbility_CommonEvent"],
......
...@@ -17,7 +17,7 @@ import {Core, ExpectExtend} from 'deccjsunit/index' ...@@ -17,7 +17,7 @@ import {Core, ExpectExtend} from 'deccjsunit/index'
const injectRef = Object.getPrototypeOf(global) || global const injectRef = Object.getPrototypeOf(global) || global
injectRef.regeneratorRuntime = require('@babel/runtime/regenerator') injectRef.regeneratorRuntime = require('@babel/runtime/regenerator')
import commonEvent from '@ohos.commonevent' import commonEvent from '@ohos.commonEvent'
export default { export default {
data: { data: {
......
...@@ -12,9 +12,9 @@ ...@@ -12,9 +12,9 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import featureAbility from '@ohos.ability.featureability' import featureAbility from '@ohos.ability.featureAbility'
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index' import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index'
import commonEvent from '@ohos.commonevent' import commonEvent from '@ohos.commonEvent'
describe('ActsAmsMultiPageAppS', function () { describe('ActsAmsMultiPageAppS', function () {
console.info('----ActsAmsMultiPageAppS----'); console.info('----ActsAmsMultiPageAppS----');
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import featureAbility from '@ohos.ability.featureability' import featureAbility from '@ohos.ability.featureAbility'
import bundle from "@ohos.bundle" import bundle from "@ohos.bundle"
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index' import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index'
......
...@@ -15,8 +15,8 @@ ...@@ -15,8 +15,8 @@
import file from '@system.file' import file from '@system.file'
import {Core, ExpectExtend} from 'deccjsunit/index' import {Core, ExpectExtend} from 'deccjsunit/index'
import rpc from "@ohos.rpc" import rpc from "@ohos.rpc"
import commonEvent from '@ohos.commonevent' import commonEvent from '@ohos.commonEvent'
import particleAbility from '@ohos.ability.particleability' import particleAbility from '@ohos.ability.particleAbility'
import bundle from "@ohos.bundle" import bundle from "@ohos.bundle"
let mMyStub; let mMyStub;
......
...@@ -12,8 +12,8 @@ ...@@ -12,8 +12,8 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import featureAbility from '@ohos.ability.featureability' import featureAbility from '@ohos.ability.featureAbility'
import commonEvent from "@ohos.commonevent" import commonEvent from "@ohos.commonEvent"
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index' import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index'
var subscriberInfoStartAbility = { var subscriberInfoStartAbility = {
...@@ -73,7 +73,7 @@ describe('ActsAmsMultiAppSimultaneousOnline', function () { ...@@ -73,7 +73,7 @@ describe('ActsAmsMultiAppSimultaneousOnline', function () {
commonEvent.unsubscribe(subscriber, unSubscribeCallback) commonEvent.unsubscribe(subscriber, unSubscribeCallback)
} }
} }
var processInfos = await abilitymanager.getActiveProcessInfos(); var processInfos = await abilityManager.getActiveProcessInfos();
var cloneFlag = 0; var cloneFlag = 0;
var selfFlag = 0; var selfFlag = 0;
for (var i = 0; i < processInfos.length; i++) { for (var i = 0; i < processInfos.length; i++) {
......
...@@ -12,8 +12,8 @@ ...@@ -12,8 +12,8 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import featureAbility from '@ohos.ability.featureability' import featureAbility from '@ohos.ability.featureAbility'
import commonEvent from '@ohos.commonevent' import commonEvent from '@ohos.commonEvent'
import bundle from "@ohos.bundle" import bundle from "@ohos.bundle"
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index' import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index'
......
...@@ -12,9 +12,9 @@ ...@@ -12,9 +12,9 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import featureAbility from '@ohos.ability.featureability' import featureAbility from '@ohos.ability.featureAbility'
import commonEvent from "@ohos.commonevent" import commonEvent from "@ohos.commonEvent"
import abilitymanager from '@ohos.app.abilitymanager' import abilityManager from '@ohos.app.abilityManager'
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index' import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index'
var subscriberInfoStartAbility = { var subscriberInfoStartAbility = {
...@@ -78,7 +78,7 @@ describe('ActsAmsMultiAppTermination', function () { ...@@ -78,7 +78,7 @@ describe('ActsAmsMultiAppTermination', function () {
} }
} }
sleep(3000); sleep(3000);
var processInfos = await abilitymanager.getActiveProcessInfos(); var processInfos = await abilityManager.getActiveProcessInfos();
var cloneFlag = 0; var cloneFlag = 0;
var selfFlag = 0; var selfFlag = 0;
for (var i = 0; i < processInfos.length; i++) { for (var i = 0; i < processInfos.length; i++) {
......
...@@ -12,8 +12,8 @@ ...@@ -12,8 +12,8 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import featureAbility from '@ohos.ability.featureability' import featureAbility from '@ohos.ability.featureAbility'
import commonEvent from '@ohos.commonevent' import commonEvent from '@ohos.commonEvent'
import bundle from "@ohos.bundle" import bundle from "@ohos.bundle"
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index' import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index'
......
...@@ -12,9 +12,9 @@ ...@@ -12,9 +12,9 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import featureAbility from '@ohos.ability.featureability' import featureAbility from '@ohos.ability.featureAbility'
import bundle from "@ohos.bundle" import bundle from "@ohos.bundle"
import commonEvent from '@ohos.commonevent' import commonEvent from '@ohos.commonEvent'
const injectRef = Object.getPrototypeOf(global) || global const injectRef = Object.getPrototypeOf(global) || global
injectRef.regeneratorRuntime = require('@babel/runtime/regenerator') injectRef.regeneratorRuntime = require('@babel/runtime/regenerator')
......
...@@ -13,9 +13,9 @@ ...@@ -13,9 +13,9 @@
* limitations under the License. * limitations under the License.
*/ */
import rpc from "@ohos.rpc" import rpc from "@ohos.rpc"
import particleAbility from '@ohos.ability.particleability' import particleAbility from '@ohos.ability.particleAbility'
import bundle from "@ohos.bundle" import bundle from "@ohos.bundle"
import commonEvent from '@ohos.commonevent' import commonEvent from '@ohos.commonEvent'
const injectRef = Object.getPrototypeOf(global) || global const injectRef = Object.getPrototypeOf(global) || global
injectRef.regeneratorRuntime = require('@babel/runtime/regenerator') injectRef.regeneratorRuntime = require('@babel/runtime/regenerator')
......
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
* limitations under the License. * limitations under the License.
*/ */
import rpc from "@ohos.rpc" import rpc from "@ohos.rpc"
import particleAbility from '@ohos.ability.particleability' import particleAbility from '@ohos.ability.particleAbility'
import commonEvent from '@ohos.commonevent' import commonEvent from '@ohos.commonEvent'
const injectRef = Object.getPrototypeOf(global) || global const injectRef = Object.getPrototypeOf(global) || global
injectRef.regeneratorRuntime = require('@babel/runtime/regenerator') injectRef.regeneratorRuntime = require('@babel/runtime/regenerator')
......
...@@ -12,9 +12,9 @@ ...@@ -12,9 +12,9 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import featureAbility from '@ohos.ability.featureability' import featureAbility from '@ohos.ability.featureAbility'
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index' import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index'
import commonEvent from '@ohos.commonevent' import commonEvent from '@ohos.commonEvent'
const START_ABILITY_TIMEOUT = 4000; const START_ABILITY_TIMEOUT = 4000;
var subscriberInfoMultiApp0700 = { var subscriberInfoMultiApp0700 = {
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
* limitations under the License. * limitations under the License.
*/ */
import featureAbility from '@ohos.ability.featureAbility' import featureAbility from '@ohos.ability.featureAbility'
import abilitymanager from '@ohos.app.abilitymanager' import abilityManager from '@ohos.app.abilityManager'
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index' import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index'
const MIN_CLONEUID = 20000000; const MIN_CLONEUID = 20000000;
...@@ -50,7 +50,7 @@ describe('ActsDataAbilityHelperTest', function () { ...@@ -50,7 +50,7 @@ describe('ActsDataAbilityHelperTest', function () {
console.debug("=AMS_MultiApp_0500 dataAbilityUri====>" + dataAbilityUri) console.debug("=AMS_MultiApp_0500 dataAbilityUri====>" + dataAbilityUri)
var cloneFlag = 0; var cloneFlag = 0;
var selfFlag = 0; var selfFlag = 0;
var processInfos = await abilitymanager.getActiveProcessInfos(); var processInfos = await abilityManager.getActiveProcessInfos();
console.info('ActsAmsMultiAppTermination processInfos length' + processInfos.length); console.info('ActsAmsMultiAppTermination processInfos length' + processInfos.length);
for (var i = 0; i < processInfos.length; i++) { for (var i = 0; i < processInfos.length; i++) {
console.info('ActsAmsMultiAppTermination process name ' + processInfos[i].processName); console.info('ActsAmsMultiAppTermination process name ' + processInfos[i].processName);
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
* limitations under the License. * limitations under the License.
*/ */
import featureAbility from '@ohos.ability.featureAbility' import featureAbility from '@ohos.ability.featureAbility'
import abilitymanager from '@ohos.app.abilitymanager' import abilityManager from '@ohos.app.abilityManager'
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index' import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index'
const MIN_CLONEUID = 20000000; const MIN_CLONEUID = 20000000;
...@@ -50,7 +50,7 @@ describe('ActsDataAbilityHelperTest', function () { ...@@ -50,7 +50,7 @@ describe('ActsDataAbilityHelperTest', function () {
console.debug("=AMS_MultiApp_0400 dataAbilityUri====>" + dataAbilityUri) console.debug("=AMS_MultiApp_0400 dataAbilityUri====>" + dataAbilityUri)
var cloneFlag = 0; var cloneFlag = 0;
var selfFlag = 0; var selfFlag = 0;
var processInfos = await abilitymanager.getActiveProcessInfos(); var processInfos = await abilityManager.getActiveProcessInfos();
console.info('ActsAmsMultiAppTermination processInfos length' + processInfos.length); console.info('ActsAmsMultiAppTermination processInfos length' + processInfos.length);
for (var i = 0; i < processInfos.length; i++) { for (var i = 0; i < processInfos.length; i++) {
console.info('ActsAmsMultiAppTermination process name ' + processInfos[i].processName); console.info('ActsAmsMultiAppTermination process name ' + processInfos[i].processName);
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import featureAbility from '@ohos.ability.featureability' import featureAbility from '@ohos.ability.featureAbility'
import bundle from '@ohos.bundle' import bundle from '@ohos.bundle'
import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index' import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index'
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
import featureAbility from '@ohos.ability.featureAbility' import featureAbility from '@ohos.ability.featureAbility'
import wantconstant from '@ohos.ability.wantConstant' import wantconstant from '@ohos.ability.wantConstant'
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index' import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index'
import commonEvent from '@ohos.commonevent' import commonEvent from '@ohos.commonEvent'
import wantConstant from '@ohos.ability.wantConstant' import wantConstant from '@ohos.ability.wantConstant'
const START_ABILITY_TIMEOUT = 4000; const START_ABILITY_TIMEOUT = 4000;
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import commonEvent from '@ohos.commonevent' import commonEvent from '@ohos.commonEvent'
import featureAbility from '@ohos.ability.featureAbility' import featureAbility from '@ohos.ability.featureAbility'
const injectRef = Object.getPrototypeOf(global) || global const injectRef = Object.getPrototypeOf(global) || global
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
* limitations under the License. * limitations under the License.
*/ */
import commonevent from '@ohos.commonevent' import commonEvent from '@ohos.commonEvent'
import featureAbility from '@ohos.ability.featureAbility' import featureAbility from '@ohos.ability.featureAbility'
const injectRef = Object.getPrototypeOf(global) || global const injectRef = Object.getPrototypeOf(global) || global
...@@ -30,7 +30,7 @@ export default { ...@@ -30,7 +30,7 @@ export default {
this.title = this.$t('strings.world'); this.title = this.$t('strings.world');
}, },
async onShow() { async onShow() {
commonevent.publish("ACTS_FinishWithResult_0100_CommonEvent", PublishCallBack); commonEvent.publish("ACTS_FinishWithResult_0100_CommonEvent", PublishCallBack);
var promise = await featureAbility.terminateSelfWithResult( var promise = await featureAbility.terminateSelfWithResult(
{ {
resultCode: 1, resultCode: 1,
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
* limitations under the License. * limitations under the License.
*/ */
import commonEvent from '@ohos.commonevent' import commonEvent from '@ohos.commonEvent'
import featureAbility from '@ohos.ability.featureAbility' import featureAbility from '@ohos.ability.featureAbility'
const injectRef = Object.getPrototypeOf(global) || global const injectRef = Object.getPrototypeOf(global) || global
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import commonEvent from '@ohos.commonevent' import commonEvent from '@ohos.commonEvent'
import featureAbility from '@ohos.ability.featureAbility' import featureAbility from '@ohos.ability.featureAbility'
const injectRef = Object.getPrototypeOf(global) || global const injectRef = Object.getPrototypeOf(global) || global
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import commonEvent from '@ohos.commonevent' import commonEvent from '@ohos.commonEvent'
import featureAbility from '@ohos.ability.featureAbility' import featureAbility from '@ohos.ability.featureAbility'
const injectRef = Object.getPrototypeOf(global) || global const injectRef = Object.getPrototypeOf(global) || global
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
* limitations under the License. * limitations under the License.
*/ */
import commonEvent from '@ohos.commonevent' import commonEvent from '@ohos.commonEvent'
import featureAbility from '@ohos.ability.featureAbility' import featureAbility from '@ohos.ability.featureAbility'
const injectRef = Object.getPrototypeOf(global) || global const injectRef = Object.getPrototypeOf(global) || global
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
* limitations under the License. * limitations under the License.
*/ */
import Subscriber from '@ohos.commonevent' import Subscriber from '@ohos.commonEvent'
export default { export default {
constructor(obj) { constructor(obj) {
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
* limitations under the License. * limitations under the License.
*/ */
import Subscriber from '@ohos.commonevent' import Subscriber from '@ohos.commonEvent'
export default { export default {
constructor(obj) { constructor(obj) {
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
* limitations under the License. * limitations under the License.
*/ */
import Subscriber from '@ohos.commonevent' import Subscriber from '@ohos.commonEvent'
export default { export default {
constructor(obj) { constructor(obj) {
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
* limitations under the License. * limitations under the License.
*/ */
import Subscriber from '@ohos.commonevent' import Subscriber from '@ohos.commonEvent'
export default { export default {
constructor(obj) { constructor(obj) {
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import commonEvent from '@ohos.commonevent' import commonEvent from '@ohos.commonEvent'
const injectRef = Object.getPrototypeOf(global) || global const injectRef = Object.getPrototypeOf(global) || global
injectRef.regeneratorRuntime = require('@babel/runtime/regenerator') injectRef.regeneratorRuntime = require('@babel/runtime/regenerator')
......
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
* limitations under the License. * limitations under the License.
*/ */
import rpc from "@ohos.rpc" import rpc from "@ohos.rpc"
import particleAbility from '@ohos.ability.particleability' import particleAbility from '@ohos.ability.particleAbility'
import commonEvent from '@ohos.commonevent' import commonEvent from '@ohos.commonEvent'
let mMyStub; let mMyStub;
let mMyProxy; let mMyProxy;
......
...@@ -14,9 +14,9 @@ ...@@ -14,9 +14,9 @@
*/ */
import rpc from "@ohos.rpc"; import rpc from "@ohos.rpc";
let mMyStub; let mMyStub;
import particleAbility from '@ohos.ability.particleability' import particleAbility from '@ohos.ability.particleAbility'
import featureAbility from '@ohos.ability.featureAbility' import featureAbility from '@ohos.ability.featureAbility'
import commonEvent from '@ohos.commonevent' import commonEvent from '@ohos.commonEvent'
var serversecond_bundleName = "com.amsst.stserviceabilityserversecond"; var serversecond_bundleName = "com.amsst.stserviceabilityserversecond";
var serversecond_abilityName = "com.amsst.stserviceabilityserversecond.MainAbility"; var serversecond_abilityName = "com.amsst.stserviceabilityserversecond.MainAbility";
var mConnIdJs; var mConnIdJs;
......
...@@ -14,9 +14,9 @@ ...@@ -14,9 +14,9 @@
*/ */
import rpc from "@ohos.rpc"; import rpc from "@ohos.rpc";
let mMyStub; let mMyStub;
import particleAbility from '@ohos.ability.particleability' import particleAbility from '@ohos.ability.particleAbility'
import featureAbility from '@ohos.ability.featureAbility' import featureAbility from '@ohos.ability.featureAbility'
import commonEvent from '@ohos.commonevent' import commonEvent from '@ohos.commonEvent'
var server_bundleName = "com.amsst.stserviceabilityserver"; var server_bundleName = "com.amsst.stserviceabilityserver";
var server_abilityName = "com.amsst.stserviceabilityserver.MainAbility"; var server_abilityName = "com.amsst.stserviceabilityserver.MainAbility";
var mConnIdJs; var mConnIdJs;
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import featureAbility from '@ohos.ability.featureability' import featureAbility from '@ohos.ability.featureAbility'
import wantConstant from '@ohos.ability.wantConstant' import wantConstant from '@ohos.ability.wantConstant'
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index' import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index'
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import featureAbility from '@ohos.ability.featureability' import featureAbility from '@ohos.ability.featureAbility'
var globalWant; var globalWant;
export default { export default {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册