Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
ac616186
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看板
未验证
提交
ac616186
编写于
3月 21, 2022
作者:
O
openharmony_ci
提交者:
Gitee
3月 21, 2022
浏览文件
操作
浏览文件
下载
差异文件
!2694 new use case
Merge pull request !2694 from 火箭龟/mas321_1
上级
53bbaefd
8cb4610d
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
24 addition
and
14 deletion
+24
-14
resourceschedule/resourceschedule_standard/deviceusagestatisticsjsunit/BUILD.gn
...rceschedule_standard/deviceusagestatisticsjsunit/BUILD.gn
+1
-1
resourceschedule/resourceschedule_standard/deviceusagestatisticsjsunit/signature/ohos_device_usage_statistics.p7b
...atisticsjsunit/signature/ohos_device_usage_statistics.p7b
+0
-0
resourceschedule/resourceschedule_standard/deviceusagestatisticsjsunit/src/main/config.json
...standard/deviceusagestatisticsjsunit/src/main/config.json
+10
-0
resourceschedule/resourceschedule_standard/deviceusagestatisticsjsunit/src/main/js/default/test/DeviceUsageStatisticsJsunit.test.js
.../main/js/default/test/DeviceUsageStatisticsJsunit.test.js
+13
-13
未找到文件。
resourceschedule/resourceschedule_standard/deviceusagestatisticsjsunit/BUILD.gn
浏览文件 @
ac616186
...
@@ -19,7 +19,7 @@ ohos_js_hap_suite("resourceschedule_deviceusagestatisticsjsunit_js_test") {
...
@@ -19,7 +19,7 @@ ohos_js_hap_suite("resourceschedule_deviceusagestatisticsjsunit_js_test") {
":resourceschedule_js_assets",
":resourceschedule_js_assets",
":resourceschedule_js_resources",
":resourceschedule_js_resources",
]
]
certificate_profile = "./signature/o
penharmony_sx
.p7b"
certificate_profile = "./signature/o
hos_device_usage_statistics
.p7b"
hap_name = "ActsResourcescheduleDeviceUsageStatisticsJsunitTest"
hap_name = "ActsResourcescheduleDeviceUsageStatisticsJsunitTest"
}
}
ohos_js_assets("resourceschedule_js_assets") {
ohos_js_assets("resourceschedule_js_assets") {
...
...
resourceschedule/resourceschedule_standard/deviceusagestatisticsjsunit/signature/o
penharmony_sx
.p7b
→
resourceschedule/resourceschedule_standard/deviceusagestatisticsjsunit/signature/o
hos_device_usage_statistics
.p7b
浏览文件 @
ac616186
无法预览此类型文件
resourceschedule/resourceschedule_standard/deviceusagestatisticsjsunit/src/main/config.json
浏览文件 @
ac616186
...
@@ -55,6 +55,16 @@
...
@@ -55,6 +55,16 @@
"autoDesignWidth"
:
false
"autoDesignWidth"
:
false
}
}
}
}
],
"defPermissions"
:
[
{
"name"
:
"ohos.permission.BUNDLE_ACTIVE_INFO"
}
],
"reqPermissions"
:
[
{
"name"
:
"ohos.permission.BUNDLE_ACTIVE_INFO"
}
]
]
}
}
}
}
resourceschedule/resourceschedule_standard/deviceusagestatisticsjsunit/src/main/js/default/test/DeviceUsageStatisticsJsunit.test.js
浏览文件 @
ac616186
...
@@ -338,7 +338,7 @@ describe("DeviceUsageStatisticsJsTest", function () {
...
@@ -338,7 +338,7 @@ describe("DeviceUsageStatisticsJsTest", function () {
*/
*/
it
(
"
DeviceUsageStatisticsJsTest013
"
,
0
,
function
(
done
)
{
it
(
"
DeviceUsageStatisticsJsTest013
"
,
0
,
function
(
done
)
{
console
.
info
(
'
----------------------DeviceUsageStatisticsJsTest013---------------------------
'
);
console
.
info
(
'
----------------------DeviceUsageStatisticsJsTest013---------------------------
'
);
let
value1
=
bundleState
.
i
ntervalType
.
BY_OPTIMIZED
;
let
value1
=
bundleState
.
I
ntervalType
.
BY_OPTIMIZED
;
expect
(
value1
).
assertEqual
(
0
)
expect
(
value1
).
assertEqual
(
0
)
done
();
done
();
})
})
...
@@ -351,7 +351,7 @@ describe("DeviceUsageStatisticsJsTest", function () {
...
@@ -351,7 +351,7 @@ describe("DeviceUsageStatisticsJsTest", function () {
*/
*/
it
(
"
DeviceUsageStatisticsJsTest014
"
,
0
,
function
(
done
)
{
it
(
"
DeviceUsageStatisticsJsTest014
"
,
0
,
function
(
done
)
{
console
.
info
(
'
----------------------DeviceUsageStatisticsJsTest014---------------------------
'
);
console
.
info
(
'
----------------------DeviceUsageStatisticsJsTest014---------------------------
'
);
let
value1
=
bundleState
.
i
ntervalType
.
BY_DAILY
;
let
value1
=
bundleState
.
I
ntervalType
.
BY_DAILY
;
expect
(
value1
).
assertEqual
(
1
)
expect
(
value1
).
assertEqual
(
1
)
done
();
done
();
})
})
...
@@ -364,7 +364,7 @@ describe("DeviceUsageStatisticsJsTest", function () {
...
@@ -364,7 +364,7 @@ describe("DeviceUsageStatisticsJsTest", function () {
*/
*/
it
(
"
DeviceUsageStatisticsJsTest015
"
,
0
,
function
(
done
)
{
it
(
"
DeviceUsageStatisticsJsTest015
"
,
0
,
function
(
done
)
{
console
.
info
(
'
----------------------DeviceUsageStatisticsJsTest015---------------------------
'
);
console
.
info
(
'
----------------------DeviceUsageStatisticsJsTest015---------------------------
'
);
let
value1
=
bundleState
.
i
ntervalType
.
BY_WEEKLY
;
let
value1
=
bundleState
.
I
ntervalType
.
BY_WEEKLY
;
expect
(
value1
).
assertEqual
(
2
)
expect
(
value1
).
assertEqual
(
2
)
done
();
done
();
})
})
...
@@ -377,7 +377,7 @@ describe("DeviceUsageStatisticsJsTest", function () {
...
@@ -377,7 +377,7 @@ describe("DeviceUsageStatisticsJsTest", function () {
*/
*/
it
(
"
DeviceUsageStatisticsJsTest016
"
,
0
,
function
(
done
)
{
it
(
"
DeviceUsageStatisticsJsTest016
"
,
0
,
function
(
done
)
{
console
.
info
(
'
----------------------DeviceUsageStatisticsJsTest016---------------------------
'
);
console
.
info
(
'
----------------------DeviceUsageStatisticsJsTest016---------------------------
'
);
let
value1
=
bundleState
.
i
ntervalType
.
BY_MONTHLY
;
let
value1
=
bundleState
.
I
ntervalType
.
BY_MONTHLY
;
expect
(
value1
).
assertEqual
(
3
)
expect
(
value1
).
assertEqual
(
3
)
done
();
done
();
})
})
...
@@ -390,7 +390,7 @@ describe("DeviceUsageStatisticsJsTest", function () {
...
@@ -390,7 +390,7 @@ describe("DeviceUsageStatisticsJsTest", function () {
*/
*/
it
(
"
DeviceUsageStatisticsJsTest017
"
,
0
,
function
(
done
)
{
it
(
"
DeviceUsageStatisticsJsTest017
"
,
0
,
function
(
done
)
{
console
.
info
(
'
----------------------DeviceUsageStatisticsJsTest017---------------------------
'
);
console
.
info
(
'
----------------------DeviceUsageStatisticsJsTest017---------------------------
'
);
let
value1
=
bundleState
.
i
ntervalType
.
BY_ANNUALLY
;
let
value1
=
bundleState
.
I
ntervalType
.
BY_ANNUALLY
;
expect
(
value1
).
assertEqual
(
4
)
expect
(
value1
).
assertEqual
(
4
)
done
();
done
();
})
})
...
@@ -685,7 +685,7 @@ describe("DeviceUsageStatisticsJsTest", function () {
...
@@ -685,7 +685,7 @@ describe("DeviceUsageStatisticsJsTest", function () {
console
.
info
(
'
----------------------DeviceUsageStatisticsJsTest028---------------------------
'
);
console
.
info
(
'
----------------------DeviceUsageStatisticsJsTest028---------------------------
'
);
let
beginTime
=
10
;
let
beginTime
=
10
;
let
endTime
=
20000000000000
;
let
endTime
=
20000000000000
;
bundleState
.
query
Current
BundleActiveStates
(
beginTime
,
endTime
,
(
err
,
res
)
=>
{
bundleState
.
queryBundleActiveStates
(
beginTime
,
endTime
,
(
err
,
res
)
=>
{
if
(
err
.
code
===
0
)
{
if
(
err
.
code
===
0
)
{
expect
(
true
).
assertEqual
(
true
);
expect
(
true
).
assertEqual
(
true
);
if
(
res
===
undefined
)
{
if
(
res
===
undefined
)
{
...
@@ -712,7 +712,7 @@ describe("DeviceUsageStatisticsJsTest", function () {
...
@@ -712,7 +712,7 @@ describe("DeviceUsageStatisticsJsTest", function () {
console
.
info
(
'
----------------------DeviceUsageStatisticsJsTest029---------------------------
'
);
console
.
info
(
'
----------------------DeviceUsageStatisticsJsTest029---------------------------
'
);
let
beginTime
=
10
;
let
beginTime
=
10
;
let
endTime
=
20000000000000
;
let
endTime
=
20000000000000
;
bundleState
.
query
Current
BundleActiveStates
(
beginTime
,
endTime
,
(
err
,
res
)
=>
{
bundleState
.
queryBundleActiveStates
(
beginTime
,
endTime
,
(
err
,
res
)
=>
{
if
(
err
.
code
===
0
)
{
if
(
err
.
code
===
0
)
{
expect
(
true
).
assertEqual
(
true
);
expect
(
true
).
assertEqual
(
true
);
if
(
res
===
undefined
)
{
if
(
res
===
undefined
)
{
...
@@ -739,7 +739,7 @@ describe("DeviceUsageStatisticsJsTest", function () {
...
@@ -739,7 +739,7 @@ describe("DeviceUsageStatisticsJsTest", function () {
console
.
info
(
'
----------------------DeviceUsageStatisticsJsTest030---------------------------
'
);
console
.
info
(
'
----------------------DeviceUsageStatisticsJsTest030---------------------------
'
);
let
beginTime
=
10
;
let
beginTime
=
10
;
let
endTime
=
20000000000000
;
let
endTime
=
20000000000000
;
bundleState
.
query
Current
BundleActiveStates
(
beginTime
,
endTime
,
(
err
,
res
)
=>
{
bundleState
.
queryBundleActiveStates
(
beginTime
,
endTime
,
(
err
,
res
)
=>
{
if
(
err
.
code
===
0
)
{
if
(
err
.
code
===
0
)
{
expect
(
true
).
assertEqual
(
true
);
expect
(
true
).
assertEqual
(
true
);
if
(
res
===
undefined
)
{
if
(
res
===
undefined
)
{
...
@@ -766,7 +766,7 @@ describe("DeviceUsageStatisticsJsTest", function () {
...
@@ -766,7 +766,7 @@ describe("DeviceUsageStatisticsJsTest", function () {
console
.
info
(
'
----------------------DeviceUsageStatisticsJsTest031---------------------------
'
);
console
.
info
(
'
----------------------DeviceUsageStatisticsJsTest031---------------------------
'
);
let
beginTime
=
10
;
let
beginTime
=
10
;
let
endTime
=
20000000000000
;
let
endTime
=
20000000000000
;
bundleState
.
query
Current
BundleActiveStates
(
beginTime
,
endTime
,
(
err
,
res
)
=>
{
bundleState
.
queryBundleActiveStates
(
beginTime
,
endTime
,
(
err
,
res
)
=>
{
if
(
err
.
code
===
0
)
{
if
(
err
.
code
===
0
)
{
expect
(
true
).
assertEqual
(
true
);
expect
(
true
).
assertEqual
(
true
);
if
(
res
===
undefined
)
{
if
(
res
===
undefined
)
{
...
@@ -793,7 +793,7 @@ describe("DeviceUsageStatisticsJsTest", function () {
...
@@ -793,7 +793,7 @@ describe("DeviceUsageStatisticsJsTest", function () {
console
.
info
(
'
----------------------DeviceUsageStatisticsJsTest032---------------------------
'
);
console
.
info
(
'
----------------------DeviceUsageStatisticsJsTest032---------------------------
'
);
let
beginTime
=
10
;
let
beginTime
=
10
;
let
endTime
=
20000000000000
;
let
endTime
=
20000000000000
;
bundleState
.
query
Current
BundleActiveStates
(
beginTime
,
endTime
,
(
err
,
res
)
=>
{
bundleState
.
queryBundleActiveStates
(
beginTime
,
endTime
,
(
err
,
res
)
=>
{
if
(
err
.
code
===
0
)
{
if
(
err
.
code
===
0
)
{
expect
(
true
).
assertEqual
(
true
);
expect
(
true
).
assertEqual
(
true
);
if
(
res
===
undefined
)
{
if
(
res
===
undefined
)
{
...
@@ -820,7 +820,7 @@ describe("DeviceUsageStatisticsJsTest", function () {
...
@@ -820,7 +820,7 @@ describe("DeviceUsageStatisticsJsTest", function () {
console
.
info
(
'
----------------------DeviceUsageStatisticsJsTest033---------------------------
'
);
console
.
info
(
'
----------------------DeviceUsageStatisticsJsTest033---------------------------
'
);
let
beginTime
=
10
;
let
beginTime
=
10
;
let
endTime
=
20000000000000
;
let
endTime
=
20000000000000
;
bundleState
.
query
Current
BundleActiveStates
(
beginTime
,
endTime
,
(
err
,
res
)
=>
{
bundleState
.
queryBundleActiveStates
(
beginTime
,
endTime
,
(
err
,
res
)
=>
{
if
(
err
.
code
===
0
)
{
if
(
err
.
code
===
0
)
{
expect
(
true
).
assertEqual
(
true
);
expect
(
true
).
assertEqual
(
true
);
if
(
res
===
undefined
)
{
if
(
res
===
undefined
)
{
...
@@ -847,7 +847,7 @@ describe("DeviceUsageStatisticsJsTest", function () {
...
@@ -847,7 +847,7 @@ describe("DeviceUsageStatisticsJsTest", function () {
console
.
info
(
'
----------------------DeviceUsageStatisticsJsTest034---------------------------
'
);
console
.
info
(
'
----------------------DeviceUsageStatisticsJsTest034---------------------------
'
);
let
beginTime
=
10
;
let
beginTime
=
10
;
let
endTime
=
20000000000000
;
let
endTime
=
20000000000000
;
bundleState
.
query
CurrentBundleActiveState
s
(
beginTime
,
endTime
).
then
((
res
)
=>
{
bundleState
.
query
BundleStateInfo
s
(
beginTime
,
endTime
).
then
((
res
)
=>
{
expect
(
true
).
assertEqual
(
true
);
expect
(
true
).
assertEqual
(
true
);
let
bundleStateInfo1
=
{
let
bundleStateInfo1
=
{
bundleName
:
'
www.explace.com
'
,
bundleName
:
'
www.explace.com
'
,
...
@@ -886,7 +886,7 @@ describe("DeviceUsageStatisticsJsTest", function () {
...
@@ -886,7 +886,7 @@ describe("DeviceUsageStatisticsJsTest", function () {
console
.
info
(
'
----------------------DeviceUsageStatisticsJsTest035---------------------------
'
);
console
.
info
(
'
----------------------DeviceUsageStatisticsJsTest035---------------------------
'
);
let
beginTime
=
1001
;
let
beginTime
=
1001
;
let
endTime
=
20000000000000
;
let
endTime
=
20000000000000
;
bundleState
.
query
CurrentBundleActiveStates
(
0
,
beginTime
,
endTime
,
(
err
,
res
)
=>
{
bundleState
.
query
BundleStateInfoByInterval
(
0
,
beginTime
,
endTime
,
(
err
,
res
)
=>
{
if
(
err
.
code
===
0
)
{
if
(
err
.
code
===
0
)
{
expect
(
true
).
assertEqual
(
true
);
expect
(
true
).
assertEqual
(
true
);
if
(
res
===
undefined
)
{
if
(
res
===
undefined
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录