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

!2697 new use case

Merge pull request !2697 from 火箭龟/release321_1
......@@ -19,7 +19,7 @@ ohos_js_hap_suite("resourceschedule_deviceusagestatisticsjsunit_js_test") {
":resourceschedule_js_assets",
":resourceschedule_js_resources",
]
certificate_profile = "./signature/openharmony_sx.p7b"
certificate_profile = "./signature/ohos_device_usage_statistics.p7b"
hap_name = "ActsResourcescheduleDeviceUsageStatisticsJsunitTest"
}
ohos_js_assets("resourceschedule_js_assets") {
......
......@@ -55,6 +55,16 @@
"autoDesignWidth": false
}
}
],
"defPermissions": [
{
"name": "ohos.permission.BUNDLE_ACTIVE_INFO"
}
],
"reqPermissions": [
{
"name": "ohos.permission.BUNDLE_ACTIVE_INFO"
}
]
}
}
......@@ -342,7 +342,7 @@ describe("DeviceUsageStatisticsJsTest", function () {
*/
it("DeviceUsageStatisticsJsTest013", 0, function (done) {
console.info('----------------------DeviceUsageStatisticsJsTest013---------------------------');
let value1 = bundleState.intervalType.BY_OPTIMIZED;
let value1 = bundleState.IntervalType.BY_OPTIMIZED;
expect(value1).assertEqual(0)
done();
})
......@@ -355,7 +355,7 @@ describe("DeviceUsageStatisticsJsTest", function () {
*/
it("DeviceUsageStatisticsJsTest014", 0, function (done) {
console.info('----------------------DeviceUsageStatisticsJsTest014---------------------------');
let value1 = bundleState.intervalType.BY_DAILY;
let value1 = bundleState.IntervalType.BY_DAILY;
expect(value1).assertEqual(1)
done();
})
......@@ -368,7 +368,7 @@ describe("DeviceUsageStatisticsJsTest", function () {
*/
it("DeviceUsageStatisticsJsTest015", 0, function (done) {
console.info('----------------------DeviceUsageStatisticsJsTest015---------------------------');
let value1 = bundleState.intervalType.BY_WEEKLY;
let value1 = bundleState.IntervalType.BY_WEEKLY;
expect(value1).assertEqual(2)
done();
})
......@@ -381,7 +381,7 @@ describe("DeviceUsageStatisticsJsTest", function () {
*/
it("DeviceUsageStatisticsJsTest016", 0, function (done) {
console.info('----------------------DeviceUsageStatisticsJsTest016---------------------------');
let value1 = bundleState.intervalType.BY_MONTHLY;
let value1 = bundleState.IntervalType.BY_MONTHLY;
expect(value1).assertEqual(3)
done();
})
......@@ -394,7 +394,7 @@ describe("DeviceUsageStatisticsJsTest", function () {
*/
it("DeviceUsageStatisticsJsTest017", 0, function (done) {
console.info('----------------------DeviceUsageStatisticsJsTest017---------------------------');
let value1 = bundleState.intervalType.BY_ANNUALLY;
let value1 = bundleState.IntervalType.BY_ANNUALLY;
expect(value1).assertEqual(4)
done();
})
......@@ -689,7 +689,7 @@ describe("DeviceUsageStatisticsJsTest", function () {
console.info('----------------------DeviceUsageStatisticsJsTest028---------------------------');
let beginTime = 10;
let endTime = 20000000000000;
bundleState.queryCurrentBundleActiveStates(beginTime, endTime, (err, res) => {
bundleState.queryBundleActiveStates(beginTime, endTime, (err, res) => {
if(err.code === 0) {
expect(true).assertEqual(true);
if(res === undefined) {
......@@ -716,7 +716,7 @@ describe("DeviceUsageStatisticsJsTest", function () {
console.info('----------------------DeviceUsageStatisticsJsTest029---------------------------');
let beginTime = 10;
let endTime = 20000000000000;
bundleState.queryCurrentBundleActiveStates(beginTime, endTime, (err, res) => {
bundleState.queryBundleActiveStates(beginTime, endTime, (err, res) => {
if(err.code === 0) {
expect(true).assertEqual(true);
if(res === undefined) {
......@@ -743,7 +743,7 @@ describe("DeviceUsageStatisticsJsTest", function () {
console.info('----------------------DeviceUsageStatisticsJsTest030---------------------------');
let beginTime = 10;
let endTime = 20000000000000;
bundleState.queryCurrentBundleActiveStates(beginTime, endTime, (err, res) => {
bundleState.queryBundleActiveStates(beginTime, endTime, (err, res) => {
if(err.code === 0) {
expect(true).assertEqual(true);
if(res === undefined) {
......@@ -770,7 +770,7 @@ describe("DeviceUsageStatisticsJsTest", function () {
console.info('----------------------DeviceUsageStatisticsJsTest031---------------------------');
let beginTime = 10;
let endTime = 20000000000000;
bundleState.queryCurrentBundleActiveStates(beginTime, endTime, (err, res) => {
bundleState.queryBundleActiveStates(beginTime, endTime, (err, res) => {
if(err.code === 0) {
expect(true).assertEqual(true);
if(res === undefined) {
......@@ -797,7 +797,7 @@ describe("DeviceUsageStatisticsJsTest", function () {
console.info('----------------------DeviceUsageStatisticsJsTest032---------------------------');
let beginTime = 10;
let endTime = 20000000000000;
bundleState.queryCurrentBundleActiveStates(beginTime, endTime, (err, res) => {
bundleState.queryBundleActiveStates(beginTime, endTime, (err, res) => {
if(err.code === 0) {
expect(true).assertEqual(true);
if(res === undefined) {
......@@ -824,7 +824,7 @@ describe("DeviceUsageStatisticsJsTest", function () {
console.info('----------------------DeviceUsageStatisticsJsTest033---------------------------');
let beginTime = 10;
let endTime = 20000000000000;
bundleState.queryCurrentBundleActiveStates(beginTime, endTime, (err, res) => {
bundleState.queryBundleActiveStates(beginTime, endTime, (err, res) => {
if(err.code === 0) {
expect(true).assertEqual(true);
if(res === undefined) {
......@@ -851,7 +851,7 @@ describe("DeviceUsageStatisticsJsTest", function () {
console.info('----------------------DeviceUsageStatisticsJsTest034---------------------------');
let beginTime = 10;
let endTime = 20000000000000;
bundleState.queryCurrentBundleActiveStates(beginTime, endTime).then((res) => {
bundleState.queryBundleStateInfos(beginTime, endTime).then((res) => {
expect(true).assertEqual(true);
let bundleStateInfo1 = {
bundleName: 'www.explace.com',
......@@ -890,7 +890,7 @@ describe("DeviceUsageStatisticsJsTest", function () {
console.info('----------------------DeviceUsageStatisticsJsTest035---------------------------');
let beginTime = 1001;
let endTime = 20000000000000;
bundleState.queryCurrentBundleActiveStates(0, beginTime, endTime, (err, res) => {
bundleState.queryBundleStateInfoByInterval(0, beginTime, endTime, (err, res) => {
if(err.code === 0) {
expect(true).assertEqual(true);
if(res === undefined) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册