Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
da82d42c
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看板
未验证
提交
da82d42c
编写于
3月 01, 2022
作者:
O
openharmony_ci
提交者:
Gitee
3月 01, 2022
浏览文件
操作
浏览文件
下载
差异文件
!2130 xts测试套大小写整改
Merge pull request !2130 from chengxingzhen/master
上级
b0de66ba
10a68be7
变更
52
隐藏空白更改
内联
并排
Showing
52 changed file
with
239 addition
and
239 deletion
+239
-239
aafwk/aafwk_standard/abilitymanager/actsamscallbackfifthscene/entry/src/main/js/test/MangerAbilityJsunit.test.js
...hscene/entry/src/main/js/test/MangerAbilityJsunit.test.js
+17
-17
aafwk/aafwk_standard/abilitymanager/actsamscallbackfirstscene/entry/src/main/js/test/MangerAbilityJsunit.test.js
...tscene/entry/src/main/js/test/MangerAbilityJsunit.test.js
+17
-17
aafwk/aafwk_standard/abilitymanager/actsamscallbackfourthscene/entry/src/main/js/test/MangerAbilityJsunit.test.js
...hscene/entry/src/main/js/test/MangerAbilityJsunit.test.js
+17
-17
aafwk/aafwk_standard/abilitymanager/actsamscallbacksecondscene/entry/src/main/js/test/MangerAbilityJsunit.test.js
...dscene/entry/src/main/js/test/MangerAbilityJsunit.test.js
+17
-17
aafwk/aafwk_standard/abilitymanager/actsamscallbackthirdscene/entry/src/main/js/test/MangerAbilityJsunit.test.js
...dscene/entry/src/main/js/test/MangerAbilityJsunit.test.js
+17
-17
aafwk/aafwk_standard/abilitymanager/actsamstestfifthscene/entry/src/main/js/test/MangerAbilityJsunit.test.js
...hscene/entry/src/main/js/test/MangerAbilityJsunit.test.js
+16
-16
aafwk/aafwk_standard/abilitymanager/actsamstestfirstscene/entry/src/main/js/test/MangerAbilityJsunit.test.js
...tscene/entry/src/main/js/test/MangerAbilityJsunit.test.js
+17
-17
aafwk/aafwk_standard/abilitymanager/actsamstestfourthscene/entry/src/main/js/test/MangerAbilityJsunit.test.js
...hscene/entry/src/main/js/test/MangerAbilityJsunit.test.js
+17
-17
aafwk/aafwk_standard/abilitymanager/actsamstestsecondscene/entry/src/main/js/test/MangerAbilityJsunit.test.js
...dscene/entry/src/main/js/test/MangerAbilityJsunit.test.js
+17
-17
aafwk/aafwk_standard/abilitymanager/actsamstestthirdscene/entry/src/main/js/test/MangerAbilityJsunit.test.js
...dscene/entry/src/main/js/test/MangerAbilityJsunit.test.js
+17
-17
aafwk/aafwk_standard/abilitymanager/clearmissionscallback/src/main/js/test/MangerAbilityJsunit.test.js
...ionscallback/src/main/js/test/MangerAbilityJsunit.test.js
+3
-3
aafwk/aafwk_standard/abilitymanager/clearmissionspromise/src/main/js/test/MangerAbilityJsunit.test.js
...sionspromise/src/main/js/test/MangerAbilityJsunit.test.js
+3
-3
aafwk/aafwk_standard/amsabilitymanager/amsMissionSnapshotTest/entry/src/main/js/test/amsMissionSnapshotTest.test.js
...est/entry/src/main/js/test/amsMissionSnapshotTest.test.js
+2
-2
aafwk/aafwk_standard/amsabilitymanager/amsMissionSnapshotTestSingleton/entry/src/main/js/default/pages/index/index.js
...tSingleton/entry/src/main/js/default/pages/index/index.js
+1
-1
aafwk/aafwk_standard/amsabilitymanager/amsMissionSnapshotTestSingletonS/entry/src/main/js/default/pages/index/index.js
...SingletonS/entry/src/main/js/default/pages/index/index.js
+1
-1
aafwk/aafwk_standard/amsdatauriutils/entry/src/main/js/test/DataUriUtilsJsSt.test.js
...auriutils/entry/src/main/js/test/DataUriUtilsJsSt.test.js
+1
-1
aafwk/aafwk_standard/amsmultiapp/MultiAppPage/entry/src/main/js/test/MangerAbilityJsunit.test.js
...ppPage/entry/src/main/js/test/MangerAbilityJsunit.test.js
+2
-2
aafwk/aafwk_standard/amsmultiapp/MultiAppPageConnectService/entry/src/main/js/test/MangerAbilityJsunit.test.js
...ervice/entry/src/main/js/test/MangerAbilityJsunit.test.js
+2
-2
aafwk/aafwk_standard/amsmultiapp/MultiAppPageConnect_Service/entry/src/main/js/default/pages/index/index.js
...ct_Service/entry/src/main/js/default/pages/index/index.js
+2
-2
aafwk/aafwk_standard/amsmultiapp/MultiAppPagePermission/entry/src/main/js/test/MangerAbilityJsunit.test.js
...ission/entry/src/main/js/test/MangerAbilityJsunit.test.js
+2
-2
aafwk/aafwk_standard/amsmultiapp/MultiAppPagePermission_Page/entry/src/main/js/default/pages/index/index.js
...ssion_Page/entry/src/main/js/default/pages/index/index.js
+1
-1
aafwk/aafwk_standard/amsmultiapp/MultiAppPage_PSS/entry/src/main/js/test/MangerAbilityJsunit.test.js
...ge_PSS/entry/src/main/js/test/MangerAbilityJsunit.test.js
+2
-2
aafwk/aafwk_standard/amsmultiapp/MultiAppPage_Page/entry/src/main/js/test/MangerAbilityJsunit.test.js
...e_Page/entry/src/main/js/test/MangerAbilityJsunit.test.js
+1
-1
aafwk/aafwk_standard/amsmultiapp/MultiAppPage_Service/entry/src/main/js/default/pages/index/index.js
...ge_Service/entry/src/main/js/default/pages/index/index.js
+2
-2
aafwk/aafwk_standard/amsmultiapp/MultiAppSimultaneousOnline/entry/src/main/js/test/MangerAbilityJsunit.test.js
...Online/entry/src/main/js/test/MangerAbilityJsunit.test.js
+3
-3
aafwk/aafwk_standard/amsmultiapp/MultiAppSimultaneousOnline_test/entry/src/main/js/test/MangerAbilityJsunit.test.js
...e_test/entry/src/main/js/test/MangerAbilityJsunit.test.js
+2
-2
aafwk/aafwk_standard/amsmultiapp/MultiAppTermination/entry/src/main/js/test/MangerAbilityJsunit.test.js
...nation/entry/src/main/js/test/MangerAbilityJsunit.test.js
+4
-4
aafwk/aafwk_standard/amsmultiapp/MultiAppTermination_test/entry/src/main/js/test/MangerAbilityJsunit.test.js
...n_test/entry/src/main/js/test/MangerAbilityJsunit.test.js
+2
-2
aafwk/aafwk_standard/amsmultiapp/amsmultiapppageexecutor/src/main/js/default/pages/index/index.js
...iapppageexecutor/src/main/js/default/pages/index/index.js
+2
-2
aafwk/aafwk_standard/amsmultiapp/amsmultiappserviceexecutor/src/main/js/default/pages/index/index.js
...pserviceexecutor/src/main/js/default/pages/index/index.js
+2
-2
aafwk/aafwk_standard/amsmultiapp/amsmultiappservicestarter/src/main/js/default/pages/index/index.js
...ppservicestarter/src/main/js/default/pages/index/index.js
+2
-2
aafwk/aafwk_standard/amsmultiapp/amsmultiapptester/entry/src/main/js/test/MangerAbilityJsunit.test.js
...tester/entry/src/main/js/test/MangerAbilityJsunit.test.js
+2
-2
aafwk/aafwk_standard/amsmultiapp/amsmultidataabilityclone/entry/src/main/js/test/MultiDataAbilityJsSt.test.js
...clone/entry/src/main/js/test/MultiDataAbilityJsSt.test.js
+2
-2
aafwk/aafwk_standard/amsmultiapp/amsmultidataabilityself/entry/src/main/js/test/MultiDataAbilityJsSt.test.js
...yself/entry/src/main/js/test/MultiDataAbilityJsSt.test.js
+2
-2
aafwk/aafwk_standard/context/actscontexttest/entry/src/main/js/test/ContextJsunit.test.js
...scontexttest/entry/src/main/js/test/ContextJsunit.test.js
+1
-1
aafwk/aafwk_standard/featureability/actsfeatureabilitytest/entry/src/main/js/test/FeatureAbilityJsunit.test.js
...ytest/entry/src/main/js/test/FeatureAbilityJsunit.test.js
+1
-1
aafwk/aafwk_standard/featureability/sceneproject/finishwithresultemptytest/src/main/js/default/pages/index/index.js
...hresultemptytest/src/main/js/default/pages/index/index.js
+1
-1
aafwk/aafwk_standard/featureability/sceneproject/finishwithresultpromiseparameterstest/src/main/js/default/pages/index/index.js
...separameterstest/src/main/js/default/pages/index/index.js
+2
-2
aafwk/aafwk_standard/featureability/sceneproject/finishwithresulttest/src/main/js/default/pages/index/index.js
...shwithresulttest/src/main/js/default/pages/index/index.js
+1
-1
aafwk/aafwk_standard/featureability/sceneproject/getcallingbundletest/src/main/js/default/pages/index/index.js
...allingbundletest/src/main/js/default/pages/index/index.js
+1
-1
aafwk/aafwk_standard/featureability/sceneproject/startability/src/main/js/default/pages/index/index.js
...ect/startability/src/main/js/default/pages/index/index.js
+1
-1
aafwk/aafwk_standard/featureability/sceneproject/terminateabilitytest/src/main/js/default/pages/index/index.js
...inateabilitytest/src/main/js/default/pages/index/index.js
+1
-1
aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicea/src/main/js/default/app.js
...service/formsystemtestservicea/src/main/js/default/app.js
+1
-1
aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviceb/src/main/js/default/app.js
...service/formsystemtestserviceb/src/main/js/default/app.js
+1
-1
aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicec/src/main/js/default/app.js
...service/formsystemtestservicec/src/main/js/default/app.js
+1
-1
aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviced/src/main/js/default/app.js
...service/formsystemtestserviced/src/main/js/default/app.js
+1
-1
aafwk/aafwk_standard/serviceability/sceneProject/particlestartability/src/main/js/default/pages/index/index.js
...iclestartability/src/main/js/default/pages/index/index.js
+1
-1
aafwk/aafwk_standard/serviceability/sceneProject/particletestserver/src/main/js/default/pages/index/index.js
...rticletestserver/src/main/js/default/pages/index/index.js
+2
-2
aafwk/aafwk_standard/serviceability/stserviceabilityserver/entry/src/main/js/default/pages/index/index.js
...lityserver/entry/src/main/js/default/pages/index/index.js
+2
-2
aafwk/aafwk_standard/serviceability/stserviceabilityserversecond/entry/src/main/js/default/pages/index/index.js
...rversecond/entry/src/main/js/default/pages/index/index.js
+2
-2
aafwk/aafwk_standard/want/actsgetwantalltest/entry/src/main/js/test/ActsGetWantAllTest.js
...twantalltest/entry/src/main/js/test/ActsGetWantAllTest.js
+1
-1
aafwk/aafwk_standard/want/sceneProject/actsgetwantalltesthap/src/main/js/default/pages/index/index.js
...etwantalltesthap/src/main/js/default/pages/index/index.js
+1
-1
未找到文件。
aafwk/aafwk_standard/abilitymanager/actsamscallbackfifthscene/entry/src/main/js/test/MangerAbilityJsunit.test.js
浏览文件 @
da82d42c
...
@@ -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.feature
a
bility
'
import
featureAbility
from
'
@ohos.ability.feature
A
bility
'
import
ability
manager
from
'
@ohos.app.abilitym
anager
'
import
ability
Manager
from
'
@ohos.app.abilityM
anager
'
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
ability
m
anager
.
queryRecentAbilityMissionInfos
(
maxnum
,
flag
);
var
data
=
await
ability
M
anager
.
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
=
ability
m
anager
.
removeMission
(
data
[
i
].
id
);
var
info
=
ability
M
anager
.
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
"
);
ability
m
anager
.
getAllRunningProcesses
(
ability
M
anager
.
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
;
ability
m
anager
.
queryRecentAbilityMissionInfos
(
maxnum
,
flag
,
ability
M
anager
.
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
;
ability
m
anager
.
queryRunningAbilityMissionInfos
(
maxnum
,
ability
M
anager
.
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
)
{
ability
m
anager
.
getActiveProcessInfos
(
ability
M
anager
.
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
;
ability
m
anager
.
getActiveAbilityMissionInfos
(
maxnum
,
ability
M
anager
.
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
;
ability
m
anager
.
getPreviousAbilityMissionInfos
(
maxnum
,
ability
M
anager
.
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
ability
m
anager
.
queryRunningAbilityMissionInfos
(
maxnum
);
var
result
=
await
ability
M
anager
.
queryRunningAbilityMissionInfos
(
maxnum
);
ability
m
anager
.
removeMission
(
result
[
1
].
id
,
ability
M
anager
.
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
ability
m
anager
.
queryRunningAbilityMissionInfos
(
maxnum
);
var
result
=
await
ability
M
anager
.
queryRunningAbilityMissionInfos
(
maxnum
);
ability
m
anager
.
moveMissionToTop
(
result
[
0
].
id
,
ability
M
anager
.
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
ability
m
anager
.
queryRunningAbilityMissionInfos
(
maxnum
);
var
result
=
await
ability
M
anager
.
queryRunningAbilityMissionInfos
(
maxnum
);
ability
m
anager
.
deleteMissions
([
result
[
0
].
id
],
ability
M
anager
.
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
)
{
ability
m
anager
.
killProcessesByBundleName
(
'
com.ix.verify.io
'
,
ability
M
anager
.
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
+
'
]
'
);
...
...
aafwk/aafwk_standard/abilitymanager/actsamscallbackfirstscene/entry/src/main/js/test/MangerAbilityJsunit.test.js
浏览文件 @
da82d42c
...
@@ -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.feature
a
bility
'
import
featureAbility
from
'
@ohos.ability.feature
A
bility
'
import
ability
manager
from
'
@ohos.app.abilitym
anager
'
import
ability
Manager
from
'
@ohos.app.abilityM
anager
'
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
ability
m
anager
.
queryRecentAbilityMissionInfos
(
maxnum
,
flag
);
var
data
=
await
ability
M
anager
.
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
=
ability
m
anager
.
removeMission
(
data
[
i
].
id
);
var
info
=
ability
M
anager
.
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
"
);
ability
m
anager
.
getAllRunningProcesses
(
ability
M
anager
.
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
;
ability
m
anager
.
queryRunningAbilityMissionInfos
(
maxnum
,
ability
M
anager
.
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
;
ability
m
anager
.
queryRecentAbilityMissionInfos
(
maxnum
,
flag
,
ability
M
anager
.
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
)
{
ability
m
anager
.
getActiveProcessInfos
(
ability
M
anager
.
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
;
ability
m
anager
.
getActiveAbilityMissionInfos
(
maxnum
,
ability
M
anager
.
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
;
ability
m
anager
.
getPreviousAbilityMissionInfos
(
maxnum
,
ability
M
anager
.
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
ability
m
anager
.
queryRunningAbilityMissionInfos
(
maxnum
);
var
result
=
await
ability
M
anager
.
queryRunningAbilityMissionInfos
(
maxnum
);
var
missionID
=
result
[
0
].
id
+
100
;
var
missionID
=
result
[
0
].
id
+
100
;
ability
m
anager
.
removeMissions
([
missionID
],
ability
M
anager
.
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
ability
m
anager
.
queryRunningAbilityMissionInfos
(
maxnum
);
var
result
=
await
ability
M
anager
.
queryRunningAbilityMissionInfos
(
maxnum
);
ability
m
anager
.
removeMission
(
result
[
0
].
id
,
ability
M
anager
.
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
)
{
ability
m
anager
.
killProcessesByBundleName
(
'
com.ix.simulate.feature
'
,
ability
M
anager
.
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
ability
m
anager
.
queryRunningAbilityMissionInfos
(
maxnum
);
var
result
=
await
ability
M
anager
.
queryRunningAbilityMissionInfos
(
maxnum
);
ability
m
anager
.
moveMissionToTop
(
result
[
0
].
id
,
ability
M
anager
.
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
+
'
]
'
);
...
...
aafwk/aafwk_standard/abilitymanager/actsamscallbackfourthscene/entry/src/main/js/test/MangerAbilityJsunit.test.js
浏览文件 @
da82d42c
...
@@ -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.feature
a
bility
'
import
featureAbility
from
'
@ohos.ability.feature
A
bility
'
import
ability
manager
from
'
@ohos.app.abilitym
anager
'
import
ability
Manager
from
'
@ohos.app.abilityM
anager
'
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
ability
m
anager
.
queryRecentAbilityMissionInfos
(
maxnum
,
flag
);
var
data
=
await
ability
M
anager
.
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
=
ability
m
anager
.
removeMission
(
data
[
i
].
id
);
var
info
=
ability
M
anager
.
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
"
);
ability
m
anager
.
getAllRunningProcesses
(
ability
M
anager
.
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
;
ability
m
anager
.
queryRecentAbilityMissionInfos
(
maxnum
,
flag
,
ability
M
anager
.
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
;
ability
m
anager
.
queryRunningAbilityMissionInfos
(
maxnum
,
ability
M
anager
.
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
)
{
ability
m
anager
.
getActiveProcessInfos
(
ability
M
anager
.
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
;
ability
m
anager
.
getActiveAbilityMissionInfos
(
maxnum
,
ability
M
anager
.
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
;
ability
m
anager
.
getPreviousAbilityMissionInfos
(
maxnum
,
ability
M
anager
.
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
ability
m
anager
.
queryRunningAbilityMissionInfos
(
maxnum
);
var
result
=
await
ability
M
anager
.
queryRunningAbilityMissionInfos
(
maxnum
);
ability
m
anager
.
removeMission
(
result
[
0
].
id
,
ability
M
anager
.
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
ability
m
anager
.
queryRunningAbilityMissionInfos
(
maxnum
);
var
result
=
await
ability
M
anager
.
queryRunningAbilityMissionInfos
(
maxnum
);
ability
m
anager
.
moveMissionToTop
(
result
[
1
].
id
,
ability
M
anager
.
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
)
{
ability
m
anager
.
killProcessesByBundleName
(
'
xxxxxxxxx
'
,
ability
M
anager
.
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
ability
m
anager
.
queryRunningAbilityMissionInfos
(
maxnum
);
var
result
=
await
ability
M
anager
.
queryRunningAbilityMissionInfos
(
maxnum
);
ability
m
anager
.
deleteMissions
([
result
[
1
].
id
,
result
[
0
].
id
],
ability
M
anager
.
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
+
'
]
'
);
...
...
aafwk/aafwk_standard/abilitymanager/actsamscallbacksecondscene/entry/src/main/js/test/MangerAbilityJsunit.test.js
浏览文件 @
da82d42c
...
@@ -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.feature
a
bility
'
import
featureAbility
from
'
@ohos.ability.feature
A
bility
'
import
ability
manager
from
'
@ohos.app.abilitym
anager
'
import
ability
Manager
from
'
@ohos.app.abilityM
anager
'
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
ability
m
anager
.
queryRecentAbilityMissionInfos
(
maxnum
,
flag
);
var
data
=
await
ability
M
anager
.
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
=
ability
m
anager
.
removeMission
(
data
[
i
].
id
);
var
info
=
ability
M
anager
.
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
"
);
ability
m
anager
.
getAllRunningProcesses
(
ability
M
anager
.
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
;
ability
m
anager
.
queryRunningAbilityMissionInfos
(
maxnum
,
ability
M
anager
.
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
;
ability
m
anager
.
queryRecentAbilityMissionInfos
(
maxnum
,
flag
,
ability
M
anager
.
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
)
{
ability
m
anager
.
getActiveProcessInfos
(
ability
M
anager
.
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
;
ability
m
anager
.
getActiveAbilityMissionInfos
(
maxnum
,
ability
M
anager
.
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
;
ability
m
anager
.
getPreviousAbilityMissionInfos
(
maxnum
,
ability
M
anager
.
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
ability
m
anager
.
queryRunningAbilityMissionInfos
(
maxnum
);
var
result
=
await
ability
M
anager
.
queryRunningAbilityMissionInfos
(
maxnum
);
ability
m
anager
.
removeMission
(
result
[
1
].
id
,
ability
M
anager
.
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
ability
m
anager
.
queryRunningAbilityMissionInfos
(
maxnum
);
var
result
=
await
ability
M
anager
.
queryRunningAbilityMissionInfos
(
maxnum
);
ability
m
anager
.
moveMissionToTop
(
result
[
0
].
id
,
ability
M
anager
.
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
)
{
ability
m
anager
.
killProcessesByBundleName
(
'
XXXXXXXXXXXX
'
,
ability
M
anager
.
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
ability
m
anager
.
queryRunningAbilityMissionInfos
(
maxnum
);
var
result
=
await
ability
M
anager
.
queryRunningAbilityMissionInfos
(
maxnum
);
ability
m
anager
.
removeMissions
([
result
[
0
].
id
],
ability
M
anager
.
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
+
'
]
'
);
...
...
aafwk/aafwk_standard/abilitymanager/actsamscallbackthirdscene/entry/src/main/js/test/MangerAbilityJsunit.test.js
浏览文件 @
da82d42c
...
@@ -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.feature
a
bility
'
import
featureAbility
from
'
@ohos.ability.feature
A
bility
'
import
ability
manager
from
'
@ohos.app.abilitym
anager
'
import
ability
Manager
from
'
@ohos.app.abilityM
anager
'
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
ability
m
anager
.
queryRecentAbilityMissionInfos
(
maxnum
,
flag
);
var
data
=
await
ability
M
anager
.
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
=
ability
m
anager
.
removeMission
(
data
[
i
].
id
);
var
info
=
ability
M
anager
.
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
"
);
ability
m
anager
.
getAllRunningProcesses
(
ability
M
anager
.
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
;
ability
m
anager
.
queryRunningAbilityMissionInfos
(
maxnum
,
ability
M
anager
.
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
;
ability
m
anager
.
queryRecentAbilityMissionInfos
(
maxnum
,
flag
,
ability
M
anager
.
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
)
{
ability
m
anager
.
getActiveProcessInfos
(
ability
M
anager
.
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
;
ability
m
anager
.
getActiveAbilityMissionInfos
(
maxnum
,
ability
M
anager
.
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
;
ability
m
anager
.
getPreviousAbilityMissionInfos
(
maxnum
,
ability
M
anager
.
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
ability
m
anager
.
queryRunningAbilityMissionInfos
(
maxnum
);
var
result
=
await
ability
M
anager
.
queryRunningAbilityMissionInfos
(
maxnum
);
ability
m
anager
.
removeMission
(
result
[
1
].
id
,
ability
M
anager
.
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
ability
m
anager
.
queryRunningAbilityMissionInfos
(
maxnum
);
var
result
=
await
ability
M
anager
.
queryRunningAbilityMissionInfos
(
maxnum
);
ability
m
anager
.
moveMissionToTop
(
result
[
0
].
id
,
ability
M
anager
.
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
ability
m
anager
.
queryRunningAbilityMissionInfos
(
maxnum
);
var
result
=
await
ability
M
anager
.
queryRunningAbilityMissionInfos
(
maxnum
);
ability
m
anager
.
deleteMissions
([
result
[
0
].
id
],
ability
M
anager
.
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
)
{
ability
m
anager
.
killProcessesByBundleName
(
'
xxxxxxxxxxx
'
,
ability
M
anager
.
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
+
'
]
'
);
...
...
aafwk/aafwk_standard/abilitymanager/actsamstestfifthscene/entry/src/main/js/test/MangerAbilityJsunit.test.js
浏览文件 @
da82d42c
...
@@ -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.feature
a
bility
'
import
featureAbility
from
'
@ohos.ability.feature
A
bility
'
import
ability
manager
from
'
@ohos.app.abilitym
anager
'
import
ability
Manager
from
'
@ohos.app.abilityM
anager
'
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
ability
m
anager
.
queryRecentAbilityMissionInfos
(
maxnum
,
flag
);
var
data
=
await
ability
M
anager
.
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
=
ability
m
anager
.
removeMission
(
data
[
i
].
id
);
var
info
=
ability
M
anager
.
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
ability
m
anager
.
getAllRunningProcesses
();
var
info
=
await
ability
M
anager
.
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
ability
m
anager
.
queryRunningAbilityMissionInfos
(
maxnum
);
var
result
=
await
ability
M
anager
.
queryRunningAbilityMissionInfos
(
maxnum
);
var
info
=
await
ability
m
anager
.
moveMissionToTop
(
result
[
1
].
id
);
var
info
=
await
ability
M
anager
.
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
ability
m
anager
.
queryRunningAbilityMissionInfos
(
maxnum
);
var
ret
=
await
ability
M
anager
.
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
ability
m
anager
.
queryRecentAbilityMissionInfos
(
maxnum
,
flag
);
var
data
=
await
ability
M
anager
.
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
ability
m
anager
.
getActiveProcessInfos
();
var
info
=
await
ability
M
anager
.
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
ability
m
anager
.
getActiveAbilityMissionInfos
(
upperLimit
);
var
data
=
await
ability
M
anager
.
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
ability
m
anager
.
getPreviousAbilityMissionInfos
(
upperLimit
);
var
data
=
await
ability
M
anager
.
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
ability
m
anager
.
queryRunningAbilityMissionInfos
(
maxnum
);
var
data
=
await
ability
M
anager
.
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
ability
m
anager
.
queryRunningAbilityMissionInfos
(
maxnum
);
var
result
=
await
ability
M
anager
.
queryRunningAbilityMissionInfos
(
maxnum
);
var
info
=
await
ability
m
anager
.
deleteMissions
([
result
[
1
].
id
]);
var
info
=
await
ability
M
anager
.
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
ability
m
anager
.
killProcessesByBundleName
(
'
com.ix.verify.io
'
);
var
info
=
await
ability
M
anager
.
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
);
...
...
aafwk/aafwk_standard/abilitymanager/actsamstestfirstscene/entry/src/main/js/test/MangerAbilityJsunit.test.js
浏览文件 @
da82d42c
...
@@ -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.feature
a
bility
'
import
featureAbility
from
'
@ohos.ability.feature
A
bility
'
import
ability
manager
from
'
@ohos.app.abilitym
anager
'
import
ability
Manager
from
'
@ohos.app.abilityM
anager
'
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
ability
m
anager
.
queryRecentAbilityMissionInfos
(
maxnum
,
flag
);
var
data
=
await
ability
M
anager
.
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
=
ability
m
anager
.
removeMission
(
data
[
i
].
id
);
var
info
=
ability
M
anager
.
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
ability
m
anager
.
getAllRunningProcesses
();
var
info
=
await
ability
M
anager
.
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
ability
m
anager
.
queryRunningAbilityMissionInfos
(
maxnum
);
var
result
=
await
ability
M
anager
.
queryRunningAbilityMissionInfos
(
maxnum
);
var
info
=
await
ability
m
anager
.
moveMissionToTop
(
result
[
0
].
id
);
var
info
=
await
ability
M
anager
.
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
ability
m
anager
.
queryRunningAbilityMissionInfos
(
maxnum
);
var
data
=
await
ability
M
anager
.
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
ability
m
anager
.
queryRecentAbilityMissionInfos
(
maxnum
,
flag
);
var
data
=
await
ability
M
anager
.
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
ability
m
anager
.
getActiveProcessInfos
();
var
info
=
await
ability
M
anager
.
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
ability
m
anager
.
getActiveAbilityMissionInfos
(
upperLimit
);
var
data
=
await
ability
M
anager
.
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
ability
m
anager
.
getPreviousAbilityMissionInfos
(
upperLimit
);
var
data
=
await
ability
M
anager
.
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
ability
m
anager
.
queryRunningAbilityMissionInfos
(
maxnum
);
var
result
=
await
ability
M
anager
.
queryRunningAbilityMissionInfos
(
maxnum
);
var
info
=
await
ability
m
anager
.
removeMission
(
result
[
0
].
id
);
var
info
=
await
ability
M
anager
.
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
ability
m
anager
.
queryRunningAbilityMissionInfos
(
maxnum
);
var
result
=
await
ability
M
anager
.
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
ability
m
anager
.
deleteMissions
([
missionID
]);
var
info
=
await
ability
M
anager
.
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
ability
m
anager
.
killProcessesByBundleName
(
'
com.ix.simulate.feature
'
);
var
info
=
await
ability
M
anager
.
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
();
...
...
aafwk/aafwk_standard/abilitymanager/actsamstestfourthscene/entry/src/main/js/test/MangerAbilityJsunit.test.js
浏览文件 @
da82d42c
...
@@ -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.feature
a
bility
'
import
featureAbility
from
'
@ohos.ability.feature
A
bility
'
import
ability
manager
from
'
@ohos.app.abilitym
anager
'
import
ability
Manager
from
'
@ohos.app.abilityM
anager
'
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
ability
m
anager
.
queryRecentAbilityMissionInfos
(
maxnum
,
flag
);
var
data
=
await
ability
M
anager
.
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
=
ability
m
anager
.
removeMission
(
data
[
i
].
id
);
var
info
=
ability
M
anager
.
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
ability
m
anager
.
getAllRunningProcesses
();
var
info
=
await
ability
M
anager
.
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
ability
m
anager
.
getActiveProcessInfos
();
var
info
=
await
ability
M
anager
.
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
ability
m
anager
.
queryRecentAbilityMissionInfos
(
maxnum
,
flag
);
var
data
=
await
ability
M
anager
.
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
ability
m
anager
.
queryRunningAbilityMissionInfos
(
maxnum
);
var
data
=
await
ability
M
anager
.
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
ability
m
anager
.
getActiveAbilityMissionInfos
(
upperLimit
);
var
data
=
await
ability
M
anager
.
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
ability
m
anager
.
getPreviousAbilityMissionInfos
(
upperLimit
);
var
data
=
await
ability
M
anager
.
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
ability
m
anager
.
queryRunningAbilityMissionInfos
(
maxnum
);
var
result
=
await
ability
M
anager
.
queryRunningAbilityMissionInfos
(
maxnum
);
var
info
=
await
ability
m
anager
.
removeMission
(
result
[
0
].
id
);
var
info
=
await
ability
M
anager
.
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
ability
m
anager
.
queryRunningAbilityMissionInfos
(
maxnum
);
var
result
=
await
ability
M
anager
.
queryRunningAbilityMissionInfos
(
maxnum
);
var
info
=
await
ability
m
anager
.
moveMissionToTop
(
result
[
0
].
id
);
var
info
=
await
ability
M
anager
.
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
ability
m
anager
.
queryRunningAbilityMissionInfos
(
maxnum
);
var
result
=
await
ability
M
anager
.
queryRunningAbilityMissionInfos
(
maxnum
);
var
info
=
await
ability
m
anager
.
removeMissions
([
result
[
0
].
id
,
result
[
1
].
id
]);
var
info
=
await
ability
M
anager
.
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
ability
m
anager
.
killProcessesByBundleName
(
'
xxxxxxxxxxxx
'
);
var
info
=
await
ability
M
anager
.
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
);
...
...
aafwk/aafwk_standard/abilitymanager/actsamstestsecondscene/entry/src/main/js/test/MangerAbilityJsunit.test.js
浏览文件 @
da82d42c
...
@@ -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.feature
a
bility
'
import
featureAbility
from
'
@ohos.ability.feature
A
bility
'
import
ability
manager
from
'
@ohos.app.abilitym
anager
'
import
ability
Manager
from
'
@ohos.app.abilityM
anager
'
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
ability
m
anager
.
queryRecentAbilityMissionInfos
(
maxnum
,
flag
);
var
data
=
await
ability
M
anager
.
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
=
ability
m
anager
.
removeMission
(
data
[
i
].
id
);
var
info
=
ability
M
anager
.
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
ability
m
anager
.
getAllRunningProcesses
();
var
info
=
await
ability
M
anager
.
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
ability
m
anager
.
queryRunningAbilityMissionInfos
(
maxnum
);
var
result
=
await
ability
M
anager
.
queryRunningAbilityMissionInfos
(
maxnum
);
var
info
=
await
ability
m
anager
.
moveMissionToTop
(
result
[
0
].
id
);
var
info
=
await
ability
M
anager
.
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
ability
m
anager
.
queryRunningAbilityMissionInfos
(
maxnum
);
var
data
=
await
ability
M
anager
.
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
ability
m
anager
.
queryRecentAbilityMissionInfos
(
maxnum
,
flag
);
var
data
=
await
ability
M
anager
.
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
ability
m
anager
.
getActiveProcessInfos
();
var
info
=
await
ability
M
anager
.
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
ability
m
anager
.
getActiveAbilityMissionInfos
(
upperLimit
);
var
data
=
await
ability
M
anager
.
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
ability
m
anager
.
getPreviousAbilityMissionInfos
(
upperLimit
);
var
data
=
await
ability
M
anager
.
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
ability
m
anager
.
queryRunningAbilityMissionInfos
(
maxnum
);
var
result
=
await
ability
M
anager
.
queryRunningAbilityMissionInfos
(
maxnum
);
var
info
=
await
ability
m
anager
.
deleteMissions
([
result
[
0
].
id
]);
var
info
=
await
ability
M
anager
.
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
ability
m
anager
.
queryRunningAbilityMissionInfos
(
maxnum
);
var
result
=
await
ability
M
anager
.
queryRunningAbilityMissionInfos
(
maxnum
);
var
info
=
await
ability
m
anager
.
removeMission
(
result
[
0
].
id
);
var
info
=
await
ability
M
anager
.
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
ability
m
anager
.
killProcessesByBundleName
(
'
XXXXXXXXXXXX
'
);
var
info
=
await
ability
M
anager
.
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
();
...
...
aafwk/aafwk_standard/abilitymanager/actsamstestthirdscene/entry/src/main/js/test/MangerAbilityJsunit.test.js
浏览文件 @
da82d42c
...
@@ -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.feature
a
bility
'
import
featureAbility
from
'
@ohos.ability.feature
A
bility
'
import
ability
manager
from
'
@ohos.app.abilitym
anager
'
import
ability
Manager
from
'
@ohos.app.abilityM
anager
'
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
ability
m
anager
.
queryRecentAbilityMissionInfos
(
maxnum
,
flag
);
var
data
=
await
ability
M
anager
.
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
=
ability
m
anager
.
removeMission
(
data
[
i
].
id
);
var
info
=
ability
M
anager
.
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
ability
m
anager
.
getAllRunningProcesses
();
var
info
=
await
ability
M
anager
.
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
ability
m
anager
.
queryRunningAbilityMissionInfos
(
maxnum
);
var
data
=
await
ability
M
anager
.
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
ability
m
anager
.
queryRecentAbilityMissionInfos
(
maxnum
,
flag
);
var
data
=
await
ability
M
anager
.
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
ability
m
anager
.
getActiveProcessInfos
();
var
info
=
await
ability
M
anager
.
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
ability
m
anager
.
getActiveAbilityMissionInfos
(
upperLimit
);
var
data
=
await
ability
M
anager
.
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
ability
m
anager
.
getPreviousAbilityMissionInfos
(
upperLimit
);
var
data
=
await
ability
M
anager
.
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
ability
m
anager
.
queryRunningAbilityMissionInfos
(
maxnum
);
var
result
=
await
ability
M
anager
.
queryRunningAbilityMissionInfos
(
maxnum
);
var
info
=
await
ability
m
anager
.
removeMission
(
result
[
1
].
id
);
var
info
=
await
ability
M
anager
.
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
ability
m
anager
.
queryRunningAbilityMissionInfos
(
maxnum
);
var
result
=
await
ability
M
anager
.
queryRunningAbilityMissionInfos
(
maxnum
);
var
info
=
await
ability
m
anager
.
moveMissionToTop
(
result
[
0
].
id
);
var
info
=
await
ability
M
anager
.
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
ability
m
anager
.
queryRunningAbilityMissionInfos
(
maxnum
);
var
result
=
await
ability
M
anager
.
queryRunningAbilityMissionInfos
(
maxnum
);
var
info
=
await
ability
m
anager
.
removeMissions
([
result
[
0
].
id
]);
var
info
=
await
ability
M
anager
.
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
ability
m
anager
.
killProcessesByBundleName
(
'
XXXXXXXX
'
);
var
info
=
await
ability
M
anager
.
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
();
...
...
aafwk/aafwk_standard/abilitymanager/clearmissionscallback/src/main/js/test/MangerAbilityJsunit.test.js
浏览文件 @
da82d42c
...
@@ -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.feature
a
bility
'
import
featureAbility
from
'
@ohos.ability.feature
A
bility
'
import
ability
manager
from
'
@ohos.app.abilitym
anager
'
import
ability
Manager
from
'
@ohos.app.abilityM
anager
'
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
)
{
ability
m
anager
.
clearMissions
(
ability
M
anager
.
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
"
);
...
...
aafwk/aafwk_standard/abilitymanager/clearmissionspromise/src/main/js/test/MangerAbilityJsunit.test.js
浏览文件 @
da82d42c
...
@@ -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.feature
a
bility
'
import
featureAbility
from
'
@ohos.ability.feature
A
bility
'
import
ability
manager
from
'
@ohos.app.abilitym
anager
'
import
ability
Manager
from
'
@ohos.app.abilityM
anager
'
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
ability
m
anager
.
clearMissions
();
var
info
=
await
ability
M
anager
.
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
);
...
...
aafwk/aafwk_standard/amsabilitymanager/amsMissionSnapshotTest/entry/src/main/js/test/amsMissionSnapshotTest.test.js
浏览文件 @
da82d42c
...
@@ -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.feature
a
bility
'
import
featureAbility
from
'
@ohos.ability.feature
A
bility
'
import
commonEvent
from
'
@ohos.common
e
vent
'
import
commonEvent
from
'
@ohos.common
E
vent
'
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
'
...
...
aafwk/aafwk_standard/amsabilitymanager/amsMissionSnapshotTestSingleton/entry/src/main/js/default/pages/index/index.js
浏览文件 @
da82d42c
...
@@ -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.common
e
vent
'
import
commonEvent
from
'
@ohos.common
E
vent
'
export
default
{
export
default
{
data
:
{
data
:
{
title
:
""
title
:
""
...
...
aafwk/aafwk_standard/amsabilitymanager/amsMissionSnapshotTestSingletonS/entry/src/main/js/default/pages/index/index.js
浏览文件 @
da82d42c
...
@@ -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.common
e
vent
'
import
commonEvent
from
'
@ohos.common
E
vent
'
export
default
{
export
default
{
data
:
{
data
:
{
title
:
""
title
:
""
...
...
aafwk/aafwk_standard/amsdatauriutils/entry/src/main/js/test/DataUriUtilsJsSt.test.js
浏览文件 @
da82d42c
...
@@ -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.data
uriu
tils
'
import
dataUriUtils
from
'
@ohos.ability.data
UriU
tils
'
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
()
{
...
...
aafwk/aafwk_standard/amsmultiapp/MultiAppPage/entry/src/main/js/test/MangerAbilityJsunit.test.js
浏览文件 @
da82d42c
...
@@ -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.feature
a
bility
'
import
featureAbility
from
'
@ohos.ability.feature
A
bility
'
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.common
e
vent
'
import
commonEvent
from
'
@ohos.common
E
vent
'
describe
(
'
ActsAmsMultiPageApp
'
,
function
()
{
describe
(
'
ActsAmsMultiPageApp
'
,
function
()
{
console
.
info
(
'
----ActsAmsMultiPageApp----
'
);
console
.
info
(
'
----ActsAmsMultiPageApp----
'
);
...
...
aafwk/aafwk_standard/amsmultiapp/MultiAppPageConnectService/entry/src/main/js/test/MangerAbilityJsunit.test.js
浏览文件 @
da82d42c
...
@@ -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.feature
a
bility
'
import
featureAbility
from
'
@ohos.ability.feature
A
bility
'
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.common
e
vent
'
import
commonEvent
from
'
@ohos.common
E
vent
'
describe
(
'
ActsAmsMultiPageAppConnectService
'
,
function
()
{
describe
(
'
ActsAmsMultiPageAppConnectService
'
,
function
()
{
...
...
aafwk/aafwk_standard/amsmultiapp/MultiAppPageConnect_Service/entry/src/main/js/default/pages/index/index.js
浏览文件 @
da82d42c
...
@@ -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.commone
E
vent
'
import
particleAbility
from
'
@ohos.ability.particle
a
bility
'
import
particleAbility
from
'
@ohos.ability.particle
A
bility
'
import
bundle
from
"
@ohos.bundle
"
import
bundle
from
"
@ohos.bundle
"
...
...
aafwk/aafwk_standard/amsmultiapp/MultiAppPagePermission/entry/src/main/js/test/MangerAbilityJsunit.test.js
浏览文件 @
da82d42c
...
@@ -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.feature
a
bility
'
import
featureAbility
from
'
@ohos.ability.feature
A
bility
'
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.common
e
vent
'
import
commonEvent
from
'
@ohos.common
E
vent
'
var
subscriberInfoStartAbility
=
{
var
subscriberInfoStartAbility
=
{
events
:
[
"
ACTS_StartAbility_CommonEvent
"
],
events
:
[
"
ACTS_StartAbility_CommonEvent
"
],
...
...
aafwk/aafwk_standard/amsmultiapp/MultiAppPagePermission_Page/entry/src/main/js/default/pages/index/index.js
浏览文件 @
da82d42c
...
@@ -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.common
e
vent
'
import
commonEvent
from
'
@ohos.common
E
vent
'
export
default
{
export
default
{
data
:
{
data
:
{
...
...
aafwk/aafwk_standard/amsmultiapp/MultiAppPage_PSS/entry/src/main/js/test/MangerAbilityJsunit.test.js
浏览文件 @
da82d42c
...
@@ -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.feature
a
bility
'
import
featureAbility
from
'
@ohos.ability.feature
A
bility
'
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.common
e
vent
'
import
commonEvent
from
'
@ohos.common
E
vent
'
describe
(
'
ActsAmsMultiPageAppS
'
,
function
()
{
describe
(
'
ActsAmsMultiPageAppS
'
,
function
()
{
console
.
info
(
'
----ActsAmsMultiPageAppS----
'
);
console
.
info
(
'
----ActsAmsMultiPageAppS----
'
);
...
...
aafwk/aafwk_standard/amsmultiapp/MultiAppPage_Page/entry/src/main/js/test/MangerAbilityJsunit.test.js
浏览文件 @
da82d42c
...
@@ -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.feature
a
bility
'
import
featureAbility
from
'
@ohos.ability.feature
A
bility
'
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
'
...
...
aafwk/aafwk_standard/amsmultiapp/MultiAppPage_Service/entry/src/main/js/default/pages/index/index.js
浏览文件 @
da82d42c
...
@@ -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.common
e
vent
'
import
commonEvent
from
'
@ohos.common
E
vent
'
import
particleAbility
from
'
@ohos.ability.particle
a
bility
'
import
particleAbility
from
'
@ohos.ability.particle
A
bility
'
import
bundle
from
"
@ohos.bundle
"
import
bundle
from
"
@ohos.bundle
"
let
mMyStub
;
let
mMyStub
;
...
...
aafwk/aafwk_standard/amsmultiapp/MultiAppSimultaneousOnline/entry/src/main/js/test/MangerAbilityJsunit.test.js
浏览文件 @
da82d42c
...
@@ -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.feature
a
bility
'
import
featureAbility
from
'
@ohos.ability.feature
A
bility
'
import
commonEvent
from
"
@ohos.common
e
vent
"
import
commonEvent
from
"
@ohos.common
E
vent
"
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
ability
m
anager
.
getActiveProcessInfos
();
var
processInfos
=
await
ability
M
anager
.
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
++
)
{
...
...
aafwk/aafwk_standard/amsmultiapp/MultiAppSimultaneousOnline_test/entry/src/main/js/test/MangerAbilityJsunit.test.js
浏览文件 @
da82d42c
...
@@ -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.feature
a
bility
'
import
featureAbility
from
'
@ohos.ability.feature
A
bility
'
import
commonEvent
from
'
@ohos.common
e
vent
'
import
commonEvent
from
'
@ohos.common
E
vent
'
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
'
...
...
aafwk/aafwk_standard/amsmultiapp/MultiAppTermination/entry/src/main/js/test/MangerAbilityJsunit.test.js
浏览文件 @
da82d42c
...
@@ -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.feature
a
bility
'
import
featureAbility
from
'
@ohos.ability.feature
A
bility
'
import
commonEvent
from
"
@ohos.common
e
vent
"
import
commonEvent
from
"
@ohos.common
E
vent
"
import
ability
manager
from
'
@ohos.app.abilitym
anager
'
import
ability
Manager
from
'
@ohos.app.abilityM
anager
'
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
ability
m
anager
.
getActiveProcessInfos
();
var
processInfos
=
await
ability
M
anager
.
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
++
)
{
...
...
aafwk/aafwk_standard/amsmultiapp/MultiAppTermination_test/entry/src/main/js/test/MangerAbilityJsunit.test.js
浏览文件 @
da82d42c
...
@@ -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.feature
a
bility
'
import
featureAbility
from
'
@ohos.ability.feature
A
bility
'
import
commonEvent
from
'
@ohos.common
e
vent
'
import
commonEvent
from
'
@ohos.common
E
vent
'
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
'
...
...
aafwk/aafwk_standard/amsmultiapp/amsmultiapppageexecutor/src/main/js/default/pages/index/index.js
浏览文件 @
da82d42c
...
@@ -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.feature
a
bility
'
import
featureAbility
from
'
@ohos.ability.feature
A
bility
'
import
bundle
from
"
@ohos.bundle
"
import
bundle
from
"
@ohos.bundle
"
import
commonEvent
from
'
@ohos.common
e
vent
'
import
commonEvent
from
'
@ohos.common
E
vent
'
const
injectRef
=
Object
.
getPrototypeOf
(
global
)
||
global
const
injectRef
=
Object
.
getPrototypeOf
(
global
)
||
global
injectRef
.
regeneratorRuntime
=
require
(
'
@babel/runtime/regenerator
'
)
injectRef
.
regeneratorRuntime
=
require
(
'
@babel/runtime/regenerator
'
)
...
...
aafwk/aafwk_standard/amsmultiapp/amsmultiappserviceexecutor/src/main/js/default/pages/index/index.js
浏览文件 @
da82d42c
...
@@ -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.particle
a
bility
'
import
particleAbility
from
'
@ohos.ability.particle
A
bility
'
import
bundle
from
"
@ohos.bundle
"
import
bundle
from
"
@ohos.bundle
"
import
commonEvent
from
'
@ohos.common
e
vent
'
import
commonEvent
from
'
@ohos.common
E
vent
'
const
injectRef
=
Object
.
getPrototypeOf
(
global
)
||
global
const
injectRef
=
Object
.
getPrototypeOf
(
global
)
||
global
injectRef
.
regeneratorRuntime
=
require
(
'
@babel/runtime/regenerator
'
)
injectRef
.
regeneratorRuntime
=
require
(
'
@babel/runtime/regenerator
'
)
...
...
aafwk/aafwk_standard/amsmultiapp/amsmultiappservicestarter/src/main/js/default/pages/index/index.js
浏览文件 @
da82d42c
...
@@ -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.particle
a
bility
'
import
particleAbility
from
'
@ohos.ability.particle
A
bility
'
import
commonEvent
from
'
@ohos.common
e
vent
'
import
commonEvent
from
'
@ohos.common
E
vent
'
const
injectRef
=
Object
.
getPrototypeOf
(
global
)
||
global
const
injectRef
=
Object
.
getPrototypeOf
(
global
)
||
global
injectRef
.
regeneratorRuntime
=
require
(
'
@babel/runtime/regenerator
'
)
injectRef
.
regeneratorRuntime
=
require
(
'
@babel/runtime/regenerator
'
)
...
...
aafwk/aafwk_standard/amsmultiapp/amsmultiapptester/entry/src/main/js/test/MangerAbilityJsunit.test.js
浏览文件 @
da82d42c
...
@@ -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.feature
a
bility
'
import
featureAbility
from
'
@ohos.ability.feature
A
bility
'
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.common
e
vent
'
import
commonEvent
from
'
@ohos.common
E
vent
'
const
START_ABILITY_TIMEOUT
=
4000
;
const
START_ABILITY_TIMEOUT
=
4000
;
var
subscriberInfoMultiApp0700
=
{
var
subscriberInfoMultiApp0700
=
{
...
...
aafwk/aafwk_standard/amsmultiapp/amsmultidataabilityclone/entry/src/main/js/test/MultiDataAbilityJsSt.test.js
浏览文件 @
da82d42c
...
@@ -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
ability
manager
from
'
@ohos.app.abilitym
anager
'
import
ability
Manager
from
'
@ohos.app.abilityM
anager
'
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
ability
m
anager
.
getActiveProcessInfos
();
var
processInfos
=
await
ability
M
anager
.
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
);
...
...
aafwk/aafwk_standard/amsmultiapp/amsmultidataabilityself/entry/src/main/js/test/MultiDataAbilityJsSt.test.js
浏览文件 @
da82d42c
...
@@ -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
ability
manager
from
'
@ohos.app.abilitym
anager
'
import
ability
Manager
from
'
@ohos.app.abilityM
anager
'
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
ability
m
anager
.
getActiveProcessInfos
();
var
processInfos
=
await
ability
M
anager
.
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
);
...
...
aafwk/aafwk_standard/context/actscontexttest/entry/src/main/js/test/ContextJsunit.test.js
浏览文件 @
da82d42c
...
@@ -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.feature
a
bility
'
import
featureAbility
from
'
@ohos.ability.feature
A
bility
'
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
'
...
...
aafwk/aafwk_standard/featureability/actsfeatureabilitytest/entry/src/main/js/test/FeatureAbilityJsunit.test.js
浏览文件 @
da82d42c
...
@@ -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.common
e
vent
'
import
commonEvent
from
'
@ohos.common
E
vent
'
import
wantConstant
from
'
@ohos.ability.wantConstant
'
import
wantConstant
from
'
@ohos.ability.wantConstant
'
const
START_ABILITY_TIMEOUT
=
4000
;
const
START_ABILITY_TIMEOUT
=
4000
;
...
...
aafwk/aafwk_standard/featureability/sceneproject/finishwithresultemptytest/src/main/js/default/pages/index/index.js
浏览文件 @
da82d42c
...
@@ -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.common
e
vent
'
import
commonEvent
from
'
@ohos.common
E
vent
'
import
featureAbility
from
'
@ohos.ability.featureAbility
'
import
featureAbility
from
'
@ohos.ability.featureAbility
'
const
injectRef
=
Object
.
getPrototypeOf
(
global
)
||
global
const
injectRef
=
Object
.
getPrototypeOf
(
global
)
||
global
...
...
aafwk/aafwk_standard/featureability/sceneproject/finishwithresultpromiseparameterstest/src/main/js/default/pages/index/index.js
浏览文件 @
da82d42c
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
* limitations under the License.
* limitations under the License.
*/
*/
import
common
event
from
'
@ohos.commone
vent
'
import
common
Event
from
'
@ohos.commonE
vent
'
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
()
{
common
e
vent
.
publish
(
"
ACTS_FinishWithResult_0100_CommonEvent
"
,
PublishCallBack
);
common
E
vent
.
publish
(
"
ACTS_FinishWithResult_0100_CommonEvent
"
,
PublishCallBack
);
var
promise
=
await
featureAbility
.
terminateSelfWithResult
(
var
promise
=
await
featureAbility
.
terminateSelfWithResult
(
{
{
resultCode
:
1
,
resultCode
:
1
,
...
...
aafwk/aafwk_standard/featureability/sceneproject/finishwithresulttest/src/main/js/default/pages/index/index.js
浏览文件 @
da82d42c
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
* limitations under the License.
* limitations under the License.
*/
*/
import
commonEvent
from
'
@ohos.common
e
vent
'
import
commonEvent
from
'
@ohos.common
E
vent
'
import
featureAbility
from
'
@ohos.ability.featureAbility
'
import
featureAbility
from
'
@ohos.ability.featureAbility
'
const
injectRef
=
Object
.
getPrototypeOf
(
global
)
||
global
const
injectRef
=
Object
.
getPrototypeOf
(
global
)
||
global
...
...
aafwk/aafwk_standard/featureability/sceneproject/getcallingbundletest/src/main/js/default/pages/index/index.js
浏览文件 @
da82d42c
...
@@ -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.common
e
vent
'
import
commonEvent
from
'
@ohos.common
E
vent
'
import
featureAbility
from
'
@ohos.ability.featureAbility
'
import
featureAbility
from
'
@ohos.ability.featureAbility
'
const
injectRef
=
Object
.
getPrototypeOf
(
global
)
||
global
const
injectRef
=
Object
.
getPrototypeOf
(
global
)
||
global
...
...
aafwk/aafwk_standard/featureability/sceneproject/startability/src/main/js/default/pages/index/index.js
浏览文件 @
da82d42c
...
@@ -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.common
e
vent
'
import
commonEvent
from
'
@ohos.common
E
vent
'
import
featureAbility
from
'
@ohos.ability.featureAbility
'
import
featureAbility
from
'
@ohos.ability.featureAbility
'
const
injectRef
=
Object
.
getPrototypeOf
(
global
)
||
global
const
injectRef
=
Object
.
getPrototypeOf
(
global
)
||
global
...
...
aafwk/aafwk_standard/featureability/sceneproject/terminateabilitytest/src/main/js/default/pages/index/index.js
浏览文件 @
da82d42c
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
* limitations under the License.
* limitations under the License.
*/
*/
import
commonEvent
from
'
@ohos.common
e
vent
'
import
commonEvent
from
'
@ohos.common
E
vent
'
import
featureAbility
from
'
@ohos.ability.featureAbility
'
import
featureAbility
from
'
@ohos.ability.featureAbility
'
const
injectRef
=
Object
.
getPrototypeOf
(
global
)
||
global
const
injectRef
=
Object
.
getPrototypeOf
(
global
)
||
global
...
...
aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicea/src/main/js/default/app.js
浏览文件 @
da82d42c
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
* limitations under the License.
* limitations under the License.
*/
*/
import
Subscriber
from
'
@ohos.common
e
vent
'
import
Subscriber
from
'
@ohos.common
E
vent
'
export
default
{
export
default
{
constructor
(
obj
)
{
constructor
(
obj
)
{
...
...
aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviceb/src/main/js/default/app.js
浏览文件 @
da82d42c
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
* limitations under the License.
* limitations under the License.
*/
*/
import
Subscriber
from
'
@ohos.common
e
vent
'
import
Subscriber
from
'
@ohos.common
E
vent
'
export
default
{
export
default
{
constructor
(
obj
)
{
constructor
(
obj
)
{
...
...
aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicec/src/main/js/default/app.js
浏览文件 @
da82d42c
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
* limitations under the License.
* limitations under the License.
*/
*/
import
Subscriber
from
'
@ohos.common
e
vent
'
import
Subscriber
from
'
@ohos.common
E
vent
'
export
default
{
export
default
{
constructor
(
obj
)
{
constructor
(
obj
)
{
...
...
aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviced/src/main/js/default/app.js
浏览文件 @
da82d42c
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
* limitations under the License.
* limitations under the License.
*/
*/
import
Subscriber
from
'
@ohos.common
e
vent
'
import
Subscriber
from
'
@ohos.common
E
vent
'
export
default
{
export
default
{
constructor
(
obj
)
{
constructor
(
obj
)
{
...
...
aafwk/aafwk_standard/serviceability/sceneProject/particlestartability/src/main/js/default/pages/index/index.js
浏览文件 @
da82d42c
...
@@ -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.common
e
vent
'
import
commonEvent
from
'
@ohos.common
E
vent
'
const
injectRef
=
Object
.
getPrototypeOf
(
global
)
||
global
const
injectRef
=
Object
.
getPrototypeOf
(
global
)
||
global
injectRef
.
regeneratorRuntime
=
require
(
'
@babel/runtime/regenerator
'
)
injectRef
.
regeneratorRuntime
=
require
(
'
@babel/runtime/regenerator
'
)
...
...
aafwk/aafwk_standard/serviceability/sceneProject/particletestserver/src/main/js/default/pages/index/index.js
浏览文件 @
da82d42c
...
@@ -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.particle
a
bility
'
import
particleAbility
from
'
@ohos.ability.particle
A
bility
'
import
commonEvent
from
'
@ohos.common
e
vent
'
import
commonEvent
from
'
@ohos.common
E
vent
'
let
mMyStub
;
let
mMyStub
;
let
mMyProxy
;
let
mMyProxy
;
...
...
aafwk/aafwk_standard/serviceability/stserviceabilityserver/entry/src/main/js/default/pages/index/index.js
浏览文件 @
da82d42c
...
@@ -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.particle
a
bility
'
import
particleAbility
from
'
@ohos.ability.particle
A
bility
'
import
featureAbility
from
'
@ohos.ability.featureAbility
'
import
featureAbility
from
'
@ohos.ability.featureAbility
'
import
commonEvent
from
'
@ohos.common
e
vent
'
import
commonEvent
from
'
@ohos.common
E
vent
'
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
;
...
...
aafwk/aafwk_standard/serviceability/stserviceabilityserversecond/entry/src/main/js/default/pages/index/index.js
浏览文件 @
da82d42c
...
@@ -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.particle
a
bility
'
import
particleAbility
from
'
@ohos.ability.particle
A
bility
'
import
featureAbility
from
'
@ohos.ability.featureAbility
'
import
featureAbility
from
'
@ohos.ability.featureAbility
'
import
commonEvent
from
'
@ohos.common
e
vent
'
import
commonEvent
from
'
@ohos.common
E
vent
'
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
;
...
...
aafwk/aafwk_standard/want/actsgetwantalltest/entry/src/main/js/test/ActsGetWantAllTest.js
浏览文件 @
da82d42c
...
@@ -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.feature
a
bility
'
import
featureAbility
from
'
@ohos.ability.feature
A
bility
'
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
'
...
...
aafwk/aafwk_standard/want/sceneProject/actsgetwantalltesthap/src/main/js/default/pages/index/index.js
浏览文件 @
da82d42c
...
@@ -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.feature
a
bility
'
import
featureAbility
from
'
@ohos.ability.feature
A
bility
'
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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录