Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
5ee64fcd
X
Xts Acts
项目概览
OpenHarmony
/
Xts Acts
1 年多 前同步成功
通知
9
Star
22
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
X
Xts Acts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
5ee64fcd
编写于
3月 07, 2022
作者:
K
kirl.liu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix codex
Signed-off-by:
N
kirl.liu
<
kirl.liu@huawei.com
>
上级
8ce392f1
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
51 addition
and
45 deletion
+51
-45
aafwk/aafwk_standard/ActsKillProcessWithAccountApi7/ActsKillProcessWithAccountApi7Test/entry/src/main/js/test/ActsProcessManageJsTest.test.js
...st/entry/src/main/js/test/ActsProcessManageJsTest.test.js
+46
-43
aafwk/aafwk_standard/amsprocessmanageapi7/actsprocessmanagejstest/entry/src/main/js/test/ActsProcessManageJsTest.test.js
...st/entry/src/main/js/test/ActsProcessManageJsTest.test.js
+4
-1
aafwk/aafwk_standard/amsprocessmanageapi7/pmvendorappa/src/main/js/default/pages/index/index.js
...pi7/pmvendorappa/src/main/js/default/pages/index/index.js
+0
-1
aafwk/aafwk_standard/lanuageConfigapi7/LanguageConfigTestApi7/entry/src/main/js/test/ActsProcessManageJsTest.test.js
...i7/entry/src/main/js/test/ActsProcessManageJsTest.test.js
+1
-0
未找到文件。
aafwk/aafwk_standard/ActsKillProcessWithAccountApi7/ActsKillProcessWithAccountApi7Test/entry/src/main/js/test/ActsProcessManageJsTest.test.js
浏览文件 @
5ee64fcd
...
...
@@ -13,7 +13,7 @@
* limitations under the License.
*/
import
{
describe
,
beforeAll
,
beforeEach
,
afterEach
,
afterAll
,
it
,
expect
}
from
"
deccjsunit/index
"
import
{
describe
,
beforeAll
,
beforeEach
,
afterEach
,
afterAll
,
it
,
expect
}
from
"
deccjsunit/index
"
import
appManager
from
'
@ohos.application.AppManager
'
;
import
featureAbility
from
'
@ohos.ability.featureAbility
'
...
...
@@ -34,17 +34,20 @@ describe('ActsAbilityTest', function () {
bundleName
:
BUNDLE_NAME
,
abilityName
:
START_ABILITY_NAME
}
}).
then
(
async
()
=>
{
}).
then
(
async
()
=>
{
console
.
log
(
"
====>end ACTS_KillProcessWithAccount startability ====>success!
"
)
done
();
})
})
function
sleep
(
delay
)
{
var
start
=
(
new
Date
()).
getTime
();
while
((
new
Date
()).
getTime
()
-
start
<
delay
)
{
continue
;
function
sleep
(
time
)
{
let
delta
;
if
(
typeof
time
!=
'
number
'
||
time
<=
0
)
{
delta
=
100
;
}
else
{
delta
=
Math
.
round
(
time
);
}
for
(
let
start
=
Date
.
now
();
Date
.
now
()
-
start
<=
delta
;);
}
function
checkRunningProcess
(
name
,
dataInfo
)
{
...
...
@@ -66,24 +69,24 @@ describe('ActsAbilityTest', function () {
var
procrssinfo
=
await
appManager
.
getProcessRunningInfos
()
console
.
log
(
'
ACTS_KillProcessWithAccount_0100 ==1== getProcessRunningInfos ======>
'
+
JSON
.
stringify
(
procrssinfo
));
+
JSON
.
stringify
(
procrssinfo
));
var
infores
=
checkRunningProcess
(
BUNDLE_NAME
,
procrssinfo
)
console
.
log
(
"
====>ACTS_KillProcessWithAccount_0100====>infores =
"
+
infores
)
expect
(
infores
).
assertEqual
(
true
);
await
appManager
.
killProcessWithAccount
(
BUNDLE_NAME
,
ACCOUNT_ID
).
then
(
async
()
=>
{
await
appManager
.
killProcessWithAccount
(
BUNDLE_NAME
,
ACCOUNT_ID
).
then
(
async
()
=>
{
console
.
log
(
'
ACTS_KillProcessWithAccount_0100 killProcess ======> start
'
);
})
setTimeout
(
async
()
=>
{
setTimeout
(
async
()
=>
{
var
copyprocrssinfo
=
await
appManager
.
getProcessRunningInfos
()
console
.
log
(
'
ACTS_KillProcessWithAccount_0100 getProcessRunningInfos ======>
'
+
JSON
.
stringify
(
copyprocrssinfo
));
+
JSON
.
stringify
(
copyprocrssinfo
));
var
outcopy
=
checkRunningProcess
(
BUNDLE_NAME
,
copyprocrssinfo
)
console
.
log
(
"
====>ACTS_KillProcessWithAccount_0100====>outcopy =
"
+
outcopy
)
expect
(
outcopy
).
assertEqual
(
false
);
done
();
},
3000
)
},
3000
)
})
/**
...
...
@@ -95,8 +98,8 @@ describe('ActsAbilityTest', function () {
console
.
debug
(
"
====>ACTS_KillProcessWithAccount_0300 start startAbility====>
"
);
var
getinfo
=
await
appManager
.
getProcessRunningInfos
()
console
.
log
(
'
ACTS_KillProcessWithAccount_0300 getProcessRunningInfos =1= ======>
'
+
JSON
.
stringify
(
getinfo
));
console
.
log
(
'
ACTS_KillProcessWithAccount_0300 getProcessRunningInfos =1= ======>
'
+
JSON
.
stringify
(
getinfo
));
var
res
=
checkRunningProcess
(
BUNDLE_NAME
,
getinfo
)
console
.
log
(
"
====>ACTS_KillProcessWithAccount_0300====>res =
"
+
res
)
expect
(
res
).
assertEqual
(
true
);
...
...
@@ -105,26 +108,26 @@ describe('ActsAbilityTest', function () {
console
.
log
(
'
ACTS_KillProcessWithAccount_0300 ======>
'
);
})
setTimeout
(
async
()
=>
{
setTimeout
(
async
()
=>
{
var
procrssinfo
=
await
appManager
.
getProcessRunningInfos
()
console
.
log
(
'
ACTS_KillProcessWithAccount_0300 ==1== getProcessRunningInfos ======>
'
+
JSON
.
stringify
(
procrssinfo
));
+
JSON
.
stringify
(
procrssinfo
));
var
infores
=
checkRunningProcess
(
BUNDLE_NAME
,
procrssinfo
)
console
.
log
(
"
====>ACTS_KillProcessWithAccount_0300====>infores =
"
+
infores
)
expect
(
infores
).
assertEqual
(
true
);
await
appManager
.
killProcessWithAccount
(
BUNDLE_NAME
,
ACCOUNT_ID
).
then
(
async
()
=>
{
await
appManager
.
killProcessWithAccount
(
BUNDLE_NAME
,
ACCOUNT_ID
).
then
(
async
()
=>
{
console
.
log
(
'
ACTS_KillProcessWithAccount_0300 killProcess ======> start
'
);
sleep
(
500
)
var
copyprocrssinfo
=
await
appManager
.
getProcessRunningInfos
()
console
.
log
(
'
ACTS_KillProcessWithAccount_0300 getProcessRunningInfos ======>
'
+
JSON
.
stringify
(
copyprocrssinfo
));
+
JSON
.
stringify
(
copyprocrssinfo
));
var
outcopy
=
checkRunningProcess
(
BUNDLE_NAME
,
copyprocrssinfo
)
console
.
log
(
"
====>ACTS_KillProcessWithAccount_0300====> outcopy =
"
+
outcopy
)
expect
(
outcopy
).
assertEqual
(
false
);
done
();
})
},
1500
)
},
1500
)
})
/**
...
...
@@ -137,7 +140,7 @@ describe('ActsAbilityTest', function () {
var
getinfo
=
await
appManager
.
getProcessRunningInfos
()
console
.
log
(
'
ACTS_KillProcessWithAccount_0400 getProcessRunningInfos =1= ======>
'
+
JSON
.
stringify
(
getinfo
));
+
JSON
.
stringify
(
getinfo
));
var
res
=
checkRunningProcess
(
BUNDLE_NAME
,
getinfo
)
console
.
log
(
"
====>ACTS_KillProcessWithAccount_0400====>res =
"
+
res
)
expect
(
res
).
assertEqual
(
true
);
...
...
@@ -146,27 +149,27 @@ describe('ActsAbilityTest', function () {
console
.
log
(
'
ACTS_KillProcessWithAccount_0400 killProcess ======> start
'
);
})
setTimeout
(
async
()
=>
{
setTimeout
(
async
()
=>
{
var
procrssinfo
=
await
appManager
.
getProcessRunningInfos
()
console
.
log
(
'
ACTS_KillProcessWithAccount_0400 ==1== getProcessRunningInfos ======>
'
+
JSON
.
stringify
(
procrssinfo
));
+
JSON
.
stringify
(
procrssinfo
));
var
infores
=
checkRunningProcess
(
BUNDLE_NAME
,
procrssinfo
)
console
.
log
(
"
====>ACTS_KillProcessWithAccount_0400====>infores =
"
+
infores
)
expect
(
infores
).
assertEqual
(
true
);
appManager
.
killProcessWithAccount
(
BUNDLE_NAME
,
ACCOUNT_ID
).
then
(
async
()
=>
{
appManager
.
killProcessWithAccount
(
BUNDLE_NAME
,
ACCOUNT_ID
).
then
(
async
()
=>
{
console
.
log
(
'
ACTS_KillProcessWithAccount_0400 killProcess2 ======> start
'
);
sleep
(
500
)
var
copyprocrssinfo
=
await
appManager
.
getProcessRunningInfos
()
console
.
log
(
'
ACTS_KillProcessWithAccount_0400 ==2== getProcessRunningInfos ======>
'
+
JSON
.
stringify
(
copyprocrssinfo
));
+
JSON
.
stringify
(
copyprocrssinfo
));
var
out
=
checkRunningProcess
(
BUNDLE_NAME
,
copyprocrssinfo
)
console
.
log
(
"
====>ACTS_KillProcessWithAccount_0400====>infores =
"
+
out
)
expect
(
out
).
assertEqual
(
false
);
done
();
})
},
1500
)
},
1500
)
})
/**
...
...
@@ -179,24 +182,24 @@ describe('ActsAbilityTest', function () {
var
procrssinfo
=
await
appManager
.
getProcessRunningInfos
()
console
.
log
(
'
ACTS_KillProcessWithAccount_0500 ==1== getProcessRunningInfos ======>
'
+
JSON
.
stringify
(
procrssinfo
));
+
JSON
.
stringify
(
procrssinfo
));
var
infores
=
checkRunningProcess
(
BUNDLE_NAME
,
procrssinfo
)
console
.
log
(
"
====>ACTS_KillProcessWithAccount_0500====>infores =
"
+
infores
)
expect
(
infores
).
assertEqual
(
true
);
await
appManager
.
killProcessWithAccount
(
BUNDLE_NAME
,
ACCOUNT_ID
,
(
async
()
=>
{
await
appManager
.
killProcessWithAccount
(
BUNDLE_NAME
,
ACCOUNT_ID
,
(
async
()
=>
{
console
.
log
(
'
ACTS_KillProcessWithAccount_0500 killProcess ======> start
'
);
}))
setTimeout
(
async
()
=>
{
setTimeout
(
async
()
=>
{
var
copyprocrssinfo
=
await
appManager
.
getProcessRunningInfos
()
console
.
log
(
'
ACTS_KillProcessWithAccount_0500 getProcessRunningInfos ======>
'
+
JSON
.
stringify
(
copyprocrssinfo
));
+
JSON
.
stringify
(
copyprocrssinfo
));
var
outcopy
=
checkRunningProcess
(
BUNDLE_NAME
,
copyprocrssinfo
)
console
.
log
(
"
====>ACTS_KillProcessWithAccount_0500====>outcopy =
"
+
outcopy
)
expect
(
outcopy
).
assertEqual
(
false
);
done
();
},
3000
)
},
3000
)
})
/**
...
...
@@ -209,35 +212,35 @@ describe('ActsAbilityTest', function () {
var
getinfo
=
await
appManager
.
getProcessRunningInfos
()
console
.
log
(
'
ACTS_KillProcessWithAccount_0700 getProcessRunningInfos =1= ======>
'
+
JSON
.
stringify
(
getinfo
));
+
JSON
.
stringify
(
getinfo
));
var
res
=
checkRunningProcess
(
BUNDLE_NAME
,
getinfo
)
console
.
log
(
"
====>ACTS_KillProcessWithAccount_0700====>res =
"
+
res
)
expect
(
res
).
assertEqual
(
true
);
appManager
.
killProcessWithAccount
(
NULL_BUNDLE_NAME
,
ACCOUNT_ID
,
(()
=>
{
appManager
.
killProcessWithAccount
(
NULL_BUNDLE_NAME
,
ACCOUNT_ID
,
(()
=>
{
console
.
log
(
'
ACTS_KillProcessWithAccount_0700 killProcess ======> start
'
);
}))
setTimeout
(
async
()
=>
{
setTimeout
(
async
()
=>
{
var
procrssinfo
=
await
appManager
.
getProcessRunningInfos
()
console
.
log
(
'
ACTS_KillProcessWithAccount_0700 ==1== getProcessRunningInfos ======>
'
+
JSON
.
stringify
(
procrssinfo
));
+
JSON
.
stringify
(
procrssinfo
));
var
infores
=
checkRunningProcess
(
BUNDLE_NAME
,
procrssinfo
)
console
.
log
(
"
====>ACTS_KillProcessWithAccount_0700====>infores =
"
+
infores
)
expect
(
infores
).
assertEqual
(
true
);
await
appManager
.
killProcessWithAccount
(
BUNDLE_NAME
,
ACCOUNT_ID
).
then
(
async
()
=>
{
await
appManager
.
killProcessWithAccount
(
BUNDLE_NAME
,
ACCOUNT_ID
).
then
(
async
()
=>
{
console
.
log
(
'
ACTS_KillProcessWithAccount_0700 killProcess ======> start
'
);
sleep
(
500
)
var
copyprocrssinfo
=
await
appManager
.
getProcessRunningInfos
()
console
.
log
(
'
ACTS_KillProcessWithAccount_0700 getProcessRunningInfos ======>
'
+
JSON
.
stringify
(
copyprocrssinfo
));
+
JSON
.
stringify
(
copyprocrssinfo
));
var
outcopy
=
checkRunningProcess
(
BUNDLE_NAME
,
copyprocrssinfo
)
console
.
log
(
"
====>ACTS_KillProcessWithAccount_0700====> outcopy =
"
+
outcopy
)
expect
(
outcopy
).
assertEqual
(
false
);
done
();
})
},
1500
)
},
1500
)
})
/**
...
...
@@ -250,35 +253,35 @@ describe('ActsAbilityTest', function () {
var
getinfo
=
await
appManager
.
getProcessRunningInfos
()
console
.
log
(
'
ACTS_KillProcessWithAccount_0800 getProcessRunningInfos =1= ======>
'
+
JSON
.
stringify
(
getinfo
));
+
JSON
.
stringify
(
getinfo
));
var
res
=
checkRunningProcess
(
BUNDLE_NAME
,
getinfo
)
console
.
log
(
"
====>ACTS_KillProcessWithAccount_0800====>res =
"
+
res
)
expect
(
res
).
assertEqual
(
true
);
appManager
.
killProcessWithAccount
(
BUNDLE_NAME
,
NULL_ACCOUNT_ID
,(()
=>
{
appManager
.
killProcessWithAccount
(
BUNDLE_NAME
,
NULL_ACCOUNT_ID
,
(()
=>
{
console
.
log
(
'
ACTS_KillProcessWithAccount_0800 killProcess ======> start
'
);
}))
setTimeout
(
async
()
=>
{
setTimeout
(
async
()
=>
{
var
procrssinfo
=
await
appManager
.
getProcessRunningInfos
()
console
.
log
(
'
ACTS_KillProcessWithAccount_0800 ==1== getProcessRunningInfos ======>
'
+
JSON
.
stringify
(
procrssinfo
));
+
JSON
.
stringify
(
procrssinfo
));
var
infores
=
checkRunningProcess
(
BUNDLE_NAME
,
procrssinfo
)
console
.
log
(
"
====>ACTS_KillProcessWithAccount_0800====>infores =
"
+
infores
)
expect
(
infores
).
assertEqual
(
true
);
await
appManager
.
killProcessWithAccount
(
BUNDLE_NAME
,
ACCOUNT_ID
).
then
(
async
()
=>
{
await
appManager
.
killProcessWithAccount
(
BUNDLE_NAME
,
ACCOUNT_ID
).
then
(
async
()
=>
{
console
.
log
(
'
ACTS_KillProcessWithAccount_0800 killProcess ======> start
'
);
sleep
(
500
)
var
copyprocrssinfo
=
await
appManager
.
getProcessRunningInfos
()
console
.
log
(
'
ACTS_KillProcessWithAccount_0800 getProcessRunningInfos ======>
'
+
JSON
.
stringify
(
copyprocrssinfo
));
+
JSON
.
stringify
(
copyprocrssinfo
));
var
outcopy
=
checkRunningProcess
(
BUNDLE_NAME
,
copyprocrssinfo
)
console
.
log
(
"
====>ACTS_KillProcessWithAccount_0800====> outcopy =
"
+
outcopy
)
expect
(
outcopy
).
assertEqual
(
false
);
done
();
})
},
1500
)
},
1500
)
})
})
\ No newline at end of file
aafwk/aafwk_standard/amsprocessmanageapi7/actsprocessmanagejstest/entry/src/main/js/test/ActsProcessManageJsTest.test.js
浏览文件 @
5ee64fcd
...
...
@@ -21,7 +21,8 @@ import file from '@system.file'
import
bundle
from
'
@ohos.bundle
'
import
{
describe
,
beforeAll
,
beforeEach
,
afterEach
,
afterAll
,
it
,
expect
}
from
'
deccjsunit/index
'
const
BUNDLE_PATHS
=
[[
'
/data/ActsAmsProcessManageSystemAppAApi7.hap
'
,
'
/data/ActsAmsProcessManageSystemAppAMultiApi7.hap
'
],
const
BUNDLE_PATHS
=
[[
'
/data/ActsAmsProcessManageSystemAppAApi7.hap
'
,
'
/data/ActsAmsProcessManageSystemAppAMultiApi7.hap
'
],
[
'
/data/ActsAmsProcessManageSystemAppBApi7.hap
'
],
[
'
/data/ActsAmsProcessManageVendorAppAApi7.hap
'
]];
const
BUNDLE_NAMES
=
[
'
com.acts.pmsystemappaapi7
'
,
...
...
@@ -1290,6 +1291,7 @@ describe('ActsAmsProcessManageJsTestApi7', function () {
done
();
});
})
/*
* @tc.number: ACTS_ProcessManage_clearUpApplicationData_1100
* @tc.name: Parameter is undefined
...
...
@@ -1311,6 +1313,7 @@ describe('ActsAmsProcessManageJsTestApi7', function () {
done
();
}
})
/*
* @tc.number: ACTS_ProcessManage_clearUpApplicationData_1200
* @tc.name: Stop an application that doesn't exist
...
...
aafwk/aafwk_standard/amsprocessmanageapi7/pmvendorappa/src/main/js/default/pages/index/index.js
浏览文件 @
5ee64fcd
...
...
@@ -13,7 +13,6 @@
* limitations under the License.
*/
import
commonEvent
from
'
@ohos.commonevent
'
// import abilityManager from '@ohos.app.abilityManager'
import
abilityManager
from
'
@ohos.application.appManager
'
import
featureAbility
from
'
@ohos.ability.featureability
'
...
...
aafwk/aafwk_standard/lanuageConfigapi7/LanguageConfigTestApi7/entry/src/main/js/test/ActsProcessManageJsTest.test.js
浏览文件 @
5ee64fcd
...
...
@@ -95,6 +95,7 @@ describe('ActsAbilityTest', function () {
})
}
})
/*
* @tc.number: AMS_UpdateConfiguration_0100
* @tc.name: Connects a service ability, which is used to start a cloned page ability.
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录