From 1330043b6b5f048f873599f10aae2e0e370af4c9 Mon Sep 17 00:00:00 2001 From: chenkang Date: Sat, 6 Aug 2022 15:54:05 +0800 Subject: [PATCH] update Signed-off-by: chenkang --- multimodalinput/input_js_standard/BUILD.gn | 64 ++++++++-------- .../multimodalinput_ets_standard/BUILD.gn | 74 ++++++++++--------- .../test/MultimodalInputEventType.test.ets | 8 +- 3 files changed, 75 insertions(+), 71 deletions(-) mode change 100644 => 100755 multimodalinput/input_js_standard/BUILD.gn diff --git a/multimodalinput/input_js_standard/BUILD.gn b/multimodalinput/input_js_standard/BUILD.gn old mode 100644 new mode 100755 index 4faf8d207..b5d682c1f --- a/multimodalinput/input_js_standard/BUILD.gn +++ b/multimodalinput/input_js_standard/BUILD.gn @@ -1,31 +1,33 @@ -# 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. - -import("//test/xts/tools/build/suite.gni") - -ohos_js_hap_suite("multimodalinput_js_test") { - hap_profile = "./src/main/config.json" - deps = [ - ":multimodalinput_js_assets", - ":multimodalinput_js_resources", - ] - certificate_profile = "./signature/openharmony_sx.p7b" - hap_name = "ActsMultimodalinputJSApiTest" -} -ohos_js_assets("multimodalinput_js_assets") { - source_dir = "./src/main/js/default" -} -ohos_resources("multimodalinput_js_resources") { - sources = [ "./src/main/resources" ] - hap_profile = "./src/main/config.json" -} +# 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. + +import("//test/xts/tools/build/suite.gni") + +ohos_js_hap_suite("multimodalinput_js_test") { + hap_profile = "./src/main/config.json" + deps = [ + ":multimodalinput_js_assets", + ":multimodalinput_js_resources", + ] + certificate_profile = "./signature/openharmony_sx.p7b" + hap_name = "ActsMultimodalinputJSApiTest" + subsystem_name = "multimodalinput" + part_name = "input" +} +ohos_js_assets("multimodalinput_js_assets") { + source_dir = "./src/main/js/default" +} +ohos_resources("multimodalinput_js_resources") { + sources = [ "./src/main/resources" ] + hap_profile = "./src/main/config.json" +} diff --git a/multimodalinput/multimodalinput_ets_standard/BUILD.gn b/multimodalinput/multimodalinput_ets_standard/BUILD.gn index 4de5f9aff..8b0be5843 100755 --- a/multimodalinput/multimodalinput_ets_standard/BUILD.gn +++ b/multimodalinput/multimodalinput_ets_standard/BUILD.gn @@ -1,36 +1,38 @@ -# 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("//test/xts/tools/build/suite.gni") - -ohos_js_hap_suite("ActsMultimodalInputEtsTest") { - hap_profile = "./entry/src/main/config.json" - deps = [ - ":multimodalinput_ets_assets", - ":multimodalinput_ets_resources", - ":multimodalinput_ets_test_assets", - ] - ets2abc = true - certificate_profile = "./signature/openharmony_sx.p7b" - hap_name = "ActsMultimodalInputEtsTest" -} -ohos_js_assets("multimodalinput_ets_assets") { - source_dir = "./entry/src/main/ets/MainAbility" -} -ohos_js_assets("multimodalinput_ets_test_assets") { - source_dir = "./entry/src/main/ets/TestAbility" -} -ohos_resources("multimodalinput_ets_resources") { - sources = [ "./entry/src/main/resources" ] - hap_profile = "./entry/src/main/config.json" -} +# 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("//test/xts/tools/build/suite.gni") + +ohos_js_hap_suite("ActsMultimodalInputEtsTest") { + hap_profile = "./entry/src/main/config.json" + deps = [ + ":multimodalinput_ets_assets", + ":multimodalinput_ets_resources", + ":multimodalinput_ets_test_assets", + ] + ets2abc = true + certificate_profile = "./signature/openharmony_sx.p7b" + hap_name = "ActsMultimodalInputEtsTest" + subsystem_name = "multimodalinput" + part_name = "input" +} +ohos_js_assets("multimodalinput_ets_assets") { + source_dir = "./entry/src/main/ets/MainAbility" +} +ohos_js_assets("multimodalinput_ets_test_assets") { + source_dir = "./entry/src/main/ets/TestAbility" +} +ohos_resources("multimodalinput_ets_resources") { + sources = [ "./entry/src/main/resources" ] + hap_profile = "./entry/src/main/config.json" +} diff --git a/multimodalinput/multimodalinput_ets_standard/entry/src/main/ets/test/MultimodalInputEventType.test.ets b/multimodalinput/multimodalinput_ets_standard/entry/src/main/ets/test/MultimodalInputEventType.test.ets index fc08c8412..01b7e3d9d 100755 --- a/multimodalinput/multimodalinput_ets_standard/entry/src/main/ets/test/MultimodalInputEventType.test.ets +++ b/multimodalinput/multimodalinput_ets_standard/entry/src/main/ets/test/MultimodalInputEventType.test.ets @@ -63,7 +63,7 @@ export default function MultimodalInputEventTypeTest() { let testKeyEvent: KeyEvent = { id: 1, deviceId: 1, actionTime: 1, screenId: 1, windowId: 1, action: keyEvent.Action.DOWN, key: testKey, unicodeChar: 1, keys: [testKey], - ctrlKey: true, altKey: true, shiftKey: true, infooKey: true, fnKey: true, capsLock: true, numLock: true, + ctrlKey: true, altKey: true, shiftKey: true, logoKey: true, fnKey: true, capsLock: true, numLock: true, scrollLock: true }; @@ -74,7 +74,7 @@ export default function MultimodalInputEventTypeTest() { expect(testKeyEvent.ctrlKey).assertTrue(); expect(testKeyEvent.altKey).assertTrue(); expect(testKeyEvent.shiftKey).assertTrue(); - expect(testKeyEvent.infooKey).assertTrue(); + expect(testKeyEvent.logoKey).assertTrue(); expect(testKeyEvent.fnKey).assertTrue(); expect(testKeyEvent.capsLock).assertTrue(); expect(testKeyEvent.numLock).assertTrue(); @@ -188,7 +188,7 @@ export default function MultimodalInputEventTypeTest() { windowY: 1, rawDeltaX: 1, rawDeltaY: 1, button: mouseEvent.Button.LEFT, pressedButtons: [mouseEvent.Button.LEFT], axes: [testAxisValue], pressedKeys: [inputkeyCode.KeyCode.KEYCODE_FN], ctrlKey: true, altKey: true, shiftKey: true, - infooKey: true, fnKey: true, capsLock: true, numLock: true, scrollLock: true + logoKey: true, fnKey: true, capsLock: true, numLock: true, scrollLock: true }; expect(testMouseEvent.action == mouseEvent.Action.CANCEL).assertTrue(); expect(testMouseEvent.screenX == 1).assertTrue(); @@ -204,7 +204,7 @@ export default function MultimodalInputEventTypeTest() { expect(testMouseEvent.ctrlKey).assertTrue(); expect(testMouseEvent.altKey).assertTrue(); expect(testMouseEvent.shiftKey).assertTrue(); - expect(testMouseEvent.infooKey).assertTrue(); + expect(testMouseEvent.logoKey).assertTrue(); expect(testMouseEvent.fnKey).assertTrue(); expect(testMouseEvent.capsLock).assertTrue(); expect(testMouseEvent.numLock).assertTrue(); -- GitLab