Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
697feaad
X
Xts Acts
项目概览
OpenHarmony
/
Xts Acts
接近 2 年 前同步成功
通知
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看板
提交
697feaad
编写于
3月 08, 2022
作者:
J
jy
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add applicationinfo
Signed-off-by:
N
jy
<
jiyong@huawei.com
>
上级
63735705
变更
27
隐藏空白更改
内联
并排
Showing
27 changed file
with
778 addition
and
0 deletion
+778
-0
aafwk/aafwk_standard/fa/BUILD.gn
aafwk/aafwk_standard/fa/BUILD.gn
+1
-0
aafwk/aafwk_standard/fa/fa_applicationinfo_test/BUILD.gn
aafwk/aafwk_standard/fa/fa_applicationinfo_test/BUILD.gn
+31
-0
aafwk/aafwk_standard/fa/fa_applicationinfo_test/Test.json
aafwk/aafwk_standard/fa/fa_applicationinfo_test/Test.json
+18
-0
aafwk/aafwk_standard/fa/fa_applicationinfo_test/entry/src/main/config.json
...ard/fa/fa_applicationinfo_test/entry/src/main/config.json
+87
-0
aafwk/aafwk_standard/fa/fa_applicationinfo_test/entry/src/main/js/MainAbility/app.js
...applicationinfo_test/entry/src/main/js/MainAbility/app.js
+23
-0
aafwk/aafwk_standard/fa/fa_applicationinfo_test/entry/src/main/js/MainAbility/i18n/en-US.json
...oninfo_test/entry/src/main/js/MainAbility/i18n/en-US.json
+11
-0
aafwk/aafwk_standard/fa/fa_applicationinfo_test/entry/src/main/js/MainAbility/i18n/zh-CN.json
...oninfo_test/entry/src/main/js/MainAbility/i18n/zh-CN.json
+11
-0
aafwk/aafwk_standard/fa/fa_applicationinfo_test/entry/src/main/js/MainAbility/pages/index/index.css
..._test/entry/src/main/js/MainAbility/pages/index/index.css
+39
-0
aafwk/aafwk_standard/fa/fa_applicationinfo_test/entry/src/main/js/MainAbility/pages/index/index.hml
..._test/entry/src/main/js/MainAbility/pages/index/index.hml
+21
-0
aafwk/aafwk_standard/fa/fa_applicationinfo_test/entry/src/main/js/MainAbility/pages/index/index.js
...o_test/entry/src/main/js/MainAbility/pages/index/index.js
+45
-0
aafwk/aafwk_standard/fa/fa_applicationinfo_test/entry/src/main/js/MainAbility/pages/second/second.css
...est/entry/src/main/js/MainAbility/pages/second/second.css
+39
-0
aafwk/aafwk_standard/fa/fa_applicationinfo_test/entry/src/main/js/MainAbility/pages/second/second.hml
...est/entry/src/main/js/MainAbility/pages/second/second.hml
+21
-0
aafwk/aafwk_standard/fa/fa_applicationinfo_test/entry/src/main/js/MainAbility/pages/second/second.js
...test/entry/src/main/js/MainAbility/pages/second/second.js
+27
-0
aafwk/aafwk_standard/fa/fa_applicationinfo_test/entry/src/main/js/MainAbility2/app.js
...pplicationinfo_test/entry/src/main/js/MainAbility2/app.js
+53
-0
aafwk/aafwk_standard/fa/fa_applicationinfo_test/entry/src/main/js/MainAbility2/i18n/en-US.json
...ninfo_test/entry/src/main/js/MainAbility2/i18n/en-US.json
+11
-0
aafwk/aafwk_standard/fa/fa_applicationinfo_test/entry/src/main/js/MainAbility2/i18n/zh-CN.json
...ninfo_test/entry/src/main/js/MainAbility2/i18n/zh-CN.json
+11
-0
aafwk/aafwk_standard/fa/fa_applicationinfo_test/entry/src/main/js/MainAbility2/pages/index/index.css
...test/entry/src/main/js/MainAbility2/pages/index/index.css
+39
-0
aafwk/aafwk_standard/fa/fa_applicationinfo_test/entry/src/main/js/MainAbility2/pages/index/index.hml
...test/entry/src/main/js/MainAbility2/pages/index/index.hml
+21
-0
aafwk/aafwk_standard/fa/fa_applicationinfo_test/entry/src/main/js/MainAbility2/pages/index/index.js
..._test/entry/src/main/js/MainAbility2/pages/index/index.js
+33
-0
aafwk/aafwk_standard/fa/fa_applicationinfo_test/entry/src/main/js/MainAbility2/pages/second/second.css
...st/entry/src/main/js/MainAbility2/pages/second/second.css
+39
-0
aafwk/aafwk_standard/fa/fa_applicationinfo_test/entry/src/main/js/MainAbility2/pages/second/second.hml
...st/entry/src/main/js/MainAbility2/pages/second/second.hml
+21
-0
aafwk/aafwk_standard/fa/fa_applicationinfo_test/entry/src/main/js/MainAbility2/pages/second/second.js
...est/entry/src/main/js/MainAbility2/pages/second/second.js
+27
-0
aafwk/aafwk_standard/fa/fa_applicationinfo_test/entry/src/main/js/test/ApplicationInfoJsunit.test.js
...test/entry/src/main/js/test/ApplicationInfoJsunit.test.js
+113
-0
aafwk/aafwk_standard/fa/fa_applicationinfo_test/entry/src/main/js/test/List.test.js
..._applicationinfo_test/entry/src/main/js/test/List.test.js
+16
-0
aafwk/aafwk_standard/fa/fa_applicationinfo_test/entry/src/main/resources/base/element/string.json
...fo_test/entry/src/main/resources/base/element/string.json
+20
-0
aafwk/aafwk_standard/fa/fa_applicationinfo_test/entry/src/main/resources/base/media/icon.png
...ioninfo_test/entry/src/main/resources/base/media/icon.png
+0
-0
aafwk/aafwk_standard/fa/fa_applicationinfo_test/signature/openharmony_sx.p7b
...d/fa/fa_applicationinfo_test/signature/openharmony_sx.p7b
+0
-0
未找到文件。
aafwk/aafwk_standard/fa/BUILD.gn
100755 → 100644
浏览文件 @
697feaad
...
...
@@ -17,6 +17,7 @@ group("fa") {
testonly = true
if (is_standard_system) {
deps = [
"fa_applicationinfo_test:FaApplicationinfoTest",
"fa_clear_test:FaClearTest",
"fa_coverapi_test:FaCoverapiTest",
"fa_equeryabilitybywant_test:FaEqueryabilitybywantTest",
...
...
aafwk/aafwk_standard/fa/fa_applicationinfo_test/BUILD.gn
0 → 100755
浏览文件 @
697feaad
# Copyright (c) 2020-2021 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import("//test/xts/tools/build/suite.gni")
ohos_js_hap_suite("FaApplicationinfoTest") {
hap_profile = "./entry/src/main/config.json"
deps = [
":fa_applicationinfo_test_assets",
":fa_applicationinfo_test_resources",
]
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "FaApplicationinfoTest"
}
ohos_js_assets("fa_applicationinfo_test_assets") {
source_dir = "./entry/src/main/js/MainAbility"
}
ohos_resources("fa_applicationinfo_test_resources") {
sources = [ "./entry/src/main/resources" ]
hap_profile = "./entry/src/main/config.json"
}
aafwk/aafwk_standard/fa/fa_applicationinfo_test/Test.json
0 → 100755
浏览文件 @
697feaad
{
"description"
:
"Configuration for hjunit demo Test"
,
"driver"
:
{
"type"
:
"JSUnitTest"
,
"test-timeout"
:
"180000"
,
"package"
:
"com.example.actsabilitydistributetest"
,
"shell-timeout"
:
"600000"
},
"kits"
:
[
{
"test-file-name"
:
[
"ActsAbilityDistributeTest.hap"
],
"type"
:
"AppInstallKit"
,
"cleanup-apps"
:
true
}
]
}
\ No newline at end of file
aafwk/aafwk_standard/fa/fa_applicationinfo_test/entry/src/main/config.json
0 → 100755
浏览文件 @
697feaad
{
"app"
:
{
"bundleName"
:
"com.example.applicationinfo"
,
"vendor"
:
"example"
,
"version"
:
{
"code"
:
1000000
,
"name"
:
"1.0.0"
}
},
"deviceConfig"
:
{},
"module"
:
{
"package"
:
"com.example.applicationinfo"
,
"name"
:
".MyApplication"
,
"mainAbility"
:
".MainAbility"
,
"srcPath"
:
""
,
"deviceType"
:
[
"phone"
],
"distro"
:
{
"deliveryWithInstall"
:
true
,
"moduleName"
:
"entry"
,
"moduleType"
:
"entry"
,
"installationFree"
:
false
},
"abilities"
:
[
{
"skills"
:
[
{
"entities"
:
[
"entity.system.home"
],
"actions"
:
[
"action.system.home"
]
}
],
"orientation"
:
"unspecified"
,
"visible"
:
true
,
"srcPath"
:
"MainAbility"
,
"name"
:
".MainAbility"
,
"srcLanguage"
:
"js"
,
"icon"
:
"$media:icon"
,
"description"
:
"$string:description_mainability"
,
"formsEnabled"
:
false
,
"label"
:
"$string:entry_MainAbility"
,
"type"
:
"page"
,
"launchType"
:
"standard"
},
{
"orientation"
:
"unspecified"
,
"srcPath"
:
"MainAbility2"
,
"name"
:
".MainAbility2"
,
"srcLanguage"
:
"js"
,
"icon"
:
"$media:icon"
,
"description"
:
"$string:description_mainability2"
,
"formsEnabled"
:
false
,
"label"
:
"$string:entry_MainAbility2"
,
"type"
:
"page"
,
"launchType"
:
"standard"
}
],
"js"
:
[
{
"pages"
:
[
"pages/index/index"
,
"pages/second/second"
],
"name"
:
".MainAbility"
,
"window"
:
{
"designWidth"
:
720
,
"autoDesignWidth"
:
false
}
},
{
"pages"
:
[
"pages/index/index"
,
"pages/second/second"
],
"name"
:
".MainAbility2"
,
"window"
:
{
"designWidth"
:
720
,
"autoDesignWidth"
:
false
}
}
]
}
}
\ No newline at end of file
aafwk/aafwk_standard/fa/fa_applicationinfo_test/entry/src/main/js/MainAbility/app.js
0 → 100755
浏览文件 @
697feaad
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export
default
{
onCreate
()
{
console
.
info
(
"
Application onCreate
"
);
},
onDestroy
()
{
console
.
info
(
"
Application onDestroy
"
);
}
};
aafwk/aafwk_standard/fa/fa_applicationinfo_test/entry/src/main/js/MainAbility/i18n/en-US.json
0 → 100755
浏览文件 @
697feaad
{
"strings"
:
{
"hello"
:
"Hello"
,
"world"
:
"World"
,
"page"
:
"Second Page"
,
"next"
:
"Next Page"
,
"back"
:
"Back"
},
"Files"
:
{
}
}
\ No newline at end of file
aafwk/aafwk_standard/fa/fa_applicationinfo_test/entry/src/main/js/MainAbility/i18n/zh-CN.json
0 → 100755
浏览文件 @
697feaad
{
"strings"
:
{
"hello"
:
"您好"
,
"world"
:
"世界"
,
"page"
:
"第二页"
,
"next"
:
"下一页"
,
"back"
:
"返回"
},
"Files"
:
{
}
}
\ No newline at end of file
aafwk/aafwk_standard/fa/fa_applicationinfo_test/entry/src/main/js/MainAbility/pages/index/index.css
0 → 100755
浏览文件 @
697feaad
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
.container
{
display
:
flex
;
flex-direction
:
column
;
justify-content
:
center
;
align-items
:
center
;
left
:
0px
;
top
:
0px
;
width
:
100%
;
height
:
100%
;
}
.title
{
font-size
:
60px
;
text-align
:
center
;
width
:
100%
;
height
:
40%
;
margin
:
10px
;
}
.btn
{
width
:
50%
;
height
:
100px
;
font-size
:
40px
;
}
aafwk/aafwk_standard/fa/fa_applicationinfo_test/entry/src/main/js/MainAbility/pages/index/index.hml
0 → 100755
浏览文件 @
697feaad
<!--
Copyright (c) 2021 Huawei Device Co., Ltd.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<div class="container" onswipe="touchMove">
<text class="title">
{{ $t('strings.hello') }} {{ title }} {{text}}
</text>
<input class="btn" type="button" value="{{ $t('strings.next') }}" onclick="onclick"></input>
</div>
aafwk/aafwk_standard/fa/fa_applicationinfo_test/entry/src/main/js/MainAbility/pages/index/index.js
0 → 100755
浏览文件 @
697feaad
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import
router
from
'
@system.router
'
import
{
Core
}
from
'
deccjsunit/index
'
export
default
{
data
:
{
title
:
""
,
text
:
""
},
onInit
()
{
this
.
title
=
this
.
$t
(
'
strings.world
'
);
this
.
text
=
"
MainAbility 1111
"
},
onShow
()
{
console
.
info
(
'
onShow finish
'
)
const
core
=
Core
.
getInstance
()
core
.
init
()
const
configService
=
core
.
getDefaultService
(
'
config
'
)
configService
.
setConfig
(
this
)
require
(
'
../../../test/List.test.js
'
)
core
.
execute
();
},
onclick
:
function
()
{
router
.
replace
({
uri
:
"
pages/second/second
"
})
}
}
aafwk/aafwk_standard/fa/fa_applicationinfo_test/entry/src/main/js/MainAbility/pages/second/second.css
0 → 100755
浏览文件 @
697feaad
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
.container
{
display
:
flex
;
flex-direction
:
column
;
justify-content
:
center
;
align-items
:
center
;
left
:
0px
;
top
:
0px
;
width
:
100%
;
height
:
100%
;
}
.title
{
font-size
:
60px
;
text-align
:
center
;
width
:
100%
;
height
:
40%
;
margin
:
10px
;
}
.btn
{
width
:
50%
;
height
:
100px
;
font-size
:
40px
;
}
aafwk/aafwk_standard/fa/fa_applicationinfo_test/entry/src/main/js/MainAbility/pages/second/second.hml
0 → 100755
浏览文件 @
697feaad
<!--
Copyright (c) 2021 Huawei Device Co., Ltd.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<div class="container">
<text class="title">
{{ $t('strings.page') }}
</text>
<input class="btn" type="button" value="{{ $t('strings.back') }}" onclick="onclick"></input>
</div>
aafwk/aafwk_standard/fa/fa_applicationinfo_test/entry/src/main/js/MainAbility/pages/second/second.js
0 → 100755
浏览文件 @
697feaad
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import
router
from
'
@system.router
'
export
default
{
data
:
{
title
:
'
World
'
},
onclick
:
function
()
{
router
.
replace
({
uri
:
"
pages/index/index
"
})
}
}
aafwk/aafwk_standard/fa/fa_applicationinfo_test/entry/src/main/js/MainAbility2/app.js
0 → 100755
浏览文件 @
697feaad
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import
featureAbility
from
'
@ohos.ability.featureability
'
import
commonEvent
from
'
@ohos.commonevent
'
export
default
{
onCreate
()
{
console
.
info
(
"
Application onCreate
"
);
var
uriList
=
[];
featureAbility
.
getWant
((
err
,
data
)
=>
{
console
.
log
(
"
---data:
"
+
JSON
.
stringify
(
data
)
)
console
.
log
(
"
---uri:
"
+
data
.
uri
)
if
(
data
.
uri
!=
""
){
console
.
log
(
"
want.uri
"
+
JSON
.
stringify
(
data
.
uri
));
commonEvent
.
publish
(
"
uri
"
,
{
parameters
:{
uri
:
data
.
uri
}
},
()
=>
{
console
.
log
(
"
MainAbility2 Publish CallBack data.uri
"
)
});
}
else
if
(
data
.
type
!=
""
){
console
.
log
(
"
want.type
"
+
JSON
.
stringify
(
data
.
type
));
commonEvent
.
publish
(
"
type
"
,
{
parameters
:{
type
:
data
.
type
}
},
()
=>
{
console
.
log
(
"
MainAbility2 Publish CallBack data.type
"
)
});
}
})
},
onDestroy
()
{
console
.
info
(
"
Application onDestroy
"
);
}
};
aafwk/aafwk_standard/fa/fa_applicationinfo_test/entry/src/main/js/MainAbility2/i18n/en-US.json
0 → 100755
浏览文件 @
697feaad
{
"strings"
:
{
"hello"
:
"Hello"
,
"world"
:
"World"
,
"page"
:
"Second Page"
,
"next"
:
"Next Page"
,
"back"
:
"Back"
},
"Files"
:
{
}
}
\ No newline at end of file
aafwk/aafwk_standard/fa/fa_applicationinfo_test/entry/src/main/js/MainAbility2/i18n/zh-CN.json
0 → 100755
浏览文件 @
697feaad
{
"strings"
:
{
"hello"
:
"您好"
,
"world"
:
"世界"
,
"page"
:
"第二页"
,
"next"
:
"下一页"
,
"back"
:
"返回"
},
"Files"
:
{
}
}
\ No newline at end of file
aafwk/aafwk_standard/fa/fa_applicationinfo_test/entry/src/main/js/MainAbility2/pages/index/index.css
0 → 100755
浏览文件 @
697feaad
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
.container
{
display
:
flex
;
flex-direction
:
column
;
justify-content
:
center
;
align-items
:
center
;
left
:
0px
;
top
:
0px
;
width
:
100%
;
height
:
100%
;
}
.title
{
font-size
:
60px
;
text-align
:
center
;
width
:
100%
;
height
:
40%
;
margin
:
10px
;
}
.btn
{
width
:
50%
;
height
:
100px
;
font-size
:
40px
;
}
aafwk/aafwk_standard/fa/fa_applicationinfo_test/entry/src/main/js/MainAbility2/pages/index/index.hml
0 → 100755
浏览文件 @
697feaad
<!--
Copyright (c) 2021 Huawei Device Co., Ltd.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<div class="container" onswipe="touchMove">
<text class="title">
{{ $t('strings.hello') }} {{ title }}
</text>
<input class="btn" type="button" value="{{ $t('strings.next') }}" onclick="onclick"></input>
</div>
aafwk/aafwk_standard/fa/fa_applicationinfo_test/entry/src/main/js/MainAbility2/pages/index/index.js
0 → 100755
浏览文件 @
697feaad
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import
router
from
'
@system.router
'
export
default
{
data
:
{
title
:
""
},
onInit
()
{
this
.
title
=
this
.
$t
(
'
strings.world
'
);
},
onclick
:
function
()
{
router
.
replace
({
uri
:
"
pages/second/second
"
})
}
}
aafwk/aafwk_standard/fa/fa_applicationinfo_test/entry/src/main/js/MainAbility2/pages/second/second.css
0 → 100755
浏览文件 @
697feaad
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
.container
{
display
:
flex
;
flex-direction
:
column
;
justify-content
:
center
;
align-items
:
center
;
left
:
0px
;
top
:
0px
;
width
:
100%
;
height
:
100%
;
}
.title
{
font-size
:
60px
;
text-align
:
center
;
width
:
100%
;
height
:
40%
;
margin
:
10px
;
}
.btn
{
width
:
50%
;
height
:
100px
;
font-size
:
40px
;
}
aafwk/aafwk_standard/fa/fa_applicationinfo_test/entry/src/main/js/MainAbility2/pages/second/second.hml
0 → 100755
浏览文件 @
697feaad
<!--
Copyright (c) 2021 Huawei Device Co., Ltd.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<div class="container">
<text class="title">
{{ $t('strings.page') }}
</text>
<input class="btn" type="button" value="{{ $t('strings.back') }}" onclick="onclick"></input>
</div>
aafwk/aafwk_standard/fa/fa_applicationinfo_test/entry/src/main/js/MainAbility2/pages/second/second.js
0 → 100755
浏览文件 @
697feaad
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import
router
from
'
@system.router
'
export
default
{
data
:
{
title
:
'
World
'
},
onclick
:
function
()
{
router
.
replace
({
uri
:
"
pages/index/index
"
})
}
}
aafwk/aafwk_standard/fa/fa_applicationinfo_test/entry/src/main/js/test/ApplicationInfoJsunit.test.js
0 → 100755
浏览文件 @
697feaad
// @ts-nocheck
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import
{
describe
,
expect
,
it
}
from
'
deccjsunit/index
'
import
commonEvent
from
'
@ohos.commonevent
'
import
featureAbility
from
'
@ohos.ability.featureability
'
var
getCallingBundleUri
=
{
events
:
[
"
uri
"
]
}
var
getCallingBundleType
=
{
events
:
[
"
type
"
]
}
describe
(
"
ApplicationInfoTest
"
,
function
()
{
var
TAG
=
""
;
/*
* @tc.number SUB_AA_OpenHarmony_Want_0200
* @tc.name Switching the mission in the launcherlist to the foreground is not supported
* @tc.desc Function test
* @tc.level 0
*/
it
(
'
SUB_AA_OpenHarmony_Want_0200
'
,
0
,
async
function
(
done
)
{
console
.
log
(
"
------------start SUB_AA_OpenHarmony_Want_0200-------------
"
);
TAG
=
"
SUB_AA_OpenHarmony_Want_0200
"
;
var
Subscriber
=
""
;
function
SubscribeCallBackUri
(
err
,
data
)
{
console
.
log
(
TAG
+
"
Subscribe CallBack data:
"
+
JSON
.
stringify
(
data
));
if
(
data
.
event
!=
""
){
for
(
var
key
in
data
.
parameters
){
console
.
log
(
TAG
+
"
data.parameters[key] is :
"
+
data
.
parameters
[
key
])
}
expect
(
data
.
parameters
[
key
]
==
"
key={true,true,false}
"
).
assertTrue
();
}
done
();
}
commonEvent
.
createSubscriber
(
getCallingBundleUri
).
then
(
async
(
data
)
=>
{
console
.
debug
(
TAG
+
"
====>Create Subscriber====>
"
);
Subscriber
=
data
;
await
commonEvent
.
subscribe
(
Subscriber
,
SubscribeCallBackUri
);
});
featureAbility
.
startAbility
({
want
:
{
abilityName
:
"
com.example.applicationinfo.MainAbility2
"
,
bundleName
:
"
com.example.applicationinfo
"
,
uri
:
"
key={true,true,false}
"
}
},
(
err
,
data
)
=>
{
console
.
log
(
TAG
+
"
:startAbility success , err:
"
+
JSON
.
stringify
(
err
)
+
"
,data:
"
+
JSON
.
stringify
(
data
));
});
console
.
log
(
"
------------end SUB_AA_OpenHarmony_Want_0200-------------
"
);
});
/*
* @tc.number SUB_AA_OpenHarmony_Want_0300
* @tc.name Switching the mission in the launcherlist to the foreground is not supported
* @tc.desc Function test
* @tc.level 0
*/
it
(
'
SUB_AA_OpenHarmony_Want_0300
'
,
0
,
async
function
(
done
)
{
console
.
log
(
"
------------start SUB_AA_OpenHarmony_Want_0300-------------
"
);
TAG
=
"
SUB_AA_OpenHarmony_Want_0300
"
;
var
Subscriber
=
""
;
function
SubscribeCallBackType
(
err
,
data
)
{
console
.
log
(
TAG
+
"
Subscribe CallBack data:
"
+
JSON
.
stringify
(
data
));
if
(
data
.
event
!=
""
){
for
(
var
key
in
data
.
parameters
){
console
.
log
(
TAG
+
"
data.parameters[key] is :
"
+
data
.
parameters
[
key
])
}
expect
(
data
.
parameters
[
key
]
==
"
MIMETYPE
"
).
assertTrue
();
}
done
();
}
commonEvent
.
createSubscriber
(
getCallingBundleType
).
then
(
async
(
data
)
=>
{
console
.
debug
(
TAG
+
"
====>Create Subscriber====>
"
);
Subscriber
=
data
;
await
commonEvent
.
subscribe
(
Subscriber
,
SubscribeCallBackType
);
});
featureAbility
.
startAbility
({
want
:
{
abilityName
:
"
com.example.applicationinfo.MainAbility2
"
,
bundleName
:
"
com.example.applicationinfo
"
,
type
:
"
MIMETYPE
"
,
}
},
(
err
,
data
)
=>
{
console
.
log
(
TAG
+
"
:startAbility success , err:
"
+
JSON
.
stringify
(
err
)
+
"
,data:
"
+
JSON
.
stringify
(
data
));
});
console
.
log
(
"
------------end SUB_AA_OpenHarmony_Want_0300-------------
"
);
})
})
\ No newline at end of file
aafwk/aafwk_standard/fa/fa_applicationinfo_test/entry/src/main/js/test/List.test.js
0 → 100755
浏览文件 @
697feaad
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
require
(
'
./ApplicationInfoJsunit.test.js
'
)
\ No newline at end of file
aafwk/aafwk_standard/fa/fa_applicationinfo_test/entry/src/main/resources/base/element/string.json
0 → 100755
浏览文件 @
697feaad
{
"string"
:
[
{
"name"
:
"entry_MainAbility"
,
"value"
:
"entry_MainAbility"
},
{
"name"
:
"description_mainability"
,
"value"
:
"JS_Empty Ability"
},
{
"name"
:
"description_mainability2"
,
"value"
:
"JS_Empty Ability"
},
{
"name"
:
"entry_MainAbility2"
,
"value"
:
"entry_MainAbility2"
}
]
}
\ No newline at end of file
aafwk/aafwk_standard/fa/fa_applicationinfo_test/entry/src/main/resources/base/media/icon.png
0 → 100755
浏览文件 @
697feaad
6.6 KB
aafwk/aafwk_standard/fa/fa_applicationinfo_test/signature/openharmony_sx.p7b
0 → 100755
浏览文件 @
697feaad
文件已添加
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录