From 0fe33c611310fd46593629002ff42eaf8ebe9d21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BA=A6=E7=A9=97?= Date: Thu, 10 Oct 2024 10:44:14 +0800 Subject: [PATCH 01/15] =?UTF-8?q?=E5=88=9B=E5=BB=BA=E5=8D=95=E5=85=83?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E5=A4=96=E5=B1=82=E7=9B=AE=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 麦穗 --- shell/platform/ohos/test/io/flutter/FlutterInjectorTest.ets | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 shell/platform/ohos/test/io/flutter/FlutterInjectorTest.ets diff --git a/shell/platform/ohos/test/io/flutter/FlutterInjectorTest.ets b/shell/platform/ohos/test/io/flutter/FlutterInjectorTest.ets new file mode 100644 index 0000000000..e69de29bb2 -- Gitee From 79869b808c22a7b47b32acfbd8ca008067410eef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BA=A6=E7=A9=97?= Date: Tue, 22 Oct 2024 18:15:41 +0800 Subject: [PATCH 02/15] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8D=95=E5=85=83?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E7=9B=AE=E5=BD=95=E7=BB=93=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 麦穗 --- .../flutter_embedding/application/.gitignore | 6 + .../application/build-profile.json5 | 28 ++ .../application/hvigorfile.ts | 20 + .../application/obfuscation-rules.txt | 23 + .../application/oh-package.json5 | 12 + .../applicationability/ApplicationAbility.ets | 55 +++ .../ApplicationBackupAbility.ets | 26 + .../application/src/main/ets/pages/Index.ets | 34 ++ .../application/src/main/module.json5 | 52 ++ .../main/resources/base/element/color.json | 8 + .../main/resources/base/element/string.json | 16 + .../main/resources/base/media/background.png | Bin 0 -> 57364 bytes .../main/resources/base/media/foreground.png | Bin 0 -> 12430 bytes .../resources/base/media/layered_image.json | 7 + .../main/resources/base/media/startIcon.png | Bin 0 -> 20093 bytes .../resources/base/profile/backup_config.json | 3 + .../resources/base/profile/main_pages.json | 5 + .../main/resources/en_US/element/string.json | 16 + .../main/resources/zh_CN/element/string.json | 16 + .../application/src/mock/mock-config.json5 | 2 + .../src/ohosTest/ets/test/List.test.ets | 43 ++ ...lutterAbilityAndEntryDelegateTest.test.ets | 94 ++++ .../ohos/FlutterAbilityTest.test.ets | 307 ++++++++++++ .../embedding/ohos/FlutterEntryTest.test.ets | 238 ++++++++++ .../ohos/FlutterManagerTest.test.ets | 103 ++++ .../ohos/OhosTouchProcessorTest.test.ets | 58 +++ .../test/embedding/ohos/SettingTest.test.ets | 44 ++ .../plugin/common/BinaryCodecTest.test.ets | 38 ++ .../PlatformViewRegistryImplTest.test.ets | 30 ++ .../platform/PlatformViewWrapperTest.test.ets | 48 ++ .../PlatformViewsControllerTest.test.ets | 215 +++++++++ .../platform/RawPointerCoordTest.test.ets | 41 ++ .../platform/RootDvModelManagerTest.test.ets | 37 ++ .../test/plugin/util/ByteBufferTest.test.ets | 446 ++++++++++++++++++ .../application/src/ohosTest/module.json5 | 13 + .../application/src/test/List.test.ets | 19 + .../application/src/test/LocalUnit.test.ets | 47 ++ .../flutter_embedding/build-profile.json5 | 14 +- .../main/ets/embedding/engine/FlutterNapi.ets | 2 +- 39 files changed, 2164 insertions(+), 2 deletions(-) create mode 100644 shell/platform/ohos/flutter_embedding/application/.gitignore create mode 100644 shell/platform/ohos/flutter_embedding/application/build-profile.json5 create mode 100644 shell/platform/ohos/flutter_embedding/application/hvigorfile.ts create mode 100644 shell/platform/ohos/flutter_embedding/application/obfuscation-rules.txt create mode 100644 shell/platform/ohos/flutter_embedding/application/oh-package.json5 create mode 100644 shell/platform/ohos/flutter_embedding/application/src/main/ets/applicationability/ApplicationAbility.ets create mode 100644 shell/platform/ohos/flutter_embedding/application/src/main/ets/applicationbackupability/ApplicationBackupAbility.ets create mode 100644 shell/platform/ohos/flutter_embedding/application/src/main/ets/pages/Index.ets create mode 100644 shell/platform/ohos/flutter_embedding/application/src/main/module.json5 create mode 100644 shell/platform/ohos/flutter_embedding/application/src/main/resources/base/element/color.json create mode 100644 shell/platform/ohos/flutter_embedding/application/src/main/resources/base/element/string.json create mode 100644 shell/platform/ohos/flutter_embedding/application/src/main/resources/base/media/background.png create mode 100644 shell/platform/ohos/flutter_embedding/application/src/main/resources/base/media/foreground.png create mode 100644 shell/platform/ohos/flutter_embedding/application/src/main/resources/base/media/layered_image.json create mode 100644 shell/platform/ohos/flutter_embedding/application/src/main/resources/base/media/startIcon.png create mode 100644 shell/platform/ohos/flutter_embedding/application/src/main/resources/base/profile/backup_config.json create mode 100644 shell/platform/ohos/flutter_embedding/application/src/main/resources/base/profile/main_pages.json create mode 100644 shell/platform/ohos/flutter_embedding/application/src/main/resources/en_US/element/string.json create mode 100644 shell/platform/ohos/flutter_embedding/application/src/main/resources/zh_CN/element/string.json create mode 100644 shell/platform/ohos/flutter_embedding/application/src/mock/mock-config.json5 create mode 100644 shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/List.test.ets create mode 100644 shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/ohos/FlutterAbilityAndEntryDelegateTest.test.ets create mode 100644 shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/ohos/FlutterAbilityTest.test.ets create mode 100644 shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/ohos/FlutterEntryTest.test.ets create mode 100644 shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/ohos/FlutterManagerTest.test.ets create mode 100644 shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/ohos/OhosTouchProcessorTest.test.ets create mode 100644 shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/ohos/SettingTest.test.ets create mode 100644 shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/common/BinaryCodecTest.test.ets create mode 100644 shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/platform/PlatformViewRegistryImplTest.test.ets create mode 100644 shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/platform/PlatformViewWrapperTest.test.ets create mode 100644 shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/platform/PlatformViewsControllerTest.test.ets create mode 100644 shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/platform/RawPointerCoordTest.test.ets create mode 100644 shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/platform/RootDvModelManagerTest.test.ets create mode 100644 shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/util/ByteBufferTest.test.ets create mode 100644 shell/platform/ohos/flutter_embedding/application/src/ohosTest/module.json5 create mode 100644 shell/platform/ohos/flutter_embedding/application/src/test/List.test.ets create mode 100644 shell/platform/ohos/flutter_embedding/application/src/test/LocalUnit.test.ets diff --git a/shell/platform/ohos/flutter_embedding/application/.gitignore b/shell/platform/ohos/flutter_embedding/application/.gitignore new file mode 100644 index 0000000000..e2713a2779 --- /dev/null +++ b/shell/platform/ohos/flutter_embedding/application/.gitignore @@ -0,0 +1,6 @@ +/node_modules +/oh_modules +/.preview +/build +/.cxx +/.test \ No newline at end of file diff --git a/shell/platform/ohos/flutter_embedding/application/build-profile.json5 b/shell/platform/ohos/flutter_embedding/application/build-profile.json5 new file mode 100644 index 0000000000..4d611879c7 --- /dev/null +++ b/shell/platform/ohos/flutter_embedding/application/build-profile.json5 @@ -0,0 +1,28 @@ +{ + "apiType": "stageMode", + "buildOption": { + }, + "buildOptionSet": [ + { + "name": "release", + "arkOptions": { + "obfuscation": { + "ruleOptions": { + "enable": false, + "files": [ + "./obfuscation-rules.txt" + ] + } + } + } + }, + ], + "targets": [ + { + "name": "default" + }, + { + "name": "ohosTest", + } + ] +} \ No newline at end of file diff --git a/shell/platform/ohos/flutter_embedding/application/hvigorfile.ts b/shell/platform/ohos/flutter_embedding/application/hvigorfile.ts new file mode 100644 index 0000000000..c71da0f040 --- /dev/null +++ b/shell/platform/ohos/flutter_embedding/application/hvigorfile.ts @@ -0,0 +1,20 @@ +/* + * Copyright (C) 2024 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 { hapTasks } from '@ohos/hvigor-ohos-plugin'; + +export default { + system: hapTasks, /* Built-in plugin of Hvigor. It cannot be modified. */ + plugins:[] /* Custom plugin to extend the functionality of Hvigor. */ +} diff --git a/shell/platform/ohos/flutter_embedding/application/obfuscation-rules.txt b/shell/platform/ohos/flutter_embedding/application/obfuscation-rules.txt new file mode 100644 index 0000000000..272efb6ca3 --- /dev/null +++ b/shell/platform/ohos/flutter_embedding/application/obfuscation-rules.txt @@ -0,0 +1,23 @@ +# Define project specific obfuscation rules here. +# You can include the obfuscation configuration files in the current module's build-profile.json5. +# +# For more details, see +# https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/source-obfuscation-V5 + +# Obfuscation options: +# -disable-obfuscation: disable all obfuscations +# -enable-property-obfuscation: obfuscate the property names +# -enable-toplevel-obfuscation: obfuscate the names in the global scope +# -compact: remove unnecessary blank spaces and all line feeds +# -remove-log: remove all console.* statements +# -print-namecache: print the name cache that contains the mapping from the old names to new names +# -apply-namecache: reuse the given cache file + +# Keep options: +# -keep-property-name: specifies property names that you want to keep +# -keep-global-name: specifies names that you want to keep in the global scope + +-enable-property-obfuscation +-enable-toplevel-obfuscation +-enable-filename-obfuscation +-enable-export-obfuscation \ No newline at end of file diff --git a/shell/platform/ohos/flutter_embedding/application/oh-package.json5 b/shell/platform/ohos/flutter_embedding/application/oh-package.json5 new file mode 100644 index 0000000000..be95b2c16d --- /dev/null +++ b/shell/platform/ohos/flutter_embedding/application/oh-package.json5 @@ -0,0 +1,12 @@ +{ + "name": "application", + "version": "1.0.0", + "description": "Please describe the basic information.", + "main": "", + "author": "", + "license": "", + "dependencies": { + "@ohos/flutter_ohos": "file:../flutter" + } +} + diff --git a/shell/platform/ohos/flutter_embedding/application/src/main/ets/applicationability/ApplicationAbility.ets b/shell/platform/ohos/flutter_embedding/application/src/main/ets/applicationability/ApplicationAbility.ets new file mode 100644 index 0000000000..11cc563d8f --- /dev/null +++ b/shell/platform/ohos/flutter_embedding/application/src/main/ets/applicationability/ApplicationAbility.ets @@ -0,0 +1,55 @@ +/* + * Copyright (C) 2024 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 { AbilityConstant, UIAbility, Want } from '@kit.AbilityKit'; +import { hilog } from '@kit.PerformanceAnalysisKit'; +import { window } from '@kit.ArkUI'; + +export default class ApplicationAbility extends UIAbility { + onCreate(want: Want, launchParam: AbilityConstant.LaunchParam): void { + hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onCreate'); + } + + onDestroy(): void { + hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onDestroy'); + } + + onWindowStageCreate(windowStage: window.WindowStage): void { + // Main window is created, set main page for this ability + hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageCreate'); + + windowStage.loadContent('pages/Index', (err) => { + if (err.code) { + hilog.error(0x0000, 'testTag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err) ?? ''); + return; + } + hilog.info(0x0000, 'testTag', 'Succeeded in loading the content.'); + }); + } + + onWindowStageDestroy(): void { + // Main window is destroyed, release UI related resources + hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageDestroy'); + } + + onForeground(): void { + // Ability has brought to foreground + hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onForeground'); + } + + onBackground(): void { + // Ability has back to background + hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onBackground'); + } +} diff --git a/shell/platform/ohos/flutter_embedding/application/src/main/ets/applicationbackupability/ApplicationBackupAbility.ets b/shell/platform/ohos/flutter_embedding/application/src/main/ets/applicationbackupability/ApplicationBackupAbility.ets new file mode 100644 index 0000000000..10ae96d625 --- /dev/null +++ b/shell/platform/ohos/flutter_embedding/application/src/main/ets/applicationbackupability/ApplicationBackupAbility.ets @@ -0,0 +1,26 @@ +/* + * Copyright (C) 2024 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 { hilog } from '@kit.PerformanceAnalysisKit'; +import { BackupExtensionAbility, BundleVersion } from '@kit.CoreFileKit'; + +export default class ApplicationBackupAbility extends BackupExtensionAbility { + async onBackup() { + hilog.info(0x0000, 'testTag', 'onBackup ok'); + } + + async onRestore(bundleVersion: BundleVersion) { + hilog.info(0x0000, 'testTag', 'onRestore ok %{public}s', JSON.stringify(bundleVersion)); + } +} \ No newline at end of file diff --git a/shell/platform/ohos/flutter_embedding/application/src/main/ets/pages/Index.ets b/shell/platform/ohos/flutter_embedding/application/src/main/ets/pages/Index.ets new file mode 100644 index 0000000000..81b53999e6 --- /dev/null +++ b/shell/platform/ohos/flutter_embedding/application/src/main/ets/pages/Index.ets @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2024 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. + */ +@Entry +@Component +struct Index { + @State message: string = 'Hello World'; + + build() { + RelativeContainer() { + Text(this.message) + .id('HelloWorld') + .fontSize(50) + .fontWeight(FontWeight.Bold) + .alignRules({ + center: { anchor: '__container__', align: VerticalAlign.Center }, + middle: { anchor: '__container__', align: HorizontalAlign.Center } + }) + } + .height('100%') + .width('100%') + } +} \ No newline at end of file diff --git a/shell/platform/ohos/flutter_embedding/application/src/main/module.json5 b/shell/platform/ohos/flutter_embedding/application/src/main/module.json5 new file mode 100644 index 0000000000..8f334feb3a --- /dev/null +++ b/shell/platform/ohos/flutter_embedding/application/src/main/module.json5 @@ -0,0 +1,52 @@ +{ + "module": { + "name": "application", + "type": "entry", + "description": "$string:module_desc", + "mainElement": "ApplicationAbility", + "deviceTypes": [ + "phone", + "tablet", + "2in1" + ], + "deliveryWithInstall": true, + "installationFree": false, + "pages": "$profile:main_pages", + "abilities": [ + { + "name": "ApplicationAbility", + "srcEntry": "./ets/applicationability/ApplicationAbility.ets", + "description": "$string:ApplicationAbility_desc", + "icon": "$media:layered_image", + "label": "$string:ApplicationAbility_label", + "startWindowIcon": "$media:startIcon", + "startWindowBackground": "$color:start_window_background", + "exported": true, + "skills": [ + { + "entities": [ + "entity.system.home" + ], + "actions": [ + "action.system.home" + ] + } + ] + } + ], + "extensionAbilities": [ + { + "name": "ApplicationBackupAbility", + "srcEntry": "./ets/applicationbackupability/ApplicationBackupAbility.ets", + "type": "backup", + "exported": false, + "metadata": [ + { + "name": "ohos.extension.backup", + "resource": "$profile:backup_config" + } + ], + } + ] + } +} \ No newline at end of file diff --git a/shell/platform/ohos/flutter_embedding/application/src/main/resources/base/element/color.json b/shell/platform/ohos/flutter_embedding/application/src/main/resources/base/element/color.json new file mode 100644 index 0000000000..3c712962da --- /dev/null +++ b/shell/platform/ohos/flutter_embedding/application/src/main/resources/base/element/color.json @@ -0,0 +1,8 @@ +{ + "color": [ + { + "name": "start_window_background", + "value": "#FFFFFF" + } + ] +} \ No newline at end of file diff --git a/shell/platform/ohos/flutter_embedding/application/src/main/resources/base/element/string.json b/shell/platform/ohos/flutter_embedding/application/src/main/resources/base/element/string.json new file mode 100644 index 0000000000..a4969eae86 --- /dev/null +++ b/shell/platform/ohos/flutter_embedding/application/src/main/resources/base/element/string.json @@ -0,0 +1,16 @@ +{ + "string": [ + { + "name": "module_desc", + "value": "module description" + }, + { + "name": "ApplicationAbility_desc", + "value": "description" + }, + { + "name": "ApplicationAbility_label", + "value": "label" + } + ] +} \ No newline at end of file diff --git a/shell/platform/ohos/flutter_embedding/application/src/main/resources/base/media/background.png b/shell/platform/ohos/flutter_embedding/application/src/main/resources/base/media/background.png new file mode 100644 index 0000000000000000000000000000000000000000..f939c9fa8cc8914832e602198745f592a0dfa34d GIT binary patch literal 57364 zcmYIuc|6qL_rIk#Su&MMQlYU)cz{|$Qc0x~A^BEf( z`{n=HaSk>%wsfNM*uUkN^8dI{qxxW z*@b_`#>VlLWSG9 z0>QdPQ-&i_RCVdp2s$-u%S362^SHV0`EO6;@n(xK));G>#qwhPWrDXGk@OBMV}H!J za!48&`xhWJKj{_+f3ir<>Jg6Ax<&Xgn;)U7UJyAw{(u?zlf{oLsJTS-_o1?+lSg-j z8fcZj1*Ad(!X>WuuxM!H5t@V3*8vLL6`QnC!q!BwQjI{yk*;~@|3;B)`p$WYcDmnZ zt`R zr=oS6o-D$WZsYKh1PiOdhhX&YWGOzpc<6ITKzr^zi-#>z){t;yz3tu_a!>)(tTU9d zd}COuy~Tb}UIRNX@aVGJqEK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iV4cW^ZW|en}IQMT+TnetP+OC=>YD9ENf2e>0Cg{8J!oHPOl6dW}=^aM*Unss)1+rbRF+Sba7% zS^dsY{r8^f?G9m8-(u)oUlX_hU>wvBfuHDZcJ$scFzxx_sGe>&>$_MnNuJCsS&yi* z?S#{Ys<=ZKzX4zFL(&!$TFy;eGq<}lHtC1pKHZ{AsJ|Suh|q}G&Hj5`YQ6kg>-TLH z@Kyi8(;^duC=6+%3mPF4l)6`@ir!|39??Zz7I ztV%vhgYW=#7VO2Wemv>Gq}*g@;q;+w3>`V;kYxK;6FPKtq`3YYe^ONz(}&E_>Aq4d zi=*$Z4@FD3K~IDg#yC21E&p50#uK=4t=!6S^zF}6jtF|OY2C#@@z}oC8anXk#M0LC zd+<`)JID$k59QE^GI&PGf^LN=Mk)-?G zAp#plve>m9P|9#iZEcyjfDFB2Y_A!F^9a*j3Pm!I-(LKYNI0 A4*&oF literal 0 HcmV?d00001 diff --git a/shell/platform/ohos/flutter_embedding/application/src/main/resources/base/media/foreground.png b/shell/platform/ohos/flutter_embedding/application/src/main/resources/base/media/foreground.png new file mode 100644 index 0000000000000000000000000000000000000000..4483ddad1f079e1089d685bd204ee1cfe1d01902 GIT binary patch literal 12430 zcmeHuS6EX)+pUO#NL3(IK|}&d7YKwF5CM@UBE5tjTBw4Q5KwvxB2pw25vBJIB27p@ zOaSQt5eZd#CxmkF|4+F-=Q)?(#XNgvmzlk1)~tDFz3+~Fs;5bRo%8yoOPA=i9zS|^ z=@P~5f9V?4rAwDs!Yjfq4p(5Rx~i8hRVUG&*j~LT%Q>2AIqB+Nx_^yhg70E+c&i!%2~zqE0}mxIX= zz1$7|sWj&3yL#7D|4uLjQqV+x(Rz4WC{A9|^m@1A6`BNi38Cf3B^aJyqxF{TjS&2q=3$BC zB1Fu04C;%o9V_Yg;Ed;xpmge>%b<|5q52W_pTd9o;Qty2mQ+-Peu)^(K)RH^d5byH z>AGB-I7$|~9l)J0H_LPDsUUL#brIHpjO1>dJ9@_5&W z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|S`@O0`r&8O4l#eLPLy7n@?{`u15<>(>(HP?sj)ax^gp0C0^Q@=iWK*f2c zD)fL#sXs~F-K&MVM;neWi6M8@tERwteOT%%cv{JMqtu2a&-F?ld~arKwAH@y=LKKw z#h-2EA?L&VSjQ(K-_mq$Dl8u&b4}hKRXUGo8jtD{dqj15STlZy(C<7sI)2CQ_~fnE k9@EG3{4s5ok?kb>|H;3ubeVRY^#A|>07*qoM6N<$f~C=$asU7T literal 0 HcmV?d00001 diff --git a/shell/platform/ohos/flutter_embedding/application/src/main/resources/base/profile/backup_config.json b/shell/platform/ohos/flutter_embedding/application/src/main/resources/base/profile/backup_config.json new file mode 100644 index 0000000000..78f40ae7c4 --- /dev/null +++ b/shell/platform/ohos/flutter_embedding/application/src/main/resources/base/profile/backup_config.json @@ -0,0 +1,3 @@ +{ + "allowToBackupRestore": true +} \ No newline at end of file diff --git a/shell/platform/ohos/flutter_embedding/application/src/main/resources/base/profile/main_pages.json b/shell/platform/ohos/flutter_embedding/application/src/main/resources/base/profile/main_pages.json new file mode 100644 index 0000000000..1898d94f58 --- /dev/null +++ b/shell/platform/ohos/flutter_embedding/application/src/main/resources/base/profile/main_pages.json @@ -0,0 +1,5 @@ +{ + "src": [ + "pages/Index" + ] +} diff --git a/shell/platform/ohos/flutter_embedding/application/src/main/resources/en_US/element/string.json b/shell/platform/ohos/flutter_embedding/application/src/main/resources/en_US/element/string.json new file mode 100644 index 0000000000..a4969eae86 --- /dev/null +++ b/shell/platform/ohos/flutter_embedding/application/src/main/resources/en_US/element/string.json @@ -0,0 +1,16 @@ +{ + "string": [ + { + "name": "module_desc", + "value": "module description" + }, + { + "name": "ApplicationAbility_desc", + "value": "description" + }, + { + "name": "ApplicationAbility_label", + "value": "label" + } + ] +} \ No newline at end of file diff --git a/shell/platform/ohos/flutter_embedding/application/src/main/resources/zh_CN/element/string.json b/shell/platform/ohos/flutter_embedding/application/src/main/resources/zh_CN/element/string.json new file mode 100644 index 0000000000..9e08d1adfe --- /dev/null +++ b/shell/platform/ohos/flutter_embedding/application/src/main/resources/zh_CN/element/string.json @@ -0,0 +1,16 @@ +{ + "string": [ + { + "name": "module_desc", + "value": "模块描述" + }, + { + "name": "ApplicationAbility_desc", + "value": "description" + }, + { + "name": "ApplicationAbility_label", + "value": "label" + } + ] +} \ No newline at end of file diff --git a/shell/platform/ohos/flutter_embedding/application/src/mock/mock-config.json5 b/shell/platform/ohos/flutter_embedding/application/src/mock/mock-config.json5 new file mode 100644 index 0000000000..7a73a41bfd --- /dev/null +++ b/shell/platform/ohos/flutter_embedding/application/src/mock/mock-config.json5 @@ -0,0 +1,2 @@ +{ +} \ No newline at end of file diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/List.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/List.test.ets new file mode 100644 index 0000000000..2c87902a73 --- /dev/null +++ b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/List.test.ets @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2024 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 FlutterAbilityAndEntryDelegateTest from './embedding/ohos/FlutterAbilityAndEntryDelegateTest.test'; +import FlutterAbilityTest from './embedding/ohos/FlutterAbilityTest.test'; +import FlutterEntryTest from './embedding/ohos/FlutterEntryTest.test'; +import FlutterManagerTest from './embedding/ohos/FlutterManagerTest.test'; +import OhosTouchProcessorTest from './embedding/ohos/OhosTouchProcessorTest.test'; +import SettingTest from './embedding/ohos/SettingTest.test'; +import BinaryCodecTest from './plugin/common/BinaryCodecTest.test'; +import PlatformViewRegistryImplTest from './plugin/platform/PlatformViewRegistryImplTest.test'; +import PlatformViewWrapperTest from './plugin/platform/PlatformViewWrapperTest.test'; +import PlatformViewsControllerTest from './plugin/platform/PlatformViewsControllerTest.test'; +import RawPointerCoordTest from './plugin/platform/RawPointerCoordTest.test'; +import RootDvModelManagerTest from './plugin/platform/RootDvModelManagerTest.test'; +import ByteBufferTest from './plugin/util/ByteBufferTest.test'; + +export default function testsuite() { + FlutterAbilityAndEntryDelegateTest(); + FlutterAbilityTest(); + FlutterEntryTest(); + FlutterManagerTest(); + OhosTouchProcessorTest(); + SettingTest(); + BinaryCodecTest(); + PlatformViewRegistryImplTest(); + PlatformViewWrapperTest(); + PlatformViewsControllerTest(); + RawPointerCoordTest(); + RootDvModelManagerTest(); + ByteBufferTest(); +} \ No newline at end of file diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/ohos/FlutterAbilityAndEntryDelegateTest.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/ohos/FlutterAbilityAndEntryDelegateTest.test.ets new file mode 100644 index 0000000000..162789fc95 --- /dev/null +++ b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/ohos/FlutterAbilityAndEntryDelegateTest.test.ets @@ -0,0 +1,94 @@ +/* + * Copyright (C) 2024 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 { describe, it, expect } from '@ohos/hypium'; +import { abilityDelegatorRegistry } from '@kit.TestKit'; +import AbilityConstant from '@ohos.app.ability.AbilityConstant'; +import { FlutterAbilityAndEntryDelegate } from "@ohos/flutter_ohos"; +import { Options } from '@ohos/flutter_ohos/src/main/ets/embedding/engine/FlutterEngineGroup'; +import { Want } from '@kit.AbilityKit'; + +const bundleName = abilityDelegatorRegistry.getArguments().bundleName; + +export default function FlutterAbilityAndEntryDelegateTest() { + describe('FlutterAbilityAndEntryDelegateTest', () => { + + it('TestCreateView', 0, async (done: Function) => { + const flutterAbilityAndEntryDelegate: FlutterAbilityAndEntryDelegate = new FlutterAbilityAndEntryDelegate(); + const result = flutterAbilityAndEntryDelegate.createView(getContext()); + expect(result).not().assertNull(); + done(); + }) + + it('TestAddEntrypointOptions', 0, async (done: Function) => { + const flutterAbilityAndEntryDelegate: FlutterAbilityAndEntryDelegate = new FlutterAbilityAndEntryDelegate(); + const options: Options = new Options(getContext()); + const result = flutterAbilityAndEntryDelegate.addEntrypointOptions(options); + expect(result).not().assertNull(); + done(); + }) + + it('TestShouldDispatchAppLifecycleState', 0, async (done: Function) => { + const flutterAbilityAndEntryDelegate: FlutterAbilityAndEntryDelegate = new FlutterAbilityAndEntryDelegate(); + const result = flutterAbilityAndEntryDelegate.shouldDispatchAppLifecycleState(); + expect(result).not().assertNull(); + done(); + }) + + it('TestGetFlutterNapi', 0, async (done: Function) => { + const flutterAbilityAndEntryDelegate: FlutterAbilityAndEntryDelegate = new FlutterAbilityAndEntryDelegate(); + const result = flutterAbilityAndEntryDelegate.getFlutterNapi(); + expect(result).assertNull(); + done(); + }) + + it('TestGetAppComponent', 0, async (done: Function) => { + const flutterAbilityAndEntryDelegate: FlutterAbilityAndEntryDelegate = new FlutterAbilityAndEntryDelegate(); + await flutterAbilityAndEntryDelegate.onAttach(getContext()); + const result = flutterAbilityAndEntryDelegate.getAppComponent(); + expect(result).not().assertNull(); + done(); + }) + + it('TestOnSaveState', 0, async (done: Function) => { + const flutterAbilityAndEntryDelegate: FlutterAbilityAndEntryDelegate = new FlutterAbilityAndEntryDelegate(); + const reason: AbilityConstant.StateType = AbilityConstant.StateType.CONTINUATION + const want: Want = { + bundleName: bundleName, + abilityName: 'EntryAbility' + } + const wantParam: Record = { + "testParams": want + } + const result = flutterAbilityAndEntryDelegate.onSaveState(reason, wantParam); + expect(result).assertEqual(5); + done(); + }) + + it('TestIsFlutterEngineFromHost', 0, async (done: Function) => { + const flutterAbilityAndEntryDelegate: FlutterAbilityAndEntryDelegate = new FlutterAbilityAndEntryDelegate(); + const result = flutterAbilityAndEntryDelegate.isFlutterEngineFromHost(); + expect(result).not().assertNull(); + done(); + }) + + it('TestGetFlutterEngine', 0, async (done: Function) => { + const flutterAbilityAndEntryDelegate: FlutterAbilityAndEntryDelegate = new FlutterAbilityAndEntryDelegate(); + const result = flutterAbilityAndEntryDelegate.getFlutterEngine(); + expect(result).assertNull(); + done(); + }) + }) + +} diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/ohos/FlutterAbilityTest.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/ohos/FlutterAbilityTest.test.ets new file mode 100644 index 0000000000..df204acc54 --- /dev/null +++ b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/ohos/FlutterAbilityTest.test.ets @@ -0,0 +1,307 @@ +/* + * Copyright (C) 2024 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 { describe, it, expect } from '@ohos/hypium'; +import { abilityDelegatorRegistry } from '@kit.TestKit'; +import { ConfigurationConstant, Want } from '@kit.AbilityKit'; +import AbilityConstant from '@ohos.app.ability.AbilityConstant'; +import { FlutterView, FlutterAbility, FlutterEngine, FlutterPlugin } from "@ohos/flutter_ohos"; +import { Configuration } from '@ohos.app.ability.Configuration'; +import { FlutterPluginBinding } from '@ohos/flutter_ohos/src/main/ets/embedding/engine/plugins/FlutterPlugin'; + +const delegator = abilityDelegatorRegistry.getAbilityDelegator() +const bundleName = abilityDelegatorRegistry.getArguments().bundleName; + +function sleep(time: number) { + return new Promise((resolve: Function) => setTimeout(resolve, time)); +} + +export default function FlutterAbilityTest() { + describe('FlutterAbilityTest', () => { + it('FlutterAbilityTest', 0, async (done: Function) => { + const flutterAbility: FlutterAbility = new FlutterAbility(); + const flutterView: FlutterView | null = flutterAbility.getFlutterView(); + expect(flutterView).not().assertNull(); + await sleep(1000); + const pagePath: string = flutterAbility.pagePath(); + expect(pagePath).assertEqual("pages/Index"); + done(); + }) + + it('TestFlutterAbilityOnCreate', 0, async (done: Function) => { + const flutterAbility: FlutterAbility = new FlutterAbility(); + const want: Want = { + bundleName: bundleName, + abilityName: 'EntryAbility' + } + + const launchParam: AbilityConstant.LaunchParam = { + launchReason: AbilityConstant.LaunchReason.UNKNOWN, + lastExitReason: AbilityConstant.LastExitReason.UNKNOWN, + lastExitMessage: "test" + } + await delegator.startAbility(want); + await sleep(1000); + flutterAbility.onCreate(want, launchParam); + done(); + }) + + it('TestFlutterAbilityOnSaveState', 0, async (done: Function) => { + const flutterAbility: FlutterAbility = new FlutterAbility(); + const reason: AbilityConstant.StateType = AbilityConstant.StateType.CONTINUATION + const want: Want = { + bundleName: bundleName, + abilityName: 'EntryAbility' + } + const wantParam: Record = { + "testParams": want + } + await sleep(1000); + const result = flutterAbility.onSaveState(reason, wantParam); + expect(result).not().assertNull(); + done(); + }) + + it('TestOnNewWant', 0, async (done: Function) => { + const flutterAbility: FlutterAbility = new FlutterAbility(); + const want: Want = { + bundleName: bundleName, + abilityName: 'EntryAbility' + } + + const launchParam: AbilityConstant.LaunchParam = { + launchReason: AbilityConstant.LaunchReason.UNKNOWN, + lastExitReason: AbilityConstant.LastExitReason.UNKNOWN, + lastExitMessage: "test" + } + flutterAbility.onNewWant(want, launchParam); + done(); + }) + + it('TestOnForegroundAndOnBackground', 0, async (done: Function) => { + const flutterAbility: FlutterAbility = new FlutterAbility(); + flutterAbility.onForeground(); + await sleep(1000); + flutterAbility.onBackground(); + done(); + }) + + it('TestGetAbility', 0, async (done: Function) => { + const flutterAbility: FlutterAbility = new FlutterAbility(); + flutterAbility.getAbility(); + done(); + }) + + it('TestGetFlutterAbilityAndEntryDelegate', 0, async (done: Function) => { + const flutterAbility: FlutterAbility = new FlutterAbility(); + const result = flutterAbility.getFlutterAbilityAndEntryDelegate(); + expect(result).not().assertNull(); + done(); + }) + + it('TestShouldDispatchAppLifecycleState', 0, async (done: Function) => { + const flutterAbility: FlutterAbility = new FlutterAbility(); + const result = flutterAbility.shouldDispatchAppLifecycleState(); + expect(result).assertTrue(); + done(); + }) + + it('TestProvideFlutterEngine', 0, async (done: Function) => { + const flutterAbility: FlutterAbility = new FlutterAbility(); + const result = flutterAbility.provideFlutterEngine(getContext()); + expect(result).assertNull(); + done(); + }) + + it('TestProvidePlatformPlugin', 0, async (done: Function) => { + const flutterAbility: FlutterAbility = new FlutterAbility(); + const flutterEngine = new FlutterEngine(getContext(), null, null, null); + const result = flutterAbility.providePlatformPlugin(flutterEngine); + expect(result).assertInstanceOf("PlatformPlugin"); + done(); + }) + + it('TestGetFlutterShellArgs', 0, async (done: Function) => { + const flutterAbility: FlutterAbility = new FlutterAbility(); + const result = flutterAbility.getFlutterShellArgs(); + expect(result).not().assertNull(); + done(); + }) + + it('TestGetDartEntrypointArgs', 0, async (done: Function) => { + const flutterAbility: FlutterAbility = new FlutterAbility(); + const result = flutterAbility.getDartEntrypointArgs(); + expect(result).not().assertNull(); + done(); + }) + + it('TestDetachFromFlutterEngine', 0, async (done: Function) => { + const flutterAbility: FlutterAbility = new FlutterAbility(); + flutterAbility.detachFromFlutterEngine(); + done(); + }) + + it('TestPopSystemNavigator', 0, async (done: Function) => { + const flutterAbility: FlutterAbility = new FlutterAbility(); + const result = flutterAbility.popSystemNavigator(); + expect(result).assertFalse(); + done(); + }) + + it('TestShouldAttachEngineToAbility', 0, async (done: Function) => { + const flutterAbility: FlutterAbility = new FlutterAbility(); + const result = flutterAbility.shouldAttachEngineToAbility(); + expect(result).assertTrue(); + done(); + }) + + it('TestGetDartEntrypointLibraryUri', 0, async (done: Function) => { + const flutterAbility: FlutterAbility = new FlutterAbility(); + const result = flutterAbility.getDartEntrypointLibraryUri(); + expect(result).assertEqual(""); + done(); + }) + + it('TestGetAppBundlePath', 0, async (done: Function) => { + const flutterAbility: FlutterAbility = new FlutterAbility(); + const result = flutterAbility.getAppBundlePath(); + expect(result).assertEqual(""); + done(); + }) + + it('TestGetDartEntrypointFunctionName', 0, async (done: Function) => { + const flutterAbility: FlutterAbility = new FlutterAbility(); + const result = flutterAbility.getDartEntrypointFunctionName(); + expect(result).not().assertNull(); + done(); + }) + + it('TestGetInitialRoute', 0, async (done: Function) => { + const flutterAbility: FlutterAbility = new FlutterAbility(); + const result = flutterAbility.getInitialRoute(); + expect(result).not().assertNull(); + done(); + }) + + it('TestGetWant', 0, async (done: Function) => { + const flutterAbility: FlutterAbility = new FlutterAbility(); + const result = flutterAbility.getWant(); + expect(result).assertInstanceOf("Want"); + done(); + }) + + it('TestShouldDestroyEngineWithHost', 0, async (done: Function) => { + const flutterAbility: FlutterAbility = new FlutterAbility(); + const result = flutterAbility.shouldDestroyEngineWithHost(); + expect(result).not().assertNull(); + done(); + }) + + it('TestAttachToEngineAutomatically', 0, async (done: Function) => { + const flutterAbility: FlutterAbility = new FlutterAbility(); + const result = flutterAbility.attachToEngineAutomatically(); + expect(result).assertTrue(); + done(); + }) + + it('TestShouldRestoreAndSaveState', 0, async (done: Function) => { + const flutterAbility: FlutterAbility = new FlutterAbility(); + const result = flutterAbility.shouldRestoreAndSaveState(); + expect(result).not().assertNull(); + done(); + }) + + it('TestGetExclusiveAppComponent', 0, async (done: Function) => { + const flutterAbility: FlutterAbility = new FlutterAbility(); + const result = flutterAbility.getExclusiveAppComponent(); + expect(result).not().assertNull(); + done(); + }) + + it('TestGetCachedEngineId', 0, async (done: Function) => { + const flutterAbility: FlutterAbility = new FlutterAbility(); + const result = flutterAbility.getCachedEngineId(); + expect(result).assertEqual("cached_engine_id"); + done(); + }) + + it('TestGetCachedEngineGroupId', 0, async (done: Function) => { + const flutterAbility: FlutterAbility = new FlutterAbility(); + const result = flutterAbility.getCachedEngineGroupId(); + expect(result).assertEqual("cached_engine_group_id"); + done(); + }) + + it('TestAddPlugin', 0, async (done: Function) => { + const flutterAbility: FlutterAbility = new FlutterAbility(); + flutterAbility.addPlugin(plugin); + done(); + }) + + it('TestRemovePlugin', 0, async (done: Function) => { + const flutterAbility: FlutterAbility = new FlutterAbility(); + flutterAbility.removePlugin(plugin); + done(); + }) + + it('TestOnMemoryLevel', 0, async (done: Function) => { + const flutterAbility: FlutterAbility = new FlutterAbility(); + const level = AbilityConstant.MemoryLevel.MEMORY_LEVEL_MODERATE + flutterAbility.onMemoryLevel(level); + done(); + }) + + it('TestOnConfigurationUpdated', 0, async (done: Function) => { + const flutterAbility: FlutterAbility = new FlutterAbility(); + const config: Configuration = { + colorMode: ConfigurationConstant.ColorMode.COLOR_MODE_DARK, + } + flutterAbility.onConfigurationUpdated(config); + done(); + }) + + it('TestGetFlutterEngine', 0, async (done: Function) => { + const flutterAbility: FlutterAbility = new FlutterAbility(); + const result = flutterAbility.getFlutterEngine(); + expect(result).not().assertNull(); + done(); + }) + + it('TestOnWindowStageDestroyAndRelease', 0, async (done: Function) => { + const flutterAbility: FlutterAbility = new FlutterAbility(); + flutterAbility.onWindowStageDestroy(); + await sleep(1000); + flutterAbility.release(); + done(); + }) + }) + +} + + +class TestFlutterPlugin implements FlutterPlugin { + getUniqueClassName(): string { + return "engine test"; + } + + onAttachedToEngine(binding: FlutterPluginBinding): void { + console.info("uitest: onAttachedToEngine"); + } + + onDetachedFromEngine(binding: FlutterPluginBinding): void { + console.info("uitest: onAttachedToEngine"); + } +} + +let plugin: FlutterPlugin = new TestFlutterPlugin(); diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/ohos/FlutterEntryTest.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/ohos/FlutterEntryTest.test.ets new file mode 100644 index 0000000000..b6b12443af --- /dev/null +++ b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/ohos/FlutterEntryTest.test.ets @@ -0,0 +1,238 @@ +/* + * Copyright (C) 2024 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 { describe, it, expect } from '@ohos/hypium'; +import { FlutterEngine, FlutterPlugin, FlutterEntry } from "@ohos/flutter_ohos"; +import { FlutterPluginBinding } from '@ohos/flutter_ohos/src/main/ets/embedding/engine/plugins/FlutterPlugin'; + +function sleep(time: number) { + return new Promise((resolve: Function) => setTimeout(resolve, time)); +} + +export default function FlutterEntryTest() { + describe('FlutterEntryTest', () => { + it('TestAboutToAppear', 0, async (done: Function) => { + const flutterEntry: FlutterEntry = new FlutterEntry(getContext()); + flutterEntry.aboutToAppear(); + done(); + }) + + it('TestGetFlutterView', 0, async (done: Function) => { + const flutterEntry: FlutterEntry = new FlutterEntry(getContext()); + const result = flutterEntry.getFlutterView(); + expect(result).not().assertNull(); + done(); + }) + + it('TestGetFlutterEngine', 0, async (done: Function) => { + const flutterEntry: FlutterEntry = new FlutterEntry(getContext()); + const result = flutterEntry.getFlutterEngine(); + expect(result).not().assertNull(); + done(); + }) + + it('TestOnPageShow', 0, async (done: Function) => { + const flutterEntry: FlutterEntry = new FlutterEntry(getContext()); + flutterEntry.onPageShow(); + await sleep(1000); + flutterEntry.onPageHide(); + await sleep(1000); + flutterEntry.onBackPress(); + done(); + }) + + it('TestConfigureFlutterEngine', 0, async (done: Function) => { + const flutterEntry: FlutterEntry = new FlutterEntry(getContext()); + const flutterEngine = new FlutterEngine(getContext(), null, null, null); + flutterEntry.configureFlutterEngine(flutterEngine); + await sleep(1000); + flutterEntry.cleanUpFlutterEngine(flutterEngine); + done(); + }) + + it('TestGetAbility', 0, async (done: Function) => { + const flutterEntry: FlutterEntry = new FlutterEntry(getContext()); + flutterEntry.getAbility(); + done(); + }) + + it('TestAboutToDisappear', 0, async (done: Function) => { + const flutterEntry: FlutterEntry = new FlutterEntry(getContext()); + flutterEntry.aboutToDisappear(); + done(); + }) + + it('TestShouldDispatchAppLifecycleState', 0, async (done: Function) => { + const flutterEntry: FlutterEntry = new FlutterEntry(getContext()); + const result = flutterEntry.shouldDispatchAppLifecycleState(); + expect(result).assertTrue(); + done(); + }) + + it('TestProvideFlutterEngine', 0, async (done: Function) => { + const flutterEntry: FlutterEntry = new FlutterEntry(getContext()); + const result = flutterEntry.provideFlutterEngine(getContext()); + expect(result).assertNull(); + done(); + }) + + it('TestProvidePlatformPlugin', 0, async (done: Function) => { + const flutterEntry: FlutterEntry = new FlutterEntry(getContext()); + const flutterEngine = new FlutterEngine(getContext(), null, null, null); + const result = flutterEntry.providePlatformPlugin(flutterEngine); + expect(result).assertInstanceOf("PlatformPlugin"); + done(); + }) + + it('TestGetFlutterShellArgs', 0, async (done: Function) => { + const flutterEntry: FlutterEntry = new FlutterEntry(getContext()); + const result = flutterEntry.getFlutterShellArgs(); + expect(result).not().assertNull(); + done(); + }) + + it('TestGetDartEntrypointArgs', 0, async (done: Function) => { + const flutterEntry: FlutterEntry = new FlutterEntry(getContext()); + const result = flutterEntry.getDartEntrypointArgs(); + expect(result).not().assertNull(); + done(); + }) + + it('TestDetachFromFlutterEngine', 0, async (done: Function) => { + const flutterEntry: FlutterEntry = new FlutterEntry(getContext()); + flutterEntry.detachFromFlutterEngine(); + done(); + }) + + it('TestPopSystemNavigator', 0, async (done: Function) => { + const flutterEntry: FlutterEntry = new FlutterEntry(getContext()); + const result = flutterEntry.popSystemNavigator(); + expect(result).assertFalse(); + done(); + }) + + it('TestShouldAttachEngineToAbility', 0, async (done: Function) => { + const flutterEntry: FlutterEntry = new FlutterEntry(getContext()); + const result = flutterEntry.shouldAttachEngineToAbility(); + expect(result).assertTrue(); + done(); + }) + + it('TestGetDartEntrypointLibraryUri', 0, async (done: Function) => { + const flutterEntry: FlutterEntry = new FlutterEntry(getContext()); + const result = flutterEntry.getDartEntrypointLibraryUri(); + expect(result).assertEqual(""); + done(); + }) + + it('TestGetAppBundlePath', 0, async (done: Function) => { + const flutterEntry: FlutterEntry = new FlutterEntry(getContext()); + const result = flutterEntry.getAppBundlePath(); + expect(result).assertEqual(""); + done(); + }) + + it('TestGetDartEntrypointFunctionName', 0, async (done: Function) => { + const flutterEntry: FlutterEntry = new FlutterEntry(getContext()); + const result = flutterEntry.getDartEntrypointFunctionName(); + expect(result).not().assertNull(); + done(); + }) + + it('TestGetInitialRoute', 0, async (done: Function) => { + const flutterEntry: FlutterEntry = new FlutterEntry(getContext()); + const result = flutterEntry.getInitialRoute(); + expect(result).not().assertNull(); + done(); + }) + + it('TestGetWant', 0, async (done: Function) => { + const flutterEntry: FlutterEntry = new FlutterEntry(getContext()); + const result = flutterEntry.getWant(); + expect(result).assertInstanceOf("Want"); + done(); + }) + + it('TestShouldDestroyEngineWithHost', 0, async (done: Function) => { + const flutterEntry: FlutterEntry = new FlutterEntry(getContext()); + const result = flutterEntry.shouldDestroyEngineWithHost(); + expect(result).not().assertNull(); + done(); + }) + + it('TestAttachToEngineAutomatically', 0, async (done: Function) => { + const flutterEntry: FlutterEntry = new FlutterEntry(getContext()); + const result = flutterEntry.attachToEngineAutomatically(); + expect(result).assertTrue(); + done(); + }) + + it('TestShouldRestoreAndSaveState', 0, async (done: Function) => { + const flutterEntry: FlutterEntry = new FlutterEntry(getContext()); + const result = flutterEntry.shouldRestoreAndSaveState(); + expect(result).not().assertNull(); + done(); + }) + + it('TestGetExclusiveAppComponent', 0, async (done: Function) => { + const flutterEntry: FlutterEntry = new FlutterEntry(getContext()); + const result = flutterEntry.getExclusiveAppComponent(); + expect(result).not().assertNull(); + done(); + }) + + it('TestGetCachedEngineId', 0, async (done: Function) => { + const flutterEntry: FlutterEntry = new FlutterEntry(getContext()); + const result = flutterEntry.getCachedEngineId(); + expect(result).assertEqual("cached_engine_id"); + done(); + }) + + it('TestGetCachedEngineGroupId', 0, async (done: Function) => { + const flutterEntry: FlutterEntry = new FlutterEntry(getContext()); + const result = flutterEntry.getCachedEngineGroupId(); + expect(result).assertEqual("cached_engine_group_id"); + done(); + }) + + it('TestAddPlugin', 0, async (done: Function) => { + const flutterEntry: FlutterEntry = new FlutterEntry(getContext()); + flutterEntry.addPlugin(plugin); + done(); + }) + + it('TestRemovePlugin', 0, async (done: Function) => { + const flutterEntry: FlutterEntry = new FlutterEntry(getContext()); + flutterEntry.removePlugin(plugin); + done(); + }) + }) + +} + +class TestFlutterPlugin implements FlutterPlugin { + getUniqueClassName(): string { + return "engine test"; + } + + onAttachedToEngine(binding: FlutterPluginBinding): void { + console.info("uitest: onAttachedToEngine"); + } + + onDetachedFromEngine(binding: FlutterPluginBinding): void { + console.info("uitest: onAttachedToEngine"); + } +} + +let plugin: FlutterPlugin = new TestFlutterPlugin(); diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/ohos/FlutterManagerTest.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/ohos/FlutterManagerTest.test.ets new file mode 100644 index 0000000000..3d0cb903fa --- /dev/null +++ b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/ohos/FlutterManagerTest.test.ets @@ -0,0 +1,103 @@ +/* + * Copyright (C) 2024 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 { describe, it, expect } from '@ohos/hypium'; +import { FlutterView, FlutterManager } from "@ohos/flutter_ohos"; +import { window } from '@kit.ArkUI'; +import { FullScreenListener } from '@ohos/flutter_ohos/src/main/ets/embedding/ohos/FlutterManager'; + +function sleep(time: number) { + return new Promise((resolve: Function) => setTimeout(resolve, time)); +} + +const flutterManager: FlutterManager = FlutterManager.getInstance(); +const uiAbility = flutterManager.getUIAbility(getContext()); + +export default function FlutterManagerTest() { + describe('FlutterManagerTest', () => { + it('TestUIAbility', 0, async (done: Function) => { + flutterManager.pushUIAbility(uiAbility); + done(); + }) + + it('TestPopUIAbility', 0, async (done: Function) => { + console.info("uitest: TestPopUIAbility begin"); + flutterManager.popUIAbility(uiAbility); + done(); + }) + + it('TestWindowStage', 0, async (done: Function) => { + const windowStage = flutterManager.getWindowStage(uiAbility); + await sleep(1000); + flutterManager.pushWindowStage(uiAbility, windowStage); + await sleep(1000); + flutterManager.popWindowStage(uiAbility); + done(); + }) + + it('TestCreateFlutterView', 0, async (done: Function) => { + await sleep(1000); + let flutterViewA: FlutterView = flutterManager.createFlutterView(getContext()); + expect(flutterViewA).not().assertNull(); + const viewId = flutterViewA.getId(); + expect(viewId).not().assertNull(); + await sleep(1000); + let flutterViewB = flutterManager.getFlutterView(viewId); + expect(flutterViewB).not().assertNull(); + done(); + }) + + it('TestGetFlutterViewList', 0, async (done: Function) => { + const result = flutterManager.getFlutterViewList(); + expect(result).not().assertNull(); + done(); + }) + + it('TestSetFullScreenListener', 0, async (done: Function) => { + class MyFullScreenListener implements FullScreenListener { + useFullScreen(): boolean { + return true; + } + + setUseFullScreen(useFullScreen: boolean): void { + console.info("uitest: setUseFullScreen useFullScreen " + useFullScreen); + } + + onScreenStateChanged(data: window.WindowStatusType): void { + console.info("uitest: onScreenStateChanged"); + } + } + + const listener: FullScreenListener = new MyFullScreenListener(); + flutterManager.setFullScreenListener(listener); + await sleep(1000); + const result = flutterManager.getFullScreenListener(); + expect(result).not().assertNull(); + done(); + }) + + it('TestFullScreen', 0, async (done: Function) => { + const result = flutterManager.useFullScreen(); + expect(result).assertTrue(); + flutterManager.setUseFullScreen(result); + done(); + }) + + it('TestClear', 0, async (done: Function) => { + flutterManager.clear(); + done(); + }) + }) + +} diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/ohos/OhosTouchProcessorTest.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/ohos/OhosTouchProcessorTest.test.ets new file mode 100644 index 0000000000..f56a5661bb --- /dev/null +++ b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/ohos/OhosTouchProcessorTest.test.ets @@ -0,0 +1,58 @@ +/* + * Copyright (C) 2024 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 { describe, it } from '@ohos/hypium'; +import { TouchEvent, Action, Touch, ToolType, SourceType } from '@ohos.multimodalInput.touchEvent'; +import { OhosTouchProcessor } from "@ohos/flutter_ohos"; + +export default function OhosTouchProcessorTest() { + describe('OhosTouchProcessorTest', () => { + it('FlutterOnTouchEvent', 0, async (done: Function) => { + const ohosTouchProcessor: OhosTouchProcessor = new OhosTouchProcessor(); + const touch: Touch = { + id: 0, + pressedTime: 0, + screenX: 0, + screenY: 0, + windowX: 0, + windowY: 0, + pressure: 0, + width: 0, + height: 0, + tiltX: 0, + tiltY: 0, + toolX: 0, + toolY: 0, + toolWidth: 0, + toolHeight: 0, + rawX: 0, + rawY: 0, + toolType: ToolType.FINGER + } + const event: TouchEvent = { + action: Action.DOWN, + touch: touch, + touches: [], + sourceType: SourceType.TOUCH_SCREEN, + id: 0, + deviceId: 0, + actionTime: 0, + screenId: 0, + windowId: 0 + } + ohosTouchProcessor.onTouchEvent(event, null) + done(); + }) + }) +} diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/ohos/SettingTest.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/ohos/SettingTest.test.ets new file mode 100644 index 0000000000..ebc11b541a --- /dev/null +++ b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/ohos/SettingTest.test.ets @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2024 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 { describe, it, expect } from '@ohos/hypium'; +import { Settings } from "@ohos/flutter_ohos"; +import { MediaQuery } from '@kit.ArkUI'; +import { PlatformBrightness } from '@ohos/flutter_ohos/src/main/ets/embedding/engine/systemchannels/SettingsChannel'; + +const settings: Settings = new Settings(null); + +export default function SettingTest() { + describe('SettingTest', () => { + it('TestGetTextScaleFactor', 0, async (done: Function) => { + const result: number = settings.getTextScaleFactor(); + expect(result).not().assertNull(); + done(); + }) + + it('TestSendSettings', 0, async (done: Function) => { + const mediaQuery: MediaQuery = new MediaQuery(); + settings.sendSettings(mediaQuery); + done(); + }) + + it('TestGetThemeMode', 0, async (done: Function) => { + const mediaQuery: MediaQuery = new MediaQuery(); + const result: PlatformBrightness = settings.getThemeMode(mediaQuery); + expect(result).not().assertNull(); + done(); + }) + }) + +} diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/common/BinaryCodecTest.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/common/BinaryCodecTest.test.ets new file mode 100644 index 0000000000..b27be52ecf --- /dev/null +++ b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/common/BinaryCodecTest.test.ets @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2024 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 { describe, it, expect } from '@ohos/hypium'; +import { BinaryCodec } from "@ohos/flutter_ohos"; +import { buffer } from '@kit.ArkTS'; + +const binaryCodec: BinaryCodec = new BinaryCodec(true); + +export default function BinaryCodecTest() { + describe('BinaryCodecTest', () => { + it('TestBinaryCodecEncodeMessageSend', 0, async (done: Function) => { + let blobValue: buffer.Blob = new buffer.Blob(['name', 'age', 'sex']); + let message: ArrayBuffer = await blobValue.arrayBuffer(); + const result: ArrayBuffer = binaryCodec.encodeMessage(message); + expect(result).not().assertNull(); + done(); + }) + + it('TestBinaryCodecDecodeMessage', 0, async (done: Function) => { + const result = binaryCodec.decodeMessage(null); + expect(result).not().assertNull(); + done(); + }) + }) + +} diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/platform/PlatformViewRegistryImplTest.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/platform/PlatformViewRegistryImplTest.test.ets new file mode 100644 index 0000000000..27d0b0eabb --- /dev/null +++ b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/platform/PlatformViewRegistryImplTest.test.ets @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2024 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 { describe, it, expect } from '@ohos/hypium'; +import { PlatformViewRegistryImpl, PlatformViewFactory } from "@ohos/flutter_ohos"; + +const platformViewRegistryImpl: PlatformViewRegistryImpl = new PlatformViewRegistryImpl(); + +export default function PlatformViewRegistryImplTest() { + describe('PlatformViewRegistryImplTest', () => { + it('TestRegisterViewFactory', 0, async (done: Function) => { + const platformViewFactory: PlatformViewFactory = platformViewRegistryImpl.getFactory('test'); + const result = platformViewRegistryImpl.registerViewFactory('test', platformViewFactory); + expect(result).assertTrue(); + done(); + }) + }) + +} diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/platform/PlatformViewWrapperTest.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/platform/PlatformViewWrapperTest.test.ets new file mode 100644 index 0000000000..833e39da4b --- /dev/null +++ b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/platform/PlatformViewWrapperTest.test.ets @@ -0,0 +1,48 @@ +/* + * Copyright (C) 2024 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 { describe, it, expect } from '@ohos/hypium'; +import { PlatformViewWrapper, OhosTouchProcessor } from "@ohos/flutter_ohos"; +import { DVModel, DVModelParameters } from '@ohos/flutter_ohos/src/main/ets/view/DynamicView/dynamicView'; + +function sleep(time: number) { + return new Promise((resolve: Function) => setTimeout(resolve, time)); +} + +const platformViewWrapper: PlatformViewWrapper = new PlatformViewWrapper(); + +export default function PlatformViewWrapperTest() { + describe('PlatformViewWrapperTest', () => { + it('TestPlatformViewWrapperSetTouchProcessor', 0, async (done: Function) => { + const newTouchProcessor: OhosTouchProcessor = new OhosTouchProcessor(); + platformViewWrapper.setTouchProcessor(newTouchProcessor); + done(); + }) + + it('TestPlatformViewWrapperDvModel', 0, async (done: Function) => { + const dvModel: DVModel = platformViewWrapper.getDvModel(); + expect(dvModel).not().assertNull(); + await sleep(1000); + platformViewWrapper.addDvModel(dvModel); + done(); + }) + + it('TestPlatformViewWrapperSetLayoutParams', 0, async (done: Function) => { + const parameters: DVModelParameters = new DVModelParameters(); + platformViewWrapper.setLayoutParams(parameters); + done(); + }) + }) + +} diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/platform/PlatformViewsControllerTest.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/platform/PlatformViewsControllerTest.test.ets new file mode 100644 index 0000000000..4717c1610f --- /dev/null +++ b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/platform/PlatformViewsControllerTest.test.ets @@ -0,0 +1,215 @@ +/* + * Copyright (C) 2024 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 { describe, it, expect, beforeAll } from '@ohos/hypium'; +import { + PlatformViewsController, + ByteBuffer, + MethodResult, + Any, + DartExecutor, + TextureRegistry, + FlutterRenderer, + FlutterNapi, + FlutterView, + TextInputPlugin, + TextInputChannel, + PlatformOverlayView, + AccessibilityEventsDelegate, + FlutterOverlaySurface, +} from "@ohos/flutter_ohos"; +import { + PlatformViewBufferResized, + PlatformViewBufferSize, + PlatformViewCreationRequest, + PlatformViewResizeRequest, + PlatformViewTouch +} from '@ohos/flutter_ohos/src/main/ets/embedding/engine/systemchannels/PlatformViewsChannel'; +import { resourceManager } from '@kit.LocalizationKit'; + +const context = getContext(); +const platformViewsController: PlatformViewsController = new PlatformViewsController(); +const viewId: number = 1; +const viewType: string = 'test'; +const logicalTop: number = 100; +const logicalLeft: number = 100; +const logicalWidth: number = 100; +const logicalHeight: number = 100; +const direction: Direction = 100; +const byteBuffer = new ByteBuffer(); +const request: PlatformViewCreationRequest = + new PlatformViewCreationRequest(viewId, viewType, logicalTop, logicalLeft, logicalWidth, logicalHeight, direction, + byteBuffer); + +const resizeRequest: PlatformViewResizeRequest = + new PlatformViewResizeRequest(viewId, logicalWidth, logicalHeight); + +const downTime: number = 100; +const eventTime: number = 100; +const action: number = 100; +const pointerCount: number = 100; +const rawPointerPropertiesList: Any = 100; +const rawPointerCoords: Any = 100; +const metaState: number = 100; +const buttonState: number = 100; +const xPrecision: number = 100; +const yPrecision: number = 100; +const deviceId: number = 100; +const edgeFlags: number = 100; +const source: number = 100; +const flags: number = 100; +const motionEventId: number = 100; +const touch: PlatformViewTouch = + new PlatformViewTouch(viewId, downTime, eventTime, action, pointerCount, rawPointerPropertiesList, + rawPointerCoords, metaState, buttonState, xPrecision, yPrecision, deviceId, edgeFlags, source, flags, + motionEventId); +const flutterNapi: FlutterNapi = new FlutterNapi(); +const textureRegistry: TextureRegistry = new FlutterRenderer(flutterNapi); +let dartExecutor: DartExecutor; + +class ResizeCallback extends PlatformViewBufferResized { + result: MethodResult | null = null; + + run(bufferSize: PlatformViewBufferSize) { + if (bufferSize == null) { + this.result?.error("error", "Failed to resize the platform view", null); + } else { + const response: Map = new Map(); + response.set("width", bufferSize.width); + response.set("height", bufferSize.height); + this.result?.success(response); + } + } +} + +export default function PlatformViewsControllerTest() { + describe('PlatformViewsControllerTest', () => { + beforeAll(() => { + const assetManager: resourceManager.ResourceManager = context.resourceManager; + dartExecutor = new DartExecutor(flutterNapi, assetManager); + }) + + it('TestPlatformViewRegistryImplGetRegistry', 0, async (done: Function) => { + const result = platformViewsController.getRegistry(); + expect(result).not().assertNull(); + done(); + }) + it('TestCreateForPlatformViewLayer', 0, async (done: Function) => { + platformViewsController.createForPlatformViewLayer(request); + done(); + }) + + it('TestPlatformViewRegistryImplDispose', 0, async (done: Function) => { + platformViewsController.dispose(viewId); + done(); + }) + + it('TestPlatformViewRegistryImplResize', 0, async (done: Function) => { + const onComplete: PlatformViewBufferResized = new ResizeCallback(); + platformViewsController.resize(resizeRequest, onComplete); + done(); + }) + + it('TestPlatformViewRegistryImplOffset', 0, async (done: Function) => { + platformViewsController.offset(viewId, logicalTop, logicalLeft); + done(); + }) + + it('TestPlatformViewRegistryImplOnBeginFrame', 0, async (done: Function) => { + platformViewsController.onBeginFrame(); + done(); + }) + + it('TestCreateOverlaySurfaceByPlatformOverlayView', 0, async (done: Function) => { + const accessibilityEventsDelegate: AccessibilityEventsDelegate = new AccessibilityEventsDelegate(); + const imageView: PlatformOverlayView = + new PlatformOverlayView(context, logicalWidth, logicalHeight, accessibilityEventsDelegate); + platformViewsController.createOverlaySurfaceByPlatformOverlayView(imageView); + done(); + }) + + it('TestCreateOverlaySurface', 0, async (done: Function) => { + const result: FlutterOverlaySurface = platformViewsController.createOverlaySurface(); + expect(result).not().assertNull(); + done(); + }) + + it('TestPlatformViewRegistryImplOnTouch', 0, async (done: Function) => { + platformViewsController.onTouch(touch); + done(); + }) + + it('TestPlatformViewRegistryImplSetDirection', 0, async (done: Function) => { + platformViewsController.setDirection(viewId, direction); + done(); + }) + + it('TestPlatformViewRegistryImplValidateDirection', 0, async (done: Function) => { + const result = platformViewsController.validateDirection(direction); + expect(result).assertInstanceOf('boolean'); + done(); + }) + + it('TestPlatformViewRegistryImplClearFocus', 0, async (done: Function) => { + platformViewsController.clearFocus(viewId); + done(); + }) + + it('TestPlatformViewRegistryImplCreateForTextureLayer', 0, async (done: Function) => { + const result = platformViewsController.createForTextureLayer(request); + expect(result).not().assertNull(); + done(); + }) + + it('TestPlatformViewRegistryImplAttach', 0, async (done: Function) => { + platformViewsController.attach(context, textureRegistry, dartExecutor); + done(); + }) + + it('TestPlatformViewRegistryImplAttachTextInputPlugin', 0, async (done: Function) => { + const textInputChannel: TextInputChannel = new TextInputChannel(dartExecutor); + const textInputPlugin: TextInputPlugin = new TextInputPlugin(textInputChannel); + platformViewsController.attachTextInputPlugin(textInputPlugin); + done(); + }) + + it('TestPlatformViewRegistryImplAttachToView', 0, async (done: Function) => { + const newFlutterView: FlutterView = new FlutterView(viewId + '', context); + platformViewsController.attachToView(newFlutterView); + done(); + }) + + it('TestPlatformViewRegistryImplGetFlutterView', 0, async (done: Function) => { + const result = platformViewsController.getFlutterView(); + expect(result).not().assertNull(); + done(); + }) + + it('TestPlatformViewRegistryImplDetach', 0, async (done: Function) => { + platformViewsController.detach(); + done(); + }) + + it('TestPlatformViewRegistryImplDetachFromView', 0, async (done: Function) => { + platformViewsController.detachFromView(); + done(); + }) + + it('TestPlatformViewRegistryImplDetachTextInputPlugin', 0, async (done: Function) => { + platformViewsController.detachTextInputPlugin(); + done(); + }) + }) + +} diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/platform/RawPointerCoordTest.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/platform/RawPointerCoordTest.test.ets new file mode 100644 index 0000000000..8c5aff6e33 --- /dev/null +++ b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/platform/RawPointerCoordTest.test.ets @@ -0,0 +1,41 @@ +/* + * Copyright (C) 2024 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 { describe, it, expect } from '@ohos/hypium'; +import { RawPointerCoords } from '@ohos/flutter_ohos/src/main/ets/plugin/platform/RawPointerCoord'; + +const orientation: number = 100; +const pressure: number = 100; +const size: number = 100; +const toolMajor: number = 100; +const toolMinor: number = 100; +const touchMajor: number = 100; +const touchMinor: number = 100; +const x: number = 100; +const y: number = 100; +const rawPointerCoords: RawPointerCoords = + new RawPointerCoords(orientation, pressure, size, toolMajor, toolMinor, touchMajor, touchMinor, x, y); + +export default function RawPointerCoordsTest() { + describe('RawPointerCoordsTest', () => { + it('TestRawPointerCoords', 0, async (done: Function) => { + const pointX = rawPointerCoords.getX(); + expect(pointX).not().assertNull(); + const pointY = rawPointerCoords.getY(); + expect(pointY).not().assertNull(); + done(); + }) + }) + +} diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/platform/RootDvModelManagerTest.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/platform/RootDvModelManagerTest.test.ets new file mode 100644 index 0000000000..a77b3ad89e --- /dev/null +++ b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/platform/RootDvModelManagerTest.test.ets @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2024 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 { describe, it, expect } from '@ohos/hypium'; +import { PlatformViewWrapper } from '@ohos/flutter_ohos'; +import { RootDvModeManager } from '@ohos/flutter_ohos/src/main/ets/plugin/platform/RootDvModelManager'; +import { DVModel, DVModelContainer } from '@ohos/flutter_ohos/src/main/ets/view/DynamicView/dynamicView'; + +export default function DVModelContainerTest() { + describe('DVModelContainerTest', () => { + it('TestDVModelContainerGetRootDvMode', 0, async (done: Function) => { + const dvModel: DVModelContainer = RootDvModeManager.getRootDvMode(); + expect(dvModel).not().assertNull(); + done(); + }) + + it('TestDVModelAddDvModel', 0, async (done: Function) => { + const platformViewWrapper: PlatformViewWrapper = new PlatformViewWrapper(); + const dvModel: DVModel = platformViewWrapper.getDvModel(); + RootDvModeManager.addDvModel(dvModel); + expect(dvModel).not().assertNull(); + done(); + }) + }) + +} diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/util/ByteBufferTest.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/util/ByteBufferTest.test.ets new file mode 100644 index 0000000000..4c1f4647b6 --- /dev/null +++ b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/util/ByteBufferTest.test.ets @@ -0,0 +1,446 @@ +/* + * Copyright (C) 2024 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 { describe, it, expect } from '@ohos/hypium'; +import { ByteBuffer } from "@ohos/flutter_ohos"; +import { buffer } from '@kit.ArkTS'; + +const byteBuffer: ByteBuffer = new ByteBuffer(); +const byteOffset = byteBuffer.byteOffset; + +export default function ByteBufferTest() { + describe('ByteBufferTest', () => { + it('TestByteBufferFrom', 0, async (done: Function) => { + const blobValue: buffer.Blob = new buffer.Blob(['name', 'age', 'sex']); + const message: ArrayBuffer = await blobValue.arrayBuffer(); + const result = ByteBuffer.from(message); + expect(result.byteLength).assertEqual(10); + done(); + }) + + it('TestByteBufferByteOffset', 0, async (done: Function) => { + expect(byteOffset).assertInstanceOf('number'); + done(); + }) + + it('TestByteBufferByteLength', 0, async (done: Function) => { + const result = byteBuffer.byteLength; + expect(result).assertInstanceOf('number'); + done(); + }) + + it('TestByteBufferBytesRemaining', 0, async (done: Function) => { + const result = byteBuffer.bytesRemaining; + expect(result).assertInstanceOf('number'); + done(); + }) + + it('TestByteBufferBuffer', 0, async (done: Function) => { + const result = byteBuffer.buffer; + expect(result).assertInstanceOf('ArrayBuffer'); + done(); + }) + + it('TestByteBufferHasRemaining', 0, async (done: Function) => { + const result = byteBuffer.hasRemaining; + expect(result).assertInstanceOf('boolean'); + done(); + }) + + it('TestByteBufferSkip', 0, async (done: Function) => { + const result = byteBuffer.byteLength; + expect(result).assertInstanceOf('number'); + byteBuffer.skip(result); + done(); + }) + + it('TestByteBufferCheckWriteCapacity', 0, async (done: Function) => { + byteBuffer.checkWriteCapacity(10); + done(); + }) + + it('TestByteBufferSetBool', 0, async (done: Function) => { + byteBuffer.setBool(byteOffset, true); + done(); + }) + + it('TestByteBufferGetBool', 0, async (done: Function) => { + let result = byteBuffer.getBool(byteOffset); + expect(result).assertTrue(); + done(); + }) + + it('TestByteBufferWriteBool', 0, async (done: Function) => { + byteBuffer.writeBool(false); + done(); + }) + + it('TestByteBufferReadBool', 0, async (done: Function) => { + let result = byteBuffer.readBool(); + expect(result).assertFalse(); + done(); + }) + + it('TestByteBufferSetInt8', 0, async (done: Function) => { + byteBuffer.setInt8(byteOffset, 10); + done(); + }) + + it('TestByteBufferGetInt8', 0, async (done: Function) => { + let result = byteBuffer.getInt8(byteOffset); + expect(result).assertInstanceOf('number'); + done(); + }) + + it('TestByteBufferWriteInt8', 0, async (done: Function) => { + byteBuffer.writeInt8(byteOffset); + done(); + }) + + it('TestByteBufferReadInt8', 0, async (done: Function) => { + let result = byteBuffer.readInt8(); + expect(result).assertInstanceOf('number'); + done(); + }) + + it('TestByteBufferSetUint8', 0, async (done: Function) => { + byteBuffer.setUint8(byteOffset, 10); + done(); + }) + + it('TestByteBufferGetUint8', 0, async (done: Function) => { + let result = byteBuffer.getUint8(byteOffset); + expect(result).assertInstanceOf('number'); + done(); + }) + + it('TestByteBufferWriteUint8', 0, async (done: Function) => { + byteBuffer.writeUint8(byteOffset); + done(); + }) + + it('TestByteBufferReadUint8', 0, async (done: Function) => { + let result = byteBuffer.readUint8(); + expect(result).assertInstanceOf('number'); + done(); + }) + + it('TestByteBufferSetInt16', 0, async (done: Function) => { + byteBuffer.setInt16(byteOffset, 10); + done(); + }) + + it('TestByteBufferGetInt16', 0, async (done: Function) => { + let result = byteBuffer.getInt16(byteOffset); + expect(result).assertInstanceOf('number'); + done(); + }) + + it('TestByteBufferWriteInt16', 0, async (done: Function) => { + byteBuffer.writeInt16(byteOffset); + done(); + }) + + it('TestByteBufferReadInt16', 0, async (done: Function) => { + let result = byteBuffer.readInt16(); + expect(result).assertInstanceOf('number'); + done(); + }) + + it('TestByteBufferSetUint16', 0, async (done: Function) => { + byteBuffer.setUint16(byteOffset, 10); + done(); + }) + + it('TestByteBufferGetUint16', 0, async (done: Function) => { + let result = byteBuffer.getUint16(byteOffset); + expect(result).assertInstanceOf('number'); + done(); + }) + + it('TestByteBufferWriteUint16', 0, async (done: Function) => { + byteBuffer.writeUint16(byteOffset); + done(); + }) + + it('TestByteBufferReadUint16', 0, async (done: Function) => { + let result = byteBuffer.readUint16(); + expect(result).assertInstanceOf('number'); + done(); + }) + + it('TestByteBufferSetInt32', 0, async (done: Function) => { + byteBuffer.setInt32(byteOffset, 10); + done(); + }) + + it('TestByteBufferGetInt32', 0, async (done: Function) => { + let result = byteBuffer.getInt32(byteOffset); + expect(result).assertInstanceOf('number'); + done(); + }) + + it('TestByteBufferWriteInt32', 0, async (done: Function) => { + byteBuffer.writeInt32(byteOffset); + done(); + }) + + it('TestByteBufferReadInt32', 0, async (done: Function) => { + let result = byteBuffer.readInt32(); + expect(result).assertInstanceOf('number'); + done(); + }) + + it('TestByteBufferSetUint32', 0, async (done: Function) => { + byteBuffer.setUint32(byteOffset, 10); + done(); + }) + + it('TestByteBufferGetUint32', 0, async (done: Function) => { + let result = byteBuffer.getUint32(byteOffset); + expect(result).assertInstanceOf('number'); + done(); + }) + + it('TestByteBufferWriteUint32', 0, async (done: Function) => { + byteBuffer.writeUint32(byteOffset); + done(); + }) + + it('TestByteBufferReadUint32', 0, async (done: Function) => { + let result = byteBuffer.readUint32(); + expect(result).assertInstanceOf('number'); + done(); + }) + + it('TestByteBufferSetFloat32', 0, async (done: Function) => { + byteBuffer.setFloat32(byteOffset, 10); + done(); + }) + + it('TestByteBufferGetFloat32', 0, async (done: Function) => { + let result = byteBuffer.getFloat32(byteOffset); + expect(result).assertInstanceOf('number'); + done(); + }) + + it('TestByteBufferWriteFloat32', 0, async (done: Function) => { + byteBuffer.writeFloat32(byteOffset); + done(); + }) + + it('TestByteBufferReadFloat32', 0, async (done: Function) => { + let result = byteBuffer.readFloat32(); + expect(result).assertInstanceOf('number'); + done(); + }) + + it('TestByteBufferSetFloat64', 0, async (done: Function) => { + byteBuffer.setFloat64(byteOffset, 10); + done(); + }) + + it('TestByteBufferGetFloat64', 0, async (done: Function) => { + let result = byteBuffer.getFloat64(byteOffset); + expect(result).assertInstanceOf('number'); + done(); + }) + + it('TestByteBufferWriteFloat64', 0, async (done: Function) => { + byteBuffer.writeFloat64(byteOffset); + done(); + }) + + it('TestByteBufferReadFloat64', 0, async (done: Function) => { + let result = byteBuffer.readFloat64(); + expect(result).assertInstanceOf('number'); + done(); + }) + + it('TestByteBufferSetBigInt64', 0, async (done: Function) => { + const value: bigint = BigInt(9223372036854775807); + byteBuffer.setBigInt64(byteOffset, value); + done(); + }) + + it('TestByteBufferGetBigInt64', 0, async (done: Function) => { + let result = byteBuffer.getBigInt64(byteOffset); + expect(result).assertInstanceOf('bigint'); + done(); + }) + + it('TestByteBufferWriteBigInt64', 0, async (done: Function) => { + const value: bigint = BigInt(9223372036854775807); + byteBuffer.writeBigInt64(value); + done(); + }) + + it('TestByteBufferReadBigInt64', 0, async (done: Function) => { + let result = byteBuffer.readBigInt64(); + expect(result).assertInstanceOf('bigint'); + done(); + }) + + it('TestByteBufferSetBigUint64', 0, async (done: Function) => { + const value: bigint = BigInt(9223372036854775807); + byteBuffer.setBigUint64(byteOffset, value); + done(); + }) + + it('TestByteBufferGetBigUint64', 0, async (done: Function) => { + let result = byteBuffer.getBigUint64(byteOffset); + expect(result).assertInstanceOf('bigint'); + done(); + }) + + it('TestByteBufferWriteBigUint64', 0, async (done: Function) => { + const value: bigint = BigInt(9223372036854775807); + byteBuffer.writeBigUint64(value); + done(); + }) + + it('TestByteBufferReadBigUint64', 0, async (done: Function) => { + let result = byteBuffer.readBigUint64(); + expect(result).assertInstanceOf('bigint'); + done(); + }) + + it('TestByteBufferSetInt64', 0, async (done: Function) => { + byteBuffer.setInt64(byteOffset, 10); + done(); + }) + + it('TestByteBufferGetInt64', 0, async (done: Function) => { + let result = byteBuffer.getInt64(byteOffset); + expect(result).assertInstanceOf('bigint'); + done(); + }) + + it('TestByteBufferWriteInt64', 0, async (done: Function) => { + byteBuffer.writeInt64(10); + done(); + }) + + it('TestByteBufferReadInt64', 0, async (done: Function) => { + let result = byteBuffer.readInt64(); + expect(result).assertInstanceOf('bigint'); + done(); + }) + + it('TestByteBufferSetUint64', 0, async (done: Function) => { + byteBuffer.setUint64(byteOffset, 10); + done(); + }) + + it('TestByteBufferGetUint64', 0, async (done: Function) => { + let result = byteBuffer.getUint64(byteOffset); + expect(result).assertInstanceOf('number'); + done(); + }) + + it('TestByteBufferWriteUint64', 0, async (done: Function) => { + byteBuffer.writeUint64(10); + done(); + }) + + it('TestByteBufferReadUint64', 0, async (done: Function) => { + let result = byteBuffer.readUint64(); + expect(result).assertInstanceOf('number'); + done(); + }) + + it('TestByteBufferSetUint8Array', 0, async (done: Function) => { + const value: Uint8Array = new Uint8Array(); + byteBuffer.setUint8Array(byteOffset, value); + done(); + }) + + it('TestByteBufferGetUint8Array', 0, async (done: Function) => { + let result = byteBuffer.getUint8Array(byteOffset); + expect(result).assertInstanceOf('Uint8Array'); + done(); + }) + + it('TestByteBufferWriteUint8Array', 0, async (done: Function) => { + const value: Uint8Array = new Uint8Array(); + byteBuffer.writeUint8Array(value); + done(); + }) + + it('TestByteBufferReadUint8Array', 0, async (done: Function) => { + let result = byteBuffer.readUint8Array(); + expect(result).assertInstanceOf('Uint8Array'); + done(); + }) + + it('TestByteBufferSetUint16Array', 0, async (done: Function) => { + const value: Uint16Array = new Uint16Array(); + byteBuffer.setUint16Array(byteOffset, value); + done(); + }) + + it('TestByteBufferGetUint16Array', 0, async (done: Function) => { + let result = byteBuffer.getUint16Array(byteOffset); + expect(result).assertInstanceOf('Uint16Array'); + done(); + }) + + it('TestByteBufferWriteUint16Array', 0, async (done: Function) => { + const value: Uint16Array = new Uint16Array(); + byteBuffer.writeUint16Array(value); + done(); + }) + + it('TestByteBufferReadUint16Array', 0, async (done: Function) => { + let result = byteBuffer.readUint16Array(); + expect(result).assertInstanceOf('Uint16Array'); + done(); + }) + + it('TestByteBufferSetString', 0, async (done: Function) => { + byteBuffer.setString(byteOffset, 'test'); + done(); + }) + + it('TestByteBufferGetString', 0, async (done: Function) => { + let result = byteBuffer.getString(byteOffset); + expect(result).assertInstanceOf('string'); + done(); + }) + + it('TestByteBufferWriteString', 0, async (done: Function) => { + byteBuffer.writeString('test'); + done(); + }) + + it('TestByteBufferReadString', 0, async (done: Function) => { + let result = byteBuffer.readString(); + expect(result).assertInstanceOf('string'); + done(); + }) + + it('TestByteBufferToString', 0, async (done: Function) => { + let result = byteBuffer.toString(); + expect(result).assertInstanceOf('string'); + done(); + }) + + it('TestByteBufferResetAndClear', 0, async (done: Function) => { + byteBuffer.reset(); + byteBuffer.clear(); + done(); + }) + }) + +} diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/module.json5 b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/module.json5 new file mode 100644 index 0000000000..e3fafde01a --- /dev/null +++ b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/module.json5 @@ -0,0 +1,13 @@ +{ + "module": { + "name": "application_test", + "type": "feature", + "deviceTypes": [ + "phone", + "tablet", + "2in1" + ], + "deliveryWithInstall": true, + "installationFree": false + } +} diff --git a/shell/platform/ohos/flutter_embedding/application/src/test/List.test.ets b/shell/platform/ohos/flutter_embedding/application/src/test/List.test.ets new file mode 100644 index 0000000000..312f48fb74 --- /dev/null +++ b/shell/platform/ohos/flutter_embedding/application/src/test/List.test.ets @@ -0,0 +1,19 @@ +/* + * Copyright (C) 2024 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 localUnitTest from './LocalUnit.test'; + +export default function testsuite() { + localUnitTest(); +} \ No newline at end of file diff --git a/shell/platform/ohos/flutter_embedding/application/src/test/LocalUnit.test.ets b/shell/platform/ohos/flutter_embedding/application/src/test/LocalUnit.test.ets new file mode 100644 index 0000000000..8ca1b6da13 --- /dev/null +++ b/shell/platform/ohos/flutter_embedding/application/src/test/LocalUnit.test.ets @@ -0,0 +1,47 @@ +/* + * Copyright (C) 2024 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 { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'; + +export default function localUnitTest() { + describe('localUnitTest', () => { + // Defines a test suite. Two parameters are supported: test suite name and test suite function. + beforeAll(() => { + // Presets an action, which is performed only once before all test cases of the test suite start. + // This API supports only one parameter: preset action function. + }); + beforeEach(() => { + // Presets an action, which is performed before each unit test case starts. + // The number of execution times is the same as the number of test cases defined by **it**. + // This API supports only one parameter: preset action function. + }); + afterEach(() => { + // Presets a clear action, which is performed after each unit test case ends. + // The number of execution times is the same as the number of test cases defined by **it**. + // This API supports only one parameter: clear action function. + }); + afterAll(() => { + // Presets a clear action, which is performed after all test cases of the test suite end. + // This API supports only one parameter: clear action function. + }); + it('assertContain', 0, () => { + // Defines a test case. This API supports three parameters: test case name, filter parameter, and test case function. + let a = 'abc'; + let b = 'b'; + // Defines a variety of assertion methods, which are used to declare expected boolean conditions. + expect(a).assertContain(b); + expect(a).assertEqual(a); + }); + }); +} \ No newline at end of file diff --git a/shell/platform/ohos/flutter_embedding/build-profile.json5 b/shell/platform/ohos/flutter_embedding/build-profile.json5 index 4cebb96991..87805d1f43 100755 --- a/shell/platform/ohos/flutter_embedding/build-profile.json5 +++ b/shell/platform/ohos/flutter_embedding/build-profile.json5 @@ -41,6 +41,18 @@ { "name": "flutter", "srcPath": "./flutter" + }, + { + "name": "application", + "srcPath": "./application", + "targets": [ + { + "name": "default", + "applyToProducts": [ + "default" + ] + } + ] } ] -} +} \ No newline at end of file diff --git a/shell/platform/ohos/flutter_embedding/flutter/src/main/ets/embedding/engine/FlutterNapi.ets b/shell/platform/ohos/flutter_embedding/flutter/src/main/ets/embedding/engine/FlutterNapi.ets index 9be47241dc..7216db2888 100644 --- a/shell/platform/ohos/flutter_embedding/flutter/src/main/ets/embedding/engine/FlutterNapi.ets +++ b/shell/platform/ohos/flutter_embedding/flutter/src/main/ets/embedding/engine/FlutterNapi.ets @@ -117,7 +117,7 @@ export default class FlutterNapi { Log.e(TAG, "runBundleAndSnapshotFromLibrary this.nativeShellHolderId:" + this.nativeShellHolderId) return; } - flutter.nativeRunBundleAndSnapshotFromLibrary(this.nativeShellHolderId!, bundlePath, entrypointFunctionName, pathToEntrypointFunction, assetManager, entrypointArgs); + flutter.nativeRunBundleAndSnapshotFromLibrary(this.nativeShellHolderId!, bundlePath, entrypointFunctionName as string, pathToEntrypointFunction as string, assetManager, entrypointArgs); }; /** -- Gitee From 19f4461b74580188ef84784cf5fc59376fb55ef7 Mon Sep 17 00:00:00 2001 From: song_zhifei Date: Wed, 23 Oct 2024 14:46:04 +0800 Subject: [PATCH 03/15] =?UTF-8?q?=E5=8D=95=E5=85=83=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: song_zhifei --- .../application/oh-package.json5 | 3 +- .../src/ohosTest/ets/test/List.test.ets | 14 +++ .../systemchannels/PlatformChannel.test.ets | 102 ++++++++++++++++++ .../RestorationChannel.test.ets | 71 ++++++++++++ .../systemchannels/SettingsChannel.test.ets | 38 +++++++ .../systemchannels/TextInputChannel.test.ets | 38 +++++++ .../plugin/common/JSONMethodCodec.test.ets | 58 ++++++++++ .../test/plugin/common/MethodCall.test.ets | 36 +++++++ .../AccessibilityEventsDelegate.test.ets | 38 +++++++ .../flutter_embedding/build-profile.json5 | 16 ++- 10 files changed, 412 insertions(+), 2 deletions(-) create mode 100644 shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/systemchannels/PlatformChannel.test.ets create mode 100644 shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/systemchannels/RestorationChannel.test.ets create mode 100644 shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/systemchannels/SettingsChannel.test.ets create mode 100644 shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/systemchannels/TextInputChannel.test.ets create mode 100644 shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/common/JSONMethodCodec.test.ets create mode 100644 shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/common/MethodCall.test.ets create mode 100644 shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/platform/AccessibilityEventsDelegate.test.ets diff --git a/shell/platform/ohos/flutter_embedding/application/oh-package.json5 b/shell/platform/ohos/flutter_embedding/application/oh-package.json5 index be95b2c16d..54e012fbb8 100644 --- a/shell/platform/ohos/flutter_embedding/application/oh-package.json5 +++ b/shell/platform/ohos/flutter_embedding/application/oh-package.json5 @@ -6,7 +6,8 @@ "author": "", "license": "", "dependencies": { - "@ohos/flutter_ohos": "file:../flutter" + "@ohos/flutter_ohos": "file:../flutter", + "@ohos/hypium": "1.0.18" } } diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/List.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/List.test.ets index 2c87902a73..7412e2e70b 100644 --- a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/List.test.ets +++ b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/List.test.ets @@ -25,6 +25,13 @@ import PlatformViewsControllerTest from './plugin/platform/PlatformViewsControll import RawPointerCoordTest from './plugin/platform/RawPointerCoordTest.test'; import RootDvModelManagerTest from './plugin/platform/RootDvModelManagerTest.test'; import ByteBufferTest from './plugin/util/ByteBufferTest.test'; +import PlatformChannelUnitTest from './embedding/engine/systemchannels/PlatformChannel.test'; +import RestorationChannelUnitTest from './embedding/engine/systemchannels/RestorationChannel.test'; +import SettingsChannelUnitTest from './embedding/engine/systemchannels/SettingsChannel.test'; +import TextInputChannelUnitTest from './embedding/engine/systemchannels/TextInputChannel.test'; +import JSONMethodCodecUnitTest from './plugin/common/JSONMethodCodec.test'; +import MethodCallUnitTest from './plugin/common/MethodCall.test'; +import AccessibilityEventsDelegateUnitTest from './plugin/platform/AccessibilityEventsDelegate.test'; export default function testsuite() { FlutterAbilityAndEntryDelegateTest(); @@ -40,4 +47,11 @@ export default function testsuite() { RawPointerCoordTest(); RootDvModelManagerTest(); ByteBufferTest(); + PlatformChannelUnitTest(); + RestorationChannelUnitTest(); + SettingsChannelUnitTest(); + TextInputChannelUnitTest(); + JSONMethodCodecUnitTest(); + MethodCallUnitTest(); + AccessibilityEventsDelegateUnitTest(); } \ No newline at end of file diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/systemchannels/PlatformChannel.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/systemchannels/PlatformChannel.test.ets new file mode 100644 index 0000000000..1b6bb22329 --- /dev/null +++ b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/systemchannels/PlatformChannel.test.ets @@ -0,0 +1,102 @@ +/* + * Copyright (C) 2024 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 { describe, expect, it, } from "@ohos/hypium"; +import { AsyncCallback as _AsyncCallback } from '@ohos.base'; +import PlatformChannel, { + Brightness, + ClipboardContentFormat, + DeviceOrientation, + HapticFeedbackType, + SystemUiMode, + SystemUiOverlay +} from "@ohos/flutter_ohos/src/main/ets/embedding/engine/systemchannels/PlatformChannel"; +import { Any, DartExecutor, FlutterNapi, MethodResult } from "@ohos/flutter_ohos"; +import { resourceManager } from "@kit.LocalizationKit"; + +export default function PlatformChannelUnitTest() { + describe('PlatformChannelTest', () => { + it('platformChannel_decodeOrientations', 0, decodeOrientations); + + it('platformChannel_getFeedbackTypeFromValue', 0, getFeedbackTypeFromValue); + + it('platformChannel_getClipboardContentFormatFromValue', 0, getClipboardContentFormatFromValue); + + it('platformChannel_getSystemUiOverlayFromValue', 0, getSystemUiOverlayFromValue); + + it('platformChannel_getSystemUiModeFromValue', 0, getSystemUiModeFromValue); + + it('platformChannel_getBrightnessFromValue', 0, getBrightnessFromValue); + + it('platformChannel_getDeviceOrientationFromValue', 0, getDeviceOrientationFromValue); + }) +} + +function decodeOrientations() { + let channel = getPlatformChannel(); + expect(channel.decodeOrientations([DeviceOrientation.PORTRAIT_UP])).assertInstanceOf("Number") +} + +function getFeedbackTypeFromValue() { + let channel = getPlatformChannel(); + let result = channel.getFeedbackTypeFromValue(HapticFeedbackType.STANDARD); + expect(result).assertInstanceOf("String") +} + +function getClipboardContentFormatFromValue() { + let channel = getPlatformChannel(); + let result = channel.getClipboardContentFormatFromValue(ClipboardContentFormat.PLAIN_TEXT); + expect(result).assertInstanceOf("String") +} + +function getSystemUiOverlayFromValue() { + let channel = getPlatformChannel(); + let result = channel.getSystemUiOverlayFromValue(SystemUiOverlay.BOTTOM_OVERLAYS); + expect(result).assertInstanceOf("String") +} + +function getSystemUiModeFromValue() { + let channel = getPlatformChannel(); + let result = channel.getSystemUiModeFromValue(SystemUiMode.IMMERSIVE); + expect(result).assertInstanceOf("String") +} + +function getBrightnessFromValue() { + let channel = getPlatformChannel(); + let result = channel.getBrightnessFromValue(Brightness.LIGHT); + expect(result).assertInstanceOf("String") +} + +function getDeviceOrientationFromValue() { + let channel = getPlatformChannel(); + let result = channel.getDeviceOrientationFromValue(DeviceOrientation.PORTRAIT_UP); + expect(result).assertInstanceOf("String") +} + +function getPlatformChannel(): PlatformChannel { + let flutterNapi = new FlutterNapi(); + let manager: resourceManager.ResourceManager = getContext().resourceManager; + let dartExecutor = new DartExecutor(flutterNapi, manager); + let channel = new PlatformChannel(dartExecutor); + return channel; +} + +export class MethodResultTest implements MethodResult { + success = (result: Any): void => { + }; + error = (errorCode: string, errorMessage: string, errorDetails: Any): void => { + }; + notImplemented = (): void => { + } +} diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/systemchannels/RestorationChannel.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/systemchannels/RestorationChannel.test.ets new file mode 100644 index 0000000000..7a692e1ad8 --- /dev/null +++ b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/systemchannels/RestorationChannel.test.ets @@ -0,0 +1,71 @@ +/* + * Copyright (C) 2024 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 { + DartExecutor, + FlutterNapi, + MethodCall, + MethodCallHandler, + MethodChannel, + MethodResult, + RestorationChannel, + StandardMethodCodec +} from "@ohos/flutter_ohos"; +import { describe, expect, it } from "@ohos/hypium"; +import { resourceManager } from "@kit.LocalizationKit"; +import { util } from "@kit.ArkTS"; + +let TAG = "RestorationChannel"; + +export default function RestorationChannelUnitTest() { + + describe('RestorationChannelTest', () => { + it("RestorationChannel_getRestorationData", 0, getRestorationData); + }) +} + +function getRestorationData() { + let channel = getRestorationChannel(); + expect(channel.getRestorationData()).assertInstanceOf("Uint8Array") +} + +function getRestorationChannel(): RestorationChannel { + let flutterNapi = new FlutterNapi(); + let manager: resourceManager.ResourceManager = getContext().resourceManager; + let dartExecutor = new DartExecutor(flutterNapi, manager); + let rawChannel = new MethodChannel(dartExecutor, "flutter/mousecursor", StandardMethodCodec.INSTANCE); + let restorationChannel = new RestorationChannel(rawChannel, false); + return restorationChannel; +} + +class TestMethodCallHandler implements MethodCallHandler { + onMethodCall(call: MethodCall, result: MethodResult): void { + } +} + +/** + * string转Uint8Array + * @param value + * @returns + */ +export function stringToUint8Array(str: string): Uint8Array { + try { + let textEncoder = new util.TextEncoder("utf-8"); + let array: Uint8Array = textEncoder.encodeInto(str); + return array + } catch (err) { + return new Uint8Array() + } +} diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/systemchannels/SettingsChannel.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/systemchannels/SettingsChannel.test.ets new file mode 100644 index 0000000000..ae6ac3ed60 --- /dev/null +++ b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/systemchannels/SettingsChannel.test.ets @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2024 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 { describe, expect, it } from "@ohos/hypium"; +import { resourceManager } from "@kit.LocalizationKit"; +import { DartExecutor, FlutterNapi, SettingsChannel } from "@ohos/flutter_ohos"; + +export default function SettingsChannelUnitTest() { + describe('SettingsChannelTest', () => { + it("SettingsChannel_startMessage", 0, startMessage); + }) +} + +function startMessage() { + let channel = getSettingsChannel(); + let result = channel.startMessage(); + expect(result).assertInstanceOf("Object"); +} + +function getSettingsChannel(): SettingsChannel { + let flutterNapi = new FlutterNapi(); + let manager: resourceManager.ResourceManager = getContext().resourceManager; + let dartExecutor = new DartExecutor(flutterNapi, manager); + let channel = new SettingsChannel(dartExecutor); + return channel; +} \ No newline at end of file diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/systemchannels/TextInputChannel.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/systemchannels/TextInputChannel.test.ets new file mode 100644 index 0000000000..5266cefa3c --- /dev/null +++ b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/systemchannels/TextInputChannel.test.ets @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2024 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 { describe, expect, it } from "@ohos/hypium"; +import { resourceManager } from "@kit.LocalizationKit"; +import { DartExecutor, FlutterNapi, TextInputChannel } from "@ohos/flutter_ohos"; + +export default function TextInputChannelUnitTest() { + describe('TextInputChannel', () => { + it("TextInputChannel_createEditingStateJSON", 0, createEditingStateJSON); + }) +} + +function createEditingStateJSON() { + let textInputChannel = getTextInputChannel(); + let result = textInputChannel.createEditingStateJSON("test", 0, 1, 0, 2); + expect(result).assertInstanceOf("Object"); +} + +function getTextInputChannel(): TextInputChannel { + let flutterNapi = new FlutterNapi(); + let manager: resourceManager.ResourceManager = getContext().resourceManager; + let dartExecutor = new DartExecutor(flutterNapi, manager); + let channel = new TextInputChannel(dartExecutor); + return channel; +} diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/common/JSONMethodCodec.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/common/JSONMethodCodec.test.ets new file mode 100644 index 0000000000..277b4cc09c --- /dev/null +++ b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/common/JSONMethodCodec.test.ets @@ -0,0 +1,58 @@ +/* + * Copyright (C) 2024 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 { Any, JSONMethodCodec, MethodCall } from "@ohos/flutter_ohos"; +import { describe, expect, it, MockKit, when } from "@ohos/hypium"; + +export default function JSONMethodCodecUnitTest() { + describe('JSONMethodCodec', () => { + it("JSONMethodCodec_encodeMethodCall", 0, encodeMethodCall); + + it("JSONMethodCodec_encodeSuccessEnvelope", 0, encodeSuccessEnvelope); + + it("JSONMethodCodec_decodeEnvelope", 0, decodeEnvelope); + + }) +} + +function encodeMethodCall() { + let mocker = new MockKit(); + let ob = JSONMethodCodec.INSTANCE; + let mockFunc = mocker.mockFunc(ob, ob.encodeMethodCall); + let params = new MethodCall("key", "value"); + let r = new ArrayBuffer(4096); + when(mockFunc)(params).afterReturn(r); + let result = ob.encodeMethodCall(params); + expect(result).assertEqual(r); +} + +function encodeSuccessEnvelope() { + let mocker = new MockKit(); + let ob = JSONMethodCodec.INSTANCE; + let mockFunc = mocker.mockFunc(ob, ob.encodeSuccessEnvelope); + let r = new ArrayBuffer(4096); + when(mockFunc)(null).afterReturn(r); + expect(ob.encodeSuccessEnvelope(null)).assertEqual(r); +} + +function decodeEnvelope() { + let mocker = new MockKit(); + let ob = JSONMethodCodec.INSTANCE; + let mockFunc = mocker.mockFunc(ob, ob.decodeEnvelope); + let r = new ArrayBuffer(4096); + when(mockFunc)(r).afterReturn("any"); + let result: Any = ob.decodeEnvelope(r); + expect(result).assertEqual("any"); +} + diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/common/MethodCall.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/common/MethodCall.test.ets new file mode 100644 index 0000000000..24e9b8b2d3 --- /dev/null +++ b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/common/MethodCall.test.ets @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2024 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 { MethodCall } from "@ohos/flutter_ohos"; +import { describe, expect, it } from "@ohos/hypium"; + +export default function MethodCallUnitTest() { + describe('MethodCall', () => { + it("MethodCall_argument", 0, argument); + + it("MethodCall_hasArgument", 0, hasArgument); + }) +} + +function argument() { + let ob = new MethodCall("get", null); + expect(ob.argument("key")).assertNull(); +} + +function hasArgument() { + let ob = new MethodCall("get", null); + expect(ob.hasArgument("key")).assertFalse(); +} + + diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/platform/AccessibilityEventsDelegate.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/platform/AccessibilityEventsDelegate.test.ets new file mode 100644 index 0000000000..e1dddc3ca4 --- /dev/null +++ b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/platform/AccessibilityEventsDelegate.test.ets @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2024 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 { AccessibilityBridge, AccessibilityEventsDelegate } from "@ohos/flutter_ohos"; +import { describe, expect, it } from "@ohos/hypium"; + +export default function AccessibilityEventsDelegateUnitTest() { + describe('AccessibilityEventsDelegate', () => { + it("AccessibilityEventsDelegate_requestSendAccessibilityEvent", 0, requestSendAccessibilityEvent); + + it("AccessibilityEventsDelegate_onAccessibilityHoverEvent", 0, onAccessibilityHoverEvent); + }) +} + +function requestSendAccessibilityEvent() { + let delegate = new AccessibilityEventsDelegate(); + let result = delegate.requestSendAccessibilityEvent(new AccessibilityBridge()); + expect(result).assertTrue(); +} + +function onAccessibilityHoverEvent() { + let delegate = new AccessibilityEventsDelegate(); + let result = delegate.onAccessibilityHoverEvent(new AccessibilityBridge()); + expect(result).assertTrue(); +} + + diff --git a/shell/platform/ohos/flutter_embedding/build-profile.json5 b/shell/platform/ohos/flutter_embedding/build-profile.json5 index 87805d1f43..f41e856d25 100755 --- a/shell/platform/ohos/flutter_embedding/build-profile.json5 +++ b/shell/platform/ohos/flutter_embedding/build-profile.json5 @@ -15,7 +15,21 @@ { "app": { - "signingConfigs": [], + "signingConfigs": [ + { + "name": "default", + "type": "HarmonyOS", + "material": { + "certpath": "C:\\Users\\song_zhifei\\.ohos\\config\\default_flutter_embedding_owhKTgi0_ny5-JoTZcHG6WbGm9Bqc5XM8zBOWIS_5Tk=.cer", + "storePassword": "0000001B98FB6E742DFECA6EF904B5B68444A704EA90F762B3BCFBFD3861372F6EC644076E93AE11BC3E6F", + "keyAlias": "debugKey", + "keyPassword": "0000001BDD0A07CDF57F54B38A497FE4E0858D1A33B65FBD79DD7206F97BE067E86AE5AE86897562A6A538", + "profile": "C:\\Users\\song_zhifei\\.ohos\\config\\default_flutter_embedding_owhKTgi0_ny5-JoTZcHG6WbGm9Bqc5XM8zBOWIS_5Tk=.p7b", + "signAlg": "SHA256withECDSA", + "storeFile": "C:\\Users\\song_zhifei\\.ohos\\config\\default_flutter_embedding_owhKTgi0_ny5-JoTZcHG6WbGm9Bqc5XM8zBOWIS_5Tk=.p12" + } + } + ], "products": [ { "name": "default", -- Gitee From e18268dc50c1ceb49f4a9d7c97bea354e809775e Mon Sep 17 00:00:00 2001 From: song_zhifei Date: Wed, 23 Oct 2024 14:54:40 +0800 Subject: [PATCH 04/15] delete sign Signed-off-by: song_zhifei --- .../ohos/flutter_embedding/build-profile.json5 | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/shell/platform/ohos/flutter_embedding/build-profile.json5 b/shell/platform/ohos/flutter_embedding/build-profile.json5 index f41e856d25..87805d1f43 100755 --- a/shell/platform/ohos/flutter_embedding/build-profile.json5 +++ b/shell/platform/ohos/flutter_embedding/build-profile.json5 @@ -15,21 +15,7 @@ { "app": { - "signingConfigs": [ - { - "name": "default", - "type": "HarmonyOS", - "material": { - "certpath": "C:\\Users\\song_zhifei\\.ohos\\config\\default_flutter_embedding_owhKTgi0_ny5-JoTZcHG6WbGm9Bqc5XM8zBOWIS_5Tk=.cer", - "storePassword": "0000001B98FB6E742DFECA6EF904B5B68444A704EA90F762B3BCFBFD3861372F6EC644076E93AE11BC3E6F", - "keyAlias": "debugKey", - "keyPassword": "0000001BDD0A07CDF57F54B38A497FE4E0858D1A33B65FBD79DD7206F97BE067E86AE5AE86897562A6A538", - "profile": "C:\\Users\\song_zhifei\\.ohos\\config\\default_flutter_embedding_owhKTgi0_ny5-JoTZcHG6WbGm9Bqc5XM8zBOWIS_5Tk=.p7b", - "signAlg": "SHA256withECDSA", - "storeFile": "C:\\Users\\song_zhifei\\.ohos\\config\\default_flutter_embedding_owhKTgi0_ny5-JoTZcHG6WbGm9Bqc5XM8zBOWIS_5Tk=.p12" - } - } - ], + "signingConfigs": [], "products": [ { "name": "default", -- Gitee From e83d9b41cf846c02ade0e3ebeeaa2bbead953db4 Mon Sep 17 00:00:00 2001 From: chenqiang Date: Wed, 23 Oct 2024 15:43:26 +0800 Subject: [PATCH 05/15] =?UTF-8?q?=E6=96=B0=E5=A2=9EUT?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: chenqiang --- .../src/ohosTest/ets/test/List.test.ets | 15 +++- .../engine/ApplicationInfoTest.test.ets | 13 ++++ .../engine/DartMessengerTest.test.ets | 32 ++++++++ .../FlutterApplicationInfoTest.test.ets | 11 +++ .../engine/FlutterLoaderTest.test.ets | 37 +++++++++ .../engine/FlutterMutatorViewTest.test.ets | 12 +++ .../engine/FlutterMutatorsStackTest.test.ets | 75 +++++++++++++++++++ .../engine/FlutterRendererTest.test.ets | 43 +++++++++++ 8 files changed, 237 insertions(+), 1 deletion(-) create mode 100644 shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/ApplicationInfoTest.test.ets create mode 100644 shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/DartMessengerTest.test.ets create mode 100644 shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/FlutterApplicationInfoTest.test.ets create mode 100644 shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/FlutterLoaderTest.test.ets create mode 100644 shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/FlutterMutatorViewTest.test.ets create mode 100644 shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/FlutterMutatorsStackTest.test.ets create mode 100644 shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/FlutterRendererTest.test.ets diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/List.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/List.test.ets index 2c87902a73..b427594a7d 100644 --- a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/List.test.ets +++ b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/List.test.ets @@ -25,7 +25,13 @@ import PlatformViewsControllerTest from './plugin/platform/PlatformViewsControll import RawPointerCoordTest from './plugin/platform/RawPointerCoordTest.test'; import RootDvModelManagerTest from './plugin/platform/RootDvModelManagerTest.test'; import ByteBufferTest from './plugin/util/ByteBufferTest.test'; - +import DartMessengerTest from './embedding/engine/DartMessengerTest.test' +import ApplicationInfoTest from './embedding/engine/ApplicationInfoTest.test' +import FlutterApplicationInfoTest from './embedding/engine/FlutterApplicationInfoTest.test' +import FlutterLoaderTest from './embedding/engine/FlutterLoaderTest.test' +import FlutterMutatorViewTest from './embedding/engine/FlutterMutatorViewTest.test' +import FlutterMutatorsStackTest from './embedding/engine/FlutterMutatorsStackTest.test' +import FlutterRendererTest from './embedding/engine/FlutterRendererTest.test' export default function testsuite() { FlutterAbilityAndEntryDelegateTest(); FlutterAbilityTest(); @@ -40,4 +46,11 @@ export default function testsuite() { RawPointerCoordTest(); RootDvModelManagerTest(); ByteBufferTest(); + DartMessengerTest(); + ApplicationInfoTest(); + FlutterApplicationInfoTest(); + FlutterLoaderTest() + FlutterMutatorViewTest(); + FlutterMutatorsStackTest(); + FlutterRendererTest(); } \ No newline at end of file diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/ApplicationInfoTest.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/ApplicationInfoTest.test.ets new file mode 100644 index 0000000000..ac8ceaad76 --- /dev/null +++ b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/ApplicationInfoTest.test.ets @@ -0,0 +1,13 @@ +import common from '@ohos.app.ability.common'; +import ApplicationInfoLoader from '@ohos/flutter_ohos/src/main/ets/embedding/engine/loader/ApplicationInfoLoader' +import { describe,it, expect } from '@ohos/hypium'; +export default function ApplicationInfoTest() { + describe('ApplicationInfoTest', () => { + it('TestLoad', 0, async (done: Function) => { + let context: common.Context = getContext(); + let applicationInfo = ApplicationInfoLoader.load(context) + expect(applicationInfo).not().assertNull(); + done(); + }) + }) +} diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/DartMessengerTest.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/DartMessengerTest.test.ets new file mode 100644 index 0000000000..c58e777305 --- /dev/null +++ b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/DartMessengerTest.test.ets @@ -0,0 +1,32 @@ +import { DartMessenger} from '@ohos/flutter_ohos/src/main/ets/embedding/engine/dart/DartMessenger' +import { describe,it, expect } from '@ohos/hypium'; +import FlutterNapi from '@ohos/flutter_ohos/src/main/ets/embedding/engine/FlutterNapi' +import { + TaskQueue, +} from '@ohos/flutter_ohos/src/main/ets/plugin/common/BinaryMessenger' +export default function DartMessengerTest() { + describe('FlutterDartMessengerTest', () => { + it('TestMakeBackgroundTaskQueue', 0, async (done: Function) => { + const flutterNapi: FlutterNapi = new FlutterNapi(); + const dartMessage = new DartMessenger(flutterNapi); + let taskQueue: TaskQueue = dartMessage.makeBackgroundTaskQueue(); + expect(taskQueue).not().assertNull(); + done(); + }) + + it('TestGetPendingChannelResponseCount', 0, async (done: Function) => { + const flutterNapi: FlutterNapi = new FlutterNapi(); + const messenger = new DartMessenger(flutterNapi); + let count: number = messenger.getPendingChannelResponseCount(); + expect(count).assertEqual(0); + done(); + }) + + it('TestAskQueueFactory', 0, async (done: Function) => { + const flutterNapi: FlutterNapi = new FlutterNapi(); + const messenger = new DartMessenger(flutterNapi); + expect(messenger.taskQueueFactory).not().assertNull(); + done(); + }) + }) +} \ No newline at end of file diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/FlutterApplicationInfoTest.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/FlutterApplicationInfoTest.test.ets new file mode 100644 index 0000000000..7bf0f49be6 --- /dev/null +++ b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/FlutterApplicationInfoTest.test.ets @@ -0,0 +1,11 @@ +import FlutterApplicationInfo from '@ohos/flutter_ohos/src/main/ets/embedding/engine/loader/FlutterApplicationInfo' +import { describe, it, expect } from '@ohos/hypium'; +export default function FlutterApplicationInfoTest() { + describe('FlutterApplicationInfoTest', () => { + it('TestLoad', 0, async (done: Function) => { + let flutterApplicationInfo = new FlutterApplicationInfo("test", "test", "test", "test", "test", "test", false) + expect(flutterApplicationInfo).not().assertNull(); + done(); + }) + }) +} diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/FlutterLoaderTest.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/FlutterLoaderTest.test.ets new file mode 100644 index 0000000000..bda5cc32f0 --- /dev/null +++ b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/FlutterLoaderTest.test.ets @@ -0,0 +1,37 @@ +import common from '@ohos.app.ability.common'; +import FlutterLoader from '@ohos/flutter_ohos/src/main/ets/embedding/engine/loader/FlutterLoader' +import { describe,it, expect } from '@ohos/hypium'; +import FlutterNapi from '@ohos/flutter_ohos/src/main/ets/embedding/engine/FlutterNapi' +export default function FlutterLoaderTest() { + describe('FlutterLoaderTest', () => { + it('initializationTest', 0, async (done: Function) => { + let flutterNapi: FlutterNapi = new FlutterNapi(); + let flutterLoader: FlutterLoader = new FlutterLoader(flutterNapi); + expect(flutterLoader.initialized).assertFalse(); + done(); + }) + + it('initResultTest', 0, async (done: Function) => { + let flutterNapi: FlutterNapi = new FlutterNapi(); + let flutterLoader: FlutterLoader = new FlutterLoader(flutterNapi); + expect(flutterLoader.initResult).assertNull(); + done(); + }) + + it('flutterNapiTest', 0, async (done: Function) => { + let flutterNapi: FlutterNapi = new FlutterNapi(); + let flutterLoader: FlutterLoader = new FlutterLoader(flutterNapi); + expect(flutterLoader.flutterNapi).not().assertNull(); + done(); + }) + + it('startInitializationTest', 0, async (done: Function) => { + let flutterNapi: FlutterNapi = new FlutterNapi(); + let flutterLoader: FlutterLoader = new FlutterLoader(flutterNapi); + let context: common.Context = getContext(); + expect(flutterLoader.initialized).assertFalse(); + flutterLoader.startInitialization(context); + done(); + }) + }) +} diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/FlutterMutatorViewTest.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/FlutterMutatorViewTest.test.ets new file mode 100644 index 0000000000..7ce0c5af10 --- /dev/null +++ b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/FlutterMutatorViewTest.test.ets @@ -0,0 +1,12 @@ +import { FlutterMutatorView } from '@ohos/flutter_ohos/src/main/ets/embedding/engine/mutatorsstack/FlutterMutatorView' +import { describe,it, expect } from '@ohos/hypium'; +export default function FlutterMutatorViewTest() { + describe('FlutterMutatorViewTest', () => { + it('TestGetDvModel', 0, async (done: Function) => { + let flutterMutatorView = new FlutterMutatorView(); + let dvModel = flutterMutatorView.getDvModel(); + expect(dvModel).not().assertNull(); + done(); + }) + }) +} diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/FlutterMutatorsStackTest.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/FlutterMutatorsStackTest.test.ets new file mode 100644 index 0000000000..c6db0aca9f --- /dev/null +++ b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/FlutterMutatorsStackTest.test.ets @@ -0,0 +1,75 @@ +import common from '@ohos.app.ability.common'; +import { + FlutterMutatorsStack, + FlutterMutator +} from '@ohos/flutter_ohos/src/main/ets/embedding/engine/mutatorsstack/FlutterMutatorsStack' +import { describe,it, expect } from '@ohos/hypium'; +import matrix4 from '@ohos.matrix4' +export default function FlutterMutatorsStackTest() { + describe('FlutterMutatorsStackTest', () => { + it('TestPushClipPath', 0, async (done: Function) => { + let flutterMutatorStack = new FlutterMutatorsStack(); + const width = 100; + const height = 200; + const command = 'M 10 10 L 90 90'; + flutterMutatorStack.pushClipPath(width, height, command); + expect(flutterMutatorStack.getMutators().length).assertEqual(1); + expect(flutterMutatorStack.getFinalClippingPaths().length).assertEqual(1); + done(); + }) + + it('TestPushClipRect1', 0, async (done: Function) => { + let flutterMutatorStack = new FlutterMutatorsStack(); + const width = 100; + const height = 200; + const radius = 10; + flutterMutatorStack.pushClipRect(width, height, radius); + expect(flutterMutatorStack.getMutators().length).assertEqual(1); + done(); + }) + + it('TestPushClipRect2', 0, async (done: Function) => { + let flutterMutatorStack = new FlutterMutatorsStack(); + const width = 100; + const height = 200; + const radius = 10; + flutterMutatorStack.pushClipRect(width, height, radius); + expect(flutterMutatorStack.getFinalClippingRects().length).assertEqual(1); + done(); + }) + + it('TestPushTransform1', 0, async (done: Function) => { + const values = [1, 0, 0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]; + let flutterMutatorStack = new FlutterMutatorsStack(); + flutterMutatorStack.pushTransform(values); + expect(flutterMutatorStack.getMutators().length).assertEqual(1); + done(); + }) + + it('TestPushTransform2', 0, async (done: Function) => { + const values = [1, 0, 0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]; + let flutterMutatorStack = new FlutterMutatorsStack(); + flutterMutatorStack.pushTransform(values); + expect(flutterMutatorStack.getMutators().length).assertEqual(1); + done(); + }) + + it('TestFlutterMutatorsStack1', 0, async (done: Function) => { + let flutterMutatorStack = new FlutterMutatorsStack(); + expect(flutterMutatorStack.getMutators().length).assertEqual(0); + done(); + }) + + it('TestFlutterMutatorsStack2', 0, async (done: Function) => { + let flutterMutatorStack = new FlutterMutatorsStack(); + expect(flutterMutatorStack.getFinalClippingPaths().length).assertEqual(0); + done(); + }) + + it('TestFlutterMutatorsStack3', 0, async (done: Function) => { + let flutterMutatorStack = new FlutterMutatorsStack(); + expect(flutterMutatorStack.getFinalClippingRects().length).assertEqual(0); + done(); + }) + }) +} diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/FlutterRendererTest.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/FlutterRendererTest.test.ets new file mode 100644 index 0000000000..582e0cb262 --- /dev/null +++ b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/FlutterRendererTest.test.ets @@ -0,0 +1,43 @@ +import { describe,it, expect } from '@ohos/hypium'; +import { FlutterRenderer} from '@ohos/flutter_ohos/src/main/ets/embedding/engine/renderer/FlutterRenderer'; +import FlutterNapi from '@ohos/flutter_ohos/src/main/ets/embedding/engine/FlutterNapi' +export default function FlutterRendererTest() { + describe('FlutterRendererTest', () => { + it('TestCreateSurfaceTexture', 0, async (done: Function) => { + let flutterNapi: FlutterNapi = new FlutterNapi(); + let flutterRenderer = new FlutterRenderer(flutterNapi); + let surfaceTextureEntry = flutterRenderer.createSurfaceTexture(); + expect(surfaceTextureEntry).not().assertNull();; + done(); + }) + + it('TestGetTextureId', 0, async (done: Function) => { + let flutterNapi: FlutterNapi = new FlutterNapi(); + let flutterRenderer = new FlutterRenderer(flutterNapi); + let textureId = flutterRenderer.getTextureId(); + expect(textureId == 0).assertFalse(); + done(); + }) + + it('TestRegisterPixelMap', 0, async (done: Function) => { + let flutterNapi: FlutterNapi = new FlutterNapi(); + let flutterRenderer = new FlutterRenderer(flutterNapi); + const pixelMap = {} as PixelMap; + let textureId = flutterRenderer.registerPixelMap(pixelMap); + expect(textureId).assertEqual(1); + done(); + }) + + it('TestRegisterPixelMapMore', 0, async (done: Function) => { + let flutterNapi: FlutterNapi = new FlutterNapi(); + let flutterRenderer = new FlutterRenderer(flutterNapi); + const pixelMap1 = {} as PixelMap; + const pixelMap2 = {} as PixelMap; + const textureId1 = flutterRenderer.registerPixelMap(pixelMap1); + const textureId2 = flutterRenderer.registerPixelMap(pixelMap2); + expect(textureId1).assertEqual(1); // 第一次调用 + expect(textureId2).assertEqual(2); // 第二次调用 + done(); + }) + }) +} -- Gitee From 53f3212a23f3a6ede7d0b01e35e2c79bc2209b9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BA=A6=E7=A9=97?= Date: Wed, 23 Oct 2024 15:44:54 +0800 Subject: [PATCH 06/15] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8D=95=E5=85=83?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E4=BB=A3=E7=A0=81=E5=B9=B6=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E9=80=9A=E8=BF=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 麦穗 --- .../src/ohosTest/ets/test/List.test.ets | 2 - ...lutterAbilityAndEntryDelegateTest.test.ets | 15 - .../ohos/FlutterAbilityTest.test.ets | 172 +---------- .../embedding/ohos/FlutterEntryTest.test.ets | 68 +---- .../ohos/FlutterManagerTest.test.ets | 35 +-- .../ohos/OhosTouchProcessorTest.test.ets | 58 ---- .../test/embedding/ohos/SettingTest.test.ets | 7 +- .../PlatformViewRegistryImplTest.test.ets | 9 +- .../platform/PlatformViewWrapperTest.test.ets | 12 +- .../PlatformViewsControllerTest.test.ets | 170 +---------- .../platform/RawPointerCoordTest.test.ets | 6 +- .../test/plugin/util/ByteBufferTest.test.ets | 275 +++++------------- 12 files changed, 117 insertions(+), 712 deletions(-) delete mode 100644 shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/ohos/OhosTouchProcessorTest.test.ets diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/List.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/List.test.ets index 2c87902a73..fb02d662f8 100644 --- a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/List.test.ets +++ b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/List.test.ets @@ -16,7 +16,6 @@ import FlutterAbilityAndEntryDelegateTest from './embedding/ohos/FlutterAbilityA import FlutterAbilityTest from './embedding/ohos/FlutterAbilityTest.test'; import FlutterEntryTest from './embedding/ohos/FlutterEntryTest.test'; import FlutterManagerTest from './embedding/ohos/FlutterManagerTest.test'; -import OhosTouchProcessorTest from './embedding/ohos/OhosTouchProcessorTest.test'; import SettingTest from './embedding/ohos/SettingTest.test'; import BinaryCodecTest from './plugin/common/BinaryCodecTest.test'; import PlatformViewRegistryImplTest from './plugin/platform/PlatformViewRegistryImplTest.test'; @@ -31,7 +30,6 @@ export default function testsuite() { FlutterAbilityTest(); FlutterEntryTest(); FlutterManagerTest(); - OhosTouchProcessorTest(); SettingTest(); BinaryCodecTest(); PlatformViewRegistryImplTest(); diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/ohos/FlutterAbilityAndEntryDelegateTest.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/ohos/FlutterAbilityAndEntryDelegateTest.test.ets index 162789fc95..3e13db7bb0 100644 --- a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/ohos/FlutterAbilityAndEntryDelegateTest.test.ets +++ b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/ohos/FlutterAbilityAndEntryDelegateTest.test.ets @@ -24,13 +24,6 @@ const bundleName = abilityDelegatorRegistry.getArguments().bundleName; export default function FlutterAbilityAndEntryDelegateTest() { describe('FlutterAbilityAndEntryDelegateTest', () => { - it('TestCreateView', 0, async (done: Function) => { - const flutterAbilityAndEntryDelegate: FlutterAbilityAndEntryDelegate = new FlutterAbilityAndEntryDelegate(); - const result = flutterAbilityAndEntryDelegate.createView(getContext()); - expect(result).not().assertNull(); - done(); - }) - it('TestAddEntrypointOptions', 0, async (done: Function) => { const flutterAbilityAndEntryDelegate: FlutterAbilityAndEntryDelegate = new FlutterAbilityAndEntryDelegate(); const options: Options = new Options(getContext()); @@ -53,14 +46,6 @@ export default function FlutterAbilityAndEntryDelegateTest() { done(); }) - it('TestGetAppComponent', 0, async (done: Function) => { - const flutterAbilityAndEntryDelegate: FlutterAbilityAndEntryDelegate = new FlutterAbilityAndEntryDelegate(); - await flutterAbilityAndEntryDelegate.onAttach(getContext()); - const result = flutterAbilityAndEntryDelegate.getAppComponent(); - expect(result).not().assertNull(); - done(); - }) - it('TestOnSaveState', 0, async (done: Function) => { const flutterAbilityAndEntryDelegate: FlutterAbilityAndEntryDelegate = new FlutterAbilityAndEntryDelegate(); const reason: AbilityConstant.StateType = AbilityConstant.StateType.CONTINUATION diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/ohos/FlutterAbilityTest.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/ohos/FlutterAbilityTest.test.ets index df204acc54..949afc3a50 100644 --- a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/ohos/FlutterAbilityTest.test.ets +++ b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/ohos/FlutterAbilityTest.test.ets @@ -14,14 +14,16 @@ */ import { describe, it, expect } from '@ohos/hypium'; import { abilityDelegatorRegistry } from '@kit.TestKit'; -import { ConfigurationConstant, Want } from '@kit.AbilityKit'; +import { Want } from '@kit.AbilityKit'; import AbilityConstant from '@ohos.app.ability.AbilityConstant'; import { FlutterView, FlutterAbility, FlutterEngine, FlutterPlugin } from "@ohos/flutter_ohos"; -import { Configuration } from '@ohos.app.ability.Configuration'; import { FlutterPluginBinding } from '@ohos/flutter_ohos/src/main/ets/embedding/engine/plugins/FlutterPlugin'; -const delegator = abilityDelegatorRegistry.getAbilityDelegator() const bundleName = abilityDelegatorRegistry.getArguments().bundleName; +const want: Want = { + bundleName: bundleName, + abilityName: 'EntryAbility' +} function sleep(time: number) { return new Promise((resolve: Function) => setTimeout(resolve, time)); @@ -32,38 +34,16 @@ export default function FlutterAbilityTest() { it('FlutterAbilityTest', 0, async (done: Function) => { const flutterAbility: FlutterAbility = new FlutterAbility(); const flutterView: FlutterView | null = flutterAbility.getFlutterView(); - expect(flutterView).not().assertNull(); + expect(flutterView).assertNull(); await sleep(1000); const pagePath: string = flutterAbility.pagePath(); expect(pagePath).assertEqual("pages/Index"); done(); }) - it('TestFlutterAbilityOnCreate', 0, async (done: Function) => { - const flutterAbility: FlutterAbility = new FlutterAbility(); - const want: Want = { - bundleName: bundleName, - abilityName: 'EntryAbility' - } - - const launchParam: AbilityConstant.LaunchParam = { - launchReason: AbilityConstant.LaunchReason.UNKNOWN, - lastExitReason: AbilityConstant.LastExitReason.UNKNOWN, - lastExitMessage: "test" - } - await delegator.startAbility(want); - await sleep(1000); - flutterAbility.onCreate(want, launchParam); - done(); - }) - it('TestFlutterAbilityOnSaveState', 0, async (done: Function) => { const flutterAbility: FlutterAbility = new FlutterAbility(); const reason: AbilityConstant.StateType = AbilityConstant.StateType.CONTINUATION - const want: Want = { - bundleName: bundleName, - abilityName: 'EntryAbility' - } const wantParam: Record = { "testParams": want } @@ -73,40 +53,17 @@ export default function FlutterAbilityTest() { done(); }) - it('TestOnNewWant', 0, async (done: Function) => { - const flutterAbility: FlutterAbility = new FlutterAbility(); - const want: Want = { - bundleName: bundleName, - abilityName: 'EntryAbility' - } - - const launchParam: AbilityConstant.LaunchParam = { - launchReason: AbilityConstant.LaunchReason.UNKNOWN, - lastExitReason: AbilityConstant.LastExitReason.UNKNOWN, - lastExitMessage: "test" - } - flutterAbility.onNewWant(want, launchParam); - done(); - }) - - it('TestOnForegroundAndOnBackground', 0, async (done: Function) => { - const flutterAbility: FlutterAbility = new FlutterAbility(); - flutterAbility.onForeground(); - await sleep(1000); - flutterAbility.onBackground(); - done(); - }) - - it('TestGetAbility', 0, async (done: Function) => { + it('TestGetWant', 0, async (done: Function) => { const flutterAbility: FlutterAbility = new FlutterAbility(); - flutterAbility.getAbility(); + const result = flutterAbility.getWant(); + expect(result).assertUndefined(); done(); }) it('TestGetFlutterAbilityAndEntryDelegate', 0, async (done: Function) => { const flutterAbility: FlutterAbility = new FlutterAbility(); const result = flutterAbility.getFlutterAbilityAndEntryDelegate(); - expect(result).not().assertNull(); + expect(result).assertNull(); done(); }) @@ -128,30 +85,10 @@ export default function FlutterAbilityTest() { const flutterAbility: FlutterAbility = new FlutterAbility(); const flutterEngine = new FlutterEngine(getContext(), null, null, null); const result = flutterAbility.providePlatformPlugin(flutterEngine); - expect(result).assertInstanceOf("PlatformPlugin"); - done(); - }) - - it('TestGetFlutterShellArgs', 0, async (done: Function) => { - const flutterAbility: FlutterAbility = new FlutterAbility(); - const result = flutterAbility.getFlutterShellArgs(); expect(result).not().assertNull(); done(); }) - it('TestGetDartEntrypointArgs', 0, async (done: Function) => { - const flutterAbility: FlutterAbility = new FlutterAbility(); - const result = flutterAbility.getDartEntrypointArgs(); - expect(result).not().assertNull(); - done(); - }) - - it('TestDetachFromFlutterEngine', 0, async (done: Function) => { - const flutterAbility: FlutterAbility = new FlutterAbility(); - flutterAbility.detachFromFlutterEngine(); - done(); - }) - it('TestPopSystemNavigator', 0, async (done: Function) => { const flutterAbility: FlutterAbility = new FlutterAbility(); const result = flutterAbility.popSystemNavigator(); @@ -180,34 +117,6 @@ export default function FlutterAbilityTest() { done(); }) - it('TestGetDartEntrypointFunctionName', 0, async (done: Function) => { - const flutterAbility: FlutterAbility = new FlutterAbility(); - const result = flutterAbility.getDartEntrypointFunctionName(); - expect(result).not().assertNull(); - done(); - }) - - it('TestGetInitialRoute', 0, async (done: Function) => { - const flutterAbility: FlutterAbility = new FlutterAbility(); - const result = flutterAbility.getInitialRoute(); - expect(result).not().assertNull(); - done(); - }) - - it('TestGetWant', 0, async (done: Function) => { - const flutterAbility: FlutterAbility = new FlutterAbility(); - const result = flutterAbility.getWant(); - expect(result).assertInstanceOf("Want"); - done(); - }) - - it('TestShouldDestroyEngineWithHost', 0, async (done: Function) => { - const flutterAbility: FlutterAbility = new FlutterAbility(); - const result = flutterAbility.shouldDestroyEngineWithHost(); - expect(result).not().assertNull(); - done(); - }) - it('TestAttachToEngineAutomatically', 0, async (done: Function) => { const flutterAbility: FlutterAbility = new FlutterAbility(); const result = flutterAbility.attachToEngineAutomatically(); @@ -215,74 +124,17 @@ export default function FlutterAbilityTest() { done(); }) - it('TestShouldRestoreAndSaveState', 0, async (done: Function) => { - const flutterAbility: FlutterAbility = new FlutterAbility(); - const result = flutterAbility.shouldRestoreAndSaveState(); - expect(result).not().assertNull(); - done(); - }) - it('TestGetExclusiveAppComponent', 0, async (done: Function) => { const flutterAbility: FlutterAbility = new FlutterAbility(); const result = flutterAbility.getExclusiveAppComponent(); - expect(result).not().assertNull(); - done(); - }) - - it('TestGetCachedEngineId', 0, async (done: Function) => { - const flutterAbility: FlutterAbility = new FlutterAbility(); - const result = flutterAbility.getCachedEngineId(); - expect(result).assertEqual("cached_engine_id"); - done(); - }) - - it('TestGetCachedEngineGroupId', 0, async (done: Function) => { - const flutterAbility: FlutterAbility = new FlutterAbility(); - const result = flutterAbility.getCachedEngineGroupId(); - expect(result).assertEqual("cached_engine_group_id"); - done(); - }) - - it('TestAddPlugin', 0, async (done: Function) => { - const flutterAbility: FlutterAbility = new FlutterAbility(); - flutterAbility.addPlugin(plugin); - done(); - }) - - it('TestRemovePlugin', 0, async (done: Function) => { - const flutterAbility: FlutterAbility = new FlutterAbility(); - flutterAbility.removePlugin(plugin); - done(); - }) - - it('TestOnMemoryLevel', 0, async (done: Function) => { - const flutterAbility: FlutterAbility = new FlutterAbility(); - const level = AbilityConstant.MemoryLevel.MEMORY_LEVEL_MODERATE - flutterAbility.onMemoryLevel(level); - done(); - }) - - it('TestOnConfigurationUpdated', 0, async (done: Function) => { - const flutterAbility: FlutterAbility = new FlutterAbility(); - const config: Configuration = { - colorMode: ConfigurationConstant.ColorMode.COLOR_MODE_DARK, - } - flutterAbility.onConfigurationUpdated(config); + expect(result).assertNull(); done(); }) it('TestGetFlutterEngine', 0, async (done: Function) => { const flutterAbility: FlutterAbility = new FlutterAbility(); const result = flutterAbility.getFlutterEngine(); - expect(result).not().assertNull(); - done(); - }) - - it('TestOnWindowStageDestroyAndRelease', 0, async (done: Function) => { - const flutterAbility: FlutterAbility = new FlutterAbility(); - flutterAbility.onWindowStageDestroy(); - await sleep(1000); - flutterAbility.release(); + expect(result).assertNull(); done(); }) }) diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/ohos/FlutterEntryTest.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/ohos/FlutterEntryTest.test.ets index b6b12443af..58ff92f5d4 100644 --- a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/ohos/FlutterEntryTest.test.ets +++ b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/ohos/FlutterEntryTest.test.ets @@ -22,16 +22,11 @@ function sleep(time: number) { export default function FlutterEntryTest() { describe('FlutterEntryTest', () => { - it('TestAboutToAppear', 0, async (done: Function) => { - const flutterEntry: FlutterEntry = new FlutterEntry(getContext()); - flutterEntry.aboutToAppear(); - done(); - }) it('TestGetFlutterView', 0, async (done: Function) => { const flutterEntry: FlutterEntry = new FlutterEntry(getContext()); const result = flutterEntry.getFlutterView(); - expect(result).not().assertNull(); + expect(result).assertNull(); done(); }) @@ -42,37 +37,6 @@ export default function FlutterEntryTest() { done(); }) - it('TestOnPageShow', 0, async (done: Function) => { - const flutterEntry: FlutterEntry = new FlutterEntry(getContext()); - flutterEntry.onPageShow(); - await sleep(1000); - flutterEntry.onPageHide(); - await sleep(1000); - flutterEntry.onBackPress(); - done(); - }) - - it('TestConfigureFlutterEngine', 0, async (done: Function) => { - const flutterEntry: FlutterEntry = new FlutterEntry(getContext()); - const flutterEngine = new FlutterEngine(getContext(), null, null, null); - flutterEntry.configureFlutterEngine(flutterEngine); - await sleep(1000); - flutterEntry.cleanUpFlutterEngine(flutterEngine); - done(); - }) - - it('TestGetAbility', 0, async (done: Function) => { - const flutterEntry: FlutterEntry = new FlutterEntry(getContext()); - flutterEntry.getAbility(); - done(); - }) - - it('TestAboutToDisappear', 0, async (done: Function) => { - const flutterEntry: FlutterEntry = new FlutterEntry(getContext()); - flutterEntry.aboutToDisappear(); - done(); - }) - it('TestShouldDispatchAppLifecycleState', 0, async (done: Function) => { const flutterEntry: FlutterEntry = new FlutterEntry(getContext()); const result = flutterEntry.shouldDispatchAppLifecycleState(); @@ -91,7 +55,7 @@ export default function FlutterEntryTest() { const flutterEntry: FlutterEntry = new FlutterEntry(getContext()); const flutterEngine = new FlutterEngine(getContext(), null, null, null); const result = flutterEntry.providePlatformPlugin(flutterEngine); - expect(result).assertInstanceOf("PlatformPlugin"); + expect(result).not().assertNull(); done(); }) @@ -109,12 +73,6 @@ export default function FlutterEntryTest() { done(); }) - it('TestDetachFromFlutterEngine', 0, async (done: Function) => { - const flutterEntry: FlutterEntry = new FlutterEntry(getContext()); - flutterEntry.detachFromFlutterEngine(); - done(); - }) - it('TestPopSystemNavigator', 0, async (done: Function) => { const flutterEntry: FlutterEntry = new FlutterEntry(getContext()); const result = flutterEntry.popSystemNavigator(); @@ -125,7 +83,7 @@ export default function FlutterEntryTest() { it('TestShouldAttachEngineToAbility', 0, async (done: Function) => { const flutterEntry: FlutterEntry = new FlutterEntry(getContext()); const result = flutterEntry.shouldAttachEngineToAbility(); - expect(result).assertTrue(); + expect(result).assertUndefined(); done(); }) @@ -157,20 +115,6 @@ export default function FlutterEntryTest() { done(); }) - it('TestGetWant', 0, async (done: Function) => { - const flutterEntry: FlutterEntry = new FlutterEntry(getContext()); - const result = flutterEntry.getWant(); - expect(result).assertInstanceOf("Want"); - done(); - }) - - it('TestShouldDestroyEngineWithHost', 0, async (done: Function) => { - const flutterEntry: FlutterEntry = new FlutterEntry(getContext()); - const result = flutterEntry.shouldDestroyEngineWithHost(); - expect(result).not().assertNull(); - done(); - }) - it('TestAttachToEngineAutomatically', 0, async (done: Function) => { const flutterEntry: FlutterEntry = new FlutterEntry(getContext()); const result = flutterEntry.attachToEngineAutomatically(); @@ -188,21 +132,21 @@ export default function FlutterEntryTest() { it('TestGetExclusiveAppComponent', 0, async (done: Function) => { const flutterEntry: FlutterEntry = new FlutterEntry(getContext()); const result = flutterEntry.getExclusiveAppComponent(); - expect(result).not().assertNull(); + expect(result).assertNull(); done(); }) it('TestGetCachedEngineId', 0, async (done: Function) => { const flutterEntry: FlutterEntry = new FlutterEntry(getContext()); const result = flutterEntry.getCachedEngineId(); - expect(result).assertEqual("cached_engine_id"); + expect(result).assertUndefined(); done(); }) it('TestGetCachedEngineGroupId', 0, async (done: Function) => { const flutterEntry: FlutterEntry = new FlutterEntry(getContext()); const result = flutterEntry.getCachedEngineGroupId(); - expect(result).assertEqual("cached_engine_group_id"); + expect(result).assertUndefined(); done(); }) diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/ohos/FlutterManagerTest.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/ohos/FlutterManagerTest.test.ets index 3d0cb903fa..336c416428 100644 --- a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/ohos/FlutterManagerTest.test.ets +++ b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/ohos/FlutterManagerTest.test.ets @@ -12,8 +12,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { describe, it, expect } from '@ohos/hypium'; -import { FlutterView, FlutterManager } from "@ohos/flutter_ohos"; +import { describe, it, expect, beforeAll } from '@ohos/hypium'; +import { FlutterManager } from "@ohos/flutter_ohos"; import { window } from '@kit.ArkUI'; import { FullScreenListener } from '@ohos/flutter_ohos/src/main/ets/embedding/ohos/FlutterManager'; @@ -26,36 +26,17 @@ const uiAbility = flutterManager.getUIAbility(getContext()); export default function FlutterManagerTest() { describe('FlutterManagerTest', () => { - it('TestUIAbility', 0, async (done: Function) => { - flutterManager.pushUIAbility(uiAbility); - done(); - }) - - it('TestPopUIAbility', 0, async (done: Function) => { - console.info("uitest: TestPopUIAbility begin"); - flutterManager.popUIAbility(uiAbility); - done(); - }) - - it('TestWindowStage', 0, async (done: Function) => { + beforeAll(async () => { const windowStage = flutterManager.getWindowStage(uiAbility); await sleep(1000); flutterManager.pushWindowStage(uiAbility, windowStage); await sleep(1000); flutterManager.popWindowStage(uiAbility); - done(); - }) - - it('TestCreateFlutterView', 0, async (done: Function) => { await sleep(1000); - let flutterViewA: FlutterView = flutterManager.createFlutterView(getContext()); - expect(flutterViewA).not().assertNull(); - const viewId = flutterViewA.getId(); - expect(viewId).not().assertNull(); + flutterManager.pushUIAbility(uiAbility); await sleep(1000); - let flutterViewB = flutterManager.getFlutterView(viewId); - expect(flutterViewB).not().assertNull(); - done(); + flutterManager.popUIAbility(uiAbility); + }) it('TestGetFlutterViewList', 0, async (done: Function) => { @@ -91,10 +72,6 @@ export default function FlutterManagerTest() { const result = flutterManager.useFullScreen(); expect(result).assertTrue(); flutterManager.setUseFullScreen(result); - done(); - }) - - it('TestClear', 0, async (done: Function) => { flutterManager.clear(); done(); }) diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/ohos/OhosTouchProcessorTest.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/ohos/OhosTouchProcessorTest.test.ets deleted file mode 100644 index f56a5661bb..0000000000 --- a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/ohos/OhosTouchProcessorTest.test.ets +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (C) 2024 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 { describe, it } from '@ohos/hypium'; -import { TouchEvent, Action, Touch, ToolType, SourceType } from '@ohos.multimodalInput.touchEvent'; -import { OhosTouchProcessor } from "@ohos/flutter_ohos"; - -export default function OhosTouchProcessorTest() { - describe('OhosTouchProcessorTest', () => { - it('FlutterOnTouchEvent', 0, async (done: Function) => { - const ohosTouchProcessor: OhosTouchProcessor = new OhosTouchProcessor(); - const touch: Touch = { - id: 0, - pressedTime: 0, - screenX: 0, - screenY: 0, - windowX: 0, - windowY: 0, - pressure: 0, - width: 0, - height: 0, - tiltX: 0, - tiltY: 0, - toolX: 0, - toolY: 0, - toolWidth: 0, - toolHeight: 0, - rawX: 0, - rawY: 0, - toolType: ToolType.FINGER - } - const event: TouchEvent = { - action: Action.DOWN, - touch: touch, - touches: [], - sourceType: SourceType.TOUCH_SCREEN, - id: 0, - deviceId: 0, - actionTime: 0, - screenId: 0, - windowId: 0 - } - ohosTouchProcessor.onTouchEvent(event, null) - done(); - }) - }) -} diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/ohos/SettingTest.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/ohos/SettingTest.test.ets index ebc11b541a..76c43cb3fe 100644 --- a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/ohos/SettingTest.test.ets +++ b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/ohos/SettingTest.test.ets @@ -27,14 +27,9 @@ export default function SettingTest() { done(); }) - it('TestSendSettings', 0, async (done: Function) => { - const mediaQuery: MediaQuery = new MediaQuery(); - settings.sendSettings(mediaQuery); - done(); - }) - it('TestGetThemeMode', 0, async (done: Function) => { const mediaQuery: MediaQuery = new MediaQuery(); + settings.sendSettings(mediaQuery); const result: PlatformBrightness = settings.getThemeMode(mediaQuery); expect(result).not().assertNull(); done(); diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/platform/PlatformViewRegistryImplTest.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/platform/PlatformViewRegistryImplTest.test.ets index 27d0b0eabb..8720501f64 100644 --- a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/platform/PlatformViewRegistryImplTest.test.ets +++ b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/platform/PlatformViewRegistryImplTest.test.ets @@ -19,8 +19,15 @@ const platformViewRegistryImpl: PlatformViewRegistryImpl = new PlatformViewRegis export default function PlatformViewRegistryImplTest() { describe('PlatformViewRegistryImplTest', () => { - it('TestRegisterViewFactory', 0, async (done: Function) => { + it('TestPlatformViewRegistryImplGetFactory', 0, async (done: Function) => { const platformViewFactory: PlatformViewFactory = platformViewRegistryImpl.getFactory('test'); + expect(platformViewFactory).not().assertNull(); + done(); + }) + + it('TestPlatformViewRegistryImplRegisterViewFactory', 0, async (done: Function) => { + const platformViewFactory: PlatformViewFactory = platformViewRegistryImpl.getFactory('test'); + expect(platformViewFactory).not().assertNull(); const result = platformViewRegistryImpl.registerViewFactory('test', platformViewFactory); expect(result).assertTrue(); done(); diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/platform/PlatformViewWrapperTest.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/platform/PlatformViewWrapperTest.test.ets index 833e39da4b..03e084c27c 100644 --- a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/platform/PlatformViewWrapperTest.test.ets +++ b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/platform/PlatformViewWrapperTest.test.ets @@ -24,21 +24,15 @@ const platformViewWrapper: PlatformViewWrapper = new PlatformViewWrapper(); export default function PlatformViewWrapperTest() { describe('PlatformViewWrapperTest', () => { - it('TestPlatformViewWrapperSetTouchProcessor', 0, async (done: Function) => { + it('TestPlatformViewWrapperDvModel', 0, async (done: Function) => { const newTouchProcessor: OhosTouchProcessor = new OhosTouchProcessor(); platformViewWrapper.setTouchProcessor(newTouchProcessor); - done(); - }) - - it('TestPlatformViewWrapperDvModel', 0, async (done: Function) => { + await sleep(1000); const dvModel: DVModel = platformViewWrapper.getDvModel(); expect(dvModel).not().assertNull(); await sleep(1000); platformViewWrapper.addDvModel(dvModel); - done(); - }) - - it('TestPlatformViewWrapperSetLayoutParams', 0, async (done: Function) => { + await sleep(1000); const parameters: DVModelParameters = new DVModelParameters(); platformViewWrapper.setLayoutParams(parameters); done(); diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/platform/PlatformViewsControllerTest.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/platform/PlatformViewsControllerTest.test.ets index 4717c1610f..a12b210726 100644 --- a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/platform/PlatformViewsControllerTest.test.ets +++ b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/platform/PlatformViewsControllerTest.test.ets @@ -12,202 +12,38 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { describe, it, expect, beforeAll } from '@ohos/hypium'; +import { describe, it, expect } from '@ohos/hypium'; import { PlatformViewsController, - ByteBuffer, - MethodResult, - Any, - DartExecutor, - TextureRegistry, - FlutterRenderer, - FlutterNapi, - FlutterView, - TextInputPlugin, - TextInputChannel, - PlatformOverlayView, - AccessibilityEventsDelegate, FlutterOverlaySurface, } from "@ohos/flutter_ohos"; -import { - PlatformViewBufferResized, - PlatformViewBufferSize, - PlatformViewCreationRequest, - PlatformViewResizeRequest, - PlatformViewTouch -} from '@ohos/flutter_ohos/src/main/ets/embedding/engine/systemchannels/PlatformViewsChannel'; -import { resourceManager } from '@kit.LocalizationKit'; -const context = getContext(); const platformViewsController: PlatformViewsController = new PlatformViewsController(); -const viewId: number = 1; -const viewType: string = 'test'; -const logicalTop: number = 100; -const logicalLeft: number = 100; -const logicalWidth: number = 100; -const logicalHeight: number = 100; const direction: Direction = 100; -const byteBuffer = new ByteBuffer(); -const request: PlatformViewCreationRequest = - new PlatformViewCreationRequest(viewId, viewType, logicalTop, logicalLeft, logicalWidth, logicalHeight, direction, - byteBuffer); - -const resizeRequest: PlatformViewResizeRequest = - new PlatformViewResizeRequest(viewId, logicalWidth, logicalHeight); - -const downTime: number = 100; -const eventTime: number = 100; -const action: number = 100; -const pointerCount: number = 100; -const rawPointerPropertiesList: Any = 100; -const rawPointerCoords: Any = 100; -const metaState: number = 100; -const buttonState: number = 100; -const xPrecision: number = 100; -const yPrecision: number = 100; -const deviceId: number = 100; -const edgeFlags: number = 100; -const source: number = 100; -const flags: number = 100; -const motionEventId: number = 100; -const touch: PlatformViewTouch = - new PlatformViewTouch(viewId, downTime, eventTime, action, pointerCount, rawPointerPropertiesList, - rawPointerCoords, metaState, buttonState, xPrecision, yPrecision, deviceId, edgeFlags, source, flags, - motionEventId); -const flutterNapi: FlutterNapi = new FlutterNapi(); -const textureRegistry: TextureRegistry = new FlutterRenderer(flutterNapi); -let dartExecutor: DartExecutor; - -class ResizeCallback extends PlatformViewBufferResized { - result: MethodResult | null = null; - - run(bufferSize: PlatformViewBufferSize) { - if (bufferSize == null) { - this.result?.error("error", "Failed to resize the platform view", null); - } else { - const response: Map = new Map(); - response.set("width", bufferSize.width); - response.set("height", bufferSize.height); - this.result?.success(response); - } - } -} export default function PlatformViewsControllerTest() { describe('PlatformViewsControllerTest', () => { - beforeAll(() => { - const assetManager: resourceManager.ResourceManager = context.resourceManager; - dartExecutor = new DartExecutor(flutterNapi, assetManager); - }) it('TestPlatformViewRegistryImplGetRegistry', 0, async (done: Function) => { const result = platformViewsController.getRegistry(); expect(result).not().assertNull(); done(); }) - it('TestCreateForPlatformViewLayer', 0, async (done: Function) => { - platformViewsController.createForPlatformViewLayer(request); - done(); - }) - - it('TestPlatformViewRegistryImplDispose', 0, async (done: Function) => { - platformViewsController.dispose(viewId); - done(); - }) - - it('TestPlatformViewRegistryImplResize', 0, async (done: Function) => { - const onComplete: PlatformViewBufferResized = new ResizeCallback(); - platformViewsController.resize(resizeRequest, onComplete); - done(); - }) - - it('TestPlatformViewRegistryImplOffset', 0, async (done: Function) => { - platformViewsController.offset(viewId, logicalTop, logicalLeft); - done(); - }) - - it('TestPlatformViewRegistryImplOnBeginFrame', 0, async (done: Function) => { - platformViewsController.onBeginFrame(); - done(); - }) - - it('TestCreateOverlaySurfaceByPlatformOverlayView', 0, async (done: Function) => { - const accessibilityEventsDelegate: AccessibilityEventsDelegate = new AccessibilityEventsDelegate(); - const imageView: PlatformOverlayView = - new PlatformOverlayView(context, logicalWidth, logicalHeight, accessibilityEventsDelegate); - platformViewsController.createOverlaySurfaceByPlatformOverlayView(imageView); - done(); - }) it('TestCreateOverlaySurface', 0, async (done: Function) => { const result: FlutterOverlaySurface = platformViewsController.createOverlaySurface(); expect(result).not().assertNull(); done(); }) - - it('TestPlatformViewRegistryImplOnTouch', 0, async (done: Function) => { - platformViewsController.onTouch(touch); - done(); - }) - - it('TestPlatformViewRegistryImplSetDirection', 0, async (done: Function) => { - platformViewsController.setDirection(viewId, direction); - done(); - }) - it('TestPlatformViewRegistryImplValidateDirection', 0, async (done: Function) => { const result = platformViewsController.validateDirection(direction); - expect(result).assertInstanceOf('boolean'); - done(); - }) - - it('TestPlatformViewRegistryImplClearFocus', 0, async (done: Function) => { - platformViewsController.clearFocus(viewId); - done(); - }) - - it('TestPlatformViewRegistryImplCreateForTextureLayer', 0, async (done: Function) => { - const result = platformViewsController.createForTextureLayer(request); - expect(result).not().assertNull(); - done(); - }) - - it('TestPlatformViewRegistryImplAttach', 0, async (done: Function) => { - platformViewsController.attach(context, textureRegistry, dartExecutor); - done(); - }) - - it('TestPlatformViewRegistryImplAttachTextInputPlugin', 0, async (done: Function) => { - const textInputChannel: TextInputChannel = new TextInputChannel(dartExecutor); - const textInputPlugin: TextInputPlugin = new TextInputPlugin(textInputChannel); - platformViewsController.attachTextInputPlugin(textInputPlugin); - done(); - }) - - it('TestPlatformViewRegistryImplAttachToView', 0, async (done: Function) => { - const newFlutterView: FlutterView = new FlutterView(viewId + '', context); - platformViewsController.attachToView(newFlutterView); + expect(result).assertFalse(); done(); }) it('TestPlatformViewRegistryImplGetFlutterView', 0, async (done: Function) => { const result = platformViewsController.getFlutterView(); - expect(result).not().assertNull(); - done(); - }) - - it('TestPlatformViewRegistryImplDetach', 0, async (done: Function) => { - platformViewsController.detach(); - done(); - }) - - it('TestPlatformViewRegistryImplDetachFromView', 0, async (done: Function) => { - platformViewsController.detachFromView(); - done(); - }) - - it('TestPlatformViewRegistryImplDetachTextInputPlugin', 0, async (done: Function) => { - platformViewsController.detachTextInputPlugin(); + expect(result).assertNull(); done(); }) }) diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/platform/RawPointerCoordTest.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/platform/RawPointerCoordTest.test.ets index 8c5aff6e33..4431600e47 100644 --- a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/platform/RawPointerCoordTest.test.ets +++ b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/platform/RawPointerCoordTest.test.ets @@ -29,9 +29,13 @@ const rawPointerCoords: RawPointerCoords = export default function RawPointerCoordsTest() { describe('RawPointerCoordsTest', () => { - it('TestRawPointerCoords', 0, async (done: Function) => { + it('TestRawPointerCoordsGetX', 0, async (done: Function) => { const pointX = rawPointerCoords.getX(); expect(pointX).not().assertNull(); + done(); + }) + + it('TestRawPointerCoordsGetY', 0, async (done: Function) => { const pointY = rawPointerCoords.getY(); expect(pointY).not().assertNull(); done(); diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/util/ByteBufferTest.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/util/ByteBufferTest.test.ets index 4c1f4647b6..536a5aed71 100644 --- a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/util/ByteBufferTest.test.ets +++ b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/util/ByteBufferTest.test.ets @@ -12,12 +12,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { describe, it, expect } from '@ohos/hypium'; +import { describe, it, expect, afterAll } from '@ohos/hypium'; import { ByteBuffer } from "@ohos/flutter_ohos"; import { buffer } from '@kit.ArkTS'; -const byteBuffer: ByteBuffer = new ByteBuffer(); -const byteOffset = byteBuffer.byteOffset; +let byteBuffer: ByteBuffer; +let byteOffset: number; export default function ByteBufferTest() { describe('ByteBufferTest', () => { @@ -30,19 +30,23 @@ export default function ByteBufferTest() { }) it('TestByteBufferByteOffset', 0, async (done: Function) => { - expect(byteOffset).assertInstanceOf('number'); + const blobValue: buffer.Blob = new buffer.Blob(['name', 'age', 'sex']); + const message: ArrayBuffer = await blobValue.arrayBuffer(); + byteBuffer = ByteBuffer.from(message); + byteOffset = byteBuffer.byteOffset; + expect(byteOffset).assertEqual(0); done(); }) it('TestByteBufferByteLength', 0, async (done: Function) => { const result = byteBuffer.byteLength; - expect(result).assertInstanceOf('number'); + expect(result).assertEqual(10); done(); }) it('TestByteBufferBytesRemaining', 0, async (done: Function) => { const result = byteBuffer.bytesRemaining; - expect(result).assertInstanceOf('number'); + expect(result).assertEqual(10); done(); }) @@ -53,393 +57,260 @@ export default function ByteBufferTest() { }) it('TestByteBufferHasRemaining', 0, async (done: Function) => { - const result = byteBuffer.hasRemaining; - expect(result).assertInstanceOf('boolean'); + const result = byteBuffer.hasRemaining(); + expect(result).assertTrue(); done(); }) it('TestByteBufferSkip', 0, async (done: Function) => { const result = byteBuffer.byteLength; - expect(result).assertInstanceOf('number'); + expect(result).assertEqual(10); byteBuffer.skip(result); - done(); - }) - - it('TestByteBufferCheckWriteCapacity', 0, async (done: Function) => { byteBuffer.checkWriteCapacity(10); done(); }) - it('TestByteBufferSetBool', 0, async (done: Function) => { - byteBuffer.setBool(byteOffset, true); - done(); - }) - it('TestByteBufferGetBool', 0, async (done: Function) => { + byteBuffer.setBool(byteOffset, true); let result = byteBuffer.getBool(byteOffset); expect(result).assertTrue(); done(); }) - it('TestByteBufferWriteBool', 0, async (done: Function) => { - byteBuffer.writeBool(false); - done(); - }) - it('TestByteBufferReadBool', 0, async (done: Function) => { + byteBuffer.writeBool(false); let result = byteBuffer.readBool(); expect(result).assertFalse(); done(); }) - it('TestByteBufferSetInt8', 0, async (done: Function) => { - byteBuffer.setInt8(byteOffset, 10); - done(); - }) - it('TestByteBufferGetInt8', 0, async (done: Function) => { + byteBuffer.setInt8(byteOffset, 10); let result = byteBuffer.getInt8(byteOffset); - expect(result).assertInstanceOf('number'); - done(); - }) - - it('TestByteBufferWriteInt8', 0, async (done: Function) => { - byteBuffer.writeInt8(byteOffset); + expect(result).assertEqual(10); done(); }) it('TestByteBufferReadInt8', 0, async (done: Function) => { + byteBuffer.writeInt8(byteOffset); let result = byteBuffer.readInt8(); - expect(result).assertInstanceOf('number'); - done(); - }) - - it('TestByteBufferSetUint8', 0, async (done: Function) => { - byteBuffer.setUint8(byteOffset, 10); + expect(result).assertEqual(0); done(); }) it('TestByteBufferGetUint8', 0, async (done: Function) => { + byteBuffer.setUint8(byteOffset, 10); let result = byteBuffer.getUint8(byteOffset); - expect(result).assertInstanceOf('number'); - done(); - }) - - it('TestByteBufferWriteUint8', 0, async (done: Function) => { - byteBuffer.writeUint8(byteOffset); + expect(result).assertEqual(10); done(); }) it('TestByteBufferReadUint8', 0, async (done: Function) => { + byteBuffer.writeUint8(byteOffset); let result = byteBuffer.readUint8(); - expect(result).assertInstanceOf('number'); - done(); - }) - - it('TestByteBufferSetInt16', 0, async (done: Function) => { - byteBuffer.setInt16(byteOffset, 10); + expect(result).assertEqual(0); done(); }) it('TestByteBufferGetInt16', 0, async (done: Function) => { + byteBuffer.setInt16(byteOffset, 10); let result = byteBuffer.getInt16(byteOffset); - expect(result).assertInstanceOf('number'); - done(); - }) - - it('TestByteBufferWriteInt16', 0, async (done: Function) => { - byteBuffer.writeInt16(byteOffset); + expect(result).assertEqual(10); done(); }) it('TestByteBufferReadInt16', 0, async (done: Function) => { + byteBuffer.writeInt16(byteOffset); let result = byteBuffer.readInt16(); - expect(result).assertInstanceOf('number'); - done(); - }) - - it('TestByteBufferSetUint16', 0, async (done: Function) => { - byteBuffer.setUint16(byteOffset, 10); + expect(result).assertEqual(0); done(); }) it('TestByteBufferGetUint16', 0, async (done: Function) => { + byteBuffer.setUint16(byteOffset, 10); let result = byteBuffer.getUint16(byteOffset); - expect(result).assertInstanceOf('number'); - done(); - }) - - it('TestByteBufferWriteUint16', 0, async (done: Function) => { - byteBuffer.writeUint16(byteOffset); + expect(result).assertEqual(10); done(); }) it('TestByteBufferReadUint16', 0, async (done: Function) => { + byteBuffer.writeUint16(byteOffset); let result = byteBuffer.readUint16(); - expect(result).assertInstanceOf('number'); - done(); - }) - - it('TestByteBufferSetInt32', 0, async (done: Function) => { - byteBuffer.setInt32(byteOffset, 10); + expect(result).assertEqual(0); done(); }) it('TestByteBufferGetInt32', 0, async (done: Function) => { + byteBuffer.setInt32(byteOffset, 10); let result = byteBuffer.getInt32(byteOffset); - expect(result).assertInstanceOf('number'); - done(); - }) - - it('TestByteBufferWriteInt32', 0, async (done: Function) => { - byteBuffer.writeInt32(byteOffset); + expect(result).assertEqual(10); done(); }) it('TestByteBufferReadInt32', 0, async (done: Function) => { + byteBuffer.writeInt32(byteOffset); let result = byteBuffer.readInt32(); - expect(result).assertInstanceOf('number'); - done(); - }) - - it('TestByteBufferSetUint32', 0, async (done: Function) => { - byteBuffer.setUint32(byteOffset, 10); + expect(result).assertEqual(0); done(); }) it('TestByteBufferGetUint32', 0, async (done: Function) => { + byteBuffer.setUint32(byteOffset, 10); let result = byteBuffer.getUint32(byteOffset); - expect(result).assertInstanceOf('number'); - done(); - }) - - it('TestByteBufferWriteUint32', 0, async (done: Function) => { - byteBuffer.writeUint32(byteOffset); + expect(result).assertEqual(10); done(); }) it('TestByteBufferReadUint32', 0, async (done: Function) => { + byteBuffer.writeUint32(byteOffset); let result = byteBuffer.readUint32(); - expect(result).assertInstanceOf('number'); - done(); - }) - - it('TestByteBufferSetFloat32', 0, async (done: Function) => { - byteBuffer.setFloat32(byteOffset, 10); + expect(result).assertEqual(0); done(); }) it('TestByteBufferGetFloat32', 0, async (done: Function) => { + byteBuffer.setFloat32(byteOffset, 10); let result = byteBuffer.getFloat32(byteOffset); - expect(result).assertInstanceOf('number'); - done(); - }) - - it('TestByteBufferWriteFloat32', 0, async (done: Function) => { - byteBuffer.writeFloat32(byteOffset); + expect(result).assertEqual(10); done(); }) it('TestByteBufferReadFloat32', 0, async (done: Function) => { + byteBuffer.writeFloat32(byteOffset); let result = byteBuffer.readFloat32(); - expect(result).assertInstanceOf('number'); - done(); - }) - - it('TestByteBufferSetFloat64', 0, async (done: Function) => { - byteBuffer.setFloat64(byteOffset, 10); + expect(result).assertEqual(0); done(); }) it('TestByteBufferGetFloat64', 0, async (done: Function) => { + byteBuffer.setFloat64(byteOffset, 10); let result = byteBuffer.getFloat64(byteOffset); - expect(result).assertInstanceOf('number'); - done(); - }) - - it('TestByteBufferWriteFloat64', 0, async (done: Function) => { - byteBuffer.writeFloat64(byteOffset); + expect(result).assertEqual(10); done(); }) it('TestByteBufferReadFloat64', 0, async (done: Function) => { + byteBuffer.writeFloat64(byteOffset); let result = byteBuffer.readFloat64(); - expect(result).assertInstanceOf('number'); + expect(result).assertEqual(0); done(); }) - it('TestByteBufferSetBigInt64', 0, async (done: Function) => { + it('TestByteBufferGetBigInt64', 0, async (done: Function) => { const value: bigint = BigInt(9223372036854775807); byteBuffer.setBigInt64(byteOffset, value); - done(); - }) - - it('TestByteBufferGetBigInt64', 0, async (done: Function) => { let result = byteBuffer.getBigInt64(byteOffset); - expect(result).assertInstanceOf('bigint'); + expect(result).not().assertNull(); done(); }) - it('TestByteBufferWriteBigInt64', 0, async (done: Function) => { + it('TestByteBufferReadBigInt64', 0, async (done: Function) => { const value: bigint = BigInt(9223372036854775807); byteBuffer.writeBigInt64(value); - done(); - }) - - it('TestByteBufferReadBigInt64', 0, async (done: Function) => { let result = byteBuffer.readBigInt64(); - expect(result).assertInstanceOf('bigint'); + expect(result).assertEqual(0n); done(); }) - it('TestByteBufferSetBigUint64', 0, async (done: Function) => { + it('TestByteBufferGetBigUint64', 0, async (done: Function) => { const value: bigint = BigInt(9223372036854775807); byteBuffer.setBigUint64(byteOffset, value); - done(); - }) - - it('TestByteBufferGetBigUint64', 0, async (done: Function) => { let result = byteBuffer.getBigUint64(byteOffset); - expect(result).assertInstanceOf('bigint'); + expect(result).not().assertNull(); done(); }) - it('TestByteBufferWriteBigUint64', 0, async (done: Function) => { + it('TestByteBufferReadBigUint64', 0, async (done: Function) => { const value: bigint = BigInt(9223372036854775807); byteBuffer.writeBigUint64(value); - done(); - }) - - it('TestByteBufferReadBigUint64', 0, async (done: Function) => { let result = byteBuffer.readBigUint64(); - expect(result).assertInstanceOf('bigint'); - done(); - }) - - it('TestByteBufferSetInt64', 0, async (done: Function) => { - byteBuffer.setInt64(byteOffset, 10); + expect(result).assertEqual(0n); done(); }) it('TestByteBufferGetInt64', 0, async (done: Function) => { + byteBuffer.setInt64(byteOffset, 10); let result = byteBuffer.getInt64(byteOffset); - expect(result).assertInstanceOf('bigint'); - done(); - }) - - it('TestByteBufferWriteInt64', 0, async (done: Function) => { - byteBuffer.writeInt64(10); + expect(result).assertEqual(10n); done(); }) it('TestByteBufferReadInt64', 0, async (done: Function) => { + byteBuffer.writeInt64(10); let result = byteBuffer.readInt64(); - expect(result).assertInstanceOf('bigint'); - done(); - }) - - it('TestByteBufferSetUint64', 0, async (done: Function) => { - byteBuffer.setUint64(byteOffset, 10); + expect(result).assertEqual(0n); done(); }) it('TestByteBufferGetUint64', 0, async (done: Function) => { + byteBuffer.setUint64(byteOffset, 10); let result = byteBuffer.getUint64(byteOffset); - expect(result).assertInstanceOf('number'); - done(); - }) - - it('TestByteBufferWriteUint64', 0, async (done: Function) => { - byteBuffer.writeUint64(10); + expect(result).assertEqual(10); done(); }) it('TestByteBufferReadUint64', 0, async (done: Function) => { + byteBuffer.writeUint64(10); let result = byteBuffer.readUint64(); - expect(result).assertInstanceOf('number'); + expect(result).assertEqual(0); done(); }) - it('TestByteBufferSetUint8Array', 0, async (done: Function) => { + it('TestByteBufferGetUint8Array', 0, async (done: Function) => { const value: Uint8Array = new Uint8Array(); byteBuffer.setUint8Array(byteOffset, value); - done(); - }) - - it('TestByteBufferGetUint8Array', 0, async (done: Function) => { let result = byteBuffer.getUint8Array(byteOffset); expect(result).assertInstanceOf('Uint8Array'); done(); }) - it('TestByteBufferWriteUint8Array', 0, async (done: Function) => { + it('TestByteBufferReadUint8Array', 0, async (done: Function) => { const value: Uint8Array = new Uint8Array(); byteBuffer.writeUint8Array(value); - done(); - }) - - it('TestByteBufferReadUint8Array', 0, async (done: Function) => { let result = byteBuffer.readUint8Array(); expect(result).assertInstanceOf('Uint8Array'); done(); }) - it('TestByteBufferSetUint16Array', 0, async (done: Function) => { + it('TestByteBufferGetUint16Array', 0, async (done: Function) => { const value: Uint16Array = new Uint16Array(); byteBuffer.setUint16Array(byteOffset, value); - done(); - }) - - it('TestByteBufferGetUint16Array', 0, async (done: Function) => { let result = byteBuffer.getUint16Array(byteOffset); expect(result).assertInstanceOf('Uint16Array'); done(); }) - it('TestByteBufferWriteUint16Array', 0, async (done: Function) => { + it('TestByteBufferReadUint16Array', 0, async (done: Function) => { const value: Uint16Array = new Uint16Array(); byteBuffer.writeUint16Array(value); - done(); - }) - - it('TestByteBufferReadUint16Array', 0, async (done: Function) => { let result = byteBuffer.readUint16Array(); expect(result).assertInstanceOf('Uint16Array'); done(); }) - it('TestByteBufferSetString', 0, async (done: Function) => { - byteBuffer.setString(byteOffset, 'test'); - done(); - }) - it('TestByteBufferGetString', 0, async (done: Function) => { + byteBuffer.setString(byteOffset, 'test'); let result = byteBuffer.getString(byteOffset); - expect(result).assertInstanceOf('string'); - done(); - }) - - it('TestByteBufferWriteString', 0, async (done: Function) => { - byteBuffer.writeString('test'); + expect(result).not().assertNull(); done(); }) it('TestByteBufferReadString', 0, async (done: Function) => { + byteBuffer.writeString('test'); let result = byteBuffer.readString(); - expect(result).assertInstanceOf('string'); + expect(result).assertUndefined(); done(); }) it('TestByteBufferToString', 0, async (done: Function) => { let result = byteBuffer.toString(); - expect(result).assertInstanceOf('string'); + expect(result).not().assertNull(); done(); }) - it('TestByteBufferResetAndClear', 0, async (done: Function) => { + afterAll(() => { byteBuffer.reset(); byteBuffer.clear(); - done(); }) }) -- Gitee From 790dced3fb7515ea39002e9af7ac96f5ca62c9f2 Mon Sep 17 00:00:00 2001 From: chenqiang Date: Wed, 23 Oct 2024 16:13:11 +0800 Subject: [PATCH 07/15] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=89=88=E6=9D=83?= =?UTF-8?q?=E5=A4=B4=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: chenqiang --- .../embedding/engine/ApplicationInfoTest.test.ets | 15 +++++++++++++++ .../embedding/engine/DartMessengerTest.test.ets | 15 +++++++++++++++ .../engine/FlutterApplicationInfoTest.test.ets | 15 +++++++++++++++ .../embedding/engine/FlutterLoaderTest.test.ets | 15 +++++++++++++++ .../engine/FlutterMutatorViewTest.test.ets | 15 +++++++++++++++ .../engine/FlutterMutatorsStackTest.test.ets | 15 +++++++++++++++ .../embedding/engine/FlutterRendererTest.test.ets | 15 +++++++++++++++ 7 files changed, 105 insertions(+) diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/ApplicationInfoTest.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/ApplicationInfoTest.test.ets index ac8ceaad76..00fe21a0e9 100644 --- a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/ApplicationInfoTest.test.ets +++ b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/ApplicationInfoTest.test.ets @@ -1,3 +1,18 @@ +/* + * Copyright (C) 2024 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 common from '@ohos.app.ability.common'; import ApplicationInfoLoader from '@ohos/flutter_ohos/src/main/ets/embedding/engine/loader/ApplicationInfoLoader' import { describe,it, expect } from '@ohos/hypium'; diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/DartMessengerTest.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/DartMessengerTest.test.ets index c58e777305..c48bad263f 100644 --- a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/DartMessengerTest.test.ets +++ b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/DartMessengerTest.test.ets @@ -1,3 +1,18 @@ +/* + * Copyright (C) 2024 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 { DartMessenger} from '@ohos/flutter_ohos/src/main/ets/embedding/engine/dart/DartMessenger' import { describe,it, expect } from '@ohos/hypium'; import FlutterNapi from '@ohos/flutter_ohos/src/main/ets/embedding/engine/FlutterNapi' diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/FlutterApplicationInfoTest.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/FlutterApplicationInfoTest.test.ets index 7bf0f49be6..7556ae740f 100644 --- a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/FlutterApplicationInfoTest.test.ets +++ b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/FlutterApplicationInfoTest.test.ets @@ -1,3 +1,18 @@ +/* + * Copyright (C) 2024 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 FlutterApplicationInfo from '@ohos/flutter_ohos/src/main/ets/embedding/engine/loader/FlutterApplicationInfo' import { describe, it, expect } from '@ohos/hypium'; export default function FlutterApplicationInfoTest() { diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/FlutterLoaderTest.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/FlutterLoaderTest.test.ets index bda5cc32f0..52e231dcd9 100644 --- a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/FlutterLoaderTest.test.ets +++ b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/FlutterLoaderTest.test.ets @@ -1,3 +1,18 @@ +/* + * Copyright (C) 2024 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 common from '@ohos.app.ability.common'; import FlutterLoader from '@ohos/flutter_ohos/src/main/ets/embedding/engine/loader/FlutterLoader' import { describe,it, expect } from '@ohos/hypium'; diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/FlutterMutatorViewTest.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/FlutterMutatorViewTest.test.ets index 7ce0c5af10..4924e8b78a 100644 --- a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/FlutterMutatorViewTest.test.ets +++ b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/FlutterMutatorViewTest.test.ets @@ -1,3 +1,18 @@ +/* + * Copyright (C) 2024 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 { FlutterMutatorView } from '@ohos/flutter_ohos/src/main/ets/embedding/engine/mutatorsstack/FlutterMutatorView' import { describe,it, expect } from '@ohos/hypium'; export default function FlutterMutatorViewTest() { diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/FlutterMutatorsStackTest.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/FlutterMutatorsStackTest.test.ets index c6db0aca9f..4c633425ba 100644 --- a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/FlutterMutatorsStackTest.test.ets +++ b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/FlutterMutatorsStackTest.test.ets @@ -1,3 +1,18 @@ +/* + * Copyright (C) 2024 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 common from '@ohos.app.ability.common'; import { FlutterMutatorsStack, diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/FlutterRendererTest.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/FlutterRendererTest.test.ets index 582e0cb262..169f510280 100644 --- a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/FlutterRendererTest.test.ets +++ b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/FlutterRendererTest.test.ets @@ -1,3 +1,18 @@ +/* + * Copyright (C) 2024 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 { describe,it, expect } from '@ohos/hypium'; import { FlutterRenderer} from '@ohos/flutter_ohos/src/main/ets/embedding/engine/renderer/FlutterRenderer'; import FlutterNapi from '@ohos/flutter_ohos/src/main/ets/embedding/engine/FlutterNapi' -- Gitee From f95f9d649e9a86c3db3881398c58c5e81eb461c2 Mon Sep 17 00:00:00 2001 From: song_zhifei Date: Wed, 23 Oct 2024 16:27:16 +0800 Subject: [PATCH 08/15] =?UTF-8?q?=E6=B7=BB=E5=8A=A0copyright?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: song_zhifei --- .../application/src/ohosTest/ets/test/List.test.ets | 1 + 1 file changed, 1 insertion(+) diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/List.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/List.test.ets index a62be0ebf3..d4ca936b0c 100644 --- a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/List.test.ets +++ b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/List.test.ets @@ -12,6 +12,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import FlutterAbilityAndEntryDelegateTest from './embedding/ohos/FlutterAbilityAndEntryDelegateTest.test'; import FlutterAbilityTest from './embedding/ohos/FlutterAbilityTest.test'; import FlutterEntryTest from './embedding/ohos/FlutterEntryTest.test'; -- Gitee From e92ac70a4a0d6507848fea1207cde18d18f43620 Mon Sep 17 00:00:00 2001 From: yxc118 Date: Wed, 23 Oct 2024 16:40:01 +0800 Subject: [PATCH 09/15] =?UTF-8?q?flutter=5Fengine=5Fdev=20=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E5=8D=95=E5=85=83=E6=B5=8B=E8=AF=95=2013=E4=B8=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: yxc118 --- .../src/ohosTest/ets/test/List.test.ets | 27 ++ .../engine/FlutterEngineCacheTest.test.ets | 47 ++++ ...utterEngineConnectionRegistryTest.test.ets | 72 +++++ .../FlutterEngineGroupCacheTest.test.ets | 48 ++++ .../engine/FlutterEngineGroupTest.test.ets | 53 ++++ .../engine/FlutterEngineTest.test.ets | 262 ++++++++++++++++++ .../embedding/engine/FlutterNapiTest.test.ets | 182 ++++++++++++ .../engine/FlutterOverlaySurfaceTest.test.ets | 35 +++ .../engine/FlutterShellArgsTest.test.ets | 62 +++++ .../engine/dart/DartExecutorTest.test.ets | 71 +++++ .../ohos/TouchEventProcessorTest.test.ets | 41 +++ .../ohos/TouchEventTrackerTest.test.ets | 51 ++++ ...ositoryCallbackAdapterWrapperTest.test.ets | 29 ++ .../common/BinaryMessengerTest.test.ets | 51 ++++ 14 files changed, 1031 insertions(+) create mode 100644 shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/FlutterEngineCacheTest.test.ets create mode 100644 shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/FlutterEngineConnectionRegistryTest.test.ets create mode 100644 shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/FlutterEngineGroupCacheTest.test.ets create mode 100644 shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/FlutterEngineGroupTest.test.ets create mode 100644 shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/FlutterEngineTest.test.ets create mode 100644 shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/FlutterNapiTest.test.ets create mode 100644 shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/FlutterOverlaySurfaceTest.test.ets create mode 100644 shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/FlutterShellArgsTest.test.ets create mode 100644 shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/dart/DartExecutorTest.test.ets create mode 100644 shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/ohos/TouchEventProcessorTest.test.ets create mode 100644 shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/ohos/TouchEventTrackerTest.test.ets create mode 100644 shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/ohos/WindowInfoRepositoryCallbackAdapterWrapperTest.test.ets create mode 100644 shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/common/BinaryMessengerTest.test.ets diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/List.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/List.test.ets index 51090aa8d6..031fd04742 100644 --- a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/List.test.ets +++ b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/List.test.ets @@ -31,6 +31,20 @@ import FlutterLoaderTest from './embedding/engine/FlutterLoaderTest.test' import FlutterMutatorViewTest from './embedding/engine/FlutterMutatorViewTest.test' import FlutterMutatorsStackTest from './embedding/engine/FlutterMutatorsStackTest.test' import FlutterRendererTest from './embedding/engine/FlutterRendererTest.test' +import TouchEventProcessorTest from './embedding/ohos/TouchEventProcessorTest.test'; +import TouchEventTrackerTest from './embedding/ohos/TouchEventTrackerTest.test'; +import WindowInfoRepositoryCallbackAdapterWrapperTest from './embedding/ohos/WindowInfoRepositoryCallbackAdapterWrapperTest.test'; +import FlutterEngineTest from './embedding/engine/FlutterEngineTest.test'; +import FlutterEngineCacheTest from './embedding/engine/FlutterEngineCacheTest.test'; +import FlutterEngineConnectionRegistryTest from './embedding/engine/FlutterEngineConnectionRegistryTest.test'; +import FlutterEngineGroupCacheTest from './embedding/engine/FlutterEngineGroupCacheTest.test'; +import FlutterEngineGroupTest from './embedding/engine/FlutterEngineGroupTest.test'; +import FlutterNapiTest from './embedding/engine/FlutterNapiTest.test'; +import FlutterOverlaySurfaceTest from './embedding/engine/FlutterOverlaySurfaceTest.test'; +import FlutterShellArgsTest from './embedding/engine/FlutterShellArgsTest.test'; +import BinaryMessengerTest from './plugin/common/BinaryMessengerTest.test'; +import DartExecutorTest from './embedding/engine/dart/DartExecutorTest.test'; + export default function testsuite() { FlutterAbilityAndEntryDelegateTest(); FlutterAbilityTest(); @@ -51,4 +65,17 @@ export default function testsuite() { FlutterMutatorViewTest(); FlutterMutatorsStackTest(); FlutterRendererTest(); + TouchEventProcessorTest(); + TouchEventTrackerTest(); + WindowInfoRepositoryCallbackAdapterWrapperTest(); + FlutterEngineTest(); + FlutterEngineCacheTest(); + FlutterEngineConnectionRegistryTest(); + FlutterEngineGroupCacheTest(); + FlutterEngineGroupTest(); + FlutterNapiTest(); + FlutterOverlaySurfaceTest(); + FlutterShellArgsTest(); + BinaryMessengerTest(); + DartExecutorTest(); } \ No newline at end of file diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/FlutterEngineCacheTest.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/FlutterEngineCacheTest.test.ets new file mode 100644 index 0000000000..73e9ca9573 --- /dev/null +++ b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/FlutterEngineCacheTest.test.ets @@ -0,0 +1,47 @@ +/* + * Copyright (C) 2024 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 { describe, it, expect } from '@ohos/hypium'; +import FlutterEngine from '@ohos/flutter_ohos/src/main/ets/embedding/engine/FlutterEngine'; +import FlutterEngineCache from '@ohos/flutter_ohos/src/main/ets/embedding/engine/FlutterEngineCache'; + +export default function FlutterEngineCacheTest() { + const flutterEngineCache: FlutterEngineCache = new FlutterEngineCache(); + + describe('FlutterEngineCacheTest', () => { + + it('getInstance', 0, async (done: Function) => { + console.info("uitest: getInstance begin"); + const getInstance: FlutterEngineCache = FlutterEngineCache.getInstance(); + expect(getInstance).not().assertNull(); + done(); + }) + + it('contains', 0, async (done: Function) => { + console.info("uitest: contains begin"); + const contains: boolean = flutterEngineCache.contains('test'); + expect(contains).not().assertNull(); + done(); + }) + + it('get', 0, async (done: Function) => { + console.info("uitest: contains begin"); + const get: FlutterEngine | null = flutterEngineCache.get('test'); + if(get) { + expect(get).not().assertNull(); + } + done(); + }) + }) +} \ No newline at end of file diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/FlutterEngineConnectionRegistryTest.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/FlutterEngineConnectionRegistryTest.test.ets new file mode 100644 index 0000000000..1de90f3781 --- /dev/null +++ b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/FlutterEngineConnectionRegistryTest.test.ets @@ -0,0 +1,72 @@ +/* + * Copyright (C) 2024 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 { describe, beforeAll, it, expect } from '@ohos/hypium'; +import { abilityDelegatorRegistry } from '@kit.TestKit'; +import FlutterEngine from '@ohos/flutter_ohos/src/main/ets/embedding/engine/FlutterEngine'; +import PlatformViewsController from '@ohos/flutter_ohos/src/main/ets/plugin/platform/PlatformViewsController' +import common from '@ohos.app.ability.common'; +import FlutterEngineConnectionRegistry + from '@ohos/flutter_ohos/src/main/ets/embedding/engine/FlutterEngineConnectionRegistry'; +import { + FlutterPlugin, + FlutterPluginBinding +} from '@ohos/flutter_ohos/src/main/ets/embedding/engine/plugins/FlutterPlugin'; +import AbilityConstant from '@ohos.app.ability.AbilityConstant'; + +export default function FlutterEngineConnectionRegistryTest() { + let flutterEngineConnectionRegistry: FlutterEngineConnectionRegistry; + let flutterEngine: FlutterEngine; + const platformViewsController = new PlatformViewsController(); + const context = getContext() as common.UIAbilityContext; + const pluginClassName = 'test'; + + describe('FlutterEngineConnectionRegistryTest', () => { + + beforeAll(() => { + const flutterLoader = flutterEngine.getFlutterLoader(); + flutterEngine = new FlutterEngine(context, null, null, platformViewsController); + flutterEngineConnectionRegistry = new FlutterEngineConnectionRegistry(context, flutterEngine, flutterLoader); + }) + + it('has', 0, async (done: Function) => { + console.info("uitest: has begin"); + if (flutterEngineConnectionRegistry) { + const hasFlag = flutterEngineConnectionRegistry.has(pluginClassName); + expect(hasFlag).not().assertNull(); + } + done(); + }) + + it('get', 0, async (done: Function) => { + console.info("uitest: get begin"); + if (flutterEngineConnectionRegistry) { + const name: FlutterPlugin = flutterEngineConnectionRegistry.get(pluginClassName); + expect(name).not().assertNull(); + } + done(); + }) + + it('onSaveState', 0, async (done: Function) => { + console.info("uitest: onSaveState begin"); + const reason = AbilityConstant.StateType.CONTINUATION; + const wantParam: Record = {}; + if (flutterEngineConnectionRegistry) { + const result: AbilityConstant.OnSaveResult = flutterEngineConnectionRegistry.onSaveState(reason, wantParam); + expect(result).not().assertNull(); + } + done(); + }) + }) +} \ No newline at end of file diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/FlutterEngineGroupCacheTest.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/FlutterEngineGroupCacheTest.test.ets new file mode 100644 index 0000000000..647b3e0e82 --- /dev/null +++ b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/FlutterEngineGroupCacheTest.test.ets @@ -0,0 +1,48 @@ +/* + * Copyright (C) 2024 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 { describe, expect, it } from '@ohos/hypium'; +import FlutterEngineGroupCache from '@ohos/flutter_ohos/src/main/ets/embedding/engine/FlutterEngineGroupCache'; +import { FlutterEngineGroup } from '@ohos/flutter_ohos'; + +export default function FlutterEngineGroupCacheTest() { + const flutterEngineGroupCache = new FlutterEngineGroupCache(); + const engineGroupId: string = ''; + + describe('FlutterEngineGroupCacheTest', () => { + + it('instance', 0, async (done: Function) => { + console.info("uitest: instance begin"); + const instance = FlutterEngineGroupCache.instance; + expect(instance).not().assertNull(); + done(); + }) + + it('contains', 0, async (done: Function) => { + console.info("uitest: contains begin"); + const flag = flutterEngineGroupCache.contains(engineGroupId); + expect(flag).not().assertNull(); + done(); + }) + + it('get', 0, async (done: Function) => { + console.info("uitest: get begin"); + const engGroupId: FlutterEngineGroup | null = flutterEngineGroupCache.get(engineGroupId); + if (engGroupId) { + expect(engGroupId).not().assertNull(); + } + done(); + }) + }) +} \ No newline at end of file diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/FlutterEngineGroupTest.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/FlutterEngineGroupTest.test.ets new file mode 100644 index 0000000000..f0190788bd --- /dev/null +++ b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/FlutterEngineGroupTest.test.ets @@ -0,0 +1,53 @@ +/* + * Copyright (C) 2024 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 { describe, expect, it } from '@ohos/hypium'; +import FlutterEngineGroup, { Options } from '@ohos/flutter_ohos/src/main/ets/embedding/engine/FlutterEngineGroup'; +import { FlutterEngine } from '@ohos/flutter_ohos'; +import PlatformViewsController from '@ohos/flutter_ohos/src/main/ets/plugin/platform/PlatformViewsController' +import common from '@ohos.app.ability.common'; + +export default function FlutterEngineGroupTest() { + const flutterEngineGroup = new FlutterEngineGroup(); + const platformViewsController = new PlatformViewsController(); + const context = getContext() as common.UIAbilityContext; + const args: Array = []; + + describe('FlutterEngineGroupTest', () => { + + it('checkLoader', 0, async (done: Function) => { + console.info("uitest: checkLoader begin"); + const checkLoaderCallBack = flutterEngineGroup.checkLoader(context, args); + expect(checkLoaderCallBack).not().assertNull(); + done(); + }) + + it('createAndRunEngineByOptions', 0, async (done: Function) => { + console.info("uitest: createAndRunEngineByOptions begin"); + const options = new Options(context); + const createAndRunEngineByOptionsCallBack = flutterEngineGroup.createAndRunEngineByOptions(options); + expect(createAndRunEngineByOptionsCallBack).not().assertNull(); + done(); + }) + + it('createEngine', 0, async (done: Function) => { + console.info("uitest: createEngine begin"); + if(context) { + const fng: FlutterEngine = flutterEngineGroup.createEngine(context, platformViewsController); + expect(fng).not().assertNull(); + } + done(); + }) + }) +} \ No newline at end of file diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/FlutterEngineTest.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/FlutterEngineTest.test.ets new file mode 100644 index 0000000000..7c2bc5fcfd --- /dev/null +++ b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/FlutterEngineTest.test.ets @@ -0,0 +1,262 @@ +/* + * Copyright (C) 2024 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 { describe, beforeAll, it, expect } from '@ohos/hypium'; +import FlutterEngine from '@ohos/flutter_ohos/src/main/ets/embedding/engine/FlutterEngine'; +import DartExecutor, { DartEntrypoint } from '@ohos/flutter_ohos/src/main/ets/embedding/engine/dart/DartExecutor'; +import { Options } from '@ohos/flutter_ohos/src/main/ets/embedding/engine/FlutterEngineGroup'; +import PlatformViewsController from '@ohos/flutter_ohos/src/main/ets/plugin/platform/PlatformViewsController' +import common from '@ohos.app.ability.common'; +import { + AccessibilityChannel, + FlutterLoader, + FlutterNapi, + FlutterRenderer, + LifecycleChannel, + LocalizationChannel, + LocalizationPlugin, + MouseCursorChannel, + NavigationChannel, + PlatformChannel, + PluginRegistry, + RestorationChannel, + SettingsChannel, + SystemChannel, + TextInputChannel +} from '@ohos/flutter_ohos'; +import ActivityControlSurface from '@ohos/flutter_ohos/src/main/ets/embedding/engine/plugins/ability/AbilityControlSurface'; + +export default function FlutterEngineTest() { + const platformViewsController = new PlatformViewsController(); + const context = getContext() as common.UIAbilityContext; + let flutterEngine: FlutterEngine; + + describe('FlutterEngineTest', () => { + + beforeAll(() => { + flutterEngine = new FlutterEngine(context, null, null, platformViewsController); + }) + + it('spawn', 0, async (done: Function) => { + console.info("uitest: spawn begin"); + const options = new Options(context); + let dartEntrypoint: DartEntrypoint | null = options.getDartEntrypoint(); + let initialRoute: string = options.getInitialRoute(); + let dartEntrypointArgs: Array = options.getDartEntrypointArgs(); + let eg: FlutterEngine | null = null; + if (dartEntrypoint) { + eg = await flutterEngine.spawn(context, + dartEntrypoint, + initialRoute, + dartEntrypointArgs, + platformViewsController, + false); + if (eg) { + expect(eg).not().assertNull(); + } + } + done(); + }) + + it('getLifecycleChannel', 0, async (done: Function) => { + console.info("uitest: getLifecycleChannel begin"); + if (flutterEngine) { + const lifecycleChannel: LifecycleChannel | null = flutterEngine.getLifecycleChannel(); + if (lifecycleChannel) { + expect(lifecycleChannel).not().assertNull(); + } + } + done(); + }) + + it('getNavigationChannel', 0, async (done: Function) => { + console.info("uitest: getNavigationChannel begin"); + if (flutterEngine) { + const navigationChannel: NavigationChannel | null = flutterEngine.getNavigationChannel(); + if (navigationChannel) { + expect(navigationChannel).not().assertNull(); + } + } + done(); + }) + + it('getTextInputChannel', 0, async (done: Function) => { + console.info("uitest: getTextInputChannel begin"); + if (flutterEngine) { + const textInputChannel: TextInputChannel | null = flutterEngine.getTextInputChannel(); + if (textInputChannel) { + expect(textInputChannel).not().assertNull(); + } + } + done(); + }) + + it('getPlatformChannel', 0, async (done: Function) => { + console.info("uitest: getPlatformChannel begin"); + if (flutterEngine) { + const platformChannel: PlatformChannel | null = flutterEngine.getPlatformChannel(); + if (platformChannel) { + expect(platformChannel).not().assertNull(); + } + } + done(); + }) + + it('getSystemChannel', 0, async (done: Function) => { + console.info("uitest: getSystemChannel begin"); + if (flutterEngine) { + const systemChannel: SystemChannel | null = flutterEngine.getSystemChannel(); + if (systemChannel) { + expect(systemChannel).not().assertNull(); + } + } + done(); + }) + + it('getLocaleChannel', 0, async (done: Function) => { + console.info("uitest: getLocaleChannel begin"); + if (flutterEngine) { + const localizationChannel: LocalizationChannel | null = flutterEngine.getLocaleChannel(); + if (localizationChannel) { + expect(localizationChannel).not().assertNull(); + } + } + done(); + }) + + it('getMouseCursorChannel', 0, async (done: Function) => { + console.info("uitest: getMouseCursorChannel begin"); + if (flutterEngine) { + const mouseCursorChannel: MouseCursorChannel | null = flutterEngine.getMouseCursorChannel(); + if (mouseCursorChannel) { + expect(mouseCursorChannel).not().assertNull(); + } + } + done(); + }) + + it('getFlutterNapi', 0, async (done: Function) => { + console.info("uitest: getFlutterNapi begin"); + if (flutterEngine) { + const flutterNapi: FlutterNapi = flutterEngine.getFlutterNapi(); + expect(flutterNapi).not().assertNull(); + } + done(); + }) + + it('getFlutterRenderer', 0, async (done: Function) => { + console.info("uitest: getFlutterRenderer begin"); + if (flutterEngine) { + const flutterRenderer: FlutterRenderer = flutterEngine.getFlutterRenderer(); + expect(flutterRenderer).not().assertNull(); + } + done(); + }) + + it('getDartExecutor', 0, async (done: Function) => { + console.info("uitest: getDartExecutor begin"); + if (flutterEngine) { + const dartExecutor: DartExecutor = flutterEngine.getDartExecutor(); + expect(dartExecutor).not().assertNull(); + } + done(); + }) + + it('getPlugins', 0, async (done: Function) => { + console.info("uitest: getPlugins begin"); + if (flutterEngine) { + const pluginRegistry: PluginRegistry | null = flutterEngine.getPlugins(); + if (pluginRegistry) { + expect(pluginRegistry).not().assertNull(); + } + } + done(); + }) + + it('getAbilityControlSurface', 0, async (done: Function) => { + console.info("uitest: getAbilityControlSurface begin"); + if (flutterEngine) { + const activityControlSurface: ActivityControlSurface | null = flutterEngine.getAbilityControlSurface(); + if (activityControlSurface) { + expect(activityControlSurface).not().assertNull(); + } + } + done(); + }) + + it('getSettingsChannel', 0, async (done: Function) => { + console.info("uitest: getSettingsChannel begin"); + if (flutterEngine) { + const settingsChannel: SettingsChannel | null = flutterEngine.getSettingsChannel(); + if (settingsChannel) { + expect(settingsChannel).not().assertNull(); + } + } + done(); + }) + + it('getFlutterLoader', 0, async (done: Function) => { + console.info("uitest: getFlutterLoader begin"); + if (flutterEngine) { + const flutterLoader: FlutterLoader = flutterEngine.getFlutterLoader(); + expect(flutterLoader).not().assertNull(); + } + done(); + }) + + it('getRestorationChannel', 0, async (done: Function) => { + console.info("uitest: getRestorationChannel begin"); + if (flutterEngine) { + const restorationChannel: RestorationChannel | null = flutterEngine.getRestorationChannel(); + if (restorationChannel) { + expect(restorationChannel).not().assertNull(); + } + } + done(); + }) + + it('getAccessibilityChannel', 0, async (done: Function) => { + console.info("uitest: getAccessibilityChannel begin"); + if (flutterEngine) { + const accessibilityChannel: AccessibilityChannel | null = flutterEngine.getAccessibilityChannel(); + if (accessibilityChannel) { + expect(accessibilityChannel).not().assertNull(); + } + } + done(); + }) + + it('getLocalizationPlugin', 0, async (done: Function) => { + console.info("uitest: getLocalizationPlugin begin"); + if (flutterEngine) { + const localizationChannel: LocalizationPlugin | null = flutterEngine.getLocalizationPlugin(); + if (localizationChannel) { + expect(localizationChannel).not().assertNull(); + } + } + done(); + }) + + it('getPlatformViewsController', 0, async (done: Function) => { + console.info("uitest: getPlatformViewsController begin"); + if (flutterEngine) { + const platformViewsController: PlatformViewsController | null = flutterEngine.getPlatformViewsController(); + if (platformViewsController) { + expect(platformViewsController).not().assertNull(); + } + } + done(); + }) + }) +} \ No newline at end of file diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/FlutterNapiTest.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/FlutterNapiTest.test.ets new file mode 100644 index 0000000000..6ee93ce6ad --- /dev/null +++ b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/FlutterNapiTest.test.ets @@ -0,0 +1,182 @@ +/* + * Copyright (C) 2024 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 FlutterNapi from '@ohos/flutter_ohos/src/main/ets/embedding/engine/FlutterNapi'; +import ApplicationInfoLoader from '@ohos/flutter_ohos/src/main/ets/embedding/engine/loader/ApplicationInfoLoader'; +import { FlutterRenderer } from '@ohos/flutter_ohos/src/main/ets/embedding/engine/renderer/FlutterRenderer'; +import { common } from '@kit.AbilityKit'; +import { describe, beforeAll, it, expect } from '@ohos/hypium'; +import { EngineLifecycleListener } from '@ohos/flutter_ohos/src/main/ets/embedding/engine/FlutterEngine' +import { FlutterApplicationInfo, FlutterCallbackInformation } from '@ohos/flutter_ohos'; +import { resourceManager } from '@kit.LocalizationKit'; + +//jit产物默认kenel文件 +const DEFAULT_KERNEL_BLOB = "kernel_blob.bin"; +//文件路径分隔符 +const FILE_SEPARATOR = "/"; + +export default function FlutterNapiTest() { + const flutterNapi = new FlutterNapi(); + const context = getContext() as common.UIAbilityContext; + let textureId = 0; + let initResult: InitResult; + let snapshotAssetPath: string; + let flutterApplicationInfo: FlutterApplicationInfo; + let bundlePath: string; + let event: PanGestureEvent; + let assetManager: resourceManager.ResourceManager; + + describe('FlutterNapiTest', () => { + + beforeAll(() => { + if (context) { + initResult = new InitResult( + `${context.filesDir}/`, + `${context.cacheDir}/`, + `${context.filesDir}`); + snapshotAssetPath = initResult!.dataDirPath + FILE_SEPARATOR + flutterApplicationInfo!.flutterAssetsDir; + bundlePath = snapshotAssetPath + FILE_SEPARATOR + DEFAULT_KERNEL_BLOB; + flutterApplicationInfo = ApplicationInfoLoader.load(context); + assetManager = context.resourceManager; + } + const target: EventTarget = new CustomEventTarget(new CustomArea(0, 0, { + x: 0, y: 0 + }, { + x: 0, y: 0 + })); + const renderer = new FlutterRenderer(flutterNapi); + textureId = renderer.getTextureId(); + event = { + offsetX: 50, + offsetY: 50, + velocityX: 50, + velocityY: 50, + fingerList: [], + velocity: 0, + target: target, + timestamp: 0, + source: SourceType.Unknown, + pressure: 0, + tiltX: 0, + tiltY: 0, + sourceTool: SourceTool.Unknown + } + }) + + it('checkImplemented', 0, async (done: Function) => { + console.info("uitest: checkImplemented begin"); + const methodName = 'test'; + const flag = flutterNapi.checkImplemented(methodName); + expect(flag).not().assertNull(); + done(); + }) + + it('nativeLookupCallbackInformation', 0, async (done: Function) => { + console.info("uitest: nativeLookupCallbackInformation begin"); + try { + const handle = 1; + const flutterCallbackInformation: FlutterCallbackInformation | null = + FlutterNapi.nativeLookupCallbackInformation(handle); + if (flutterCallbackInformation) { + expect(flutterCallbackInformation).not().assertNull(); + } + } catch (e) { + } + done(); + }) + + it('isAttached', 0, async (done: Function) => { + console.info("uitest: isAttached begin"); + const flag: boolean = flutterNapi.isAttached(); + expect(flag).not().assertNull(); + done(); + }) + + it('spawn', 0, async (done: Function) => { + console.info("uitest: spawn begin"); + const entrypointFunctionName = 'test1'; + const pathToEntrypointFunction = 'test2'; + const initialRoute = 'test3'; + const entrypointArgs = ['test4']; + try { + const fnapi: FlutterNapi = + flutterNapi.spawn(entrypointFunctionName, pathToEntrypointFunction, initialRoute, entrypointArgs); + expect(fnapi).not().assertNull(); + } catch (e) { + } + done(); + }) + + it('computePlatformResolvedLocale', 0, async (done: Function) => { + console.info("uitest: computePlatformResolvedLocale begin"); + const strings = []; + const arr = flutterNapi.computePlatformResolvedLocale(strings); + expect(arr).not().assertNull(); + done(); + }) + + it('registerTexture', 0, async (done: Function) => { + console.info("uitest: registerTexture begin"); + const id = flutterNapi.registerTexture(textureId); + expect(id).not().assertNull(); + done(); + }) + }) +} + +class InitResult { + appStoragePath: string; + engineCachesPath: string; + dataDirPath: string; + + constructor(appStoragePath: string, + engineCachesPath: string, + dataDirPath: string) { + this.appStoragePath = appStoragePath; + this.engineCachesPath = engineCachesPath; + this.dataDirPath = dataDirPath; + } +} + +class CurEngineLifecycleListener implements EngineLifecycleListener { + onPreEngineRestart() { + + } + + onEngineWillDestroy() { + + } +} + +class CustomEventTarget implements EventTarget { + area: Area = new CustomArea(0, 0, { x: 0, y: 0 }, { x: 0, y: 0 }); + + constructor(area: Area) { + this.area = area; + } +} + +class CustomArea implements Area { + width: Length = 0; + height: Length = 0; + position: Position = { x: 0, y: 0 }; + globalPosition: Position = { x: 0, y: 0 }; + + constructor(width: Length, height: Length, position: Position, globalPosition: Position) { + this.width = width; + this.height = height; + this.position = position; + this.globalPosition = globalPosition; + } +} \ No newline at end of file diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/FlutterOverlaySurfaceTest.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/FlutterOverlaySurfaceTest.test.ets new file mode 100644 index 0000000000..b98eaccdbe --- /dev/null +++ b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/FlutterOverlaySurfaceTest.test.ets @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2024 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 { describe, beforeAll, expect, it } from '@ohos/hypium'; +import { FlutterOverlaySurface } from '@ohos/flutter_ohos/src/main/ets/embedding/engine/FlutterOverlaySurface'; + +export default function FlutterOverlaySurfaceTest() { + let flutterOverlaySurface: FlutterOverlaySurface; + + describe('FlutterOverlaySurfaceTest', () => { + + beforeAll(() => { + const id = 2356; + flutterOverlaySurface = new FlutterOverlaySurface(id); + }) + + it('getId', 0, async (done: Function) => { + console.info("uitest: getId begin"); + const id = flutterOverlaySurface.getId(); + expect(id).not().assertNull(); + done(); + }) + }) +} \ No newline at end of file diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/FlutterShellArgsTest.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/FlutterShellArgsTest.test.ets new file mode 100644 index 0000000000..b92df1429d --- /dev/null +++ b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/FlutterShellArgsTest.test.ets @@ -0,0 +1,62 @@ +/* + * Copyright (C) 2024 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 { describe, expect, it } from '@ohos/hypium'; +import { abilityDelegatorRegistry } from '@kit.TestKit'; +import { Want } from '@kit.AbilityKit'; +import FlutterShellArgs from '@ohos/flutter_ohos/src/main/ets/embedding/engine/FlutterShellArgs'; + +const bundleName = abilityDelegatorRegistry.getArguments().bundleName; + +export default function FlutterShellArgsTest() { + const flutterShellArgs: FlutterShellArgs = new FlutterShellArgs(); + const want: Want = { + bundleName: bundleName, + abilityName: 'EntryAbility' + } + + describe('FlutterShellArgsTest', () => { + + it('fromWant', 0, async (done: Function) => { + console.info("uitest: fromWant begin"); + try { + const flutterShellArgs = FlutterShellArgs.fromWant(want); + if (flutterShellArgs) { + expect(flutterShellArgs).not().assertNull(); + } + } catch (e) { + } + done(); + }) + + it('checkArg', 0, async (done: Function) => { + console.info("uitest: checkArg begin"); + const argKey = 'argKey'; + const argFlag = 'argFlag'; + try { + const flutterShellArgs = FlutterShellArgs.fromWant(want); + FlutterShellArgs.checkArg(argKey, argFlag, want, flutterShellArgs); + } catch (e) { + } + done(); + }) + + it('toArray', 0, async (done: Function) => { + console.info("uitest: toArray begin"); + const toArray = flutterShellArgs.toArray(); + expect(toArray).not().assertNull(); + done(); + }) + }) +} \ No newline at end of file diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/dart/DartExecutorTest.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/dart/DartExecutorTest.test.ets new file mode 100644 index 0000000000..649c1935f5 --- /dev/null +++ b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/dart/DartExecutorTest.test.ets @@ -0,0 +1,71 @@ +/* + * Copyright (C) 2024 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 { describe, beforeAll, expect, it } from '@ohos/hypium'; +import { common } from '@kit.AbilityKit'; +import { Options } from '@ohos/flutter_ohos/src/main/ets/embedding/engine/FlutterEngineGroup'; +import { DartEntrypoint } from '@ohos/flutter_ohos/src/main/ets/embedding/engine/dart/DartExecutor'; +import DartExecutor from '@ohos/flutter_ohos/src/main/ets/embedding/engine/dart/DartExecutor'; +import FlutterNapi from '@ohos/flutter_ohos/src/main/ets/embedding/engine/FlutterNapi'; +import { resourceManager } from '@kit.LocalizationKit'; + +export default function DartExecutorTest() { + const context = getContext() as common.UIAbilityContext; + const flutterNapi = new FlutterNapi(); + let dartExecutor: DartExecutor; + let options: Options; + let assetManager: resourceManager.ResourceManager; + let dartEntrypoint: DartEntrypoint | null = null; + let resourceManager: resourceManager.ResourceManager; + + describe('DartExecutorTest', () => { + + beforeAll(() => { + if (context) { + assetManager = context.resourceManager; + resourceManager = context.resourceManager; + dartExecutor = new DartExecutor(flutterNapi, assetManager); + options = new Options(context); + } + dartEntrypoint = options.getDartEntrypoint(); + }) + + it('isExecutingDart', 0, async (done: Function) => { + console.info("uitest: isExecutingDart begin"); + if (dartExecutor) { + const isExecutingDart = dartExecutor.isExecutingDart(); + expect(isExecutingDart).not().assertNull(); + } + done(); + }) + + it('getBinaryMessenger', 0, async (done: Function) => { + console.info("uitest: getBinaryMessenger begin"); + if (dartExecutor) { + const binaryMessenger = dartExecutor.getBinaryMessenger(); + expect(binaryMessenger).not().assertNull(); + } + done(); + }) + + it('makeBackgroundTaskQueue', 0, async (done: Function) => { + console.info("uitest: makeBackgroundTaskQueue begin"); + if (dartExecutor) { + const taskQueue = dartExecutor.makeBackgroundTaskQueue(); + expect(taskQueue).not().assertNull(); + } + done(); + }) + }) +} \ No newline at end of file diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/ohos/TouchEventProcessorTest.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/ohos/TouchEventProcessorTest.test.ets new file mode 100644 index 0000000000..dc72a1450d --- /dev/null +++ b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/ohos/TouchEventProcessorTest.test.ets @@ -0,0 +1,41 @@ +/* + * Copyright (C) 2024 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 { describe, it, expect } from '@ohos/hypium'; +import TouchEventProcessor from '@ohos/flutter_ohos/src/main/ets/embedding/ohos/TouchEventProcessor'; +import { CustomTouchEvent } from '@ohos/flutter_ohos/src/main/ets/plugin/platform/CustomTouchEvent'; + +export default function TouchEventProcessorTest() { + const touchEventProcessor: TouchEventProcessor = new TouchEventProcessor(); + + describe('TouchEventProcessorTest', () => { + + it('getInstance', 0, async (done: Function) => { + console.info("uitest: getInstance begin"); + const getInstance: TouchEventProcessor = TouchEventProcessor.getInstance(); + expect(getInstance).not().assertNull(); + done(); + }) + + it('decodeTouchPacket', 0, async (done: Function) => { + console.info("uitest: decodeTouchPacket begin"); + const strings = ['test1', 'test2', 'test3']; + const top = 10; + const left = 10; + const decodeTouchPacket: CustomTouchEvent = touchEventProcessor.constureCustomTouchEvent(strings, top, left); + expect(decodeTouchPacket).not().assertNull(); + done(); + }) + }) +} \ No newline at end of file diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/ohos/TouchEventTrackerTest.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/ohos/TouchEventTrackerTest.test.ets new file mode 100644 index 0000000000..fc93b33e7b --- /dev/null +++ b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/ohos/TouchEventTrackerTest.test.ets @@ -0,0 +1,51 @@ +/* + * Copyright (C) 2024 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 { describe, it, expect } from '@ohos/hypium'; +import { TouchEventId, TouchEventTracker } from '@ohos/flutter_ohos/src/main/ets/embedding/ohos/TouchEventTracker'; +import { TouchEvent } from '@ohos.multimodalInput.touchEvent'; + +export default function TouchEventTrackerTest() { + const touchEventTracker: TouchEventTracker = new TouchEventTracker(); + + describe('TouchEventTrackerTest', () => { + + it('getInstance', 0, async (done: Function) => { + console.info("uitest: getInstance begin"); + const getInstance: TouchEventTracker = TouchEventTracker.getInstance(); + expect(getInstance).not().assertNull(); + done(); + }) + + it('track', 0, async (done: Function) => { + console.info("uitest: decodeTouchPacket begin"); + const event: TouchEvent | null = null; + if(event) { + const decodeTouchPacket: TouchEventId = touchEventTracker.track(event); + expect(decodeTouchPacket).not().assertNull(); + } + done(); + }) + + it('pop', 0, async (done: Function) => { + console.info("uitest: pop begin"); + const eventId: TouchEventId | null = null; + if(eventId) { + const tuchEvent: TouchEvent = touchEventTracker.pop(eventId); + expect(tuchEvent).not().assertNull(); + } + done(); + }) + }) +} \ No newline at end of file diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/ohos/WindowInfoRepositoryCallbackAdapterWrapperTest.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/ohos/WindowInfoRepositoryCallbackAdapterWrapperTest.test.ets new file mode 100644 index 0000000000..92a803725b --- /dev/null +++ b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/ohos/WindowInfoRepositoryCallbackAdapterWrapperTest.test.ets @@ -0,0 +1,29 @@ +/* + * Copyright (C) 2024 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 { describe, it, expect } from '@ohos/hypium'; +import WindowInfoRepositoryCallbackAdapterWrapper from '@ohos/flutter_ohos/src/main/ets/embedding/ohos/WindowInfoRepositoryCallbackAdapterWrapper'; + +export default function WindowInfoRepositoryCallbackAdapterWrapperTest() { + + describe('WindowInfoRepositoryCallbackAdapterWrapper', () => { + + it('WindowInfoRepositoryCallbackAdapterWrapper', 0, async (done: Function) => { + console.info("uitest: WindowInfoRepositoryCallbackAdapterWrapper begin"); + const windowInfoRepositoryCallbackAdapterWrapper: WindowInfoRepositoryCallbackAdapterWrapper = new WindowInfoRepositoryCallbackAdapterWrapper(); + expect(windowInfoRepositoryCallbackAdapterWrapper).not().assertNull(); + done(); + }) + }) +} \ No newline at end of file diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/common/BinaryMessengerTest.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/common/BinaryMessengerTest.test.ets new file mode 100644 index 0000000000..b746c79682 --- /dev/null +++ b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/common/BinaryMessengerTest.test.ets @@ -0,0 +1,51 @@ +/* + * Copyright (C) 2024 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 { describe, expect, it } from '@ohos/hypium'; +import { + BinaryMessageHandler, + BinaryMessenger, + BinaryReply, + TaskQueue, + TaskQueueOptions +} from '@ohos/flutter_ohos/src/main/ets/plugin/common/BinaryMessenger'; + +export default function BinaryMessengerTest() { + let binaryMessenger: CurBinaryMessenger = new CurBinaryMessenger(); + + describe('BinaryMessengerTest', () => { + + it('makeBackgroundTaskQueue', 0, async (done: Function) => { + console.info("uitest: makeBackgroundTaskQueue begin"); + const options = new TaskQueueOptions(); + const taskQueue: TaskQueue = binaryMessenger.makeBackgroundTaskQueue(options); + expect(taskQueue).not().assertNull(); + done(); + }) + }) +} + +class CurBinaryMessenger implements BinaryMessenger { + makeBackgroundTaskQueue(options?: TaskQueueOptions | undefined): TaskQueue { + return {}; + } + + send(channel: String, message: ArrayBuffer, callback?: BinaryReply | null | undefined) { + + } + + setMessageHandler(channel: String, handler: BinaryMessageHandler | BinaryMessageHandler | null, taskQueue?: TaskQueue, + ...args: Object[]) { + } +} \ No newline at end of file -- Gitee From 83ba1c5bd14e3e85d5471be2301d0838e0445b69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BD=98=E6=B6=9B=E6=B6=9B?= Date: Wed, 23 Oct 2024 18:57:33 +0800 Subject: [PATCH 10/15] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E5=8D=95=E5=85=83?= =?UTF-8?q?=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 佘涛涛 --- .../ets/test/FlutterInjector.test.ets | 31 +++++++++++++++ .../src/ohosTest/ets/test/List.test.ets | 26 +++++++++++++ .../common/SendableBinaryCodec.test.ets | 38 ++++++++++++++++++ .../platform/PlatformOverlayView.test.ets | 32 +++++++++++++++ .../plugin/platform/PlatformView.test.ets | 39 +++++++++++++++++++ .../ets/test/plugin/util/Log.test.ets | 25 ++++++++++++ .../plugin/util/MessageChannelUtils.test.ets | 25 ++++++++++++ .../ets/test/plugin/util/PathUtils.test.ets | 32 +++++++++++++++ .../ets/test/plugin/util/StringUtils.test.ets | 30 ++++++++++++++ .../ets/test/plugin/util/ToolUtils.test.ets | 26 +++++++++++++ .../test/plugin/util/TraceSection.test.ets | 34 ++++++++++++++++ .../view/DynamicView/dynamicViewJson.test.ets | 30 ++++++++++++++ .../test/view/FlutterRunArguments.test.ets | 28 +++++++++++++ 13 files changed, 396 insertions(+) create mode 100644 shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/FlutterInjector.test.ets create mode 100644 shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/common/SendableBinaryCodec.test.ets create mode 100644 shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/platform/PlatformOverlayView.test.ets create mode 100644 shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/platform/PlatformView.test.ets create mode 100644 shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/util/Log.test.ets create mode 100644 shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/util/MessageChannelUtils.test.ets create mode 100644 shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/util/PathUtils.test.ets create mode 100644 shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/util/StringUtils.test.ets create mode 100644 shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/util/ToolUtils.test.ets create mode 100644 shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/util/TraceSection.test.ets create mode 100644 shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/view/DynamicView/dynamicViewJson.test.ets create mode 100644 shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/view/FlutterRunArguments.test.ets diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/FlutterInjector.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/FlutterInjector.test.ets new file mode 100644 index 0000000000..ab342916e2 --- /dev/null +++ b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/FlutterInjector.test.ets @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2024 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 { describe, it, expect } from '@ohos/hypium' +import { FlutterInjector } from "@ohos/flutter_ohos"; + +export default function FlutterInjectorTest() { + describe('FlutterInjectorTest', () => { + it('getInstance', 0, () => { + expect(FlutterInjector.getInstance()).not().assertNull(); + }) + it('getFlutterLoader', 0, () => { + expect(FlutterInjector.getInstance().getFlutterLoader()).not().assertNull(); + }) + it('getFlutterNapi', 0, () => { + expect(FlutterInjector.getInstance().getFlutterNapi()).not().assertNull(); + }) + }) +} \ No newline at end of file diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/List.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/List.test.ets index a23cd3af88..539c972f52 100644 --- a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/List.test.ets +++ b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/List.test.ets @@ -54,6 +54,19 @@ import FlutterShellArgsTest from './embedding/engine/FlutterShellArgsTest.test'; import BinaryMessengerTest from './plugin/common/BinaryMessengerTest.test'; import DartExecutorTest from './embedding/engine/dart/DartExecutorTest.test'; +import PathUtilsTest from './plugin/util/PathUtils.test'; +import StringUtilsTest from './plugin/util/StringUtils.test'; +import ToolUtilsTest from './plugin/util/ToolUtils.test'; +import MessageChannelUtilsTest from './plugin/util/MessageChannelUtils.test'; +import LogTest from './plugin/util/Log.test'; +import TraceSectionTest from './plugin/util/TraceSection.test'; +import FlutterInjectorTest from './FlutterInjector.test'; +import SendableBinaryCodecTest from './plugin/common/SendableBinaryCodec.test'; +import dynamicViewJsonTest from './view/DynamicView/dynamicViewJson.test'; +import PlatformOverlayViewTest from './plugin/platform/PlatformOverlayView.test'; +import PlatformViewTest from './plugin/platform/PlatformView.test'; +import FlutterRunArgumentsTest from './view/FlutterRunArguments.test'; + export default function testsuite() { FlutterAbilityAndEntryDelegateTest(); FlutterAbilityTest(); @@ -94,4 +107,17 @@ export default function testsuite() { FlutterShellArgsTest(); BinaryMessengerTest(); DartExecutorTest(); + PathUtilsTest(); + StringUtilsTest(); + ToolUtilsTest(); + MessageChannelUtilsTest(); + LogTest(); + TraceSectionTest(); + FlutterInjectorTest(); + SendableBinaryCodecTest(); + dynamicViewJsonTest(); + PlatformOverlayViewTest(); + PlatformViewTest(); + PlatformViewTest(); + FlutterRunArgumentsTest(); } \ No newline at end of file diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/common/SendableBinaryCodec.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/common/SendableBinaryCodec.test.ets new file mode 100644 index 0000000000..8a4a351ff7 --- /dev/null +++ b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/common/SendableBinaryCodec.test.ets @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2024 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 { describe, it, expect } from '@ohos/hypium' +import { SendableBinaryCodec } from '@ohos/flutter_ohos'; +import { buffer } from '@kit.ArkTS'; + + +export default function SendableBinaryCodecTest() { + describe('SendableBinaryCodecTest', () => { + it('encodeMessage', 0, async (done: Function) => { + let blobValue: buffer.Blob = new buffer.Blob(['name', 'age', 'sex']); + let message: ArrayBuffer = await blobValue.arrayBuffer(); + expect(SendableBinaryCodec.INSTANCE_DIRECT.encodeMessage(message)) + .not() + .assertNull(); + done(); + }) + + it('decodeMessage', 0, () => { + expect(SendableBinaryCodec.INSTANCE_DIRECT.decodeMessage(null)) + .not() + .assertNull(); + }); + }) +} \ No newline at end of file diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/platform/PlatformOverlayView.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/platform/PlatformOverlayView.test.ets new file mode 100644 index 0000000000..4ddd8fe65f --- /dev/null +++ b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/platform/PlatformOverlayView.test.ets @@ -0,0 +1,32 @@ +/* + * Copyright (C) 2024 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 { describe, it, expect } from '@ohos/hypium' +import { AccessibilityEventsDelegate, PlatformOverlayView } from '@ohos/flutter_ohos'; + +const platformOverlayView: PlatformOverlayView = + new PlatformOverlayView(getContext(), 800, 800, new AccessibilityEventsDelegate()) + +export default function PlatformOverlayViewTest() { + describe('PlatformOverlayViewTest', () => { + it('PlatformOverlayView', 0, () => { + let overlayLayerViews = new Map(); + expect(overlayLayerViews).not().assertNull(); + }); + it('onHoverEvent', 0, () => { + expect(platformOverlayView.onHoverEvent()).assertFalse(); + }) + }) +} \ No newline at end of file diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/platform/PlatformView.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/platform/PlatformView.test.ets new file mode 100644 index 0000000000..b50f6bfd79 --- /dev/null +++ b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/platform/PlatformView.test.ets @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2024 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 { describe, it, expect } from '@ohos/hypium' +import { PlatformView } from '@ohos/flutter_ohos'; +import { Params } from '@ohos/flutter_ohos/src/main/ets/plugin/platform/PlatformView'; + + +export default function PlatformViewTest() { + describe('PlatformViewTest', () => { + class TestPlatformView extends PlatformView { + getView(): WrappedBuilder<[Params]> { + throw new Error('Method not implemented.'); + } + + dispose(): void { + throw new Error('Method not implemented.'); + } + } + + const platformView: PlatformView = new TestPlatformView() + it('getType', 0, () => { + expect(platformView.getType()).assertEqual('default') + }) + }) +} \ No newline at end of file diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/util/Log.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/util/Log.test.ets new file mode 100644 index 0000000000..5ef0a0618a --- /dev/null +++ b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/util/Log.test.ets @@ -0,0 +1,25 @@ +/* + * Copyright (C) 2024 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 { describe, it, expect } from '@ohos/hypium' +import { Log } from '@ohos/flutter_ohos'; + +export default function LogTest() { + describe('LogTest', () => { + it('Log', 0, () => { + expect(Log.toString()).not().assertNull(); + }); + }) +} \ No newline at end of file diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/util/MessageChannelUtils.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/util/MessageChannelUtils.test.ets new file mode 100644 index 0000000000..60c39c1c12 --- /dev/null +++ b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/util/MessageChannelUtils.test.ets @@ -0,0 +1,25 @@ +/* + * Copyright (C) 2024 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 { describe, it, expect } from '@ohos/hypium' +import { MessageChannelUtils } from '@ohos/flutter_ohos'; + +export default function MessageChannelUtilsTest() { + describe('MessageChannelUtilsTest', () => { + it('resizeChannelBuffer', 0, () => { + expect(MessageChannelUtils.toString()).not().assertNull(); + }); + }) +} \ No newline at end of file diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/util/PathUtils.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/util/PathUtils.test.ets new file mode 100644 index 0000000000..8f42832818 --- /dev/null +++ b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/util/PathUtils.test.ets @@ -0,0 +1,32 @@ +/* + * Copyright (C) 2024 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 { describe, it, expect } from '@ohos/hypium' +import { PathUtils } from '@ohos/flutter_ohos'; + +export default function PathUtilsTest() { + describe('PathUtilsTest', () => { + it('getFilesDir', 0, () => { + expect(PathUtils.getFilesDir(getContext())).not().assertNull(); + }); + it('getCacheDirectory', 0, () => { + expect(PathUtils.getCacheDirectory(getContext())).not().assertNull(); + }); + it('getDataDirectory', 0, () => { + const name = "flutter"; + expect(PathUtils.getDataDirectory(getContext())).assertContain(name); + }); + }) +} \ No newline at end of file diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/util/StringUtils.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/util/StringUtils.test.ets new file mode 100644 index 0000000000..693d0b188e --- /dev/null +++ b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/util/StringUtils.test.ets @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2024 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 { describe, it, expect } from '@ohos/hypium' +import { StringUtils } from '@ohos/flutter_ohos'; + +const TAG: string = "stringUtilsTest"; + +export default function StringUtilsTest() { + describe('StringUtilsTest', () => { + it('isNotEmpty', 0, () => { + expect(StringUtils.isNotEmpty(TAG)).assertTrue(); + }); + it('isEmpty', 0, () => { + expect(StringUtils.isEmpty("")).assertTrue(); + }); + }) +} \ No newline at end of file diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/util/ToolUtils.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/util/ToolUtils.test.ets new file mode 100644 index 0000000000..158170ba95 --- /dev/null +++ b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/util/ToolUtils.test.ets @@ -0,0 +1,26 @@ +/* + * Copyright (C) 2024 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 { describe, it, expect } from '@ohos/hypium' +import { ToolUtils } from '@ohos/flutter_ohos'; + +export default function ToolUtilsTest() { + describe('ToolUtilsTest', () => { + it('isObj', 0, () => { + const json = JSON.stringify('object'); + expect(ToolUtils.isObj(json)).assertFalse(); + }); + }) +} \ No newline at end of file diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/util/TraceSection.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/util/TraceSection.test.ets new file mode 100644 index 0000000000..b09b01f109 --- /dev/null +++ b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/util/TraceSection.test.ets @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2024 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 { describe, it, expect } from '@ohos/hypium' +import { TraceSection } from '@ohos/flutter_ohos'; + +export default function TraceSectionTest() { + describe('TraceSectionTest', () => { + it('begin', 0, () => { + const sectionName = "DartExecutor"; + expect(TraceSection.begin(sectionName)).assertLarger(0); + }); + it('end', 0, () => { + const sectionName = "DartExecutor"; + TraceSection.end(sectionName); + }); + it('endWithId', 0, () => { + const sectionName = "DartExecutor"; + TraceSection.endWithId(sectionName, 1); + }); + }) +} \ No newline at end of file diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/view/DynamicView/dynamicViewJson.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/view/DynamicView/dynamicViewJson.test.ets new file mode 100644 index 0000000000..610a7f88c6 --- /dev/null +++ b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/view/DynamicView/dynamicViewJson.test.ets @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2024 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 { describe, it, expect } from '@ohos/hypium' +import { createDVModelFromJson } from '@ohos/flutter_ohos/src/main/ets/view/DynamicView/dynamicViewJson'; + +const TAG: string = "dynamicViewJsonTest"; + +export default function dynamicViewJsonTest() { + describe('dynamicViewJsonTest', () => { + it('createDVModelFromJson', 0, () => { + let dvModel = createDVModelFromJson(JSON.stringify(TAG)); + expect(dvModel) + .not() + .assertNull(); + }) + }) +} \ No newline at end of file diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/view/FlutterRunArguments.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/view/FlutterRunArguments.test.ets new file mode 100644 index 0000000000..a9d1a07872 --- /dev/null +++ b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/view/FlutterRunArguments.test.ets @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2024 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 { describe, it, expect } from '@ohos/hypium' +import { FlutterRunArguments } from '@ohos/flutter_ohos'; + +const TAG: string = "FlutterRunArgumentsTest"; + +export default function FlutterRunArgumentsTest() { + describe('FlutterRunArgumentsTest', () => { + it('flutterRunArguments', 0, () => { + const flutterRunArguments = new FlutterRunArguments(TAG, TAG, TAG) + expect(flutterRunArguments.bundlePath).assertEqual(TAG) + }) + }) +} \ No newline at end of file -- Gitee From 2eef000dfa4d6bb1ff28b0fdbed8b9a1fe02dab8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BD=98=E6=B6=9B=E6=B6=9B?= Date: Wed, 23 Oct 2024 11:03:01 +0000 Subject: [PATCH 11/15] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=96=87=E4=BB=B6=20sh?= =?UTF-8?q?ell/platform/ohos/test/io/flutter/FlutterInjectorTest.ets?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- shell/platform/ohos/test/io/flutter/FlutterInjectorTest.ets | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 shell/platform/ohos/test/io/flutter/FlutterInjectorTest.ets diff --git a/shell/platform/ohos/test/io/flutter/FlutterInjectorTest.ets b/shell/platform/ohos/test/io/flutter/FlutterInjectorTest.ets deleted file mode 100644 index e69de29bb2..0000000000 -- Gitee From 44b454723aa849f5039e4c1d8a1533b3c13ffbd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BD=98=E6=B6=9B=E6=B6=9B?= Date: Thu, 24 Oct 2024 09:40:58 +0800 Subject: [PATCH 12/15] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E5=8D=95=E5=85=83?= =?UTF-8?q?=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 佘涛涛 --- .../ets/test/plugin/common/SendableBinaryCodec.test.ets | 1 - .../src/ohosTest/ets/test/plugin/platform/PlatformView.test.ets | 2 -- 2 files changed, 3 deletions(-) diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/common/SendableBinaryCodec.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/common/SendableBinaryCodec.test.ets index 8a4a351ff7..f8174e51fb 100644 --- a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/common/SendableBinaryCodec.test.ets +++ b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/common/SendableBinaryCodec.test.ets @@ -17,7 +17,6 @@ import { describe, it, expect } from '@ohos/hypium' import { SendableBinaryCodec } from '@ohos/flutter_ohos'; import { buffer } from '@kit.ArkTS'; - export default function SendableBinaryCodecTest() { describe('SendableBinaryCodecTest', () => { it('encodeMessage', 0, async (done: Function) => { diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/platform/PlatformView.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/platform/PlatformView.test.ets index b50f6bfd79..4369f8d25f 100644 --- a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/platform/PlatformView.test.ets +++ b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/platform/PlatformView.test.ets @@ -13,12 +13,10 @@ * limitations under the License. */ - import { describe, it, expect } from '@ohos/hypium' import { PlatformView } from '@ohos/flutter_ohos'; import { Params } from '@ohos/flutter_ohos/src/main/ets/plugin/platform/PlatformView'; - export default function PlatformViewTest() { describe('PlatformViewTest', () => { class TestPlatformView extends PlatformView { -- Gitee From 16486e4239da180b7b8bc2093eaaef6720fb87ca Mon Sep 17 00:00:00 2001 From: chenqiang Date: Thu, 24 Oct 2024 10:08:10 +0800 Subject: [PATCH 13/15] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E7=94=A8=E4=BE=8B=E7=9B=AE=E5=BD=95=E7=BB=93=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: chenqiang --- .../src/ohosTest/ets/test/List.test.ets | 14 +++++++------- .../engine/{ => dart}/DartMessengerTest.test.ets | 0 .../{ => loader}/ApplicationInfoTest.test.ets | 0 .../FlutterApplicationInfoTest.test.ets | 0 .../engine/{ => loader}/FlutterLoaderTest.test.ets | 0 .../FlutterMutatorViewTest.test.ets | 0 .../FlutterMutatorsStackTest.test.ets | 0 .../{ => renderer}/FlutterRendererTest.test.ets | 0 8 files changed, 7 insertions(+), 7 deletions(-) rename shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/{ => dart}/DartMessengerTest.test.ets (100%) rename shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/{ => loader}/ApplicationInfoTest.test.ets (100%) rename shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/{ => loader}/FlutterApplicationInfoTest.test.ets (100%) rename shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/{ => loader}/FlutterLoaderTest.test.ets (100%) rename shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/{ => mutatorsstack}/FlutterMutatorViewTest.test.ets (100%) rename shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/{ => mutatorsstack}/FlutterMutatorsStackTest.test.ets (100%) rename shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/{ => renderer}/FlutterRendererTest.test.ets (100%) diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/List.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/List.test.ets index 539c972f52..5d3946b7e6 100644 --- a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/List.test.ets +++ b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/List.test.ets @@ -33,13 +33,13 @@ import JSONMethodCodecUnitTest from './plugin/common/JSONMethodCodec.test'; import MethodCallUnitTest from './plugin/common/MethodCall.test'; import AccessibilityEventsDelegateUnitTest from './plugin/platform/AccessibilityEventsDelegate.test'; -import DartMessengerTest from './embedding/engine/DartMessengerTest.test' -import ApplicationInfoTest from './embedding/engine/ApplicationInfoTest.test' -import FlutterApplicationInfoTest from './embedding/engine/FlutterApplicationInfoTest.test' -import FlutterLoaderTest from './embedding/engine/FlutterLoaderTest.test' -import FlutterMutatorViewTest from './embedding/engine/FlutterMutatorViewTest.test' -import FlutterMutatorsStackTest from './embedding/engine/FlutterMutatorsStackTest.test' -import FlutterRendererTest from './embedding/engine/FlutterRendererTest.test' +import DartMessengerTest from './embedding/engine/dart/DartMessengerTest.test' +import ApplicationInfoTest from './embedding/engine/loader/ApplicationInfoTest.test' +import FlutterApplicationInfoTest from './embedding/engine/loader/FlutterApplicationInfoTest.test' +import FlutterLoaderTest from './embedding/engine/loader/FlutterLoaderTest.test' +import FlutterMutatorViewTest from './embedding/engine/mutatorsstack/FlutterMutatorViewTest.test' +import FlutterMutatorsStackTest from './embedding/engine/mutatorsstack/FlutterMutatorsStackTest.test' +import FlutterRendererTest from './embedding/engine/renderer/FlutterRendererTest.test' import TouchEventProcessorTest from './embedding/ohos/TouchEventProcessorTest.test'; import TouchEventTrackerTest from './embedding/ohos/TouchEventTrackerTest.test'; import WindowInfoRepositoryCallbackAdapterWrapperTest from './embedding/ohos/WindowInfoRepositoryCallbackAdapterWrapperTest.test'; diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/DartMessengerTest.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/dart/DartMessengerTest.test.ets similarity index 100% rename from shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/DartMessengerTest.test.ets rename to shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/dart/DartMessengerTest.test.ets diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/ApplicationInfoTest.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/loader/ApplicationInfoTest.test.ets similarity index 100% rename from shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/ApplicationInfoTest.test.ets rename to shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/loader/ApplicationInfoTest.test.ets diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/FlutterApplicationInfoTest.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/loader/FlutterApplicationInfoTest.test.ets similarity index 100% rename from shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/FlutterApplicationInfoTest.test.ets rename to shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/loader/FlutterApplicationInfoTest.test.ets diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/FlutterLoaderTest.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/loader/FlutterLoaderTest.test.ets similarity index 100% rename from shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/FlutterLoaderTest.test.ets rename to shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/loader/FlutterLoaderTest.test.ets diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/FlutterMutatorViewTest.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/mutatorsstack/FlutterMutatorViewTest.test.ets similarity index 100% rename from shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/FlutterMutatorViewTest.test.ets rename to shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/mutatorsstack/FlutterMutatorViewTest.test.ets diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/FlutterMutatorsStackTest.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/mutatorsstack/FlutterMutatorsStackTest.test.ets similarity index 100% rename from shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/FlutterMutatorsStackTest.test.ets rename to shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/mutatorsstack/FlutterMutatorsStackTest.test.ets diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/FlutterRendererTest.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/renderer/FlutterRendererTest.test.ets similarity index 100% rename from shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/FlutterRendererTest.test.ets rename to shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/renderer/FlutterRendererTest.test.ets -- Gitee From 594a0d7cc1a2aee2277d6a14d2b352353ef90809 Mon Sep 17 00:00:00 2001 From: yxc118 Date: Thu, 24 Oct 2024 10:10:44 +0800 Subject: [PATCH 14/15] =?UTF-8?q?fix:=E4=BF=AE=E5=A4=8D=E5=8D=95=E5=85=83?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: yxc118 --- .../FlutterEngineConnectionRegistryTest.test.ets | 14 +++++--------- .../embedding/engine/FlutterEngineTest.test.ets | 9 +++++---- .../engine/dart/DartExecutorTest.test.ets | 15 +++++++-------- 3 files changed, 17 insertions(+), 21 deletions(-) diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/FlutterEngineConnectionRegistryTest.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/FlutterEngineConnectionRegistryTest.test.ets index 1de90f3781..01925e7b0e 100644 --- a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/FlutterEngineConnectionRegistryTest.test.ets +++ b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/FlutterEngineConnectionRegistryTest.test.ets @@ -13,30 +13,26 @@ * limitations under the License. */ import { describe, beforeAll, it, expect } from '@ohos/hypium'; -import { abilityDelegatorRegistry } from '@kit.TestKit'; +import { FlutterPlugin, } from '@ohos/flutter_ohos/src/main/ets/embedding/engine/plugins/FlutterPlugin'; import FlutterEngine from '@ohos/flutter_ohos/src/main/ets/embedding/engine/FlutterEngine'; import PlatformViewsController from '@ohos/flutter_ohos/src/main/ets/plugin/platform/PlatformViewsController' import common from '@ohos.app.ability.common'; -import FlutterEngineConnectionRegistry - from '@ohos/flutter_ohos/src/main/ets/embedding/engine/FlutterEngineConnectionRegistry'; -import { - FlutterPlugin, - FlutterPluginBinding -} from '@ohos/flutter_ohos/src/main/ets/embedding/engine/plugins/FlutterPlugin'; +import FlutterEngineConnectionRegistry from '@ohos/flutter_ohos/src/main/ets/embedding/engine/FlutterEngineConnectionRegistry'; import AbilityConstant from '@ohos.app.ability.AbilityConstant'; export default function FlutterEngineConnectionRegistryTest() { let flutterEngineConnectionRegistry: FlutterEngineConnectionRegistry; let flutterEngine: FlutterEngine; + let context: common.UIAbilityContext; const platformViewsController = new PlatformViewsController(); - const context = getContext() as common.UIAbilityContext; const pluginClassName = 'test'; describe('FlutterEngineConnectionRegistryTest', () => { beforeAll(() => { - const flutterLoader = flutterEngine.getFlutterLoader(); + context = getContext() as common.UIAbilityContext; flutterEngine = new FlutterEngine(context, null, null, platformViewsController); + const flutterLoader = flutterEngine.getFlutterLoader(); flutterEngineConnectionRegistry = new FlutterEngineConnectionRegistry(context, flutterEngine, flutterLoader); }) diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/FlutterEngineTest.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/FlutterEngineTest.test.ets index 7c2bc5fcfd..fc91be86a4 100644 --- a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/FlutterEngineTest.test.ets +++ b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/FlutterEngineTest.test.ets @@ -13,11 +13,8 @@ * limitations under the License. */ import { describe, beforeAll, it, expect } from '@ohos/hypium'; -import FlutterEngine from '@ohos/flutter_ohos/src/main/ets/embedding/engine/FlutterEngine'; import DartExecutor, { DartEntrypoint } from '@ohos/flutter_ohos/src/main/ets/embedding/engine/dart/DartExecutor'; import { Options } from '@ohos/flutter_ohos/src/main/ets/embedding/engine/FlutterEngineGroup'; -import PlatformViewsController from '@ohos/flutter_ohos/src/main/ets/plugin/platform/PlatformViewsController' -import common from '@ohos.app.ability.common'; import { AccessibilityChannel, FlutterLoader, @@ -36,15 +33,19 @@ import { TextInputChannel } from '@ohos/flutter_ohos'; import ActivityControlSurface from '@ohos/flutter_ohos/src/main/ets/embedding/engine/plugins/ability/AbilityControlSurface'; +import PlatformViewsController from '@ohos/flutter_ohos/src/main/ets/plugin/platform/PlatformViewsController'; +import FlutterEngine from '@ohos/flutter_ohos/src/main/ets/embedding/engine/FlutterEngine'; +import common from '@ohos.app.ability.common'; export default function FlutterEngineTest() { const platformViewsController = new PlatformViewsController(); - const context = getContext() as common.UIAbilityContext; + let context: common.UIAbilityContext; let flutterEngine: FlutterEngine; describe('FlutterEngineTest', () => { beforeAll(() => { + const context = getContext() as common.UIAbilityContext; flutterEngine = new FlutterEngine(context, null, null, platformViewsController); }) diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/dart/DartExecutorTest.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/dart/DartExecutorTest.test.ets index 649c1935f5..6577fa556c 100644 --- a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/dart/DartExecutorTest.test.ets +++ b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/dart/DartExecutorTest.test.ets @@ -16,13 +16,13 @@ import { describe, beforeAll, expect, it } from '@ohos/hypium'; import { common } from '@kit.AbilityKit'; import { Options } from '@ohos/flutter_ohos/src/main/ets/embedding/engine/FlutterEngineGroup'; import { DartEntrypoint } from '@ohos/flutter_ohos/src/main/ets/embedding/engine/dart/DartExecutor'; +import { resourceManager } from '@kit.LocalizationKit'; import DartExecutor from '@ohos/flutter_ohos/src/main/ets/embedding/engine/dart/DartExecutor'; import FlutterNapi from '@ohos/flutter_ohos/src/main/ets/embedding/engine/FlutterNapi'; -import { resourceManager } from '@kit.LocalizationKit'; export default function DartExecutorTest() { - const context = getContext() as common.UIAbilityContext; const flutterNapi = new FlutterNapi(); + let context: common.UIAbilityContext; let dartExecutor: DartExecutor; let options: Options; let assetManager: resourceManager.ResourceManager; @@ -32,12 +32,11 @@ export default function DartExecutorTest() { describe('DartExecutorTest', () => { beforeAll(() => { - if (context) { - assetManager = context.resourceManager; - resourceManager = context.resourceManager; - dartExecutor = new DartExecutor(flutterNapi, assetManager); - options = new Options(context); - } + context = getContext() as common.UIAbilityContext; + assetManager = context.resourceManager; + resourceManager = context.resourceManager; + dartExecutor = new DartExecutor(flutterNapi, assetManager); + options = new Options(context); dartEntrypoint = options.getDartEntrypoint(); }) -- Gitee From 8ea73afa92a084cc432683da683df19908c5ddea Mon Sep 17 00:00:00 2001 From: houtingjuan Date: Fri, 25 Oct 2024 16:56:17 +0800 Subject: [PATCH 15/15] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E5=8D=95=E5=85=83?= =?UTF-8?q?=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: houtingjuan --- .../src/ohosTest/ets/test/List.test.ets | 30 ++++++ .../systemchannels/LifecycleChannel.test.ets | 71 ++++++++++++++ .../plugin/common/FlutterException.test.ets | 58 ++++++++++++ .../plugin/common/JSONMessageCodec.test.ets | 29 ++++++ .../common/SendableJSONMessageCodec.test.ets | 29 ++++++ .../common/SendableJSONMethodCodec.test.ets | 42 +++++++++ .../SendableStandardMessageCodec.test.ets | 92 +++++++++++++++++++ .../SendableStandardMethodCodec.test.ets | 35 +++++++ .../common/SendableStringCodec.test.ets | 43 +++++++++ .../common/StandardMessageCodec.test.ets | 92 +++++++++++++++++++ .../common/StandardMethodCodec.test.ets | 33 +++++++ .../test/plugin/common/StringCodec.test.ets | 47 ++++++++++ .../editing/ListenableEditingState.test.ets | 48 ++++++++++ .../plugin/editing/TextEditingDelta.test.ets | 34 +++++++ .../plugin/editing/TextInputPlugin.test.ets | 47 ++++++++++ .../localization/LocalizationPlugin.test.ets | 55 +++++++++++ 16 files changed, 785 insertions(+) create mode 100644 shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/systemchannels/LifecycleChannel.test.ets create mode 100644 shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/common/FlutterException.test.ets create mode 100644 shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/common/JSONMessageCodec.test.ets create mode 100644 shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/common/SendableJSONMessageCodec.test.ets create mode 100644 shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/common/SendableJSONMethodCodec.test.ets create mode 100644 shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/common/SendableStandardMessageCodec.test.ets create mode 100644 shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/common/SendableStandardMethodCodec.test.ets create mode 100644 shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/common/SendableStringCodec.test.ets create mode 100644 shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/common/StandardMessageCodec.test.ets create mode 100644 shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/common/StandardMethodCodec.test.ets create mode 100644 shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/common/StringCodec.test.ets create mode 100644 shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/editing/ListenableEditingState.test.ets create mode 100644 shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/editing/TextEditingDelta.test.ets create mode 100644 shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/editing/TextInputPlugin.test.ets create mode 100644 shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/localization/LocalizationPlugin.test.ets diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/List.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/List.test.ets index 5d3946b7e6..80151e3685 100644 --- a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/List.test.ets +++ b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/List.test.ets @@ -66,6 +66,21 @@ import dynamicViewJsonTest from './view/DynamicView/dynamicViewJson.test'; import PlatformOverlayViewTest from './plugin/platform/PlatformOverlayView.test'; import PlatformViewTest from './plugin/platform/PlatformView.test'; import FlutterRunArgumentsTest from './view/FlutterRunArguments.test'; +import LifecycleChannelTest from './embedding/engine/systemchannels/LifecycleChannel.test'; +import FlutterExceptionTest from './plugin/common/FlutterException.test'; +import JSONMessageCodecTest from './plugin/common/JSONMessageCodec.test'; +import SendableJSONMessageCodecTest from './plugin/common/SendableJSONMessageCodec.test'; +import SendableJSONMethodCodecTest from './plugin/common/SendableJSONMethodCodec.test'; +import SendableStringCodecTest from './plugin/common/SendableStringCodec.test'; +import StandardMessageCodecTest from './plugin/common/StandardMessageCodec.test'; +import StandardMethodCodecTest from './plugin/common/StandardMethodCodec.test'; +import StringCodecTest from './plugin/common/StringCodec.test'; +import ListenableEditingStateTest from './plugin/editing/ListenableEditingState.test'; +import TextEditingDeltaTest from './plugin/editing/TextEditingDelta.test'; +import TextInputPluginTest from './plugin/editing/TextInputPlugin.test'; +import LocalizationPluginTest from './plugin/localization/LocalizationPlugin.test'; +import SendableStandardMessageCodecTest from './plugin/common/SendableStandardMessageCodec.test'; +import SendableStandardMethodCodecTest from './plugin/common/SendableStandardMethodCodec.test'; export default function testsuite() { FlutterAbilityAndEntryDelegateTest(); @@ -120,4 +135,19 @@ export default function testsuite() { PlatformViewTest(); PlatformViewTest(); FlutterRunArgumentsTest(); + LifecycleChannelTest(); + FlutterExceptionTest(); + JSONMessageCodecTest(); + SendableJSONMessageCodecTest(); + SendableJSONMethodCodecTest(); + SendableStandardMessageCodecTest(); + SendableStandardMethodCodecTest(); + SendableStringCodecTest(); + StandardMessageCodecTest(); + StandardMethodCodecTest(); + StringCodecTest(); + ListenableEditingStateTest(); + TextEditingDeltaTest(); + TextInputPluginTest(); + LocalizationPluginTest(); } \ No newline at end of file diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/systemchannels/LifecycleChannel.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/systemchannels/LifecycleChannel.test.ets new file mode 100644 index 0000000000..61590d0821 --- /dev/null +++ b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/embedding/engine/systemchannels/LifecycleChannel.test.ets @@ -0,0 +1,71 @@ +/* + * Copyright (C) 2024 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 { describe, beforeEach, it, expect } from '@ohos/hypium' +import LifecycleChannel from '@ohos/flutter_ohos/src/main/ets/embedding/engine/systemchannels/LifecycleChannel'; +import Any from '@ohos/flutter_ohos/src/main/ets/plugin/common/Any'; + +export default function LifecycleChannelTest() { + describe('LifecycleChannelTest', () => { + let lifecycleChannel: LifecycleChannel; + let dartExecutorMock: Any; + let basicMessageChannelMock: Any; + beforeEach(() => { + dartExecutorMock = { + send: (channelName: string, message: string) => { + } + }; + basicMessageChannelMock = { + send: (message: string) => { + } + }; + lifecycleChannel = new LifecycleChannel(dartExecutorMock as Any); + (lifecycleChannel as Any).channel = basicMessageChannelMock; + }); + it('should send resumed state with focus', 0, () => { + lifecycleChannel.appIsResumed(); + lifecycleChannel.aWindowIsFocused(); + expect(basicMessageChannelMock.send).not().assertEqual('AppLifecycleState.resumed'); + }) + it('should send inactive state without focus', 0, () => { + lifecycleChannel.appIsResumed(); + lifecycleChannel.noWindowsAreFocused(); + expect(basicMessageChannelMock.send).not().assertEqual('AppLifecycleState.inactive'); + }) + it('should send inactive state when app is inactive', 0, () => { + lifecycleChannel.appIsInactive(); + lifecycleChannel.aWindowIsFocused(); + expect(basicMessageChannelMock.send).not().assertEqual('AppLifecycleState.inactive'); + }) + it('should send paused state when app is paused', 0, () => { + lifecycleChannel.appIsPaused(); + lifecycleChannel.aWindowIsFocused(); + expect(basicMessageChannelMock.send).not().assertEqual('AppLifecycleState.paused'); + }) + it('should send detached state when app is detached', 0, () => { + lifecycleChannel.appIsDetached(); + lifecycleChannel.aWindowIsFocused(); + expect(basicMessageChannelMock.send).not().assertEqual('AppLifecycleState.detached'); + }) + it('should not send duplicate state', 0, () => { + lifecycleChannel.appIsResumed(); + lifecycleChannel.aWindowIsFocused(); + (lifecycleChannel as Any).lastFlutterState = 'AppLifecycleState.resumed'; + + lifecycleChannel.appIsResumed(); + lifecycleChannel.aWindowIsFocused(); + expect(basicMessageChannelMock.send).not().assertEqual(1); + }) + }) +} diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/common/FlutterException.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/common/FlutterException.test.ets new file mode 100644 index 0000000000..fbdeee4dbf --- /dev/null +++ b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/common/FlutterException.test.ets @@ -0,0 +1,58 @@ +/* + * Copyright (C) 2024 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 { describe, it, expect } from '@ohos/hypium'; +import FlutterException from '@ohos/flutter_ohos/src/main/ets/plugin/common/FlutterException'; + +interface keyValue { + key: string; +} + +interface anotherKey { + anotherKey: string; +} + +interface defaultKey { + defaultKey: string; +} + +export default function FlutterExceptionTest() { + describe('FlutterExceptionTest', () => { + it('should initialize with correct values', 0, () => { + const code = 'ERROR_CODE_123'; + const message = 'This is an error message'; + const details:keyValue = { key: 'value' }; + const exception = new FlutterException(code, message, details); + expect(exception.message).assertEqual(message); + expect(exception.code).assertEqual(code); + expect(exception.name).assertEqual(''); + }) + it('should have a stack property if provided', 0, () => { + const code = 'ERROR_CODE_456'; + const message = 'Another error message'; + const details: anotherKey = { anotherKey: 'anotherValue' }; + const stack = 'Error stack trace'; + const exception = new FlutterException(code, message, details); + exception.stack = stack; + expect(exception.stack).assertEqual(stack); + }) + it('should default name to an empty string if not provided', 0, () => { + const code = 'ERROR_CODE_789'; + const message = 'Default name test'; + const details: defaultKey = { defaultKey: 'defaultValue' }; + const exception = new FlutterException(code, message, details); + expect(exception.name).assertEqual(''); + }) + }) +} diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/common/JSONMessageCodec.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/common/JSONMessageCodec.test.ets new file mode 100644 index 0000000000..d7df35e2f0 --- /dev/null +++ b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/common/JSONMessageCodec.test.ets @@ -0,0 +1,29 @@ +/* + * Copyright (C) 2024 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 { describe, it, expect } from '@ohos/hypium' +import JSONMessageCodec from '@ohos/flutter_ohos/src/main/ets/plugin/common/JSONMessageCodec'; +import StringUtils from '@ohos/flutter_ohos/src/main/ets/util/StringUtils'; + +export default function JSONMessageCodecTest() { + describe('JSONMessageCodecTest', () => { + const codec = JSONMessageCodec.INSTANCE; + it('should encode and decode a null message', 0, () => { + const originalMessage = null; + const encodedMessage = codec.encodeMessage(originalMessage); + const decodedMessage = StringUtils.arrayBufferToString(encodedMessage); + expect(decodedMessage).assertEqual(""); + }) + }) +} diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/common/SendableJSONMessageCodec.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/common/SendableJSONMessageCodec.test.ets new file mode 100644 index 0000000000..5383bfc399 --- /dev/null +++ b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/common/SendableJSONMessageCodec.test.ets @@ -0,0 +1,29 @@ +/* + * Copyright (C) 2024 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 { describe, it, expect } from '@ohos/hypium'; +import SendableJSONMessageCodec from '@ohos/flutter_ohos/src/main/ets/plugin/common/SendableJSONMessageCodec'; +import StringUtils from '@ohos/flutter_ohos/src/main/ets/util/StringUtils' + +export default function SendableJSONMessageCodecTest() { + describe('SendableJSONMessageCodecTest', () => { + const codec = SendableJSONMessageCodec.INSTANCE; + it('encodeMessage and decodeMessage with a null message', 0, () => { + const originalMessage = null; + const encodedMessage = codec.encodeMessage(originalMessage); + const decodedMessage = StringUtils.arrayBufferToString(encodedMessage); + expect(decodedMessage).assertEqual(""); + }) + }) +} diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/common/SendableJSONMethodCodec.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/common/SendableJSONMethodCodec.test.ets new file mode 100644 index 0000000000..b8d2c0e54a --- /dev/null +++ b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/common/SendableJSONMethodCodec.test.ets @@ -0,0 +1,42 @@ +/* + * Copyright (C) 2024 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 { describe, it, expect } from '@ohos/hypium'; +import SendableJSONMethodCodec from '@ohos/flutter_ohos/src/main/ets/plugin/common/SendableJSONMethodCodec'; + +export default function SendableJSONMethodCodecTest() { + describe('SendableJSONMethodCodecTest', () => { + const codec = SendableJSONMethodCodec.INSTANCE; + it('throws an error for invalid JSON', 0, () => { + const invalidJSON = new ArrayBuffer(1); + + try { + codec.decodeMethodCall(invalidJSON); + //fail('Expected an error to be thrown'); + throw new Error('Expected an error to be thrown'); + } catch (e) { + expect(e.message).assertContain('Invalid JSON') + } + + try { + codec.decodeEnvelope(invalidJSON); + //fail('Expected an error to be thrown'); + throw new Error('Expected an error to be thrown'); + } catch (e) { + expect(e.message).assertContain('Invalid JSON') + } + }) + }) +} + diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/common/SendableStandardMessageCodec.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/common/SendableStandardMessageCodec.test.ets new file mode 100644 index 0000000000..0a16e5345b --- /dev/null +++ b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/common/SendableStandardMessageCodec.test.ets @@ -0,0 +1,92 @@ +/* + * Copyright (C) 2024 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 { describe, it, expect } from '@ohos/hypium' +import Any from '@ohos/flutter_ohos/src/main/ets/plugin/common/Any'; +import SendableStandardMessageCodec from '@ohos/flutter_ohos/src/main/ets/plugin/common/SendableStandardMessageCodec'; + +export default function SendableStandardMessageCodecTest() { + describe('SendableStandardMessageCodecTest', () => { + const codec = SendableStandardMessageCodec.INSTANCE; + + it('testEncodeDecodeNull', 0, () => { + const encoded = codec.encodeMessage(null); + const decoded:Any = codec.decodeMessage(encoded); + expect(decoded).assertNull(); + }) + + it('testEncodeDecodeBoolean', 0, () => { + const encodedTrue = codec.encodeMessage(true); + const decodedTrue:Any = codec.decodeMessage(encodedTrue); + expect(decodedTrue).assertTrue(); + + const encodedFalse = codec.encodeMessage(false); + const decodedFalse:Any = codec.decodeMessage(encodedFalse); + expect(decodedFalse).assertFalse(); + }) + + it('testEncodeDecodeNumber', 0, () => { + const int32Value = 123456; + const encodedInt32 = codec.encodeMessage(int32Value); + const decodedInt32:Any = codec.decodeMessage(encodedInt32); + expect(decodedInt32).assertEqual(int32Value); + + const int64Value = BigInt(9007199254740991); // Max safe integer + const encodedInt64 = codec.encodeMessage(int64Value); + const decodedInt64:Any = codec.decodeMessage(encodedInt64); + expect(decodedInt64).assertEqual(int64Value); + + const float64Value = 3.14159; + const encodedFloat64 = codec.encodeMessage(float64Value); + const decodedFloat64:Any = codec.decodeMessage(encodedFloat64); + expect(decodedFloat64).assertClose(float64Value, 5); + + }) + + it('testEncodeDecodeUint8Array', 0, () => { + const uint8Array = new Uint8Array([1, 2, 3, 4, 5]); + const encodedArray = codec.encodeMessage(uint8Array); + const decodedArray:Any = codec.decodeMessage(encodedArray); + expect(decodedArray).assertDeepEquals(uint8Array); + }) + + it('testEncodeDecodeInt32Array', 0, () => { + const int32Array = new Int32Array([1, 2, 3, 4, 5]); + const encodedArray = codec.encodeMessage(int32Array); + const decodedArray:Any = codec.decodeMessage(encodedArray); + expect(decodedArray).assertDeepEquals(int32Array); + }) + + it('testEncodeDecodeBigInt64Array', 0, () => { + const bigInt64Array = new BigInt64Array([BigInt(1), BigInt(2), BigInt(3), BigInt(4), BigInt(5)]); + const encodedArray = codec.encodeMessage(bigInt64Array); + const decodedArray:Any = codec.decodeMessage(encodedArray); + expect(decodedArray.length).assertEqual(bigInt64Array.length); + for (let i = 0; i < bigInt64Array.length; i++) { + expect(decodedArray[i]).assertEqual(bigInt64Array[i]); + } + }) + + it('testEncodeDecodeFloat64Array', 0, () => { + const float64Array = new Float64Array([1.1, 2.2, 3.3, 4.4, 5.5]); + const encodedArray = codec.encodeMessage(float64Array); + const decodedArray:Any = codec.decodeMessage(encodedArray); + expect(decodedArray).assertDeepEquals(float64Array); + }) + }) +} + + + + diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/common/SendableStandardMethodCodec.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/common/SendableStandardMethodCodec.test.ets new file mode 100644 index 0000000000..7257b488ba --- /dev/null +++ b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/common/SendableStandardMethodCodec.test.ets @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2024 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 { describe, it, expect } from '@ohos/hypium'; +import SendableStandardMethodCodec from '@ohos/flutter_ohos/src/main/ets/plugin/common/SendableStandardMethodCodec'; + +export default function SendableStandardMethodCodecTest() { + describe('SendableStandardMethodCodecTest', () => { + const codec = SendableStandardMethodCodec.INSTANCE; + it('decodeMethodCall_shouldThrowErrorOnCorruptedMethodCall', 0, () => { + const corruptedBuffer = new ArrayBuffer(2); + const bufferView = new Uint8Array(corruptedBuffer); + bufferView[0] = 0; + bufferView[1] = 1; + + try { + codec.decodeMethodCall(corruptedBuffer); + expect(false).assertEqual(true); + } catch (e) { + expect(e.message).assertEqual('Method call corrupted'); + } + }) + }) +} \ No newline at end of file diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/common/SendableStringCodec.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/common/SendableStringCodec.test.ets new file mode 100644 index 0000000000..7a5d4a3b8b --- /dev/null +++ b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/common/SendableStringCodec.test.ets @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2024 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 { describe, it, expect } from '@ohos/hypium' +import StringCodec from '@ohos/flutter_ohos/src/main/ets/plugin/common/SendableStringCodec' +import StringUtils from '@ohos/flutter_ohos/src/main/ets/util/StringUtils' + +export default function SendableStringCodecTest() { + describe('SendableStringCodecTest', () => { + const codec = StringCodec.INSTANCE; + it('encodeMessage_emptyString_ReturnEmptyString', 0, () => { + const testString = ""; + const encodedMessage = codec.encodeMessage(testString); + const decodedString = StringUtils.arrayBufferToString(encodedMessage); + expect(decodedString).assertEqual(testString); + }) + it('encodeMessage_null_ReturnEmptyString', 0, () => { + const encodedMessage = codec.encodeMessage(""); + const decodedString = StringUtils.arrayBufferToString(encodedMessage); + expect(decodedString).assertEqual(""); + }) + it('decodeMessage_emptyString_ReturnEmptyString', 0, () => { + const encodedMessage = new ArrayBuffer(0); + const decodedString = codec.decodeMessage(encodedMessage); + expect(decodedString).assertEqual(""); + }) + it('decodeMessage_null_ReturnEmptyString', 0, () => { + const decodedString = codec.decodeMessage(null); + expect(decodedString).assertEqual(""); + }) + }) +} \ No newline at end of file diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/common/StandardMessageCodec.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/common/StandardMessageCodec.test.ets new file mode 100644 index 0000000000..bf86971696 --- /dev/null +++ b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/common/StandardMessageCodec.test.ets @@ -0,0 +1,92 @@ +/* + * Copyright (C) 2024 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 { describe, it, expect } from '@ohos/hypium' +import Any from '@ohos/flutter_ohos/src/main/ets/plugin/common/Any'; +import StandardMessageCodec from '@ohos/flutter_ohos/src/main/ets/plugin/common/StandardMessageCodec'; + +export default function StandardMessageCodecTest() { + describe('StandardMessageCodecTest', () => { + const codec = StandardMessageCodec.INSTANCE; + it('should encode and decode null', 0, () => { + const encoded = codec.encodeMessage(null); + const decoded:Any = codec.decodeMessage(encoded); + expect(decoded).assertNull(); + }) + it('should encode and decode boolean', 0, () => { + const encodedTrue = codec.encodeMessage(true); + const decodedTrue:Any = codec.decodeMessage(encodedTrue); + expect(decodedTrue).assertTrue(); + + const encodedFalse = codec.encodeMessage(false); + const decodedFalse:Any = codec.decodeMessage(encodedFalse); + expect(decodedFalse).assertFalse(); + }) + it('should encode and decode number (int32)', 0, () => { + const number = 123456; + const encoded = codec.encodeMessage(number); + const decoded:Any = codec.decodeMessage(encoded); + expect(decoded).assertEqual(number); + }) + it('should encode and decode number (int64)', 0, () => { + const number = BigInt(1234567890123456789); + const encoded = codec.encodeMessage(number); + const decoded:Any = codec.decodeMessage(encoded); + expect(decoded).assertEqual(number); + }) + it('should encode and decode number (float64)', 0, ()=> { + const number = 3.14159;; + const encoded = codec.encodeMessage(number); + const decoded:Any = codec.decodeMessage(encoded); + expect(decoded).assertClose(number,5) + }) + it('should encode and decode Uint8Array', 0, () => { + const array = new Uint8Array([1, 2, 3, 4, 5]); + const encoded = codec.encodeMessage(array); + const decoded:Any = codec.decodeMessage(encoded); + expect(decoded).assertDeepEquals(array); + }) + it('should encode and decode Int32Array', 0, () => { + const array = new Int32Array([1, 2, 3, 4, 5]); + const encoded = codec.encodeMessage(array); + const decoded:Any = codec.decodeMessage(encoded); + expect(decoded).assertDeepEquals(array); + }) + it('should encode and decode BigInt64Array', 0, () => { + const array = new BigInt64Array([BigInt(1), BigInt(2), BigInt(3), BigInt(4), BigInt(5)]); + const encoded = codec.encodeMessage(array); + const decoded:Any = codec.decodeMessage(encoded); + expect(decoded.length).assertEqual(array.length); + for (let i = 0; i < array.length; i++) { + expect(decoded[i]).assertEqual(array[i]); + } + }) + it('should encode and decode Float32Array', 0, () => { + const array = new Float32Array([1.1, 2.2, 3.3, 4.4, 5.5]); + const encoded = codec.encodeMessage(array); + const decoded:Any = codec.decodeMessage(encoded); + for (let i = 0; i < array.length; i++) { + expect(decoded[i]).assertEqual(array[i]); + } + }) + it('should encode and decode Float64Array', 0, () => { + const array = new Float64Array([1.1, 2.2, 3.3, 4.4, 5.5]); + const encoded = codec.encodeMessage(array); + const decoded:Any = codec.decodeMessage(encoded); + for (let i = 0; i < array.length; i++) { + expect(decoded[i]).assertEqual(array[i]); + } + }) + }) +} diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/common/StandardMethodCodec.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/common/StandardMethodCodec.test.ets new file mode 100644 index 0000000000..cd3e920dfc --- /dev/null +++ b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/common/StandardMethodCodec.test.ets @@ -0,0 +1,33 @@ +/* + * Copyright (C) 2024 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 { describe, it, expect } from '@ohos/hypium' +import StandardMethodCodec from '@ohos/flutter_ohos/src/main/ets/plugin/common/StandardMethodCodec'; + +export default function StandardMethodCodecTest() { + describe('StandardMethodCodecTest', () => { + const codec = StandardMethodCodec.INSTANCE; + it('should throw an error for a corrupted method call', 0, () => { + const corruptedMethodCall = new ArrayBuffer(2); // Just an invalid ArrayBuffer + try { + codec.decodeMethodCall(corruptedMethodCall); + //fail('Expected an error to be thrown'); + throw new Error('Expected an error to be thrown'); + } catch (e) { + expect(e.message).assertEqual('Method call corrupted'); + } + }); + }) +} + diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/common/StringCodec.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/common/StringCodec.test.ets new file mode 100644 index 0000000000..01a42a4020 --- /dev/null +++ b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/common/StringCodec.test.ets @@ -0,0 +1,47 @@ +/* + * Copyright (C) 2024 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 { describe, it, expect } from '@ohos/hypium' +import StringCodec from '@ohos/flutter_ohos/src/main/ets/plugin/common/StringCodec' +import StringUtils from '@ohos/flutter_ohos/src/main/ets/util/StringUtils' + +export default function StringCodecTest() { + describe('StringCodecTest', () => { + const codec = StringCodec.INSTANCE; + it('encodeMessage_emptyString_ReturnEmptyString', 0, () => { + const testString = ""; + const encodedMessage = codec.encodeMessage(testString); + const decodedString = StringUtils.arrayBufferToString(encodedMessage); + expect(decodedString).assertEqual(testString); + }) + it('decodeMessage_emptyString_ReturnEmptyString', 0, () => { + const encodedMessage = new ArrayBuffer(0); + const decodedString = codec.decodeMessage(encodedMessage); + expect(decodedString).assertEqual(""); + }) + it('decodeMessage_null_ReturnEmptyString', 0, () => { + const decodedString = codec.decodeMessage(null); + expect(decodedString).assertEqual(""); + }) + }) +} + + + + + + + + + diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/editing/ListenableEditingState.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/editing/ListenableEditingState.test.ets new file mode 100644 index 0000000000..6db50566f7 --- /dev/null +++ b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/editing/ListenableEditingState.test.ets @@ -0,0 +1,48 @@ +/* + * Copyright (C) 2024 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 { describe, it, expect } from '@ohos/hypium'; +import { EditingStateWatcher, ListenableEditingState } from '@ohos/flutter_ohos/src/main/ets/plugin/editing/ListenableEditingState'; + +export default function ListenableEditingStateTest() { + describe('ListenableEditingStateTest', () => { + let editingState: ListenableEditingState = new ListenableEditingState(null, 0); + it('should initialize with default values', 0, () => { + expect(editingState.getSelectionStart()).assertEqual(0); + expect(editingState.getSelectionEnd()).assertEqual(0); + expect(editingState.getComposingStart()).assertEqual(-1); + expect(editingState.getComposingEnd()).assertEqual(-1); + expect(editingState.getStringCache()).assertEqual(''); + }) + it('should handle insert text event correctly', 0, () => { + editingState.handleInsertTextEvent('hello'); + expect(editingState.getStringCache()).assertEqual('hello'); + expect(editingState.getSelectionStart()).assertEqual(5); + expect(editingState.getSelectionEnd()).assertEqual(5); + }) + + it('should handle delete event correctly (right)', 0, () => { + editingState.handleDeleteEvent(true, 1); + expect(editingState.getStringCache()).assertEqual('hello'); + expect(editingState.getSelectionStart()).assertEqual(5); + expect(editingState.getSelectionEnd()).assertEqual(5); + }) + it('should handle newline event correctly', 0, () => { + editingState.handleNewlineEvent(); + expect(editingState.getStringCache()).assertEqual('hello\n'); + expect(editingState.getSelectionStart()).assertEqual(6); + expect(editingState.getSelectionEnd()).assertEqual(6); + }) + }) +} diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/editing/TextEditingDelta.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/editing/TextEditingDelta.test.ets new file mode 100644 index 0000000000..8c3c27d9ad --- /dev/null +++ b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/editing/TextEditingDelta.test.ets @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2024 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 { describe, it, expect } from '@ohos/hypium'; +import { TextEditingDelta } from '@ohos/flutter_ohos/src/main/ets/plugin/editing/TextEditingDelta'; + +export default function TextEditingDeltaTest() { + describe('TextEditingDeltaTest', () => { + it('testToJSON', 0, () => { + const delta = new TextEditingDelta("Old Text", 0, 0, 0, 0, 2, 5, "Delta Text"); + const json = delta.toJSON(); + expect(json.oldText).assertEqual("Old Text"); + expect(json.deltaText).assertEqual("Delta Text"); + expect(json.deltaStart).assertEqual(2); + expect(json.deltaEnd).assertEqual(5); + expect(json.selectionBase).assertEqual(0); + expect(json.selectionExtent).assertEqual(0); + expect(json.composingBase).assertEqual(0); + expect(json.composingExtent).assertEqual(0); + }) + }) +} + diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/editing/TextInputPlugin.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/editing/TextInputPlugin.test.ets new file mode 100644 index 0000000000..e432646031 --- /dev/null +++ b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/editing/TextInputPlugin.test.ets @@ -0,0 +1,47 @@ +/* + * Copyright (C) 2024 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 { describe, beforeEach, it, expect } from '@ohos/hypium' +import TextInputChannel from '@ohos/flutter_ohos/src/main/ets/embedding/engine/systemchannels/TextInputChannel'; +import TextInputPlugin from '@ohos/flutter_ohos/src/main/ets/plugin/editing/TextInputPlugin'; +import TextInputMethodHandlerImpl from '@ohos/flutter_ohos/src/main/ets/plugin/editing/TextInputPlugin'; +import common from '@ohos.app.ability.common'; +import DartExecutor from '@ohos/flutter_ohos/src/main/ets/embedding/engine/dart/DartExecutor'; +import FlutterInjector from '@ohos/flutter_ohos/src/main/ets/FlutterInjector'; + +export default function TextInputPluginTest() { + describe('TextInputPluginTest', () => { + let textInputPlugin: TextInputPlugin; + let textInputChannelMock: TextInputChannel; + let textInputMethodHandlerImpl: TextInputMethodHandlerImpl; + let dartExecutor: DartExecutor; + beforeEach(() => { + let context: common.Context = getContext(); + const assetManager = context.resourceManager; + const flutterNapi = FlutterInjector.getInstance().getFlutterNapi(); + dartExecutor = new DartExecutor(flutterNapi, assetManager); + textInputChannelMock = new TextInputChannel(dartExecutor); + textInputPlugin = new TextInputPlugin(textInputChannelMock); + textInputMethodHandlerImpl = new TextInputMethodHandlerImpl(textInputChannelMock); + }) + it('should initialize correctly', 0, ()=> { + expect(textInputMethodHandlerImpl).not().assertNull(); + }) + it('Test clearTextInputClient', 0, () => { + textInputPlugin.clearTextInputClient(); + expect(textInputPlugin).not().assertNull(); + }) + }) +} + diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/localization/LocalizationPlugin.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/localization/LocalizationPlugin.test.ets new file mode 100644 index 0000000000..e986d7f2c4 --- /dev/null +++ b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/localization/LocalizationPlugin.test.ets @@ -0,0 +1,55 @@ +/* + * Copyright (C) 2024 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 { describe, beforeEach, it, expect } from '@ohos/hypium'; +import LocalizationPlugin from '@ohos/flutter_ohos/src/main/ets/plugin/localization/LocalizationPlugin'; +import common from '@ohos.app.ability.common'; +import LocalizationChannel,{LocalizationMessageHandler} from '@ohos/flutter_ohos/src/main/ets/embedding/engine/systemchannels/LocalizationChannel'; +import intl from '@ohos.intl'; +import DartExecutor from '@ohos/flutter_ohos/src/main/ets/embedding/engine/dart/DartExecutor'; +import FlutterInjector from '@ohos/flutter_ohos/src/main/ets/FlutterInjector'; +import Any from '@ohos/flutter_ohos/src/main/ets/plugin/common/Any'; + +export default function LocalizationPluginTest() { + describe('LocalizationPluginTest', () => { + let localizationChannel: LocalizationChannel; + let localizationPlugin: LocalizationPlugin; + let dartExecutor: DartExecutor; + + beforeEach(() => { + let context: common.Context = getContext(); + const assetManager = context.resourceManager; + const flutterNapi = FlutterInjector.getInstance().getFlutterNapi(); + dartExecutor = new DartExecutor(flutterNapi, assetManager); + localizationChannel = new LocalizationChannel(dartExecutor); // 初始化LocalizationChannel + localizationPlugin = new LocalizationPlugin(context, localizationChannel); + }); + it('test_localeFromString', 0, () => { + let localeString = "zh_CN"; + let expectedLocale = new intl.Locale("zh_CN"); + let actualLocale = localizationPlugin.localeFromString(localeString); + + expect(actualLocale.language).assertEqual(expectedLocale.language); + expect(actualLocale.region).assertEqual(expectedLocale.region); + expect(actualLocale.script).assertEqual(expectedLocale.script); + }) + it('testSendLocaleToFlutter', 0, () => { + let mockSystemLocale = 'zh-Hans-CN'; + (localizationChannel as Any).sendLocales = (locales:Any) => { + expect(locales).assertContain(mockSystemLocale); + }; + localizationPlugin.sendLocaleToFlutter(); + }) + }) +} -- Gitee