diff --git a/multimodalinput/BUILD.gn b/multimodalinput/BUILD.gn index e2b34ad1b0dca5a2ea3747fd1f52d040fa4f34e8..f82002374996e059ef6ea71ae8da9be04241579d 100644 --- a/multimodalinput/BUILD.gn +++ b/multimodalinput/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (C) 2021 Huawei Device Co., Ltd. +# Copyright (C) 2022 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 diff --git a/multimodalinput/input_js_standard/BUILD.gn b/multimodalinput/input_js_standard/BUILD.gn index 9bbc8fafa37d49a7fede842d118aa935bffb46eb..4faf8d207f2ee20ac19be4594ddd67597c996af1 100644 --- a/multimodalinput/input_js_standard/BUILD.gn +++ b/multimodalinput/input_js_standard/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (C) 2021 Huawei Device Co., Ltd. +# Copyright (C) 2022 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 diff --git a/multimodalinput/input_js_standard/src/main/js/default/app.js b/multimodalinput/input_js_standard/src/main/js/default/app.js index e423f4bce4698ec1d7dc86c3eea3990a5e7b1085..830070d196d86b127cea947d168bfd116f446205 100644 --- a/multimodalinput/input_js_standard/src/main/js/default/app.js +++ b/multimodalinput/input_js_standard/src/main/js/default/app.js @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Huawei Device Co., Ltd. + * Copyright (C) 2022 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 diff --git a/multimodalinput/input_js_standard/src/main/js/default/pages/index/index.css b/multimodalinput/input_js_standard/src/main/js/default/pages/index/index.css index 6fda792753f2e15f22b529c7b90a82185b2770bf..72baaffcaa675bfe9f3d3d1974690ae7d05c1a4b 100644 --- a/multimodalinput/input_js_standard/src/main/js/default/pages/index/index.css +++ b/multimodalinput/input_js_standard/src/main/js/default/pages/index/index.css @@ -1,3 +1,18 @@ +/* + * Copyright (C) 2022 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 { flex-direction: column; justify-content: center; diff --git a/multimodalinput/input_js_standard/src/main/js/default/pages/index/index.hml b/multimodalinput/input_js_standard/src/main/js/default/pages/index/index.hml index f64b040a5ae394dbaa5e185e1ecd4f4556b92184..8d0e2061b88c99c91488405f0f2ead0c77de1a9e 100644 --- a/multimodalinput/input_js_standard/src/main/js/default/pages/index/index.hml +++ b/multimodalinput/input_js_standard/src/main/js/default/pages/index/index.hml @@ -1,3 +1,18 @@ + +
{{ $t('strings.hello') }} {{ title }} diff --git a/multimodalinput/input_js_standard/src/main/js/default/pages/index/index.js b/multimodalinput/input_js_standard/src/main/js/default/pages/index/index.js index 7b5fd53fb8052084c1de8036ae37402ff471ab3b..8591303b6dc0dd113b5615caee931a4b69fd80a4 100644 --- a/multimodalinput/input_js_standard/src/main/js/default/pages/index/index.js +++ b/multimodalinput/input_js_standard/src/main/js/default/pages/index/index.js @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Huawei Device Co., Ltd. + * Copyright (C) 2022 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 @@ -13,7 +13,7 @@ * limitations under the License. */ -import {Core, ExpectExtend} from 'deccjsunit/index' +import { Core, ExpectExtend } from 'deccjsunit/index' const injectRef = Object.getPrototypeOf(global) || global injectRef.regeneratorRuntime = require('@babel/runtime/regenerator') diff --git a/multimodalinput/input_js_standard/src/main/js/default/test/InputConsumer.test.js b/multimodalinput/input_js_standard/src/main/js/default/test/InputConsumer.test.js index 7a2b28274a5b2524e99cedbdfebd26c4bd27a767..ac9bcaaafb788e512748df37da8dc9f8c36953aa 100755 --- a/multimodalinput/input_js_standard/src/main/js/default/test/InputConsumer.test.js +++ b/multimodalinput/input_js_standard/src/main/js/default/test/InputConsumer.test.js @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Huawei Device Co., Ltd. + * Copyright (c) 2022 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 diff --git a/multimodalinput/input_js_standard/src/main/js/default/test/InputDevice.test.js b/multimodalinput/input_js_standard/src/main/js/default/test/InputDevice.test.js index 3f950e5146bfdafe527b35412971cc99450372ff..18c0ccc97048cb0c35fee9b57d8cb3489fe7c993 100644 --- a/multimodalinput/input_js_standard/src/main/js/default/test/InputDevice.test.js +++ b/multimodalinput/input_js_standard/src/main/js/default/test/InputDevice.test.js @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Huawei Device Co., Ltd. + * Copyright (c) 2022 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 diff --git a/multimodalinput/input_js_standard/src/main/js/default/test/ListMultimodalinput.test.js b/multimodalinput/input_js_standard/src/main/js/default/test/ListMultimodalinput.test.js index cdaebe0f867e6ad0ea47b593353fdad488039911..2983feb4873b4a1f077d09b1d3512529b688a754 100644 --- a/multimodalinput/input_js_standard/src/main/js/default/test/ListMultimodalinput.test.js +++ b/multimodalinput/input_js_standard/src/main/js/default/test/ListMultimodalinput.test.js @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Huawei Device Co., Ltd. + * Copyright (c) 2022 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 diff --git a/powermgr/powermgrbattery/src/main/js/default/pages/index/index.css b/powermgr/powermgrbattery/src/main/js/default/pages/index/index.css index 6fda792753f2e15f22b529c7b90a82185b2770bf..7300d2a1fa143c4d24a9bcba4e5f76363ee7b3a4 100755 --- a/powermgr/powermgrbattery/src/main/js/default/pages/index/index.css +++ b/powermgr/powermgrbattery/src/main/js/default/pages/index/index.css @@ -1,3 +1,18 @@ +/* + * 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 { flex-direction: column; justify-content: center; diff --git a/powermgr/powermgrbattery/src/main/js/default/pages/index/index.hml b/powermgr/powermgrbattery/src/main/js/default/pages/index/index.hml index f64b040a5ae394dbaa5e185e1ecd4f4556b92184..eeaf6a3fc3d3611dc94827c5e1a9f390513b6ed8 100755 --- a/powermgr/powermgrbattery/src/main/js/default/pages/index/index.hml +++ b/powermgr/powermgrbattery/src/main/js/default/pages/index/index.hml @@ -1,3 +1,18 @@ + +
{{ $t('strings.hello') }} {{ title }} diff --git a/powermgr/powermgrbattery_rk3568/src/main/js/default/pages/index/index.css b/powermgr/powermgrbattery_rk3568/src/main/js/default/pages/index/index.css index 6fda792753f2e15f22b529c7b90a82185b2770bf..7311df55604b1bbcbd18d4d36e55655e8c3a99f1 100755 --- a/powermgr/powermgrbattery_rk3568/src/main/js/default/pages/index/index.css +++ b/powermgr/powermgrbattery_rk3568/src/main/js/default/pages/index/index.css @@ -1,3 +1,18 @@ +/* + * 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 { flex-direction: column; justify-content: center; diff --git a/powermgr/powermgrbattery_rk3568/src/main/js/default/pages/index/index.hml b/powermgr/powermgrbattery_rk3568/src/main/js/default/pages/index/index.hml index f64b040a5ae394dbaa5e185e1ecd4f4556b92184..eeaf6a3fc3d3611dc94827c5e1a9f390513b6ed8 100755 --- a/powermgr/powermgrbattery_rk3568/src/main/js/default/pages/index/index.hml +++ b/powermgr/powermgrbattery_rk3568/src/main/js/default/pages/index/index.hml @@ -1,3 +1,18 @@ + +
{{ $t('strings.hello') }} {{ title }} diff --git a/powermgr/powermgrbatterystats/src/main/js/default/pages/index/index.css b/powermgr/powermgrbatterystats/src/main/js/default/pages/index/index.css index 5c52a87a04f583e9d5f4db1dd40d4eafdb9b6aeb..cff50023ce54b7fbbbae9ecd72ab5a49e0b50291 100755 --- a/powermgr/powermgrbatterystats/src/main/js/default/pages/index/index.css +++ b/powermgr/powermgrbatterystats/src/main/js/default/pages/index/index.css @@ -1,3 +1,18 @@ +/* + * 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 { flex-direction: column; justify-content: center; diff --git a/powermgr/powermgrbatterystats/src/main/js/default/pages/index/index.hml b/powermgr/powermgrbatterystats/src/main/js/default/pages/index/index.hml index f629c71a9be857db6cdf94149652a191b9b272ea..936e04ebdb33a919d0ce918652dac1da8bb6ec92 100755 --- a/powermgr/powermgrbatterystats/src/main/js/default/pages/index/index.hml +++ b/powermgr/powermgrbatterystats/src/main/js/default/pages/index/index.hml @@ -1,3 +1,18 @@ + +
{{ $t('strings.hello') }} {{ title }} diff --git a/powermgr/powermgrthermal/src/main/js/default/pages/index/index.css b/powermgr/powermgrthermal/src/main/js/default/pages/index/index.css index 6fda792753f2e15f22b529c7b90a82185b2770bf..7300d2a1fa143c4d24a9bcba4e5f76363ee7b3a4 100644 --- a/powermgr/powermgrthermal/src/main/js/default/pages/index/index.css +++ b/powermgr/powermgrthermal/src/main/js/default/pages/index/index.css @@ -1,3 +1,18 @@ +/* + * 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 { flex-direction: column; justify-content: center; diff --git a/powermgr/powermgrthermal/src/main/js/default/pages/index/index.hml b/powermgr/powermgrthermal/src/main/js/default/pages/index/index.hml index f64b040a5ae394dbaa5e185e1ecd4f4556b92184..eeaf6a3fc3d3611dc94827c5e1a9f390513b6ed8 100644 --- a/powermgr/powermgrthermal/src/main/js/default/pages/index/index.hml +++ b/powermgr/powermgrthermal/src/main/js/default/pages/index/index.hml @@ -1,3 +1,18 @@ + +
{{ $t('strings.hello') }} {{ title }} diff --git a/sensors/miscdevice_standard/src/main/js/default/pages/index/index.css b/sensors/miscdevice_standard/src/main/js/default/pages/index/index.css index 6fda792753f2e15f22b529c7b90a82185b2770bf..7300d2a1fa143c4d24a9bcba4e5f76363ee7b3a4 100755 --- a/sensors/miscdevice_standard/src/main/js/default/pages/index/index.css +++ b/sensors/miscdevice_standard/src/main/js/default/pages/index/index.css @@ -1,3 +1,18 @@ +/* + * 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 { flex-direction: column; justify-content: center; diff --git a/sensors/miscdevice_standard/src/main/js/default/pages/index/index.hml b/sensors/miscdevice_standard/src/main/js/default/pages/index/index.hml index f64b040a5ae394dbaa5e185e1ecd4f4556b92184..eeaf6a3fc3d3611dc94827c5e1a9f390513b6ed8 100755 --- a/sensors/miscdevice_standard/src/main/js/default/pages/index/index.hml +++ b/sensors/miscdevice_standard/src/main/js/default/pages/index/index.hml @@ -1,3 +1,18 @@ + +
{{ $t('strings.hello') }} {{ title }} diff --git a/sensors/sensor_standard/src/main/js/default/pages/index/index.css b/sensors/sensor_standard/src/main/js/default/pages/index/index.css index 6fda792753f2e15f22b529c7b90a82185b2770bf..7300d2a1fa143c4d24a9bcba4e5f76363ee7b3a4 100644 --- a/sensors/sensor_standard/src/main/js/default/pages/index/index.css +++ b/sensors/sensor_standard/src/main/js/default/pages/index/index.css @@ -1,3 +1,18 @@ +/* + * 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 { flex-direction: column; justify-content: center; diff --git a/sensors/sensor_standard/src/main/js/default/pages/index/index.hml b/sensors/sensor_standard/src/main/js/default/pages/index/index.hml index f64b040a5ae394dbaa5e185e1ecd4f4556b92184..eeaf6a3fc3d3611dc94827c5e1a9f390513b6ed8 100644 --- a/sensors/sensor_standard/src/main/js/default/pages/index/index.hml +++ b/sensors/sensor_standard/src/main/js/default/pages/index/index.hml @@ -1,3 +1,18 @@ + +
{{ $t('strings.hello') }} {{ title }} diff --git a/sensors/sensor_standard/src/main/js/default/test/SensorGeneralalgorithm.test.js b/sensors/sensor_standard/src/main/js/default/test/SensorGeneralalgorithm.test.js index 9a727dcf0423e9adc10b8be58e69e108946ba8fc..95aea4c9faf05f7827fb47c581ca6ac4dc2c256e 100755 --- a/sensors/sensor_standard/src/main/js/default/test/SensorGeneralalgorithm.test.js +++ b/sensors/sensor_standard/src/main/js/default/test/SensorGeneralalgorithm.test.js @@ -627,7 +627,7 @@ describe("SensorJsTest", function () { it('SensorJsTest_088', 0, async function (done) { console.info('SensorJsTest_088 start') sensor.createQuaternion([0.52, -0.336, -0.251], (error, data) => { - console.info('SensorJsTest_088' + 'lengh:' + data.length); + console.info('SensorJsTest_088' + 'length:' + data.length); if (error) { console.info('SensorJsTest_088 failed'); expect(false).assertTrue(); @@ -929,7 +929,7 @@ describe("SensorJsTest", function () { expect(data).assertEqual(getGeomagneticDipResult[0]) } done() - console.info('SensorJsTest_101' + 'lengh:' + data.length); + console.info('SensorJsTest_101' + 'length:' + data.length); }) console.info("SensorJsTest_101 end") }) diff --git a/sensors/sensor_standard/src/main/js/default/test/SensorOnOffTest.test.js b/sensors/sensor_standard/src/main/js/default/test/SensorOnOffTest.test.js index ffeaefa220f1a9b0046f53da3470d4fe720a56b9..0c8606ff4504ab21d256100ad1401e807db0ae7c 100755 --- a/sensors/sensor_standard/src/main/js/default/test/SensorOnOffTest.test.js +++ b/sensors/sensor_standard/src/main/js/default/test/SensorOnOffTest.test.js @@ -46,6 +46,9 @@ describe('SystemParameterTest', function () { console.info('afterEach caled') }) + let testSensorId = 0; + let testNullSensorId = -1; + /** * @tc.number SUB_SENSORS_Sensor_JSTest_0010 * @tc.name testRegisterSensortest001 @@ -53,20 +56,16 @@ describe('SystemParameterTest', function () { */ it('SUB_SENSORS_Sensor_JSTest_0010', 0, async function (done) { console.info('SUB_SENSORS_Sensor_JSTest_0010 start'); - await sensor.on(0, function (error, data) { - if (error) { - if (error.code == -1) { - console.info("testRegisterSensortest001 on error: sensor 0 not exit") - } else { - console.info('testRegisterSensortest001 on error :' + error.code); - expect(false).assertTrue(); - } - done(); - } else { + await sensor.on(testSensorId, function (data) { + if (data) { console.info('testRegisterSensortest001 on success'); expect(data.x).assertInstanceOf('Number'); expect(data.timestamp).assertInstanceOf('Number'); done(); + } else { + console.info('testRegisterSensortest001 on error'); + expect(false).assertTrue(); + done(); } }); console.info('SUB_SENSORS_Sensor_JSTest_0010 end'); @@ -79,17 +78,17 @@ describe('SystemParameterTest', function () { */ it('SUB_SENSORS_Sensor_JSTest_0020', 0, async function (done) { console.info('SUB_SENSORS_Sensor_JSTest_0020 start'); - await sensor.on(-1, function (error, data) { - if (error) { - console.info('testRegisterSensortest002 on error'); - expect(true).assertTrue(); - done(); - } else { + await sensor.on(testNullSensorId, function (data) { + if (data) { console.info('testRegisterSensortest002 on success'); expect(false).assertTrue(); done(); } }); + setTimeout(() => { + expect(true).assertTrue(); + done(); + }, 500) console.info('SUB_SENSORS_Sensor_JSTest_0020 end'); })