diff --git a/aafwk/aafwk_standard/abilitymanager/actsamscallbackfifthscene/entry/src/main/js/resources/base/media/icon.png b/aafwk/aafwk_standard/abilitymanager/actsamscallbackfifthscene/entry/src/main/js/resources/base/media/icon.png old mode 100644 new mode 100755 diff --git a/aafwk/aafwk_standard/abilitymanager/sceneProject/simulateFAbilityFir/src/main/js/resources/base/media/icon.png b/aafwk/aafwk_standard/abilitymanager/sceneProject/simulateFAbilityFir/src/main/js/resources/base/media/icon.png old mode 100644 new mode 100755 diff --git a/aafwk/aafwk_standard/context/scene/defpermission/src/main/js/resources/base/element/string.json b/aafwk/aafwk_standard/context/scene/defpermission/src/main/js/resources/base/element/string.json old mode 100644 new mode 100755 diff --git a/appexecfwk/ams_standard/amszipfileunzipfilest/entry/src/main/js/default/app.js b/appexecfwk/ams_standard/amszipfileunzipfilest/entry/src/main/js/default/app.js old mode 100755 new mode 100644 diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosfirstscene/package.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosfirstscene/package.json old mode 100644 new mode 100755 diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosfirstsceneupdate/package.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosfirstsceneupdate/package.json old mode 100644 new mode 100755 diff --git a/hiviewdfx/hiappeventtest/hiappeventjstest/src/main/js/default/test/HiAppEvent.test.js b/hiviewdfx/hiappeventtest/hiappeventjstest/src/main/js/default/test/HiAppEvent.test.js index 6d5669c38cd9a2f9ab56e5bfd123c1b2e9632914..bb1336fec53b0b5eb27bc7dd350578e58ca5e89f 100755 --- a/hiviewdfx/hiappeventtest/hiappeventjstest/src/main/js/default/test/HiAppEvent.test.js +++ b/hiviewdfx/hiappeventtest/hiappeventjstest/src/main/js/default/test/HiAppEvent.test.js @@ -29,13 +29,13 @@ describe('HiAppEventApiTest', function () { "key_array_str": ["a", "b", "c"], "key_array_bool": [true, false],"key_array_int2": [1, 2, 3], "key_arr_float2": [1.1, 2.2, 3.3], "key_arr_str2": ["a", "b", "c"], "key_array_bool2": [true, false]}, (err, value) => { - console.log(`HiAppEvent into json-callback`); + console.log('HiAppEvent into json-callback'); if (err) { - console.error(`HiAppEvent json-callback-error code=${err.code}`); + console.error('HiAppEvent json-callback-error code=${err.code}'); expect().assertFail(); done(); } else { - console.log(`HiAppEvent json-callback-success value=${value}`); + console.log('HiAppEvent json-callback-success value=${value}'); expect(value == 0).assertTrue(); done(); } @@ -54,13 +54,13 @@ describe('HiAppEventApiTest', function () { "key_array_str": ["a", "b", "c"], "key_array_bool": [true, false],"key_array_int2": [1, 2, 3], "key_arr_float2": [1.1, 2.2, 3.3], "key_arr_str2": ["a", "b", "c"], "key_array_bool2": [true, false]}, (err, value) => { - console.log(`HiAppEvent into json-callback`); + console.log('HiAppEvent into json-callback'); if (err) { - console.error(`HiAppEvent json-callback-error code=${err.code}`); + console.error('HiAppEvent json-callback-error code=${err.code}'); expect().assertFail(); done(); } else { - console.log(`HiAppEvent json-callback-success value=${value}`); + console.log('HiAppEvent json-callback-success value=${value}'); expect(value == 0).assertTrue(); done(); } @@ -80,13 +80,13 @@ describe('HiAppEventApiTest', function () { "key_array_str": ["a", "b", "c"], "key_array_bool": [true, false],"key_array_int2": [1, 2, 3], "key_arr_float2": [1.1, 2.2, 3.3], "key_arr_str2": ["a", "b", "c"], "key_array_bool2": [true, false]}, (err, value) => { - console.log(`HiAppEvent into json-callback`); + console.log('HiAppEvent into json-callback'); if (err) { - console.error(`HiAppEvent json-callback-error code=${err.code}`); + console.error('HiAppEvent json-callback-error code=${err.code}'); expect().assertFail(); done(); } else { - console.log(`HiAppEvent json-callback-success value=${value}`); + console.log('HiAppEvent json-callback-success value=${value}'); expect(value == 0).assertTrue(); done(); } @@ -106,13 +106,13 @@ describe('HiAppEventApiTest', function () { "key_array_str": ["a", "b", "c"], "key_array_bool": [true, false],"key_array_int2": [1, 2, 3], "key_arr_float2": [1.1, 2.2, 3.3], "key_arr_str2": ["a", "b", "c"], "key_array_bool2": [true, false]}, (err, value) => { - console.log(`HiAppEvent into json-callback`); + console.log('HiAppEvent into json-callback'); if (err) { - console.error(`HiAppEvent json-callback-error code=${err.code}`); + console.error('HiAppEvent json-callback-error code=${err.code}'); expect().assertFail(); done(); } else { - console.log(`HiAppEvent json-callback-success value=${value}`); + console.log('HiAppEvent json-callback-success value=${value}'); expect(value == 0).assertTrue(); done(); } @@ -130,13 +130,13 @@ describe('HiAppEventApiTest', function () { console.info('testHiAppEventApi06 start') HiAppEvent.write("write", HiAppEvent.EventType.FAULT, {"key_int":100}, (err, value) => { - console.log(`HiAppEvent into json-callback`); + console.log('HiAppEvent into json-callback'); if (err) { - console.error(`HiAppEvent json-callback-error code=${err.code}`); + console.error('HiAppEvent json-callback-error code=${err.code}'); expect().assertFail(); done(); } else { - console.log(`HiAppEvent json-callback-success value=${value}`); + console.log('HiAppEvent json-callback-success value=${value}'); expect(value == 0).assertTrue(); done(); } @@ -153,13 +153,13 @@ describe('HiAppEventApiTest', function () { console.info('testHiAppEventApi07 start') HiAppEvent.write("write", HiAppEvent.EventType.FAULT, {"key_int_array":[100, 200]}, (err, value) => { - console.log(`HiAppEvent into json-callback`); + console.log('HiAppEvent into json-callback'); if (err) { - console.error(`HiAppEvent json-callback-error code=${err.code}`); + console.error('HiAppEvent json-callback-error code=${err.code}'); expect().assertFail(); done(); } else { - console.log(`HiAppEvent json-callback-success value=${value}`); + console.log('HiAppEvent json-callback-success value=${value}'); expect(value == 0).assertTrue(); done(); } @@ -176,13 +176,13 @@ describe('HiAppEventApiTest', function () { console.info('testHiAppEventApi08 start') HiAppEvent.write("write", HiAppEvent.EventType.FAULT, {"key_float":1.1}, (err, value) => { - console.log(`HiAppEvent into json-callback`); + console.log('HiAppEvent into json-callback'); if (err) { - console.error(`HiAppEvent json-callback-error code=${err.code}`); + console.error('HiAppEvent json-callback-error code=${err.code}'); expect().assertFail(); done(); } else { - console.log(`HiAppEvent json-callback-success value=${value}`); + console.log('HiAppEvent json-callback-success value=${value}'); expect(value == 0).assertTrue(); done(); } @@ -199,13 +199,13 @@ describe('HiAppEventApiTest', function () { console.info('testHiAppEventApi09 start') HiAppEvent.write("write", HiAppEvent.EventType.FAULT, {"key_float_array":[1.1, 1.2]}, (err, value) => { - console.log(`HiAppEvent into json-callback`); + console.log('HiAppEvent into json-callback'); if (err) { - console.error(`HiAppEvent json-callback-error code=${err.code}`); + console.error('HiAppEvent json-callback-error code=${err.code}'); expect().assertFail(); done(); } else { - console.log(`HiAppEvent json-callback-success value=${value}`); + console.log('HiAppEvent json-callback-success value=${value}'); expect(value == 0).assertTrue(); done(); } @@ -222,13 +222,13 @@ describe('HiAppEventApiTest', function () { console.info('testHiAppEventApi10 start') HiAppEvent.write("write", HiAppEvent.EventType.FAULT, {"key_string":"hello world"}, (err, value) => { - console.log(`HiAppEvent into json-callback`); + console.log('HiAppEvent into json-callback'); if (err) { - console.error(`HiAppEvent json-callback-error code=${err.code}`); + console.error('HiAppEvent json-callback-error code=${err.code}'); expect().assertFail(); done(); } else { - console.log(`HiAppEvent json-callback-success value=${value}`); + console.log('HiAppEvent json-callback-success value=${value}'); expect(value == 0).assertTrue(); done(); } @@ -245,13 +245,13 @@ describe('HiAppEventApiTest', function () { console.info('testHiAppEventApi11 start') HiAppEvent.write("write", HiAppEvent.EventType.FAULT, {"key_string_array":["hello world", "hello world2"]}, (err, value) => { - console.log(`HiAppEvent into json-callback`); + console.log('HiAppEvent into json-callback'); if (err) { - console.error(`HiAppEvent json-callback-error code=${err.code}`); + console.error('HiAppEvent json-callback-error code=${err.code}'); expect().assertFail(); done(); } else { - console.log(`HiAppEvent json-callback-success value=${value}`); + console.log('HiAppEvent json-callback-success value=${value}'); expect(value == 0).assertTrue(); done(); } @@ -268,13 +268,13 @@ describe('HiAppEventApiTest', function () { console.info('testHiAppEventApi12 start') HiAppEvent.write("write", HiAppEvent.EventType.FAULT, {"key_bool":true}, (err, value) => { - console.log(`HiAppEvent into json-callback`); + console.log('HiAppEvent into json-callback'); if (err) { - console.error(`HiAppEvent json-callback-error code=${err.code}`); + console.error('HiAppEvent json-callback-error code=${err.code}'); expect().assertFail(); done(); } else { - console.log(`HiAppEvent json-callback-success value=${value}`); + console.log('HiAppEvent json-callback-success value=${value}'); expect(value == 0).assertTrue(); done(); } @@ -291,13 +291,13 @@ describe('HiAppEventApiTest', function () { console.info('testHiAppEventApi13 start') HiAppEvent.write("write", HiAppEvent.EventType.FAULT, {"key_bool":false}, (err, value) => { - console.log(`HiAppEvent into json-callback`); + console.log('HiAppEvent into json-callback'); if (err) { - console.error(`HiAppEvent json-callback-error code=${err.code}`); + console.error('HiAppEvent json-callback-error code=${err.code}'); expect().assertFail(); done(); } else { - console.log(`HiAppEvent json-callback-success value=${value}`); + console.log('HiAppEvent json-callback-success value=${value}'); expect(value == 0).assertTrue(); done(); } @@ -314,13 +314,13 @@ describe('HiAppEventApiTest', function () { console.info('testHiAppEventApi14 start') HiAppEvent.write("write", HiAppEvent.EventType.FAULT, {"key_bool_array":[false, true]}, (err, value) => { - console.log(`HiAppEvent into json-callback`); + console.log('HiAppEvent into json-callback'); if (err) { - console.error(`HiAppEvent json-callback-error code=${err.code}`); + console.error('HiAppEvent json-callback-error code=${err.code}'); expect().assertFail(); done(); } else { - console.log(`HiAppEvent json-callback-success value=${value}`); + console.log('HiAppEvent json-callback-success value=${value}'); expect(value == 0).assertTrue(); done(); } @@ -337,13 +337,13 @@ describe('HiAppEventApiTest', function () { console.info('testHiAppEventApi15 start') HiAppEvent.write("write", HiAppEvent.EventType.FAULT, {"key_char":'c'}, (err, value) => { - console.log(`HiAppEvent into json-callback`); + console.log('HiAppEvent into json-callback'); if (err) { - console.error(`HiAppEvent json-callback-error code=${err.code}`); + console.error('HiAppEvent json-callback-error code=${err.code}'); expect().assertFail(); done(); } else { - console.log(`HiAppEvent json-callback-success value=${value}`); + console.log('HiAppEvent json-callback-success value=${value}'); expect(value == 0).assertTrue(); done(); } @@ -360,13 +360,13 @@ describe('HiAppEventApiTest', function () { console.info('testHiAppEventApi16 start') HiAppEvent.write("write", HiAppEvent.EventType.FAULT, {"key_long":2147483647}, (err, value) => { - console.log(`HiAppEvent into json-callback`); + console.log('HiAppEvent into json-callback'); if (err) { - console.error(`HiAppEvent json-callback-error code=${err.code}`); + console.error('HiAppEvent json-callback-error code=${err.code}'); expect().assertFail(); done(); } else { - console.log(`HiAppEvent json-callback-success value=${value}`); + console.log('HiAppEvent json-callback-success value=${value}'); expect(value == 0).assertTrue(); done(); } @@ -383,13 +383,13 @@ describe('HiAppEventApiTest', function () { console.info('testHiAppEventApi17 start') HiAppEvent.write("write", HiAppEvent.EventType.FAULT, {"key_double":100.123}, (err, value) => { - console.log(`HiAppEvent into json-callback`); + console.log('HiAppEvent into json-callback'); if (err) { - console.error(`HiAppEvent json-callback-error code=${err.code}`); + console.error('HiAppEvent json-callback-error code=${err.code}'); expect().assertFail(); done(); } else { - console.log(`HiAppEvent json-callback-success value=${value}`); + console.log('HiAppEvent json-callback-success value=${value}'); expect(value == 0).assertTrue(); done(); } @@ -406,20 +406,20 @@ describe('HiAppEventApiTest', function () { console.info('testHiAppEventApi18 start') HiAppEvent.write("write", HiAppEvent.EventType.FAULT, {"key_longlong":2147483647}, (err, value) => { - console.log(`HiAppEvent into json-callback`); + console.log('HiAppEvent into json-callback'); if (err) { - console.error(`HiAppEvent json-callback-error code=${err.code}`); + console.error('HiAppEvent json-callback-error code=${err.code}'); expect().assertFail(); done(); } else { - console.log(`HiAppEvent json-callback-success value=${value}`); + console.log('HiAppEvent json-callback-success value=${value}'); expect(value == 0).assertTrue(); done(); } }); console.info('testHiAppEventApi18 end') }) - + /** * @tc.number DFX_DFT_HiviewKit_HiAppEvent_JSNAPI_1900 * @tc.name testHiAppEventApi19 @@ -429,20 +429,20 @@ describe('HiAppEventApiTest', function () { console.info('testHiAppEventApi19 start') HiAppEvent.write("write", HiAppEvent.EventType.BEHAVIOR + 1, {"key_longlong":2147483647}, (err, value) => { - console.log(`HiAppEvent into json-callback`); + console.log('HiAppEvent into json-callback'); if (err) { - console.error(`HiAppEvent json-callback-error code=${err.code}`); + console.error('HiAppEvent json-callback-error code=${err.code}'); expect().assertFail(); done(); } else { - console.log(`HiAppEvent json-callback-success value=${value}`); + console.log('HiAppEvent json-callback-success value=${value}'); expect(value == 0).assertTrue(); done(); } }); console.info('testHiAppEventApi19 end') }) - + /** * @tc.number DFX_DFT_HiviewKit_HiAppEvent_JSNAPI_2000 * @tc.name testHiAppEventApi20 @@ -452,20 +452,20 @@ describe('HiAppEventApiTest', function () { console.info('testHiAppEventApi20 start') HiAppEvent.write("", HiAppEvent.EventType.FAULT, {"key_longlong":2147483647}, (err, value) => { - console.log(`HiAppEvent20 into json-callback`); + console.log('HiAppEvent20 into json-callback'); if (err) { - console.error(`HiAppEvent20 json-callback-error code=${err.code}`); + console.error('HiAppEvent20 json-callback-error code=${err.code}'); expect(err.code == -1).assertTrue(); done(); } else { - console.log(`HiAppEvent20 json-callback-success value=${value}`); + console.log('HiAppEvent20 json-callback-success value=${value}'); expect().assertFail(); done(); } }); console.info('testHiAppEventApi20 end') }) - + /** * @tc.number DFX_DFT_HiviewKit_HiAppEvent_JSNAPI_2100 * @tc.name testHiAppEventApi21 @@ -481,17 +481,99 @@ describe('HiAppEventApiTest', function () { } HiAppEvent.write(strlong, HiAppEvent.EventType.FAULT, {"key_longlong":2147483647}, (err, value) => { - console.log(`HiAppEvent into json-callback`); + console.log('HiAppEvent into json-callback'); if (err) { - console.error(`HiAppEvent21 json-callback-error code=${err.code}`); + console.error('HiAppEvent21 json-callback-error code=${err.code}'); expect(err.code == -1).assertTrue(); done(); } else { - console.log(`HiAppEvent21 json-callback-success value=${value}`); + console.log('HiAppEvent21 json-callback-success value=${value}'); expect().assertFail(); done(); } }); console.info('testHiAppEventApi21 end') }) + + /** + * @tc.number DFX_DFT_HiviewKit_HiAppEvent_JSNAPI_2200 + * @tc.name testHiAppEventApi22 + * @tc.desc HiAppEvent configure interface with disable option set true. + */ + it('testHiAppEventApi22', 3, function () { + console.info('testHiAppEventApi22 start') + let configret =false; + configret = HiAppEvent.configure({disable:true}); + expect(configret == true).assertTrue(); + HiAppEvent.configure({disable: false}); + console.info('testHiAppEventApi22 end') + }) + + /** + * @tc.number DFX_DFT_HiviewKit_HiAppEvent_JSNAPI_2300 + * @tc.name testHiAppEventApi23 + * @tc.desc HiAppEvent configure interface with disable option set false. + */ + it('testHiAppEventApi23', 3, function () { + console.info('testHiAppEventApi23 start') + let configret =false; + configret = HiAppEvent.configure({disable: false}); + expect(configret == true).assertTrue(); + console.info('testHiAppEventApi23 end') + }) + + /** + * @tc.number DFX_DFT_HiviewKit_HiAppEvent_JSNAPI_2400 + * @tc.name testHiAppEventApi24 + * @tc.desc HiAppEvent configure interface with maxStorage option set 100M. + */ + it('testHiAppEventApi24', 3, function () { + console.info('testHiAppEventApi24 start') + let configret =false; + configret = HiAppEvent.configure({maxStorage:'100M'}); + console.info('configret = %d', configret); + expect(configret == true).assertTrue(); + console.info('testHiAppEventApi24 end') + }) + + /** + * @tc.number DFX_DFT_HiviewKit_HiAppEvent_JSNAPI_2500 + * @tc.name testHiAppEventApi25 + * @tc.desc HiAppEvent with predefined event and param. + */ + it('testHiAppEventApi25', 3, async function (done) { + console.info('testHiAppEventApi25 start') + HiAppEvent.write(HiAppEvent.Event.USER_LOGIN, HiAppEvent.EventType.BEHAVIOR, + {[HiAppEvent.Param.USER_ID]: 'userlogin', [HiAppEvent.Param.DISTRIBUTED_SERVICE_NAME]: 'HiAppEvent', + [HiAppEvent.Param.DISTRIBUTED_SERVICE_INSTANCE_ID]: 100}, + (err, value) => { + console.log('HiAppEvent into json-callback'); + if (err) { + console.error('HiAppEvent json-callback-error code=${err.code}'); + expect().assertFail(); + done(); + } else { + console.log('HiAppEvent json-callback-success value=${value}'); + expect(value == 0).assertTrue(); + done(); + } + }); + + HiAppEvent.write(HiAppEvent.Event.USER_LOGOUT, HiAppEvent.EventType.BEHAVIOR, + {[HiAppEvent.Param.USER_ID]: 'userlogout', [HiAppEvent.Param.DISTRIBUTED_SERVICE_NAME]: 'HiAppEvent', + [HiAppEvent.Param.DISTRIBUTED_SERVICE_INSTANCE_ID]: 100}, + (err, value) => { + console.log('HiAppEvent into json-callback'); + if (err) { + console.error('HiAppEvent json-callback-error code=${err.code}'); + expect().assertFail(); + done(); + } else { + console.log('HiAppEvent json-callback-success value=${value}'); + expect(value == 0).assertTrue(); + done(); + } + }); + console.info('testHiAppEventApi25 end') + }) }) diff --git a/notification/ans_standard/actsansnotificationcancel/entry/package.json b/notification/ans_standard/actsansnotificationcancel/entry/package.json old mode 100644 new mode 100755 diff --git a/notification/ans_standard/actsansslottest/actsansgetslottestcallback/entry/package.json b/notification/ans_standard/actsansslottest/actsansgetslottestcallback/entry/package.json old mode 100755 new mode 100644 diff --git a/notification/ans_standard/actsansslottest/actsansgetslottestcallback/entry/src/main/js/test/List.test.js b/notification/ans_standard/actsansslottest/actsansgetslottestcallback/entry/src/main/js/test/List.test.js old mode 100755 new mode 100644 diff --git a/notification/ans_standard/actsansslottest/actsansgetslottestpromise/entry/package.json b/notification/ans_standard/actsansslottest/actsansgetslottestpromise/entry/package.json old mode 100755 new mode 100644 diff --git a/notification/ans_standard/actsansslottest/actsansremoveslottest/entry/package.json b/notification/ans_standard/actsansslottest/actsansremoveslottest/entry/package.json old mode 100755 new mode 100644 diff --git a/notification/ans_standard/publish_test/enablenotification/localnotificationenable/entry/.gitignore b/notification/ans_standard/publish_test/enablenotification/localnotificationenable/entry/.gitignore old mode 100644 new mode 100755 diff --git a/notification/ans_standard/publish_test/subscribe/publishfirst/entry/.gitignore b/notification/ans_standard/publish_test/subscribe/publishfirst/entry/.gitignore old mode 100644 new mode 100755