From a4e31f45eb4a493dff268915e242fc41e2ee1344 Mon Sep 17 00:00:00 2001 From: wangwentian <wtwanga@isoftstone.com> Date: Fri, 9 Jun 2023 14:49:36 +0800 Subject: [PATCH] =?UTF-8?q?webView=20errorCode=20edit=20=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wangwentian <wtwanga@isoftstone.com> --- .../AppScope/app.json | 21 + .../resources/base/element/string.json | 8 + .../resources/base/media/app_icon.png | Bin 0 -> 15458 bytes .../BUILD.gn | 41 + .../Test.json | 26 + .../src/main/ets/Application/AbilityStage.ts | 9 + .../src/main/ets/MainAbility/MainAbility.ts | 37 + .../webViewContCookieToGeoLocationError.ets | 704 ++++++++++++++++++ .../pages/webViewContGetUrlAndOthersError.ets | 399 ++++++++++ .../pages/webViewContJavaScriptError.ets | 219 ++++++ .../webViewContJsMessageExtReturnError.ets | 274 +++++++ .../pages/webViewContMessageError.ets | 138 ++++ .../pages/webViewContPageOperationsError.ets | 216 ++++++ .../pages/webViewContStoreWebArchiveError.ets | 213 ++++++ .../webViewContWebMessageExtReturnError.ets | 311 ++++++++ .../pages/webViewContZoomAndOthersError.ets | 331 ++++++++ .../ets/TestRunner/OpenHarmonyTestRunner.ts | 78 ++ .../entry/src/main/ets/test/List.test.ets | 35 + .../entry/src/main/ets/test/Utils.ets | 169 +++++ ...bViewContCookieToGeoLocationError.test.ets | 420 +++++++++++ .../webViewContGetUrlAndOthersError.test.ets | 288 +++++++ .../test/webViewContJavaScriptError.test.ets | 145 ++++ ...ebViewContJsMessageExtReturnError.test.ets | 123 +++ .../ets/test/webViewContMessageError.test.ets | 69 ++ .../webViewContPageOperationsError.test.ets | 178 +++++ .../webViewContStoreWebArchiveError.test.ets | 134 ++++ ...bViewContWebMessageExtReturnError.test.ets | 134 ++++ .../webViewContZoomAndOthersError.test.ets | 266 +++++++ .../entry/src/main/module.json | 49 ++ .../main/resources/base/element/string.json | 32 + .../src/main/resources/base/media/icon.png | Bin 0 -> 15458 bytes .../resources/base/profile/main_pages.json | 13 + .../entry/src/main/resources/rawfile/icon.png | Bin 0 -> 15458 bytes .../src/main/resources/rawfile/index.html | 73 ++ .../entry/src/main/resources/rawfile/index.js | 150 ++++ .../src/main/resources/rawfile/indexEdit.html | 22 + .../resources/rawfile/indexNoPermission.html | 73 ++ .../src/main/resources/rawfile/second.html | 17 + .../resources/rawfile/testMessageExt.html | 26 + .../signature/openharmony_sx.p7b | Bin 0 -> 3470 bytes 40 files changed, 5441 insertions(+) create mode 100644 arkui/ace_ets_web_dev_webviewControllerError/AppScope/app.json create mode 100644 arkui/ace_ets_web_dev_webviewControllerError/AppScope/resources/base/element/string.json create mode 100644 arkui/ace_ets_web_dev_webviewControllerError/AppScope/resources/base/media/app_icon.png create mode 100644 arkui/ace_ets_web_dev_webviewControllerError/BUILD.gn create mode 100644 arkui/ace_ets_web_dev_webviewControllerError/Test.json create mode 100644 arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/ets/Application/AbilityStage.ts create mode 100644 arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/ets/MainAbility/MainAbility.ts create mode 100644 arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/ets/MainAbility/pages/webViewContCookieToGeoLocationError.ets create mode 100644 arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/ets/MainAbility/pages/webViewContGetUrlAndOthersError.ets create mode 100644 arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/ets/MainAbility/pages/webViewContJavaScriptError.ets create mode 100644 arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/ets/MainAbility/pages/webViewContJsMessageExtReturnError.ets create mode 100644 arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/ets/MainAbility/pages/webViewContMessageError.ets create mode 100644 arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/ets/MainAbility/pages/webViewContPageOperationsError.ets create mode 100644 arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/ets/MainAbility/pages/webViewContStoreWebArchiveError.ets create mode 100644 arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/ets/MainAbility/pages/webViewContWebMessageExtReturnError.ets create mode 100644 arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/ets/MainAbility/pages/webViewContZoomAndOthersError.ets create mode 100644 arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts create mode 100644 arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/ets/test/List.test.ets create mode 100644 arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/ets/test/Utils.ets create mode 100644 arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/ets/test/webViewContCookieToGeoLocationError.test.ets create mode 100644 arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/ets/test/webViewContGetUrlAndOthersError.test.ets create mode 100644 arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/ets/test/webViewContJavaScriptError.test.ets create mode 100644 arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/ets/test/webViewContJsMessageExtReturnError.test.ets create mode 100644 arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/ets/test/webViewContMessageError.test.ets create mode 100644 arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/ets/test/webViewContPageOperationsError.test.ets create mode 100644 arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/ets/test/webViewContStoreWebArchiveError.test.ets create mode 100644 arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/ets/test/webViewContWebMessageExtReturnError.test.ets create mode 100644 arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/ets/test/webViewContZoomAndOthersError.test.ets create mode 100644 arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/module.json create mode 100644 arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/resources/base/element/string.json create mode 100644 arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/resources/base/media/icon.png create mode 100644 arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/resources/base/profile/main_pages.json create mode 100644 arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/resources/rawfile/icon.png create mode 100644 arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/resources/rawfile/index.html create mode 100644 arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/resources/rawfile/index.js create mode 100644 arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/resources/rawfile/indexEdit.html create mode 100644 arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/resources/rawfile/indexNoPermission.html create mode 100644 arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/resources/rawfile/second.html create mode 100644 arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/resources/rawfile/testMessageExt.html create mode 100644 arkui/ace_ets_web_dev_webviewControllerError/signature/openharmony_sx.p7b diff --git a/arkui/ace_ets_web_dev_webviewControllerError/AppScope/app.json b/arkui/ace_ets_web_dev_webviewControllerError/AppScope/app.json new file mode 100644 index 000000000..11be5a436 --- /dev/null +++ b/arkui/ace_ets_web_dev_webviewControllerError/AppScope/app.json @@ -0,0 +1,21 @@ +{ + "app": { + "bundleName": "com.open.harmony.acewebtest", + "vendor": "huawei", + "versionCode": 1000000, + "versionName": "1.0.0", + "debug": false, + "icon": "$media:icon", + "label": "$string:app_name", + "description": "$string:description_application", + "distributedNotificationEnabled": true, + "keepAlive": true, + "singleUser": true, + "minAPIVersion": 10, + "targetAPIVersion": 10, + "car": { + "apiCompatibleVersion": 10, + "singleUser": false + } + } +} \ No newline at end of file diff --git a/arkui/ace_ets_web_dev_webviewControllerError/AppScope/resources/base/element/string.json b/arkui/ace_ets_web_dev_webviewControllerError/AppScope/resources/base/element/string.json new file mode 100644 index 000000000..ee69f9a86 --- /dev/null +++ b/arkui/ace_ets_web_dev_webviewControllerError/AppScope/resources/base/element/string.json @@ -0,0 +1,8 @@ +{ + "string":[ + { + "name":"app_name", + "value":"ohosProject" + } + ] +} \ No newline at end of file diff --git a/arkui/ace_ets_web_dev_webviewControllerError/AppScope/resources/base/media/app_icon.png b/arkui/ace_ets_web_dev_webviewControllerError/AppScope/resources/base/media/app_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..474a55588fd7216113dd42073aadf254d4dba023 GIT binary patch literal 15458 zcmV-oJe|XdP)<h;3K|Lk000e1NJLTq0043T0043b1^@s6kKKiR00001b5ch_0Itp) z=>Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!~g&e!~vBn4jTXfJNHRMK~#8N)t$?W zZ`*d)f6uD@IOn2&LJ;lP6@!gHh#>Y<V%wGxg4)xzw<9PC@qtkU#TyJH4Y4DF7!+GJ z#s5S!-n(~I{i@2(=R4+DYu4Jos(sGA7sYYT*mJG<7<0_=nvb=9tM-5X*Z$G-4tRb} zl2m*e*Zci3`TPAo*w@G1es?$=cF*8k_OzkXaG>1!r&0HL_gDqb&`3X(Z=GaQp8SP` z92In5!tr>lHv4nxKS1{J@p1P!+F4$_JksuYcRrnVr_*tFKEi|jF}%m8r`_Y_l6p^% z@<T($eg9y)-R?ryPtV8Q6ZIaR9>+LnCznqL`mDBrry9$FzRWuxkQF=}GpwhbiR|yW zmfjQNx4tFelhpeM=s1qPZ}7VBtuHUqIh+_+IvN7$>(jXIa?55SEAd6rfw_FG^Ciq> zUAOb*d;6XH7UwzzrTnE1QtLJmPK4||=GS#JMbf8dX;2o^T+5qYx7QF%t86tY^M!6V z<CgCpOXqLz=e(BrT-LDi)MH}=CoE=*N32ymA)h0b)#$ybHFsw<d_jT?R2!mC@x}GP z8NxV?XWSp4vwx~G`mnLGe%@oTAQ=m)n97%0K@U23ILSde_Ff2=Tx#pjTwu(>rngTY z1udv}ju^g5nNRXGgh*Bp3Mrd$sWa|p#az3e^Glh~4OYDwx?a*KW72*IFc`5a72{iM zp*N~%>#A7GyQ5CGc@5sreOI4Vr-jh46-ty$UgtlNS4u^>BKcJpW(i@*S9!$UCqmcd z(U6LQxPK-@LYcI@ROQ<K5q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41gZsMh4IU%5a%|WI{*0Dxb}@C$k>D zD*;20N{)BIOQ{tj;NRl5w-|ch2}M5c{wK!f>CfqKoBq&WEM66Pqk<HuzXlUreTFvu zNvn-U1$e$`h<lHs{D7fP9{izAew%1Kr_%lX=iS*d1fPfkuPXbDq33Ir$Us_5Hj%^m z;IEC{1vr(!7uN3BT}<Yn!+kT>aN5`Y)t8TRI`--F?$f7FyF2*vpx(dgmuRWV_Q&1- Y0jIQKqpXab7ytkO07*qoM6N<$f;yQ2zW@LL literal 0 HcmV?d00001 diff --git a/arkui/ace_ets_web_dev_webviewControllerError/BUILD.gn b/arkui/ace_ets_web_dev_webviewControllerError/BUILD.gn new file mode 100644 index 000000000..574ddf080 --- /dev/null +++ b/arkui/ace_ets_web_dev_webviewControllerError/BUILD.gn @@ -0,0 +1,41 @@ +# Copyright (c) 2023 iSoftStone Information Technology (Group) Co.,Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//test/xts/tools/build/suite.gni") + +ohos_js_hap_suite("ActsAceWebDevWebViewContErrorTest") { + hap_profile = "entry/src/main/module.json" + js_build_mode = "debug" + deps = [ + ":ace_ets_web_dev_js_assets", + ":ace_ets_web_dev_resources", + ] + ets2abc = true + certificate_profile = "signature/openharmony_sx.p7b" + hap_name = "ActsAceWebDevWebViewControllerErrorTest" +} + +ohos_app_scope("ace_ets_web_dev_app_profile") { + app_profile = "AppScope/app.json" + sources = [ "AppScope/resources" ] +} + +ohos_js_assets("ace_ets_web_dev_js_assets") { + source_dir = "entry/src/main/ets" +} + +ohos_resources("ace_ets_web_dev_resources") { + sources = [ "entry/src/main/resources" ] + deps = [ ":ace_ets_web_dev_app_profile" ] + hap_profile = "entry/src/main/module.json" +} diff --git a/arkui/ace_ets_web_dev_webviewControllerError/Test.json b/arkui/ace_ets_web_dev_webviewControllerError/Test.json new file mode 100644 index 000000000..a467f22ef --- /dev/null +++ b/arkui/ace_ets_web_dev_webviewControllerError/Test.json @@ -0,0 +1,26 @@ +{ + "description": "Configuration for hjunit demo Tests", + "driver": { + "type": "OHJSUnitTest", + "test-timeout": "180000", + "bundle-name": "com.open.harmony.acewebtest", + "module-name": "phone", + "shell-timeout": "600000", + "testcase-timeout": 70000 + }, + "kits": [{ + "test-file-name": [ + "ActsAceWebDevWebViewControllerErrorTest.hap" + ], + "type": "AppInstallKit", + "cleanup-apps": true + }, + { + "type": "ShellKit", + "run-command": [ + "power-shell wakeup", + "power-shell setmode 602" + ] + } + ] +} \ No newline at end of file diff --git a/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/ets/Application/AbilityStage.ts b/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/ets/Application/AbilityStage.ts new file mode 100644 index 000000000..b0e0206ea --- /dev/null +++ b/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/ets/Application/AbilityStage.ts @@ -0,0 +1,9 @@ +import AbilityStage from "@ohos.app.ability.AbilityStage" + +export default class MyAbilityStage extends AbilityStage { + onCreate() { + console.log("[Demo] MyAbilityStage onCreate") + globalThis.stageOnCreateRun = 1; + globalThis.stageContext = this.context; + } +} diff --git a/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/ets/MainAbility/MainAbility.ts b/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/ets/MainAbility/MainAbility.ts new file mode 100644 index 000000000..97867ef0d --- /dev/null +++ b/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/ets/MainAbility/MainAbility.ts @@ -0,0 +1,37 @@ +import Ability from '@ohos.app.ability.UIAbility' + +export default class MainAbility extends Ability { + onCreate(want,launchParam){ + // Ability is creating, initialize resources for this ability + console.log("[Demo] MainAbility onCreate") + globalThis.abilityWant = want; + } + + onDestroy() { + // Ability is destroying, release resources for this ability + console.log("[Demo] MainAbility onDestroy") + } + + onWindowStageCreate(windowStage) { + // Main window is created, set main page for this ability + console.log("[Demo] MainAbility onWindowStageCreate windowStage="+ windowStage) + globalThis.windowStage = windowStage + globalThis.abilityContext = this.context + windowStage.setUIContent(this.context, "MainAbility/pages/webViewContMessageError", null) + } + + onWindowStageDestroy() { + //Main window is destroyed, release UI related resources + console.log("[Demo] MainAbility onWindowStageDestroy") + } + + onForeground() { + // Ability has brought to foreground + console.log("[Demo] MainAbility onForeground") + } + + onBackground() { + // Ability has back to background + console.log("[Demo] MainAbility onBackground") + } +}; diff --git a/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/ets/MainAbility/pages/webViewContCookieToGeoLocationError.ets b/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/ets/MainAbility/pages/webViewContCookieToGeoLocationError.ets new file mode 100644 index 000000000..bee33a533 --- /dev/null +++ b/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/ets/MainAbility/pages/webViewContCookieToGeoLocationError.ets @@ -0,0 +1,704 @@ +/** + * Copyright (c) 2023 iSoftStone Information Technology (Group) 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 events_emitter from '@ohos.events.emitter'; +import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry'; +import { Hypium } from '@ohos/hypium'; +import testsuite from '../../test/List.test'; +import Utils from '../../test/Utils'; +import web_webview from '@ohos.web.webview'; +// @ts-nocheck + +@Entry +@Component +struct webViewContCookieToGeoLocationError { + controller: web_webview.WebviewController = new web_webview.WebviewController(); + @State str:string="emitGetCookieInitErr"; + @State userAgent:string = "Mozilla/5.0 (Window NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko)" + + " CHrome/105.0.0.0 Safari/537.36 Edg/105.0.1343.27"; + @State javaScriptAccess:boolean=true; + @State fileAccess:boolean=true; + @State domStorageAccess:boolean=false; + @State imageAccess:boolean=true; + @State onlineImageAccess:boolean=true; + @State databaseAccess:boolean=true; + @State errorCode: string = '0'; + @State errorTestCode: number = 0; + @State errorMsg: string = 'failed'; + origin: string = ""; + + onPageShow(){ + let valueChangeEvent={ + eventId:10, + priority:events_emitter.EventPriority.LOW + } + events_emitter.on(valueChangeEvent,this.valueChangeCallBack) + } + private valueChangeCallBack=(eventData)=>{ + console.info("webViewContCookieToGeoLocationError page valueChangeCallBack"); + if(eventData != null){ + console.info("valueChangeCallBack:"+ JSON.stringify(eventData)); + if(eventData.data.ACTION != null){ + this.str = eventData.data.ACTION; + } + } + } + + build(){ + Column(){ + Row() { + Button("CookieToGeoLocationErrorTest").key('webViewContCookieToGeoLocationError').onClick(() => { + console.info("key==>" + this.str) + switch (this.str) { + case "emitGetCookieInitErr": { + try { + web_webview.WebCookieManager.getCookie('[1,2]'); + } catch (error) { + console.error(`emitGetCookieInitErr ErrorCode: ${error.code}, Message: ${error.message}`); + this.errorCode = error.code; + this.errorMsg = error.message; + } + Utils.emitEvent(this.errorCode, 752) + Utils.emitEvent(this.errorMsg, 753) + break; + } + case "emitSetCookieInitErr": { + try { + this.errorCode = '0'; + this.errorMsg = 'failed'; + web_webview.WebCookieManager.setCookie('[1,2]', 'a=b'); + } catch (error) { + console.error(`emitSetCookieInitErr ErrorCode: ${error.code}, Message: ${error.message}`); + this.errorCode = error.code; + this.errorMsg = error.message; + } + Utils.emitEvent(this.errorCode, 754) + Utils.emitEvent(this.errorMsg, 755) + break; + } + case "emitSetCookieValueErr": { + try { + this.errorCode = '0'; + this.errorMsg = 'failed'; + web_webview.WebCookieManager.setCookie('https://www.example.com', ''); + } catch (error) { + console.error(`emitSetCookieValueErr ErrorCode: ${error.code}, Message: ${error.message}`); + this.errorCode = error.code; + this.errorMsg = error.message; + } + Utils.emitEvent(this.errorCode, 756) + Utils.emitEvent(this.errorMsg, 757) + break; + } + case "emitDeleteOriginValueNullErr": { + try { + this.errorCode = '0'; + this.errorMsg = 'failed'; + web_webview.WebStorage.deleteOrigin(this.origin); + } catch (error) { + console.error(`emitDeleteOriginValueNullErr ErrorCode: ${error.code}, Message: ${error.message}`); + this.errorCode = error.code; + this.errorMsg = error.message; + } + Utils.emitEvent(this.errorCode, 758) + Utils.emitEvent(this.errorMsg, 759) + break; + } + case "emitDeleteOriginValueIllegalErr": { + try { + this.errorCode = '0'; + this.errorMsg = 'failed'; + this.origin = "[1,a]" + web_webview.WebStorage.deleteOrigin(this.origin); + } catch (error) { + console.error(`emitDeleteOriginValueIllegalErr ErrorCode: ${error.code}, Message: ${error.message}`); + this.errorCode = error.code; + this.errorMsg = error.message; + } + Utils.emitEvent(this.errorCode, 760) + Utils.emitEvent(this.errorMsg, 761) + break; + } + case "emitDeleteOriginValueErr": { + try { + this.errorCode = '0'; + this.errorMsg = 'failed'; + this.origin = "/wrongPath%*" + web_webview.WebStorage.deleteOrigin(this.origin); + } catch (error) { + console.error(`emitDeleteOriginValueErr ErrorCode: ${error.code}, Message: ${error.message}`); + this.errorCode = error.code; + this.errorMsg = error.message; + } + Utils.emitEvent(this.errorCode, 762) + Utils.emitEvent(this.errorMsg, 763) + break; + } + case "emitGetOriginsCallbackUnAPIErr": { + try { + this.errorCode = '0'; + this.errorMsg = 'failed'; + this.databaseAccess = false; + this.controller.refresh(); + web_webview.WebStorage.getOrigins((error, origins) => { + if (error) { + console.log('error: ' + JSON.stringify(error)); + this.errorTestCode = error.code; + this.errorMsg = error.message; + console.error("emitGetOriginsCallbackUnAPIErr getOrigins return result is :" + this.errorTestCode + this.errorMsg); + Utils.emitEvent(this.errorTestCode, 764) + Utils.emitEvent(this.errorMsg, 765) + return; + } + for (let i = 0; i < origins.length; i++) { + console.log('origin: ' + origins[i].origin); + console.log('usage: ' + origins[i].usage); + console.log('quota: ' + origins[i].quota); + } + }) + } catch (error) { + console.error(`emitGetOriginsCallbackUnAPIErr ErrorCode: ${error.code}, Message: ${error.message}`); + } + this.databaseAccess = true; + break; + } + case "emitGetOriginsPromiseUnAPIErr": { + try { + this.errorTestCode = 0; + this.errorMsg = 'failed'; + this.databaseAccess = false; + this.controller.refresh(); + web_webview.WebStorage.getOrigins() + .then(origins => { + for (let i = 0; i < origins.length; i++) { + console.log('origin: ' + origins[i].origin); + console.log('usage: ' + origins[i].usage); + console.log('quota: ' + origins[i].quota); + } + }) + .catch(error => { + console.log('error: ' + JSON.stringify(error)); + this.errorTestCode = error.code; + this.errorMsg = error.message; + console.error("emitGetOriginsPromiseUnAPIErr getOrigins return result is :" + this.errorTestCode + this.errorMsg); + Utils.emitEvent(this.errorTestCode, 766) + Utils.emitEvent(this.errorMsg, 767) + }) + } catch (error) { + console.error(`emitGetOriginsPromiseUnAPIErr ErrorCode: ${error.code}, Message: ${error.message}`); + } + this.databaseAccess = true; + break; + } + case "emitGetOriginQuotaCallbackValueErr": { + try { + this.errorTestCode = 0; + this.errorMsg = 'failed'; + this.origin = "/wrongPath%*" + web_webview.WebStorage.getOriginQuota(this.origin, (error, quota) => { + if (error) { + console.log('error: ' + JSON.stringify(error)); + this.errorTestCode = error.code; + this.errorMsg = error.message; + console.error("emitGetOriginQuotaCallbackValueErr getOriginQuota return result is :" + this.errorTestCode + this.errorMsg); + Utils.emitEvent(this.errorTestCode, 768) + Utils.emitEvent(this.errorMsg, 769) + return; + } + console.log('quota: ' + quota); + }) + } catch (error) { + console.error(`emitGetOriginQuotaCallbackValueErr ErrorCode: ${error.code}, Message: ${error.message}`); + } + break; + } + case "emitGetOriginQuotaCallbackValueIllegalErr": { + try { + this.errorTestCode = 0; + this.errorMsg = 'failed'; + this.origin = "[1,a]" + web_webview.WebStorage.getOriginQuota(this.origin, (error, quota) => { + if (error) { + console.log('error: ' + JSON.stringify(error)); + this.errorTestCode = error.code; + this.errorMsg = error.message; + console.error("emitGetOriginQuotaCallbackValueIllegalErr getOriginQuota return result is :" + this.errorTestCode + this.errorMsg); + Utils.emitEvent(this.errorTestCode, 770) + Utils.emitEvent(this.errorMsg, 771) + return; + } + console.log('quota: ' + quota); + }) + } catch (error) { + console.error(`emitGetOriginQuotaCallbackValueIllegalErr ErrorCode: ${error.code}, Message: ${error.message}`); + } + break; + } + case "emitGetOriginQuotaCallbackValueNullErr": { + try { + this.errorTestCode = 0; + this.errorMsg = 'failed'; + this.origin = "" + web_webview.WebStorage.getOriginQuota(this.origin, (error, quota) => { + if (error) { + console.log('error: ' + JSON.stringify(error)); + this.errorTestCode = error.code; + this.errorMsg = error.message; + console.error("emitGetOriginQuotaCallbackValueNullErr getOriginQuota return result is :" + this.errorTestCode + this.errorMsg); + Utils.emitEvent(this.errorTestCode, 772) + Utils.emitEvent(this.errorMsg, 773) + return; + } + console.log('quota: ' + quota); + }) + } catch (error) { + console.error(`emitGetOriginQuotaCallbackValueNullErr ErrorCode: ${error.code}, Message: ${error.message}`); + } + break; + } + case "emitGetOriginQuotaPromiseValueErr": { + try { + this.errorTestCode = 0; + this.errorMsg = 'failed'; + this.origin = "/wrongPath%*" + web_webview.WebStorage.getOriginQuota(this.origin) + .then(quota => { + console.log('quota: ' + quota); + }) + .catch(error => { + console.log('error: ' + JSON.stringify(error)); + this.errorTestCode = error.code; + this.errorMsg = error.message; + console.error("emitGetOriginQuotaPromiseValueErr getOriginQuota return result is :" + this.errorTestCode + this.errorMsg); + Utils.emitEvent(this.errorTestCode, 774) + Utils.emitEvent(this.errorMsg, 775) + }) + } catch (error) { + console.error(`emitGetOriginQuotaPromiseValueErr ErrorCode: ${error.code}, Message: ${error.message}`); + } + break; + } + case "emitGetOriginQuotaPromiseValueIllegalErr": { + try { + this.errorTestCode = 0; + this.errorMsg = 'failed'; + this.origin = "[1,a]" + web_webview.WebStorage.getOriginQuota(this.origin) + .then(quota => { + console.log('quota: ' + quota); + }) + .catch(error => { + console.log('error: ' + JSON.stringify(error)); + this.errorTestCode = error.code; + this.errorMsg = error.message; + console.error("emitGetOriginQuotaPromiseValueIllegalErr getOriginQuota return result is :" + this.errorTestCode + this.errorMsg); + Utils.emitEvent(this.errorTestCode, 776) + Utils.emitEvent(this.errorMsg, 777) + }) + } catch (error) { + console.error(`emitGetOriginQuotaPromiseValueIllegalErr ErrorCode: ${error.code}, Message: ${error.message}`); + } + break; + } + case "emitGetOriginQuotaPromiseValueNullErr": { + try { + this.errorTestCode = 0; + this.errorMsg = 'failed'; + this.origin = "" + web_webview.WebStorage.getOriginQuota(this.origin) + .then(quota => { + console.log('quota: ' + quota); + }) + .catch(error => { + console.log('error: ' + JSON.stringify(error)); + this.errorTestCode = error.code; + this.errorMsg = error.message; + console.error("emitGetOriginQuotaPromiseValueNullErr getOriginQuota return result is :" + this.errorTestCode + this.errorMsg); + Utils.emitEvent(this.errorTestCode, 778) + Utils.emitEvent(this.errorMsg, 779) + }) + } catch (error) { + console.error(`emitGetOriginQuotaPromiseValueNullErr ErrorCode: ${error.code}, Message: ${error.message}`); + } + break; + } + case "emitGetOriginUsageCallbackValueErr": { + try { + this.errorTestCode = 0; + this.errorMsg = 'failed'; + this.origin = "/wrongPath%*" + web_webview.WebStorage.getOriginUsage(this.origin, (error, usage) => { + if (error) { + console.log('error: ' + JSON.stringify(error)); + this.errorTestCode = error.code; + this.errorMsg = error.message; + console.error("emitGetOriginUsageCallbackValueErr getOriginUsage return result is :" + this.errorTestCode + this.errorMsg); + Utils.emitEvent(this.errorTestCode, 780) + Utils.emitEvent(this.errorMsg, 781) + return; + } + console.log('usage: ' + usage); + }) + } catch (error) { + console.error(`emitGetOriginUsageCallbackValueErr ErrorCode: ${error.code}, Message: ${error.message}`); + } + break; + } + case "emitGetOriginUsageCallbackValueIllegalErr": { + try { + this.errorTestCode = 0; + this.errorMsg = 'failed'; + this.origin = "[1,a]" + web_webview.WebStorage.getOriginUsage(this.origin, (error, usage) => { + if (error) { + console.log('error: ' + JSON.stringify(error)); + this.errorTestCode = error.code; + this.errorMsg = error.message; + console.error("emitGetOriginUsageCallbackValueIllegalErr getOriginUsage return result is :" + this.errorTestCode + this.errorMsg); + Utils.emitEvent(this.errorTestCode, 782) + Utils.emitEvent(this.errorMsg, 783) + return; + } + console.log('usage: ' + usage); + }) + } catch (error) { + console.error(`emitGetOriginUsageCallbackValueIllegalErr ErrorCode: ${error.code}, Message: ${error.message}`); + } + break; + } + case "emitGetOriginUsageCallbackValueNullErr": { + try { + this.errorTestCode = 0; + this.errorMsg = 'failed'; + this.origin = "" + web_webview.WebStorage.getOriginUsage(this.origin, (error, usage) => { + if (error) { + console.log('error: ' + JSON.stringify(error)); + this.errorTestCode = error.code; + this.errorMsg = error.message; + console.error("emitGetOriginUsageCallbackValueNullErr getOriginUsage return result is :" + this.errorTestCode + this.errorMsg); + Utils.emitEvent(this.errorTestCode, 784) + Utils.emitEvent(this.errorMsg, 785) + return; + } + console.log('usage: ' + usage); + }) + } catch (error) { + console.error(`emitGetOriginUsageCallbackValueNullErr ErrorCode: ${error.code}, Message: ${error.message}`); + } + break; + } + case "emitGetOriginUsagePromiseValueErr": { + try { + this.errorTestCode = 0; + this.errorMsg = 'failed'; + this.origin = "/wrongPath%*" + web_webview.WebStorage.getOriginUsage(this.origin) + .then(usage => { + console.log('usage: ' + usage); + }) + .catch(error => { + console.log('error: ' + JSON.stringify(error)); + this.errorTestCode = error.code; + this.errorMsg = error.message; + console.error("emitGetOriginUsagePromiseValueErr getOriginUsage return result is :" + this.errorTestCode + this.errorMsg); + Utils.emitEvent(this.errorTestCode, 786) + Utils.emitEvent(this.errorMsg, 787) + }) + } catch (error) { + console.error(`emitGetOriginUsagePromiseValueErr ErrorCode: ${error.code}, Message: ${error.message}`); + } + break; + } + case "emitGetOriginUsagePromiseValueIllegalErr": { + try { + this.errorTestCode = 0; + this.errorMsg = 'failed'; + this.origin = "[1,a]" + web_webview.WebStorage.getOriginUsage(this.origin) + .then(usage => { + console.log('usage: ' + usage); + }) + .catch(error => { + console.log('error: ' + JSON.stringify(error)); + this.errorTestCode = error.code; + this.errorMsg = error.message; + console.error("emitGetOriginUsagePromiseValueIllegalErr getOriginUsage return result is :" + this.errorTestCode + this.errorMsg); + Utils.emitEvent(this.errorTestCode, 788) + Utils.emitEvent(this.errorMsg, 789) + }) + } catch (error) { + console.error(`emitGetOriginUsagePromiseValueIllegalErr ErrorCode: ${error.code}, Message: ${error.message}`); + } + break; + } + case "emitGetOriginUsagePromiseValueNullErr": { + try { + this.errorTestCode = 0; + this.errorMsg = 'failed'; + this.origin = "" + web_webview.WebStorage.getOriginUsage(this.origin) + .then(usage => { + console.log('usage: ' + usage); + }) + .catch(error => { + console.log('error: ' + JSON.stringify(error)); + this.errorTestCode = error.code; + this.errorMsg = error.message; + console.error("emitGetOriginUsagePromiseValueNullErr getOriginUsage return result is :" + this.errorTestCode + this.errorMsg); + Utils.emitEvent(this.errorTestCode, 790) + Utils.emitEvent(this.errorMsg, 791) + }) + } catch (error) { + console.error(`emitGetOriginUsagePromiseValueNullErr ErrorCode: ${error.code}, Message: ${error.message}`); + } + break; + } + case "emitAllowGeolocationValueErr": { + try { + this.errorCode = '0'; + this.errorMsg = 'failed'; + this.origin = "/wrongPath%*" + web_webview.GeolocationPermissions.allowGeolocation(this.origin); + } catch (error) { + console.error(`emitAllowGeolocationValueErr ErrorCode: ${error.code}, Message: ${error.message}`); + this.errorCode = error.code; + this.errorMsg = error.message; + } + Utils.emitEvent(this.errorCode, 792) + Utils.emitEvent(this.errorMsg, 793) + break; + } + case "emitAllowGeolocationValueIllegalErr": { + try { + this.errorCode = '0'; + this.errorMsg = 'failed'; + this.origin = "[1,a]" + web_webview.GeolocationPermissions.allowGeolocation(this.origin); + } catch (error) { + console.error(`emitAllowGeolocationValueIllegalErr ErrorCode: ${error.code}, Message: ${error.message}`); + this.errorCode = error.code; + this.errorMsg = error.message; + } + Utils.emitEvent(this.errorCode, 794) + Utils.emitEvent(this.errorMsg, 795) + break; + } + case "emitAllowGeolocationValueNullErr": { + try { + this.errorCode = '0'; + this.errorMsg = 'failed'; + this.origin = "" + web_webview.GeolocationPermissions.allowGeolocation(this.origin); + } catch (error) { + console.error(`emitAllowGeolocationValueNullErr ErrorCode: ${error.code}, Message: ${error.message}`); + this.errorCode = error.code; + this.errorMsg = error.message; + } + Utils.emitEvent(this.errorCode, 796) + Utils.emitEvent(this.errorMsg, 797) + break; + } + case "emitDeleteGeolocationValueErr": { + try { + this.errorCode = '0'; + this.errorMsg = 'failed'; + this.origin = "/wrongPath%*" + web_webview.GeolocationPermissions.deleteGeolocation(this.origin); + } catch (error) { + console.error(`emitDeleteGeolocationValueErr ErrorCode: ${error.code}, Message: ${error.message}`); + this.errorCode = error.code; + this.errorMsg = error.message; + } + Utils.emitEvent(this.errorCode, 798) + Utils.emitEvent(this.errorMsg, 799) + break; + } + case "emitDeleteGeolocationValueIllegalErr": { + try { + this.errorCode = '0'; + this.errorMsg = 'failed'; + this.origin = "[1,a]" + web_webview.GeolocationPermissions.deleteGeolocation(this.origin); + } catch (error) { + console.error(`emitDeleteGeolocationValueIllegalErr ErrorCode: ${error.code}, Message: ${error.message}`); + this.errorCode = error.code; + this.errorMsg = error.message; + } + Utils.emitEvent(this.errorCode, 800) + Utils.emitEvent(this.errorMsg, 801) + break; + } + case "emitDeleteGeolocationValueNullErr": { + try { + this.errorCode = '0'; + this.errorMsg = 'failed'; + this.origin = "" + web_webview.GeolocationPermissions.deleteGeolocation(this.origin); + } catch (error) { + console.error(`emitDeleteGeolocationValueNullErr ErrorCode: ${error.code}, Message: ${error.message}`); + this.errorCode = error.code; + this.errorMsg = error.message; + } + Utils.emitEvent(this.errorCode, 802) + Utils.emitEvent(this.errorMsg, 803) + break; + } + case "emitGetAccessibleGeolocationCallbackValueErr": { + try { + this.errorTestCode = 0; + this.errorMsg = 'failed'; + this.origin = "/wrongPath%*" + web_webview.GeolocationPermissions.getAccessibleGeolocation(this.origin, (error, result) => { + if (error) { + console.log('getAccessibleGeolocationAsync error: ' + JSON.stringify(error)); + this.errorTestCode = error.code; + this.errorMsg = error.message; + console.error("emitGetAccessibleGeolocationCallbackValueErr getAccessibleGeolocation return result is :" + this.errorTestCode + this.errorMsg); + Utils.emitEvent(this.errorTestCode, 804) + Utils.emitEvent(this.errorMsg, 805) + return; + } + console.log('getAccessibleGeolocationAsync result: ' + result); + }); + } catch (error) { + console.error(`emitGetAccessibleGeolocationCallbackValueErr ErrorCode: ${error.code}, Message: ${error.message}`); + } + break; + } + case "emitGetAccessibleGeolocationCallbackValueIllegalErr": { + try { + this.errorTestCode = 0; + this.errorMsg = 'failed'; + this.origin = "[1,a]" + web_webview.GeolocationPermissions.getAccessibleGeolocation(this.origin, (error, result) => { + if (error) { + console.log('getAccessibleGeolocationAsync error: ' + JSON.stringify(error)); + this.errorTestCode = error.code; + this.errorMsg = error.message; + console.error("emitGetAccessibleGeolocationCallbackValueIllegalErr getAccessibleGeolocation return result is :" + this.errorTestCode + this.errorMsg); + Utils.emitEvent(this.errorTestCode, 806) + Utils.emitEvent(this.errorMsg, 807) + return; + } + console.log('getAccessibleGeolocationAsync result: ' + result); + }); + } catch (error) { + console.error(`emitGetAccessibleGeolocationCallbackValueIllegalErr ErrorCode: ${error.code}, Message: ${error.message}`); + } + break; + } + case "emitGetAccessibleGeolocationCallbackValueNullErr": { + try { + this.errorTestCode = 0; + this.errorMsg = 'failed'; + this.origin = "" + web_webview.GeolocationPermissions.getAccessibleGeolocation(this.origin, (error, result) => { + if (error) { + console.log('getAccessibleGeolocationAsync error: ' + JSON.stringify(error)); + this.errorTestCode = error.code; + this.errorMsg = error.message; + console.error("emitGetAccessibleGeolocationCallbackValueNullErr getAccessibleGeolocation return result is :" + this.errorTestCode + this.errorMsg); + Utils.emitEvent(this.errorTestCode, 808) + Utils.emitEvent(this.errorMsg, 809) + return; + } + console.log('getAccessibleGeolocationAsync result: ' + result); + }); + } catch (error) { + console.error(`emitGetAccessibleGeolocationCallbackValueNullErr ErrorCode: ${error.code}, Message: ${error.message}`); + } + break; + } + case "emitGetAccessibleGeolocationPromiseValueErr": { + try { + this.errorTestCode = 0; + this.errorMsg = 'failed'; + this.origin = "/wrongPath%*" + web_webview.GeolocationPermissions.getAccessibleGeolocation(this.origin) + .then(result => { + console.log('getAccessibleGeolocationPromise result: ' + result); + }) + .catch(error => { + console.log('getAccessibleGeolocationPromise error: ' + JSON.stringify(error)); + this.errorTestCode = error.code; + this.errorMsg = error.message; + console.error("emitGetAccessibleGeolocationPromiseValueErr getAccessibleGeolocation return result is :" + this.errorTestCode + this.errorMsg); + Utils.emitEvent(this.errorTestCode, 810) + Utils.emitEvent(this.errorMsg, 811) + }); + } catch (error) { + console.error(`emitGetAccessibleGeolocationPromiseValueErr ErrorCode: ${error.code}, Message: ${error.message}`); + } + break; + } + case "emitGetAccessibleGeolocationPromiseValueIllegalErr": { + try { + this.errorTestCode = 0; + this.errorMsg = 'failed'; + this.origin = "[1,a]" + web_webview.GeolocationPermissions.getAccessibleGeolocation(this.origin) + .then(result => { + console.log('getAccessibleGeolocationPromise result: ' + result); + }) + .catch(error => { + console.log('getAccessibleGeolocationPromise error: ' + JSON.stringify(error)); + this.errorTestCode = error.code; + this.errorMsg = error.message; + console.error("emitGetAccessibleGeolocationPromiseValueIllegalErr getAccessibleGeolocation return result is :" + this.errorTestCode + this.errorMsg); + Utils.emitEvent(this.errorTestCode, 812) + Utils.emitEvent(this.errorMsg, 813) + }); + } catch (error) { + console.error(`emitGetAccessibleGeolocationPromiseValueIllegalErr ErrorCode: ${error.code}, Message: ${error.message}`); + } + break; + } + case "emitGetAccessibleGeolocationPromiseValueNullErr": { + try { + this.errorTestCode = 0; + this.errorMsg = 'failed'; + this.origin = "" + web_webview.GeolocationPermissions.getAccessibleGeolocation(this.origin) + .then(result => { + console.log('getAccessibleGeolocationPromise result: ' + result); + }) + .catch(error => { + console.log('getAccessibleGeolocationPromise error: ' + JSON.stringify(error)); + this.errorTestCode = error.code; + this.errorMsg = error.message; + console.error("emitGetAccessibleGeolocationPromiseValueNullErr getAccessibleGeolocation return result is :" + this.errorTestCode + this.errorMsg); + Utils.emitEvent(this.errorTestCode, 814) + Utils.emitEvent(this.errorMsg, 815) + }); + } catch (error) { + console.error(`emitGetAccessibleGeolocationPromiseValueNullErr ErrorCode: ${error.code}, Message: ${error.message}`); + } + break; + } + } + }) + } + Web({src:'www.example.com',controller:this.controller}) + .javaScriptAccess(this.javaScriptAccess) + .fileAccess(this.fileAccess) + .imageAccess(this.imageAccess) + .domStorageAccess(this.domStorageAccess) + .onlineImageAccess(this.onlineImageAccess) + .databaseAccess(this.databaseAccess) + .userAgent(this.userAgent) + } + } +} \ No newline at end of file diff --git a/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/ets/MainAbility/pages/webViewContGetUrlAndOthersError.ets b/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/ets/MainAbility/pages/webViewContGetUrlAndOthersError.ets new file mode 100644 index 000000000..8a8ba6624 --- /dev/null +++ b/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/ets/MainAbility/pages/webViewContGetUrlAndOthersError.ets @@ -0,0 +1,399 @@ +/** + * Copyright (c) 2023 iSoftStone Information Technology (Group) 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 events_emitter from '@ohos.events.emitter'; +import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry'; +import { Hypium } from '@ohos/hypium'; +import testsuite from '../../test/List.test'; +import Utils from '../../test/Utils'; +import web_webview from '@ohos.web.webview'; +// @ts-nocheck + +function Uint8ArrayToString(dataArray) { + var dataString = '' + for (var i = 0; i < dataArray.length; i++) { + dataString += String.fromCharCode(dataArray[i]) + } + return dataString +} + +function ParseX509CertInfo(x509CertArray) { + let res: string = 'getCertificate success: len = ' + x509CertArray.length; + for (let i = 0; i < x509CertArray.length; i++) { + res += ', index = ' + i + ', issuer name = ' + + Uint8ArrayToString(x509CertArray[i].getIssuerName().data) + ', subject name = ' + + Uint8ArrayToString(x509CertArray[i].getSubjectName().data) + ', valid start = ' + + x509CertArray[i].getNotBeforeTime() + + ', valid end = ' + x509CertArray[i].getNotAfterTime() + } + return res +} + +@Entry +@Component +struct webViewContGetUrlAndOthersError { + controller: web_webview.WebviewController = new web_webview.WebviewController(); + controllerTwo: web_webview.WebviewController = new web_webview.WebviewController(); + @State str:string="emitGetUrlInitErr"; + @State userAgent:string = "Mozilla/5.0 (Window NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko)" + + " CHrome/105.0.0.0 Safari/537.36 Edg/105.0.1343.27"; + @State javaScriptAccess:boolean=true; + @State fileAccess:boolean=true; + @State domStorageAccess:boolean=false; + @State imageAccess:boolean=true; + @State onlineImageAccess:boolean=true; + @State databaseAccess:boolean=true; + @State errorCode: string = '0'; + @State errorMsg: string = 'failed'; + @State step: number = -2; + @State outputStr: string = '' + + onPageShow(){ + let valueChangeEvent={ + eventId:10, + priority:events_emitter.EventPriority.LOW + } + events_emitter.on(valueChangeEvent,this.valueChangeCallBack) + } + private valueChangeCallBack=(eventData)=>{ + console.info("webViewContGetUrlAndOthersError page valueChangeCallBack"); + if(eventData != null){ + console.info("valueChangeCallBack:"+ JSON.stringify(eventData)); + if(eventData.data.ACTION != null){ + this.str = eventData.data.ACTION; + } + } + } + + build(){ + Column(){ + Row() { + Button("getUrlAndOthersErrorTest").key('webViewContGetUrlAndOthersError').onClick(() => { + console.info("key==>" + this.str) + switch (this.str) { + case "emitGetUrlInitErr": { + try { + this.controllerTwo.getUrl(); + } catch (error) { + console.error(`emitGetUrlInitErr ErrorCode: ${error.code}, Message: ${error.message}`); + this.errorCode = error.code; + this.errorMsg = error.message; + } + Utils.emitEvent(this.errorCode, 712) + Utils.emitEvent(this.errorMsg, 713) + break; + } + case "emitStopInitErr": { + try { + this.errorCode = '0'; + this.errorMsg = 'failed'; + this.controllerTwo.stop(); + } catch (error) { + console.error(`emitStopInitErr ErrorCode: ${error.code}, Message: ${error.message}`); + this.errorCode = error.code; + this.errorMsg = error.message; + } + Utils.emitEvent(this.errorCode, 714) + Utils.emitEvent(this.errorMsg, 715) + break; + } + case "emitBackOrForwardInitErr": { + try { + this.errorCode = '0'; + this.errorMsg = 'failed'; + this.controllerTwo.backOrForward(this.step); + } catch (error) { + console.error(`emitBackOrForwardInitErr ErrorCode: ${error.code}, Message: ${error.message}`); + this.errorCode = error.code; + this.errorMsg = error.message; + } + Utils.emitEvent(this.errorCode, 716) + Utils.emitEvent(this.errorMsg, 717) + break; + } + case "emitScrollToInitErr": { + try { + this.errorCode = '0'; + this.errorMsg = 'failed'; + this.controllerTwo.scrollTo(50, 50); + } catch (error) { + console.error(`emitScrollToInitErr ErrorCode: ${error.code}, Message: ${error.message}`); + this.errorCode = error.code; + this.errorMsg = error.message; + } + Utils.emitEvent(this.errorCode, 718) + Utils.emitEvent(this.errorMsg, 719) + break; + } + case "emitScrollByInitErr": { + try { + this.errorCode = '0'; + this.errorMsg = 'failed'; + this.controllerTwo.scrollBy(50, 50); + } catch (error) { + console.error(`emitScrollByInitErr ErrorCode: ${error.code}, Message: ${error.message}`); + this.errorCode = error.code; + this.errorMsg = error.message; + } + Utils.emitEvent(this.errorCode, 720) + Utils.emitEvent(this.errorMsg, 721) + break; + } + case "emitSlideScrollInitErr": { + try { + this.errorCode = '0'; + this.errorMsg = 'failed'; + this.controllerTwo.slideScroll(500, 500); + } catch (error) { + console.error(`emitSlideScrollInitErr ErrorCode: ${error.code}, Message: ${error.message}`); + this.errorCode = error.code; + this.errorMsg = error.message; + } + Utils.emitEvent(this.errorCode, 722) + Utils.emitEvent(this.errorMsg, 723) + break; + } + case "emitGetOriginalUrlInitErr": { + try { + this.errorCode = '0'; + this.errorMsg = 'failed'; + this.controllerTwo.getOriginalUrl(); + } catch (error) { + console.error(`emitGetOriginalUrlInitErr ErrorCode: ${error.code}, Message: ${error.message}`); + this.errorCode = error.code; + this.errorMsg = error.message; + } + Utils.emitEvent(this.errorCode, 724) + Utils.emitEvent(this.errorMsg, 725) + break; + } + case "emitGetFaviconInitErr": { + try { + this.errorCode = '0'; + this.errorMsg = 'failed'; + this.controllerTwo.getFavicon(); + } catch (error) { + console.error(`emitGetFaviconInitErr ErrorCode: ${error.code}, Message: ${error.message}`); + this.errorCode = error.code; + this.errorMsg = error.message; + } + Utils.emitEvent(this.errorCode, 726) + Utils.emitEvent(this.errorMsg, 727) + break; + } + case "emitSetNetworkAvailableInitErr": { + try { + this.errorCode = '0'; + this.errorMsg = 'failed'; + this.controllerTwo.setNetworkAvailable(true); + } catch (error) { + console.error(`emitSetNetworkAvailableInitErr ErrorCode: ${error.code}, Message: ${error.message}`); + this.errorCode = error.code; + this.errorMsg = error.message; + } + Utils.emitEvent(this.errorCode, 728) + Utils.emitEvent(this.errorMsg, 729) + break; + } + case "emitHasImageCallBackInitErr": { + try { + this.errorCode = '0'; + this.errorMsg = 'failed'; + this.controllerTwo.hasImage((error, data) => { + if (error) { + console.info(`hasImage error: ` + JSON.stringify(error)) + return; + } + console.info("hasImage: " + data); + }); + } catch (error) { + console.error(`emitHasImageCallBackInitErr ErrorCode: ${error.code}, Message: ${error.message}`); + this.errorCode = error.code; + this.errorMsg = error.message; + } + Utils.emitEvent(this.errorCode, 730) + Utils.emitEvent(this.errorMsg, 731) + break; + } + case "emitHasImagePromiseInitErr": { + try { + this.errorCode = '0'; + this.errorMsg = 'failed'; + this.controllerTwo.hasImage() + .then((data) => { + console.info('hasImage: ' + data); + }) + .catch(function (error) { + console.error("error: " + error); + }) + } catch (error) { + console.error(`emitHasImagePromiseInitErr ErrorCode: ${error.code}, Message: ${error.message}`); + this.errorCode = error.code; + this.errorMsg = error.message; + } + Utils.emitEvent(this.errorCode, 732) + Utils.emitEvent(this.errorMsg, 733) + break; + } + case "emitRemoveCacheInitErr": { + try { + this.errorCode = '0'; + this.errorMsg = 'failed'; + this.controllerTwo.removeCache(false); + } catch (error) { + console.error(`emitRemoveCacheInitErr ErrorCode: ${error.code}, Message: ${error.message}`); + this.errorCode = error.code; + this.errorMsg = error.message; + } + Utils.emitEvent(this.errorCode, 734) + Utils.emitEvent(this.errorMsg, 735) + break; + } + case "emitPageUpInitErr": { + try { + this.errorCode = '0'; + this.errorMsg = 'failed'; + this.controllerTwo.pageUp(false); + } catch (error) { + console.error(`emitPageUpInitErr ErrorCode: ${error.code}, Message: ${error.message}`); + this.errorCode = error.code; + this.errorMsg = error.message; + } + Utils.emitEvent(this.errorCode, 736) + Utils.emitEvent(this.errorMsg, 737) + break; + } + case "emitPageDownInitErr": { + try { + this.errorCode = '0'; + this.errorMsg = 'failed'; + this.controllerTwo.pageDown(false); + } catch (error) { + console.error(`emitPageDownInitErr ErrorCode: ${error.code}, Message: ${error.message}`); + this.errorCode = error.code; + this.errorMsg = error.message; + } + Utils.emitEvent(this.errorCode, 738) + Utils.emitEvent(this.errorMsg, 739) + break; + } + case "emitGetBackForwardEntriesInitErr": { + try { + this.errorCode = '0'; + this.errorMsg = 'failed'; + this.controllerTwo.getBackForwardEntries(); + } catch (error) { + console.error(`emitGetBackForwardEntriesInitErr ErrorCode: ${error.code}, Message: ${error.message}`); + this.errorCode = error.code; + this.errorMsg = error.message; + } + Utils.emitEvent(this.errorCode, 740) + Utils.emitEvent(this.errorMsg, 741) + break; + } + case "emitSerializeWebStateInitErr": { + try { + this.errorCode = '0'; + this.errorMsg = 'failed'; + this.controllerTwo.serializeWebState(); + } catch (error) { + console.error(`emitSerializeWebStateInitErr ErrorCode: ${error.code}, Message: ${error.message}`); + this.errorCode = error.code; + this.errorMsg = error.message; + } + Utils.emitEvent(this.errorCode, 742) + Utils.emitEvent(this.errorMsg, 743) + break; + } + case "emitRestoreWebStateInitErr": { + try { + this.errorCode = '0'; + this.errorMsg = 'failed'; + let size = 8; + let buf = new ArrayBuffer(size); + this.controllerTwo.restoreWebState(new Uint8Array(buf.slice(0, 8))); + } catch (error) { + console.error(`emitRestoreWebStateInitErr ErrorCode: ${error.code}, Message: ${error.message}`); + this.errorCode = error.code; + this.errorMsg = error.message; + } + Utils.emitEvent(this.errorCode, 744) + Utils.emitEvent(this.errorMsg, 745) + break; + } + case "emitGetCertificatePromiseInitErr": { + try { + this.errorCode = '0'; + this.errorMsg = 'failed'; + this.controllerTwo.getCertificate().then(x509CertArray => { + this.outputStr = ParseX509CertInfo(x509CertArray); + }) + } catch (error) { + console.error(`emitGetCertificatePromiseInitErr ErrorCode: ${error.code}, Message: ${error.message}`); + this.errorCode = error.code; + this.errorMsg = error.message; + } + Utils.emitEvent(this.errorCode, 746) + Utils.emitEvent(this.errorMsg, 747) + break; + } + case "emitGetCertificateCallbackInitErr": { + try { + this.errorCode = '0'; + this.errorMsg = 'failed'; + this.controllerTwo.getCertificate((error, x509CertArray) => { + if (error) { + this.outputStr = 'getCertificate failed: ' + error.code + ", errMsg: " + error.message; + } else { + this.outputStr = ParseX509CertInfo(x509CertArray); + } + }) + } catch (error) { + console.error(`emitGetCertificateCallbackInitErr ErrorCode: ${error.code}, Message: ${error.message}`); + this.errorCode = error.code; + this.errorMsg = error.message; + } + Utils.emitEvent(this.errorCode, 748) + Utils.emitEvent(this.errorMsg, 749) + break; + } + case "emitSetAudioMutedInitErr": { + try { + this.errorCode = '0'; + this.errorMsg = 'failed'; + this.controllerTwo.setAudioMuted(false) + } catch (error) { + console.error(`emitSetAudioMutedInitErr ErrorCode: ${error.code}, Message: ${error.message}`); + this.errorCode = error.code; + this.errorMsg = error.message; + } + Utils.emitEvent(this.errorCode, 750) + Utils.emitEvent(this.errorMsg, 751) + break; + } + } + }) + } + Web({src:$rawfile('index.html'),controller:this.controller}) + .javaScriptAccess(this.javaScriptAccess) + .fileAccess(this.fileAccess) + .imageAccess(this.imageAccess) + .domStorageAccess(this.domStorageAccess) + .onlineImageAccess(this.onlineImageAccess) + .databaseAccess(this.databaseAccess) + .userAgent(this.userAgent) + } + } +} \ No newline at end of file diff --git a/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/ets/MainAbility/pages/webViewContJavaScriptError.ets b/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/ets/MainAbility/pages/webViewContJavaScriptError.ets new file mode 100644 index 000000000..b114ba1bd --- /dev/null +++ b/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/ets/MainAbility/pages/webViewContJavaScriptError.ets @@ -0,0 +1,219 @@ +/** + * Copyright (c) 2023 iSoftStone Information Technology (Group) 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 events_emitter from '@ohos.events.emitter'; +import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry'; +import { Hypium } from '@ohos/hypium'; +import testsuite from '../../test/List.test'; +import Utils from '../../test/Utils'; +import web_webview from '@ohos.web.webview'; +// @ts-nocheck + +@Entry +@Component +struct webViewContJavaScriptError { + controller: web_webview.WebviewController = new web_webview.WebviewController(); + controllerTwo: web_webview.WebviewController = new web_webview.WebviewController(); + @State str:string="emitRegisterJavaScriptProxyInitErr"; + @State userAgent:string = "Mozilla/5.0 (Window NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko)" + + " CHrome/105.0.0.0 Safari/537.36 Edg/105.0.1343.27"; + @State javaScriptAccess:boolean=true; + @State fileAccess:boolean=true; + @State domStorageAccess:boolean=false; + @State imageAccess:boolean=true; + @State onlineImageAccess:boolean=true; + @State databaseAccess:boolean=true; + @State errorCode: string = '0'; + @State errorMsg: string = 'failed'; + @State webResult: string = ''; + @State name: string = 'UnExistObj'; + + testObj = { + test: (data) => { + return "ArkUI Web Component"; + }, + toString: () => { + console.log('Web Component toString'); + } + } + + onPageShow(){ + let valueChangeEvent={ + eventId:10, + priority:events_emitter.EventPriority.LOW + } + events_emitter.on(valueChangeEvent,this.valueChangeCallBack) + } + private valueChangeCallBack=(eventData)=>{ + console.info("webViewContJavaScriptError page valueChangeCallBack"); + if(eventData != null){ + console.info("valueChangeCallBack:"+ JSON.stringify(eventData)); + if(eventData.data.ACTION != null){ + this.str = eventData.data.ACTION; + } + } + } + + build(){ + Column(){ + Row() { + Button("javaScriptErrorTest").key('webViewContJavaScriptError').onClick(() => { + console.info("key==>" + this.str) + switch (this.str) { + case "emitRegisterJavaScriptProxyInitErr": { + try { + this.controllerTwo.registerJavaScriptProxy(this.testObj, "objName", ["test", "toString"]);; + } catch (error) { + console.error(`emitRegisterJavaScriptProxyInitErr ErrorCode: ${error.code}, Message: ${error.message}`); + this.errorCode = error.code; + this.errorMsg = error.message; + } + Utils.emitEvent(this.errorCode, 650) + Utils.emitEvent(this.errorMsg, 651) + break; + } + case "emitRunJavaScriptCallbackInitErr": { + try { + this.errorCode = '0'; + this.errorMsg = 'failed'; + this.controllerTwo.runJavaScript( + 'test()', + (error, result) => { + if (error) { + console.info(`run JavaScript error: ` + JSON.stringify(error)); + return; + } + if (result) { + this.webResult = result; + console.info(`The test() return value is: ${result}`); + } + }); + } catch (error) { + console.error(`emitRunJavaScriptCallbackInitErr ErrorCode: ${error.code}, Message: ${error.message}`); + this.errorCode = error.code; + this.errorMsg = error.message; + } + Utils.emitEvent(this.errorCode, 652) + Utils.emitEvent(this.errorMsg, 653) + break; + } + case "emitRunJavaScriptPromiseInitErr": { + try { + this.errorCode = '0'; + this.errorMsg = 'failed'; + this.controllerTwo.runJavaScript('test()') + .then(function (result) { + console.log('result: ' + result); + }) + .catch(function (error) { + console.error("error: " + error); + }) + } catch (error) { + console.error(`emitRunJavaScriptPromiseInitErr ErrorCode: ${error.code}, Message: ${error.message}`); + this.errorCode = error.code; + this.errorMsg = error.message; + } + Utils.emitEvent(this.errorCode, 654) + Utils.emitEvent(this.errorMsg, 655) + break; + } + case "emitRunJavaScriptExtCallbackInitErr": { + try { + this.errorCode = '0'; + this.errorMsg = 'failed'; + this.controllerTwo.runJavaScriptExt( + 'test()', + (error, result) => { + if (error) { + console.info(`run JavaScript error: ` + JSON.stringify(error)); + return; + } + if (result) { + console.info(`The test() return value is: ${result}`); + } + }); + } catch (error) { + console.error(`emitRunJavaScriptExtCallbackInitErr ErrorCode: ${error.code}, Message: ${error.message}`); + this.errorCode = error.code; + this.errorMsg = error.message; + } + Utils.emitEvent(this.errorCode, 656) + Utils.emitEvent(this.errorMsg, 657) + break; + } + case "emitRunJavaScriptExtPromiseInitErr": { + try { + this.errorCode = '0'; + this.errorMsg = 'failed'; + this.controllerTwo.runJavaScriptExt('test()') + .then(function (result) { + console.log('result: ' + result); + }) + .catch(function (error) { + console.error("error: " + error); + }) + } catch (error) { + console.error(`emitRunJavaScriptExtPromiseInitErr ErrorCode: ${error.code}, Message: ${error.message}`); + this.errorCode = error.code; + this.errorMsg = error.message; + } + Utils.emitEvent(this.errorCode, 658) + Utils.emitEvent(this.errorMsg, 659) + break; + } + case "emitDeleteJavaScriptRegisterInitErr": { + try { + this.errorCode = '0'; + this.errorMsg = 'failed'; + this.controllerTwo.deleteJavaScriptRegister(this.name); + } catch (error) { + console.error(`emitDeleteJavaScriptRegisterInitErr ErrorCode: ${error.code}, Message: ${error.message}`); + this.errorCode = error.code; + this.errorMsg = error.message; + } + Utils.emitEvent(this.errorCode, 660) + Utils.emitEvent(this.errorMsg, 661) + break; + } + case "emitDeleteJavaScriptRegisterNameErr": { + try { + this.errorCode = '0'; + this.errorMsg = 'failed'; + this.controller.registerJavaScriptProxy(this.testObj, "objName", ["test", "toString"]); + this.controller.refresh(); + this.controller.deleteJavaScriptRegister(this.name); + } catch (error) { + console.error(`emitDeleteJavaScriptRegisterNameErr ErrorCode: ${error.code}, Message: ${error.message}`); + this.errorCode = error.code; + this.errorMsg = error.message; + } + Utils.emitEvent(this.errorCode, 662) + Utils.emitEvent(this.errorMsg, 663) + break; + } + } + }) + } + Web({src:$rawfile('index.html'),controller:this.controller}) + .javaScriptAccess(this.javaScriptAccess) + .fileAccess(this.fileAccess) + .imageAccess(this.imageAccess) + .domStorageAccess(this.domStorageAccess) + .onlineImageAccess(this.onlineImageAccess) + .databaseAccess(this.databaseAccess) + .userAgent(this.userAgent) + } + } +} \ No newline at end of file diff --git a/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/ets/MainAbility/pages/webViewContJsMessageExtReturnError.ets b/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/ets/MainAbility/pages/webViewContJsMessageExtReturnError.ets new file mode 100644 index 000000000..a0d5824c1 --- /dev/null +++ b/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/ets/MainAbility/pages/webViewContJsMessageExtReturnError.ets @@ -0,0 +1,274 @@ +/** + * Copyright (c) 2023 iSoftStone Information Technology (Group) 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 events_emitter from '@ohos.events.emitter'; +import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry'; +import { Hypium } from '@ohos/hypium'; +import testsuite from '../../test/List.test'; +import Utils from '../../test/Utils'; +import web_webview from '@ohos.web.webview'; +// @ts-nocheck + +@Entry +@Component +struct webViewContJsMessageExtReturnError { + controller: web_webview.WebviewController = new web_webview.WebviewController(); + @State str:string="emitJsMessageExtGetStringError"; + @State userAgent:string = "Mozilla/5.0 (Window NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko)" + + " CHrome/105.0.0.0 Safari/537.36 Edg/105.0.1343.27"; + @State javaScriptAccess:boolean=true; + @State fileAccess:boolean=true; + @State domStorageAccess:boolean=false; + @State imageAccess:boolean=true; + @State onlineImageAccess:boolean=true; + @State databaseAccess:boolean=true; + @State zoomAccess:boolean=false; + @State errorCode: string = '0'; + @State errorTestCode: number = 0; + @State errorMsg: string = 'failed'; + + onPageShow(){ + let valueChangeEvent={ + eventId:10, + priority:events_emitter.EventPriority.LOW + } + events_emitter.on(valueChangeEvent,this.valueChangeCallBack) + } + private valueChangeCallBack=(eventData)=>{ + console.info("webViewContJsMessageExtReturnError page valueChangeCallBack"); + if(eventData != null){ + console.info("valueChangeCallBack:"+ JSON.stringify(eventData)); + if(eventData.data.ACTION != null){ + this.str = eventData.data.ACTION; + } + } + } + + build(){ + Column(){ + Row() { + Button("JsMessageExtErrorTest").key('webViewContJsMessageExtReturnError').onClick(async () => { + console.info("key==>" + this.str) + switch (this.str) { + case "emitJsMessageExtGetStringError": { + this.controller.loadUrl($rawfile('testMessageExt.html')); + await Utils.sleep(3000); + try { + this.controller.runJavaScriptExt( + 'testArray()', + (error, result) => { + if (error) { + console.info(`run JavaScript error: ` + JSON.stringify(error)) + return; + } + if (result) { + try { + let type = result.getType(); + console.info('run JavaScript result.getType(): ' + type) + result.getString(); + } + catch (resError) { + console.log(`log error code: ${resError.code}, Message: ${resError.message}`); + this.errorTestCode = resError.code; + this.errorMsg = resError.message; + console.error("emitJsMessageExtGetStringError runJavaScriptExt getString result is :" + this.errorTestCode + this.errorMsg); + Utils.emitEvent(this.errorTestCode, 816) + Utils.emitEvent(this.errorMsg, 817) + return; + } + } + }); + } catch (error) { + console.error(`ErrorCode: ${error.code}, Message: ${error.message}`); + } + break; + } + case "emitJsMessageExtGetNumberError": { + this.errorTestCode = 0; + this.errorMsg = 'failed'; + this.controller.loadUrl($rawfile('testMessageExt.html')); + try { + this.controller.runJavaScriptExt( + 'testArrayBuffer()', + (error, result) => { + if (error) { + console.info(`run JavaScript error: ` + JSON.stringify(error)) + return; + } + if (result) { + try { + let type = result.getType(); + console.info('run JavaScript result.getType(): ' + type) + result.getNumber(); + } + catch (resError) { + console.log(`log error code: ${resError.code}, Message: ${resError.message}`); + this.errorTestCode = resError.code; + this.errorMsg = resError.message; + console.error("emitJsMessageExtGetNumberError runJavaScriptExt getNumber result is :" + this.errorTestCode + this.errorMsg); + Utils.emitEvent(this.errorTestCode, 818) + Utils.emitEvent(this.errorMsg, 819) + return; + } + } + }); + } catch (error) { + console.error(`ErrorCode: ${error.code}, Message: ${error.message}`); + } + break; + } + case "emitJsMessageExtGetBooleanError": { + this.errorTestCode = 0; + this.errorMsg = 'failed'; + this.controller.loadUrl($rawfile('testMessageExt.html')); + try { + this.controller.runJavaScriptExt( + 'testNumber()', + (error, result) => { + if (error) { + console.info(`run JavaScript error: ` + JSON.stringify(error)) + return; + } + if (result) { + try { + let type = result.getType(); + console.info('run JavaScript result.getType(): ' + type) + result.getBoolean(); + } + catch (resError) { + console.log(`log error code: ${resError.code}, Message: ${resError.message}`); + this.errorTestCode = resError.code; + this.errorMsg = resError.message; + console.error("emitJsMessageExtGetBooleanError runJavaScriptExt getBoolean result is :" + this.errorTestCode + this.errorMsg); + Utils.emitEvent(this.errorTestCode, 820) + Utils.emitEvent(this.errorMsg, 821) + return; + } + } + }); + } catch (error) { + console.error(`ErrorCode: ${error.code}, Message: ${error.message}`); + } + break; + } + case "emitJsMessageExtGetArrayBufferError": { + this.errorTestCode = 0; + this.errorMsg = 'failed'; + this.controller.loadUrl($rawfile('testMessageExt.html')); + try { + this.controller.runJavaScriptExt( + 'testBoolean()', + (error, result) => { + if (error) { + console.info(`run JavaScript error: ` + JSON.stringify(error)) + return; + } + if (result) { + try { + let type = result.getType(); + console.info('run JavaScript result.getType(): ' + type) + result.getArrayBuffer(); + } + catch (resError) { + console.log(`log error code: ${resError.code}, Message: ${resError.message}`); + this.errorTestCode = resError.code; + this.errorMsg = resError.message; + console.error("emitJsMessageExtGetArrayBufferError runJavaScriptExt getArrayBuffer result is :" + this.errorTestCode + this.errorMsg); + Utils.emitEvent(this.errorTestCode, 822) + Utils.emitEvent(this.errorMsg, 823) + return; + } + } + }); + } catch (error) { + console.error(`ErrorCode: ${error.code}, Message: ${error.message}`); + } + break; + } + case "emitJsMessageExtGetArrayError": { + this.errorTestCode = 0; + this.errorMsg = 'failed'; + this.controller.loadUrl($rawfile('testMessageExt.html')); + try { + this.controller.runJavaScriptExt( + 'testString()', + (error, result) => { + if (error) { + console.info(`run JavaScript error: ` + JSON.stringify(error)) + return; + } + if (result) { + try { + let type = result.getType(); + console.info('run JavaScript result.getType(): ' + type) + result.getArray(); + } + catch (resError) { + console.log(`log error code: ${resError.code}, Message: ${resError.message}`); + this.errorTestCode = resError.code; + this.errorMsg = resError.message; + console.error("emitJsMessageExtGetArrayError runJavaScriptExt getArray result is :" + this.errorTestCode + this.errorMsg); + Utils.emitEvent(this.errorTestCode, 824) + Utils.emitEvent(this.errorMsg, 825) + return; + } + } + }); + } catch (error) { + console.error(`ErrorCode: ${error.code}, Message: ${error.message}`); + } + break; + } + } + }) + } + Web({src:'www.example.com',controller:this.controller}) + .javaScriptAccess(this.javaScriptAccess) + .fileAccess(this.fileAccess) + .imageAccess(this.imageAccess) + .domStorageAccess(this.domStorageAccess) + .onlineImageAccess(this.onlineImageAccess) + .databaseAccess(this.databaseAccess) + .userAgent(this.userAgent) + .zoomAccess(this.zoomAccess) + .onPageEnd(err => { + try { + this.controller.runJavaScriptExt( + 'testArray()', + (error, result) => { + if (error) { + console.info(`run JavaScript error: ` + JSON.stringify(error)) + return; + } + if (result) { + try { + let type = result.getType(); + console.info('run JavaScript result.getType(): ' + type) + result.getString(); + } + catch (resError) { + console.log(`log error code: ${resError.code}, Message: ${resError.message}`); + return; + } + } + }); + console.info('url: ', err.url); + } catch (error) { + console.error(`ErrorCode: ${error.code}, Message: ${error.message}`); + } + }) + } + } +} \ No newline at end of file diff --git a/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/ets/MainAbility/pages/webViewContMessageError.ets b/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/ets/MainAbility/pages/webViewContMessageError.ets new file mode 100644 index 000000000..be205e0ea --- /dev/null +++ b/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/ets/MainAbility/pages/webViewContMessageError.ets @@ -0,0 +1,138 @@ +/** + * Copyright (c) 2023 iSoftStone Information Technology (Group) 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 events_emitter from '@ohos.events.emitter'; +import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry'; +import { Hypium } from '@ohos/hypium'; +import testsuite from '../../test/List.test'; +import Utils from '../../test/Utils'; +import web_webview from '@ohos.web.webview'; +// @ts-nocheck + +@Entry +@Component +struct webViewContMessageError { + controller: web_webview.WebviewController = new web_webview.WebviewController(); + controllerTwo: web_webview.WebviewController = new web_webview.WebviewController(); + ports: web_webview.WebMessagePort[]; + msgPort: web_webview.WebMessagePort[] = null; + @State sendFromEts: string = 'Send this message from ets to HTML'; + @State receivedFromHtml: string = 'Display received message send from HTML'; + @State str:string="emitPostMessageInitErr"; + @State userAgent:string = "Mozilla/5.0 (Window NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko)" + + " CHrome/105.0.0.0 Safari/537.36 Edg/105.0.1343.27"; + @State javaScriptAccess:boolean=true; + @State fileAccess:boolean=true; + @State domStorageAccess:boolean=false; + @State imageAccess:boolean=true; + @State onlineImageAccess:boolean=true; + @State databaseAccess:boolean=true; + @State errorCode: string = '0'; + @State errorMsg: string = 'failed'; + + onPageShow(){ + let valueChangeEvent={ + eventId:10, + priority:events_emitter.EventPriority.LOW + } + events_emitter.on(valueChangeEvent,this.valueChangeCallBack) + } + private valueChangeCallBack=(eventData)=>{ + console.info("webViewContMessageError page valueChangeCallBack"); + if(eventData != null){ + console.info("valueChangeCallBack:"+ JSON.stringify(eventData)); + if(eventData.data.ACTION != null){ + this.str = eventData.data.ACTION; + } + } + } + private jsObj={ + test:(res)=>{ + Utils.emitEvent(res,102); + }, + toString:(str)=>{ + console.info("ets toString:"+String(str)); + }, + register:(res)=>{ + Utils.emitEvent(res,86); + return "web222" + } + } + aboutToAppear(){ + let abilityDelegator: any + abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() + let abilityDelegatorArguments: any + abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments() + console.info('start run testcase!!!') + Hypium.hypiumTest(abilityDelegator, abilityDelegatorArguments, testsuite) + } + build(){ + Column(){ + Row() { + Button("messageEventErrorTest").key('webViewContMessageError').onClick(() => { + console.info("key==>" + this.str) + switch (this.str) { + case "emitPostMessageInitErr": { + try { + this.ports = this.controller.createWebMessagePorts(); + this.controllerTwo.postMessage('__init_port__', [this.ports[0]], '*'); + } catch (error) { + console.error(`emitPostMessageInitErr ErrorCode: ${error.code}, Message: ${error.message}`); + this.errorCode = error.code + this.errorMsg = error.message + } + this.controller.runJavaScript("test()",(res) => { + Utils.emitEvent(this.errorCode, 600) + Utils.emitEvent(this.errorMsg, 601) + }) + break; + } + case "emitPostMessageEventUnPortErr": { + try { + this.errorCode = '0'; + this.errorMsg = 'failed'; + this.ports = this.controller.createWebMessagePorts(); + this.controller.postMessage('__init_port__', [this.ports[0]], '*'); + if (this.ports && this.ports[1]) { + this.ports[1].close(); + } else { + console.log("ports is null, Please initialize first"); + } + this.ports[1].postMessageEvent("post message from ets to html5"); + } catch (error) { + console.error(`emitPostMessageEventUnPortErr ErrorCode: ${error.code}, Message: ${error.message}`); + this.errorCode = error.code + this.errorMsg = error.message + } + this.controller.runJavaScript("test()",(res) => { + Utils.emitEvent(this.errorCode, 602) + Utils.emitEvent(this.errorMsg, 603) + }) + break; + } + } + }) + } + Web({src:$rawfile('indexEdit.html'),controller:this.controller}) + .javaScriptAccess(this.javaScriptAccess) + .fileAccess(this.fileAccess) + .imageAccess(this.imageAccess) + .domStorageAccess(this.domStorageAccess) + .onlineImageAccess(this.onlineImageAccess) + .databaseAccess(this.databaseAccess) + .userAgent(this.userAgent) + } + } +} \ No newline at end of file diff --git a/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/ets/MainAbility/pages/webViewContPageOperationsError.ets b/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/ets/MainAbility/pages/webViewContPageOperationsError.ets new file mode 100644 index 000000000..70e33e357 --- /dev/null +++ b/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/ets/MainAbility/pages/webViewContPageOperationsError.ets @@ -0,0 +1,216 @@ +/** + * Copyright (c) 2023 iSoftStone Information Technology (Group) 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 events_emitter from '@ohos.events.emitter'; +import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry'; +import { Hypium } from '@ohos/hypium'; +import testsuite from '../../test/List.test'; +import Utils from '../../test/Utils'; +import web_webview from '@ohos.web.webview'; +// @ts-nocheck + +@Entry +@Component +struct webViewContPageOperationsError { + controller: web_webview.WebviewController = new web_webview.WebviewController(); + controllerTwo: web_webview.WebviewController = new web_webview.WebviewController(); + @State str:string="emitAccessForwardInitErr"; + @State userAgent:string = "Mozilla/5.0 (Window NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko)" + + " CHrome/105.0.0.0 Safari/537.36 Edg/105.0.1343.27"; + @State javaScriptAccess:boolean=true; + @State fileAccess:boolean=true; + @State domStorageAccess:boolean=false; + @State imageAccess:boolean=true; + @State onlineImageAccess:boolean=true; + @State databaseAccess:boolean=true; + @State errorCode: string = '0'; + @State errorMsg: string = 'failed'; + @State steps: number = 2; + + onPageShow(){ + let valueChangeEvent={ + eventId:10, + priority:events_emitter.EventPriority.LOW + } + events_emitter.on(valueChangeEvent,this.valueChangeCallBack) + } + private valueChangeCallBack=(eventData)=>{ + console.info("webViewContPageOperationsError page valueChangeCallBack"); + if(eventData != null){ + console.info("valueChangeCallBack:"+ JSON.stringify(eventData)); + if(eventData.data.ACTION != null){ + this.str = eventData.data.ACTION; + } + } + } + + build(){ + Column(){ + Row() { + Button("pageOperationsErrorTest").key('webViewContPageOperationsError').onClick(() => { + console.info("key==>" + this.str) + switch (this.str) { + case "emitAccessForwardInitErr": { + try { + this.controllerTwo.accessForward(); + } catch (error) { + console.error(`emitAccessForwardInitErr ErrorCode: ${error.code}, Message: ${error.message}`); + this.errorCode = error.code + this.errorMsg = error.message + } + Utils.emitEvent(this.errorCode, 630) + Utils.emitEvent(this.errorMsg, 631) + break; + } + case "emitForwardInitErr": { + try { + this.errorCode = '0'; + this.errorMsg = 'failed'; + this.controllerTwo.forward(); + } catch (error) { + console.error(`emitForwardInitErr ErrorCode: ${error.code}, Message: ${error.message}`); + this.errorCode = error.code + this.errorMsg = error.message + } + Utils.emitEvent(this.errorCode, 632) + Utils.emitEvent(this.errorMsg, 633) + break; + } + case "emitAccessBackwardInitErr": { + try { + this.errorCode = '0'; + this.errorMsg = 'failed'; + this.controllerTwo.accessBackward(); + } catch (error) { + console.error(`emitAccessBackwardInitErr ErrorCode: ${error.code}, Message: ${error.message}`); + this.errorCode = error.code + this.errorMsg = error.message + } + Utils.emitEvent(this.errorCode, 634) + Utils.emitEvent(this.errorMsg, 635) + break; + } + case "emitBackwardInitErr": { + try { + this.errorCode = '0'; + this.errorMsg = 'failed'; + this.controllerTwo.backward(); + } catch (error) { + console.error(`emitBackwardInitErr ErrorCode: ${error.code}, Message: ${error.message}`); + this.errorCode = error.code + this.errorMsg = error.message + } + Utils.emitEvent(this.errorCode, 636) + Utils.emitEvent(this.errorMsg, 637) + break; + } + case "emitOnActiveInitErr": { + try { + this.errorCode = '0'; + this.errorMsg = 'failed'; + this.controllerTwo.onActive(); + } catch (error) { + console.error(`emitOnActiveInitErr ErrorCode: ${error.code}, Message: ${error.message}`); + this.errorCode = error.code + this.errorMsg = error.message + } + Utils.emitEvent(this.errorCode, 638) + Utils.emitEvent(this.errorMsg, 639) + break; + } + case "emitOnInactiveInitErr": { + try { + this.errorCode = '0'; + this.errorMsg = 'failed'; + this.controllerTwo.onInactive(); + } catch (error) { + console.error(`emitOnInactiveInitErr ErrorCode: ${error.code}, Message: ${error.message}`); + this.errorCode = error.code + this.errorMsg = error.message + } + Utils.emitEvent(this.errorCode, 640) + Utils.emitEvent(this.errorMsg, 641) + break; + } + case "emitRefreshInitErr": { + try { + this.errorCode = '0'; + this.errorMsg = 'failed'; + this.controllerTwo.refresh(); + } catch (error) { + console.error(`emitRefreshInitErr ErrorCode: ${error.code}, Message: ${error.message}`); + this.errorCode = error.code + this.errorMsg = error.message + } + Utils.emitEvent(this.errorCode, 642) + Utils.emitEvent(this.errorMsg, 643) + break; + } + case "emitAccessStepInitErr": { + try { + this.errorCode = '0'; + this.errorMsg = 'failed'; + this.controllerTwo.accessStep(this.steps); + } catch (error) { + console.error(`emitAccessStepInitErr ErrorCode: ${error.code}, Message: ${error.message}`); + this.errorCode = error.code + this.errorMsg = error.message + } + Utils.emitEvent(this.errorCode, 644) + Utils.emitEvent(this.errorMsg, 645) + break; + } + case "emitClearHistoryInitErr": { + try { + this.errorCode = '0'; + this.errorMsg = 'failed'; + this.controllerTwo.clearHistory(); + } catch (error) { + console.error(`emitClearHistoryInitErr ErrorCode: ${error.code}, Message: ${error.message}`); + this.errorCode = error.code + this.errorMsg = error.message + } + Utils.emitEvent(this.errorCode, 646) + Utils.emitEvent(this.errorMsg, 647) + break; + } + case "emitGetHitTestInitErr": { + try { + this.errorCode = '0'; + this.errorMsg = 'failed'; + this.controllerTwo.getHitTest(); + } catch (error) { + console.error(`emitGetHitTestInitErr ErrorCode: ${error.code}, Message: ${error.message}`); + this.errorCode = error.code + this.errorMsg = error.message + } + Utils.emitEvent(this.errorCode, 648) + Utils.emitEvent(this.errorMsg, 649) + break; + } + } + }) + } + Web({src:'www.example.com',controller:this.controller}) + .javaScriptAccess(this.javaScriptAccess) + .fileAccess(this.fileAccess) + .imageAccess(this.imageAccess) + .domStorageAccess(this.domStorageAccess) + .onlineImageAccess(this.onlineImageAccess) + .databaseAccess(this.databaseAccess) + .userAgent(this.userAgent) + } + } +} \ No newline at end of file diff --git a/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/ets/MainAbility/pages/webViewContStoreWebArchiveError.ets b/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/ets/MainAbility/pages/webViewContStoreWebArchiveError.ets new file mode 100644 index 000000000..52fb27bc8 --- /dev/null +++ b/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/ets/MainAbility/pages/webViewContStoreWebArchiveError.ets @@ -0,0 +1,213 @@ +/** + * Copyright (c) 2023 iSoftStone Information Technology (Group) 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 events_emitter from '@ohos.events.emitter'; +import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry'; +import { Hypium } from '@ohos/hypium'; +import testsuite from '../../test/List.test'; +import Utils from '../../test/Utils'; +import web_webview from '@ohos.web.webview'; +// @ts-nocheck + +@Entry +@Component +struct webViewContStoreWebArchiveError { + controller: web_webview.WebviewController = new web_webview.WebviewController(); + controllerTwo: web_webview.WebviewController = new web_webview.WebviewController(); + @State str:string="emitStoreWebArchiveCallBackInitErr"; + @State userAgent:string = "Mozilla/5.0 (Window NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko)" + + " CHrome/105.0.0.0 Safari/537.36 Edg/105.0.1343.27"; + @State javaScriptAccess:boolean=true; + @State fileAccess:boolean=true; + @State domStorageAccess:boolean=false; + @State imageAccess:boolean=true; + @State onlineImageAccess:boolean=true; + @State databaseAccess:boolean=true; + @State errorCode: string = '0'; + @State errorTestCode: number = 0; + @State errorMsg: string = 'failed'; + + onPageShow(){ + let valueChangeEvent={ + eventId:10, + priority:events_emitter.EventPriority.LOW + } + events_emitter.on(valueChangeEvent,this.valueChangeCallBack) + } + private valueChangeCallBack=(eventData)=>{ + console.info("webViewContStoreWebArchiveError page valueChangeCallBack"); + if(eventData != null){ + console.info("valueChangeCallBack:"+ JSON.stringify(eventData)); + if(eventData.data.ACTION != null){ + this.str = eventData.data.ACTION; + } + } + } + + build(){ + Column(){ + Row() { + Button("storeWebArchiveErrorTest").key('webViewContStoreWebArchiveError').onClick(() => { + console.info("key==>" + this.str) + switch (this.str) { + case "emitStoreWebArchiveCallBackInitErr": { + try { + this.controllerTwo.storeWebArchive("/data/storage/el2/base/", true, (error, filename) => { + if (error) { + console.info(`save web archive error: ` + JSON.stringify(error)); + return; + } + if (filename != null) { + console.info(`save web archive success: ${filename}`); + } + }); + } catch (error) { + console.error(`emitStoreWebArchiveCallBackInitErr ErrorCode: ${error.code}, Message: ${error.message}`); + this.errorCode = error.code; + this.errorMsg = error.message; + } + Utils.emitEvent(this.errorCode, 700) + Utils.emitEvent(this.errorMsg, 701) + break; + } + case "emitStoreWebArchiveCallBackPathErr": { + try { + this.errorCode = '0'; + this.errorMsg = 'failed'; + this.controller.storeWebArchive("/ErrorPath/Error/Err/E12345/Error.html", false, (error, filename) => { + if (error) { + console.info(`save web archive error: ` + JSON.stringify(error)); + this.errorTestCode = error.code; + this.errorMsg = error.message; + console.error("emitStoreWebArchiveCallBackPathErr storeWebArchive return result is :" + this.errorTestCode + this.errorMsg); + Utils.emitEvent(this.errorTestCode, 702) + Utils.emitEvent(this.errorMsg, 703) + return; + } + if (filename != null) { + console.info(`save web archive success: ${filename}`); + } + }); + } catch (error) { + console.error(`emitStoreWebArchiveCallBackPathErr ErrorCode: ${error.code}, Message: ${error.message}`); + } + break; + } + case "emitStoreWebArchiveCallBackUnAccessErr": { + try { + this.errorTestCode = 0; + this.errorMsg = 'failed'; + this.controller.storeWebArchive("/proc/sys/net/core/", true, (error, filename) => { + if (error) { + console.info(`save web archive error: ` + JSON.stringify(error)); + this.errorTestCode = error.code; + this.errorMsg = error.message; + console.error("emitStoreWebArchiveCallBackUnAccessErr storeWebArchive return result is :" + this.errorTestCode + this.errorMsg); + Utils.emitEvent(this.errorTestCode, 704) + Utils.emitEvent(this.errorMsg, 705) + return; + } + if (filename != null) { + console.info(`save web archive success: ${filename}`) + } + }); + } catch (error) { + console.error(`emitStoreWebArchiveCallBackUnAccessErr ErrorCode: ${error.code}, Message: ${error.message}`); + } + break; + } + + case "emitStoreWebArchivePromiseInitErr": { + try { + this.errorCode = '0'; + this.errorMsg = 'failed'; + this.controllerTwo.storeWebArchive("/data/storage/el2/base/", true) + .then(filename => { + if (filename != null) { + console.info(`save web archive success: ${filename}`); + } + }) + .catch(error => { + console.log('error: ' + JSON.stringify(error)); + }) + } catch (error) { + console.error(`emitStoreWebArchivePromiseInitErr ErrorCode: ${error.code}, Message: ${error.message}`); + this.errorCode = error.code; + this.errorMsg = error.message; + } + Utils.emitEvent(this.errorCode, 706) + Utils.emitEvent(this.errorMsg, 707) + break; + } + case "emitStoreWebArchivePromisePathErr": { + try { + this.errorTestCode = 0; + this.errorMsg = 'failed'; + this.controller.storeWebArchive("/ErrorPath/Error/Err/E12345/Error.html", false) + .then(filename => { + if (filename != null) { + console.info(`save web archive success: ${filename}`); + } + }) + .catch(error => { + console.log('error: ' + JSON.stringify(error)); + this.errorTestCode = error.code; + this.errorMsg = error.message; + console.error("emitStoreWebArchivePromisePathErr storeWebArchive return result is :" + this.errorTestCode + this.errorMsg); + Utils.emitEvent(this.errorTestCode, 708) + Utils.emitEvent(this.errorMsg, 709) + }) + } catch (error) { + console.error(`emitStoreWebArchivePromisePathErr ErrorCode: ${error.code}, Message: ${error.message}`); + } + break; + } + case "emitStoreWebArchivePromiseUnAccessErr": { + try { + this.errorTestCode = 0; + this.errorMsg = 'failed'; + this.controller.storeWebArchive("/proc/sys/net/core/", true) + .then(filename => { + if (filename != null) { + console.info(`save web archive success: ${filename}`); + } + }) + .catch(error => { + console.log('error: ' + JSON.stringify(error)); + this.errorTestCode = error.code; + this.errorMsg = error.message; + console.error("emitStoreWebArchivePromiseUnAccessErr storeWebArchive return result is :" + this.errorTestCode + this.errorMsg); + Utils.emitEvent(this.errorTestCode, 710) + Utils.emitEvent(this.errorMsg, 711) + }) + } catch (error) { + console.error(`emitStoreWebArchivePromiseUnAccessErr ErrorCode: ${error.code}, Message: ${error.message}`); + } + break; + } + } + }) + } + Web({src:$rawfile('index.html'),controller:this.controller}) + .javaScriptAccess(this.javaScriptAccess) + .fileAccess(this.fileAccess) + .imageAccess(this.imageAccess) + .domStorageAccess(this.domStorageAccess) + .onlineImageAccess(this.onlineImageAccess) + .databaseAccess(this.databaseAccess) + .userAgent(this.userAgent) + } + } +} \ No newline at end of file diff --git a/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/ets/MainAbility/pages/webViewContWebMessageExtReturnError.ets b/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/ets/MainAbility/pages/webViewContWebMessageExtReturnError.ets new file mode 100644 index 000000000..e1a2f5092 --- /dev/null +++ b/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/ets/MainAbility/pages/webViewContWebMessageExtReturnError.ets @@ -0,0 +1,311 @@ +/** + * Copyright (c) 2023 iSoftStone Information Technology (Group) 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 events_emitter from '@ohos.events.emitter'; +import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry'; +import { Hypium } from '@ohos/hypium'; +import testsuite from '../../test/List.test'; +import Utils from '../../test/Utils'; +import web_webview from '@ohos.web.webview'; +// @ts-nocheck + +@Entry +@Component +struct webViewContWebMessageExtReturnError { + controller: web_webview.WebviewController = new web_webview.WebviewController(); + ports: web_webview.WebMessagePort[] = null; + nativePort: web_webview.WebMessagePort = null; + @State str:string="emitWebMessageExtGetStringError"; + @State userAgent:string = "Mozilla/5.0 (Window NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko)" + + " CHrome/105.0.0.0 Safari/537.36 Edg/105.0.1343.27"; + @State javaScriptAccess:boolean=true; + @State fileAccess:boolean=true; + @State domStorageAccess:boolean=false; + @State imageAccess:boolean=true; + @State onlineImageAccess:boolean=true; + @State databaseAccess:boolean=true; + @State zoomAccess:boolean=false; + @State errorCode: string = '0'; + @State errorTestCode: number = 0; + @State errorMsg: string = 'failed'; + @State webResult: string = '' + message: web_webview.WebMessageExt = new web_webview.WebMessageExt(); + + onPageShow(){ + let valueChangeEvent={ + eventId:10, + priority:events_emitter.EventPriority.LOW + } + events_emitter.on(valueChangeEvent,this.valueChangeCallBack) + } + private valueChangeCallBack=(eventData)=>{ + console.info("webViewContWebMessageExtReturnError page valueChangeCallBack"); + if(eventData != null){ + console.info("valueChangeCallBack:"+ JSON.stringify(eventData)); + if(eventData.data.ACTION != null){ + this.str = eventData.data.ACTION; + } + } + } + + build(){ + Column(){ + Row() { + Button("WebMessageExtErrorTest").key('webViewContWebMessageExtReturnError').onClick(() => { + console.info("key==>" + this.str) + switch (this.str) { + case "emitWebMessageExtGetStringError": { + this.ports = this.controller.createWebMessagePorts(true); + this.controller.postMessage("init_web_messageport", [this.ports[1]], "*"); + this.nativePort = this.ports[0]; + this.controller.runJavaScript( + 'postErrorToApp()', + (error, result) => { + if (error) { + console.info(`run JavaScript error: ` + JSON.stringify(error)) + return; + } + if (result) { + this.webResult = result + console.info(`The postErrorToApp() return value is: ${result}`) + } + }); + this.nativePort.onMessageEventExt((result) => { + console.log("In eTS side got message"); + try { + var type = result.getType(); + console.log("In eTS side getType:" + type); + result.getString() + } catch (resError) { + console.log(`log error code: ${resError.code}, Message: ${resError.message}`); + this.errorTestCode = resError.code; + this.errorMsg = resError.message; + console.error("emitWebMessageExtGetStringError onMessageEventExt getString result is :" + this.errorTestCode + this.errorMsg); + Utils.emitEvent(this.errorTestCode, 826) + Utils.emitEvent(this.errorMsg, 827) + } + }); + break; + } + case "emitWebMessageExtGetNumberError": { + this.errorTestCode = 0; + this.errorMsg = 'failed'; + this.ports = this.controller.createWebMessagePorts(true); + this.controller.postMessage("init_web_messageport", [this.ports[1]], "*"); + this.nativePort = this.ports[0]; + this.controller.runJavaScript( + 'postArrayToApp()', + (error, result) => { + if (error) { + console.info(`run JavaScript error: ` + JSON.stringify(error)) + return; + } + if (result) { + this.webResult = result + console.info(`The postArrayToApp() return value is: ${result}`) + } + }); + this.nativePort.onMessageEventExt((result) => { + console.log("In eTS side got message"); + try { + var type = result.getType(); + console.log("In eTS side getType:" + type); + result.getNumber() + } catch (resError) { + console.log(`log error code: ${resError.code}, Message: ${resError.message}`); + this.errorTestCode = resError.code; + this.errorMsg = resError.message; + console.error("emitWebMessageExtGetNumberError onMessageEventExt getNumber result is :" + this.errorTestCode + this.errorMsg); + Utils.emitEvent(this.errorTestCode, 828) + Utils.emitEvent(this.errorMsg, 829) + } + }); + break; + } + case "emitWebMessageExtGetBooleanError": { + this.errorTestCode = 0; + this.errorMsg = 'failed'; + this.ports = this.controller.createWebMessagePorts(true); + this.controller.postMessage("init_web_messageport", [this.ports[1]], "*"); + this.nativePort = this.ports[0]; + this.controller.runJavaScript( + 'postArrayBufferToApp()', + (error, result) => { + if (error) { + console.info(`run JavaScript error: ` + JSON.stringify(error)) + return; + } + if (result) { + this.webResult = result + console.info(`The postArrayBufferToApp() return value is: ${result}`) + } + }); + this.nativePort.onMessageEventExt((result) => { + console.log("In eTS side got message"); + try { + var type = result.getType(); + console.log("In eTS side getType:" + type); + result.getBoolean() + } catch (resError) { + console.log(`log error code: ${resError.code}, Message: ${resError.message}`); + this.errorTestCode = resError.code; + this.errorMsg = resError.message; + console.error("emitWebMessageExtGetBooleanError onMessageEventExt getBoolean result is :" + this.errorTestCode + this.errorMsg); + Utils.emitEvent(this.errorTestCode, 830) + Utils.emitEvent(this.errorMsg, 831) + } + }); + break; + } + case "emitWebMessageExtGetArrayBufferError": { + this.errorTestCode = 0; + this.errorMsg = 'failed'; + this.ports = this.controller.createWebMessagePorts(true); + this.controller.postMessage("init_web_messageport", [this.ports[1]], "*"); + this.nativePort = this.ports[0]; + this.controller.runJavaScript( + 'postBooleanToApp()', + (error, result) => { + if (error) { + console.info(`run JavaScript error: ` + JSON.stringify(error)) + return; + } + if (result) { + this.webResult = result + console.info(`The postBooleanToApp() return value is: ${result}`) + } + }); + this.nativePort.onMessageEventExt((result) => { + console.log("In eTS side got message"); + try { + var type = result.getType(); + console.log("In eTS side getType:" + type); + result.getArrayBuffer() + } catch (resError) { + console.log(`log error code: ${resError.code}, Message: ${resError.message}`); + this.errorTestCode = resError.code; + this.errorMsg = resError.message; + console.error("emitWebMessageExtGetArrayBufferError onMessageEventExt getArrayBuffer result is :" + this.errorTestCode + this.errorMsg); + Utils.emitEvent(this.errorTestCode, 832) + Utils.emitEvent(this.errorMsg, 833) + } + }); + break; + } + case "emitWebMessageExtGetArrayError": { + this.errorTestCode = 0; + this.errorMsg = 'failed'; + this.ports = this.controller.createWebMessagePorts(true); + this.controller.postMessage("init_web_messageport", [this.ports[1]], "*"); + this.nativePort = this.ports[0]; + this.controller.runJavaScript( + 'postNumberToApp()', + (error, result) => { + if (error) { + console.info(`run JavaScript error: ` + JSON.stringify(error)) + return; + } + if (result) { + this.webResult = result + console.info(`The postNumberToApp() return value is: ${result}`) + } + }); + this.nativePort.onMessageEventExt((result) => { + console.log("In eTS side got message"); + try { + var type = result.getType(); + console.log("In eTS side getType:" + type); + result.getArray() + } catch (resError) { + console.log(`log error code: ${resError.code}, Message: ${resError.message}`); + this.errorTestCode = resError.code; + this.errorMsg = resError.message; + console.error("emitWebMessageExtGetArrayError onMessageEventExt getArray result is :" + this.errorTestCode + this.errorMsg); + Utils.emitEvent(this.errorTestCode, 834) + Utils.emitEvent(this.errorMsg, 835) + } + }); + break; + } + case "emitWebMessageExtGetErrorError": { + this.errorTestCode = 0; + this.errorMsg = 'failed'; + this.ports = this.controller.createWebMessagePorts(true); + this.controller.postMessage("init_web_messageport", [this.ports[1]], "*"); + this.nativePort = this.ports[0]; + this.controller.runJavaScript( + 'postStringToApp()', + (error, result) => { + if (error) { + console.info(`run JavaScript error: ` + JSON.stringify(error)) + return; + } + if (result) { + this.webResult = result + console.info(`The postStringToApp() return value is: ${result}`) + } + }); + this.nativePort.onMessageEventExt((result) => { + console.log("In eTS side got message"); + try { + var type = result.getType(); + console.log("In eTS side getType:" + type); + result.getError() + } catch (resError) { + console.log(`log error code: ${resError.code}, Message: ${resError.message}`); + this.errorTestCode = resError.code; + this.errorMsg = resError.message; + console.error("emitWebMessageExtGetErrorError onMessageEventExt getError result is :" + this.errorTestCode + this.errorMsg); + Utils.emitEvent(this.errorTestCode, 836) + Utils.emitEvent(this.errorMsg, 837) + } + }); + break; + } + } + }) + } + Web({src:$rawfile('indexEdit.html'),controller:this.controller}) + .javaScriptAccess(this.javaScriptAccess) + .fileAccess(this.fileAccess) + .imageAccess(this.imageAccess) + .domStorageAccess(this.domStorageAccess) + .onlineImageAccess(this.onlineImageAccess) + .databaseAccess(this.databaseAccess) + .userAgent(this.userAgent) + .zoomAccess(this.zoomAccess) + .onPageEnd(err => { + console.log("In eTS side message onPageEnd init mesaage channel"); + console.log("1.create message port") + this.ports = this.controller.createWebMessagePorts(true); + console.log("2.send port1 to HTML5") + this.controller.postMessage("init_web_messageport", [this.ports[1]], "*"); + console.log("3.save port0 to current path") + this.nativePort = this.ports[0]; + console.log("4.set callback function") + this.nativePort.onMessageEventExt((result) => { + console.log("In eTS side got message"); + try { + var type = result.getType(); + console.log("In eTS side getType:" + type); + } catch (resError) { + console.log(`log error code: ${resError.code}, Message: ${resError.message}`); + } + }); + console.info('url: ', err.url); + }) + } + } +} \ No newline at end of file diff --git a/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/ets/MainAbility/pages/webViewContZoomAndOthersError.ets b/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/ets/MainAbility/pages/webViewContZoomAndOthersError.ets new file mode 100644 index 000000000..76d8c74ad --- /dev/null +++ b/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/ets/MainAbility/pages/webViewContZoomAndOthersError.ets @@ -0,0 +1,331 @@ +/** + * Copyright (c) 2023 iSoftStone Information Technology (Group) 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 events_emitter from '@ohos.events.emitter'; +import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry'; +import { Hypium } from '@ohos/hypium'; +import testsuite from '../../test/List.test'; +import Utils from '../../test/Utils'; +import web_webview from '@ohos.web.webview'; +// @ts-nocheck + +@Entry +@Component +struct webViewContZoomAndOthersError { + controller: web_webview.WebviewController = new web_webview.WebviewController(); + controllerTwo: web_webview.WebviewController = new web_webview.WebviewController(); + @State str:string="emitZoomInitErr"; + @State userAgent:string = "Mozilla/5.0 (Window NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko)" + + " CHrome/105.0.0.0 Safari/537.36 Edg/105.0.1343.27"; + @State javaScriptAccess:boolean=true; + @State fileAccess:boolean=true; + @State domStorageAccess:boolean=false; + @State imageAccess:boolean=true; + @State onlineImageAccess:boolean=true; + @State databaseAccess:boolean=true; + @State zoomAccess:boolean=false; + @State errorCode: string = '0'; + @State errorMsg: string = 'failed'; + @State factor: number = 1; + @State searchString: string = "test"; + + onPageShow(){ + let valueChangeEvent={ + eventId:10, + priority:events_emitter.EventPriority.LOW + } + events_emitter.on(valueChangeEvent,this.valueChangeCallBack) + } + private valueChangeCallBack=(eventData)=>{ + console.info("webViewContZoomAndOthersError page valueChangeCallBack"); + if(eventData != null){ + console.info("valueChangeCallBack:"+ JSON.stringify(eventData)); + if(eventData.data.ACTION != null){ + this.str = eventData.data.ACTION; + } + } + } + + build(){ + Column(){ + Row() { + Button("zoomAndOthersErrorTest").key('webViewContZoomAndOthersError').onClick(() => { + console.info("key==>" + this.str) + switch (this.str) { + case "emitZoomInitErr": { + try { + this.controllerTwo.zoom(this.factor); + } catch (error) { + console.error(`emitZoomInitErr ErrorCode: ${error.code}, Message: ${error.message}`); + this.errorCode = error.code; + this.errorMsg = error.message; + } + Utils.emitEvent(this.errorCode, 664) + Utils.emitEvent(this.errorMsg, 665) + break; + } + case "emitZoomEnableErr": { + try { + this.errorCode = '0'; + this.errorMsg = 'failed'; + this.controller.zoom(this.factor); + } catch (error) { + console.error(`emitZoomEnableErr ErrorCode: ${error.code}, Message: ${error.message}`); + this.errorCode = error.code; + this.errorMsg = error.message; + } + Utils.emitEvent(this.errorCode, 666) + Utils.emitEvent(this.errorMsg, 667) + break; + } + case "emitSearchAllAsyncInitErr": { + try { + this.errorCode = '0'; + this.errorMsg = 'failed'; + this.controllerTwo.searchAllAsync(this.searchString); + } catch (error) { + console.error(`emitSearchAllAsyncInitErr ErrorCode: ${error.code}, Message: ${error.message}`); + this.errorCode = error.code; + this.errorMsg = error.message; + } + Utils.emitEvent(this.errorCode, 668) + Utils.emitEvent(this.errorMsg, 669) + break; + } + case "emitClearMatchesInitErr": { + try { + this.errorCode = '0'; + this.errorMsg = 'failed'; + this.controllerTwo.clearMatches(); + } catch (error) { + console.error(`emitClearMatchesInitErr ErrorCode: ${error.code}, Message: ${error.message}`); + this.errorCode = error.code; + this.errorMsg = error.message; + } + Utils.emitEvent(this.errorCode, 670) + Utils.emitEvent(this.errorMsg, 671) + break; + } + case "emitSearchNextInitErr": { + try { + this.errorCode = '0'; + this.errorMsg = 'failed'; + this.controllerTwo.searchNext(true); + } catch (error) { + console.error(`emitSearchNextInitErr ErrorCode: ${error.code}, Message: ${error.message}`); + this.errorCode = error.code; + this.errorMsg = error.message; + } + Utils.emitEvent(this.errorCode, 672) + Utils.emitEvent(this.errorMsg, 673) + break; + } + case "emitClearSslCacheInitErr": { + try { + this.errorCode = '0'; + this.errorMsg = 'failed'; + this.controllerTwo.clearSslCache(); + } catch (error) { + console.error(`emitClearSslCacheInitErr ErrorCode: ${error.code}, Message: ${error.message}`); + this.errorCode = error.code; + this.errorMsg = error.message; + } + Utils.emitEvent(this.errorCode, 674) + Utils.emitEvent(this.errorMsg, 675) + break; + } + case "emitClearClientAuthenticationCacheInitErr": { + try { + this.errorCode = '0'; + this.errorMsg = 'failed'; + this.controllerTwo.clearClientAuthenticationCache(); + } catch (error) { + console.error(`emitClearClientAuthenticationCacheInitErr ErrorCode: ${error.code}, Message: ${error.message}`); + this.errorCode = error.code; + this.errorMsg = error.message; + } + Utils.emitEvent(this.errorCode, 676) + Utils.emitEvent(this.errorMsg, 677) + break; + } + case "emitCreateWebMessagePortsInitErr": { + try { + this.errorCode = '0'; + this.errorMsg = 'failed'; + this.controllerTwo.createWebMessagePorts(); + } catch (error) { + console.error(`emitCreateWebMessagePortsInitErr ErrorCode: ${error.code}, Message: ${error.message}`); + this.errorCode = error.code; + this.errorMsg = error.message; + } + Utils.emitEvent(this.errorCode, 678) + Utils.emitEvent(this.errorMsg, 679) + break; + } + case "emitRequestFocusInitErr": { + try { + this.errorCode = '0'; + this.errorMsg = 'failed'; + this.controllerTwo.requestFocus(); + } catch (error) { + console.error(`emitRequestFocusInitErr ErrorCode: ${error.code}, Message: ${error.message}`); + this.errorCode = error.code; + this.errorMsg = error.message; + } + Utils.emitEvent(this.errorCode, 680) + Utils.emitEvent(this.errorMsg, 681) + break; + } + case "emitZoomInInitErr": { + try { + this.errorCode = '0'; + this.errorMsg = 'failed'; + this.controllerTwo.zoomIn(); + } catch (error) { + console.error(`emitZoomInInitErr ErrorCode: ${error.code}, Message: ${error.message}`); + this.errorCode = error.code; + this.errorMsg = error.message; + } + Utils.emitEvent(this.errorCode, 682) + Utils.emitEvent(this.errorMsg, 683) + break; + } + case "emitZoomInEnableErr": { + try { + this.errorCode = '0'; + this.errorMsg = 'failed'; + this.controller.zoomIn(); + } catch (error) { + console.error(`emitZoomInEnableErr ErrorCode: ${error.code}, Message: ${error.message}`); + this.errorCode = error.code; + this.errorMsg = error.message; + } + Utils.emitEvent(this.errorCode, 684) + Utils.emitEvent(this.errorMsg, 685) + break; + } + case "emitZoomOutInitErr": { + try { + this.errorCode = '0'; + this.errorMsg = 'failed'; + this.controllerTwo.zoomOut(); + } catch (error) { + console.error(`emitZoomOutInitErr ErrorCode: ${error.code}, Message: ${error.message}`); + this.errorCode = error.code; + this.errorMsg = error.message; + } + Utils.emitEvent(this.errorCode, 686) + Utils.emitEvent(this.errorMsg, 687) + break; + } + case "emitZoomOutEnableErr": { + try { + this.errorCode = '0'; + this.errorMsg = 'failed'; + this.controller.zoomOut(); + } catch (error) { + console.error(`emitZoomOutEnableErr ErrorCode: ${error.code}, Message: ${error.message}`); + this.errorCode = error.code; + this.errorMsg = error.message; + } + Utils.emitEvent(this.errorCode, 688) + Utils.emitEvent(this.errorMsg, 689) + break; + } + case "emitGetHitTestValueInitErr": { + try { + this.errorCode = '0'; + this.errorMsg = 'failed'; + this.controllerTwo.getHitTestValue(); + } catch (error) { + console.error(`emitGetHitTestValueInitErr ErrorCode: ${error.code}, Message: ${error.message}`); + this.errorCode = error.code; + this.errorMsg = error.message; + } + Utils.emitEvent(this.errorCode, 690) + Utils.emitEvent(this.errorMsg, 691) + break; + } + case "emitGetWebIdInitErr": { + try { + this.errorCode = '0'; + this.errorMsg = 'failed'; + this.controllerTwo.getWebId(); + } catch (error) { + console.error(`emitGetWebIdInitErr ErrorCode: ${error.code}, Message: ${error.message}`); + this.errorCode = error.code; + this.errorMsg = error.message; + } + Utils.emitEvent(this.errorCode, 692) + Utils.emitEvent(this.errorMsg, 693) + break; + } + case "emitGetUserAgentInitErr": { + try { + this.errorCode = '0'; + this.errorMsg = 'failed'; + this.controllerTwo.getUserAgent(); + } catch (error) { + console.error(`emitGetUserAgentInitErr ErrorCode: ${error.code}, Message: ${error.message}`); + this.errorCode = error.code; + this.errorMsg = error.message; + } + Utils.emitEvent(this.errorCode, 694) + Utils.emitEvent(this.errorMsg, 695) + break; + } + case "emitGetTitleInitErr": { + try { + this.errorCode = '0'; + this.errorMsg = 'failed'; + this.controllerTwo.getTitle(); + } catch (error) { + console.error(`emitGetTitleInitErr ErrorCode: ${error.code}, Message: ${error.message}`); + this.errorCode = error.code; + this.errorMsg = error.message; + } + Utils.emitEvent(this.errorCode, 696) + Utils.emitEvent(this.errorMsg, 697) + break; + } + case "emitGetPageHeightInitErr": { + try { + this.errorCode = '0'; + this.errorMsg = 'failed'; + this.controllerTwo.getPageHeight(); + } catch (error) { + console.error(`emitGetPageHeightInitErr ErrorCode: ${error.code}, Message: ${error.message}`); + this.errorCode = error.code; + this.errorMsg = error.message; + } + Utils.emitEvent(this.errorCode, 698) + Utils.emitEvent(this.errorMsg, 699) + break; + } + } + }) + } + Web({src:$rawfile('index.html'),controller:this.controller}) + .javaScriptAccess(this.javaScriptAccess) + .fileAccess(this.fileAccess) + .imageAccess(this.imageAccess) + .domStorageAccess(this.domStorageAccess) + .onlineImageAccess(this.onlineImageAccess) + .databaseAccess(this.databaseAccess) + .userAgent(this.userAgent) + .zoomAccess(this.zoomAccess) + } + } +} \ No newline at end of file diff --git a/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts b/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts new file mode 100644 index 000000000..a4ee2f165 --- /dev/null +++ b/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts @@ -0,0 +1,78 @@ +/* + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import TestRunner from '@ohos.application.testRunner' +import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry' + +var abilityDelegator = undefined +var abilityDelegatorArguments = undefined + +function translateParamsToString(parameters) { + const keySet = new Set([ + '-s class', '-s notClass', '-s suite', '-s it', + '-s level', '-s testType', '-s size', '-s timeout', + '-s dryRun' + ]) + let targetParams = ''; + for (const key in parameters) { + if (keySet.has(key)) { + targetParams = `${targetParams} ${key} ${parameters[key]}` + } + } + return targetParams.trim() +} + +async function onAbilityCreateCallback() { + console.log("onAbilityCreateCallback"); +} + +async function addAbilityMonitorCallback(err: any) { + console.info("addAbilityMonitorCallback : " + JSON.stringify(err)) +} + +export default class OpenHarmonyTestRunner implements TestRunner { + constructor() { + } + + onPrepare() { + console.info("OpenHarmonyTestRunner OnPrepare ") + } + + async onRun() { + console.log('OpenHarmonyTestRunner onRun run') + abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments() + abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() + var testAbilityName = abilityDelegatorArguments.bundleName + '.MainAbility' + let lMonitor = { + abilityName: testAbilityName, + onAbilityCreate: onAbilityCreateCallback, + }; + abilityDelegator.addAbilityMonitor(lMonitor, addAbilityMonitorCallback) + var cmd = 'aa start -d 0 -a com.example.myapplication.MainAbility' + ' -b ' + abilityDelegatorArguments.bundleName + cmd += ' '+translateParamsToString(abilityDelegatorArguments.parameters) + var debug = abilityDelegatorArguments.parameters["-D"] + if (debug == 'true') + { + cmd += ' -D' + } + console.info('cmd : '+cmd) + abilityDelegator.executeShellCommand(cmd, + (err: any, d: any) => { + console.info('executeShellCommand : err : ' + JSON.stringify(err)); + console.info('executeShellCommand : data : ' + d.stdResult); + console.info('executeShellCommand : data : ' + d.exitCode); + }) + console.info('OpenHarmonyTestRunner onRun end') + } +}; \ No newline at end of file diff --git a/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/ets/test/List.test.ets b/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/ets/test/List.test.ets new file mode 100644 index 000000000..6ef340e2e --- /dev/null +++ b/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/ets/test/List.test.ets @@ -0,0 +1,35 @@ +/** + * Copyright (c) 2023 iSoftStone Information Technology (Group) 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 webViewContMessageError from './webViewContMessageError.test' +import webViewContPageOperationsError from './webViewContPageOperationsError.test' +import webViewContJavaScriptError from './webViewContJavaScriptError.test' +import webViewContZoomAndOthersError from './webViewContZoomAndOthersError.test' +import webViewContStoreWebArchiveError from './webViewContStoreWebArchiveError.test' +import webViewContGetUrlAndOthersError from './webViewContGetUrlAndOthersError.test' +import webViewContCookieToGeoLocationError from './webViewContCookieToGeoLocationError.test' +import webViewContJsMessageExtReturnError from './webViewContJsMessageExtReturnError.test' +import webViewContWebMessageExtReturnError from './webViewContWebMessageExtReturnError.test' + +export default function testsuite() { + webViewContMessageError() + webViewContPageOperationsError() + webViewContJavaScriptError() + webViewContZoomAndOthersError() + webViewContStoreWebArchiveError() + webViewContGetUrlAndOthersError() + webViewContCookieToGeoLocationError() + webViewContJsMessageExtReturnError() + webViewContWebMessageExtReturnError() +} \ No newline at end of file diff --git a/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/ets/test/Utils.ets b/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/ets/test/Utils.ets new file mode 100644 index 000000000..1188613cf --- /dev/null +++ b/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/ets/test/Utils.ets @@ -0,0 +1,169 @@ +/* + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import events_emitter from '@ohos.events.emitter'; +import { expect } from "@ohos/hypium"; +export default class Utils { + static sleep(time){ + return new Promise((resolve,reject)=>{ + setTimeout(()=>{ + resolve("ok") + },time) + }).then(()=>{ + console.info(`sleep ${time} over...`) + }) + } + static registerEvent(testCaseName,expectedValue,eventId,done){ + console.info(`[${testCaseName}] START`); + try{ + let callBack=(backData)=>{ + try{ + console.info(`${testCaseName} get result is:`+JSON.stringify(backData)); + expect(backData.data.ACTION).assertEqual(expectedValue); + console.info(`[${testCaseName}] END`); + }catch(err){ + console.info(`[${testCaseName}] err:`+JSON.stringify(err)); + } + done() + } + let innerEvent = { + eventId:eventId, + priority:events_emitter.EventPriority.LOW + } + events_emitter.on(innerEvent,callBack) + }catch(err){ + console.info(`[${testCaseName}] err:`+JSON.stringify(err)); + } + } + static emitEvent(actualValue,eventId){ + try { + let backData = { + data: { + "ACTION": actualValue + } + } + let backEvent = { + eventId:eventId, + priority:events_emitter.EventPriority.LOW + } + console.info("webFlag start to emit action state"); + events_emitter.emit(backEvent, backData); + } catch (err) { + console.info("webFlag emit action state err: " + JSON.stringify(err)); + } + } + static registerEventTwo(testCaseName,eventId,done){ + console.info(`[${testCaseName}] START`); + try{ + let callBack=(backData)=>{ + try{ + console.info(`${testCaseName} get result is:`+JSON.stringify(backData)); + expect(backData.data.actualValue).assertLarger(backData.data.expectedValue-100); + expect(backData.data.actualValue).assertLess(backData.data.expectedValue-(-100)); + console.info(`[${testCaseName}] END`); + }catch(err){ + console.info(`[${testCaseName}] err:`+JSON.stringify(err)); + } + done() + } + let innerEvent = { + eventId:eventId, + priority:events_emitter.EventPriority.LOW + } + events_emitter.on(innerEvent,callBack) + }catch(err){ + console.info(`[${testCaseName}] err:`+JSON.stringify(err)); + } + } + static emitEventTwo(expectedValue,actualValue,eventId){ + try { + let backData = { + data: { + "expectedValue":expectedValue, + "actualValue":actualValue + } + } + let backEvent = { + eventId:eventId, + priority:events_emitter.EventPriority.LOW + } + console.info("webFlag start to emit action state"); + events_emitter.emit(backEvent, backData); + } catch (err) { + console.info("webFlag emit action state err: " + JSON.stringify(err)); + } + } + static registerContainEvent(testCaseName,expectedValue,eventId,done){ + console.info(`[${testCaseName}] START`); + try{ + let callBack=(backData)=>{ + try{ + console.info(`${testCaseName} get result is:`+JSON.stringify(backData)); + expect(backData.data.ACTION).assertContain(expectedValue); + console.info(`[${testCaseName}] END`); + }catch(err){ + console.info(`[${testCaseName}] err:`+JSON.stringify(err)); + } + done() + } + let innerEvent = { + eventId:eventId, + priority:events_emitter.EventPriority.LOW + } + events_emitter.on(innerEvent,callBack) + }catch(err){ + console.info(`[${testCaseName}] err:`+JSON.stringify(err)); + } + } + static commitKey(emitKey){ + try { + let backData = { + data: { + "ACTION": emitKey + } + } + let backEvent = { + eventId:10, + priority:events_emitter.EventPriority.LOW + } + console.info("start send emitKey"); + events_emitter.emit(backEvent, backData); + } catch (err) { + console.info("emit emitKey err: " + JSON.stringify(err)); + } + } + static registerLargerEvent(testCaseName,eventId,done){ + console.info(`[${testCaseName}] START`); + try{ + let callBack=(backData)=>{ + try{ + console.info(`${testCaseName} get result is:`+JSON.stringify(backData)); + expect(backData.data.actualValue).assertLarger(backData.data.expectedValue); + console.info(`[${testCaseName}] END`); + }catch(err){ + console.info(`[${testCaseName}] err:`+JSON.stringify(err)); + } + done() + } + let innerEvent = { + eventId:eventId, + priority:events_emitter.EventPriority.LOW + } + events_emitter.on(innerEvent,callBack) + }catch(err){ + console.info(`[${testCaseName}] err:`+JSON.stringify(err)); + } + } +} \ No newline at end of file diff --git a/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/ets/test/webViewContCookieToGeoLocationError.test.ets b/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/ets/test/webViewContCookieToGeoLocationError.test.ets new file mode 100644 index 000000000..216ab19c8 --- /dev/null +++ b/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/ets/test/webViewContCookieToGeoLocationError.test.ets @@ -0,0 +1,420 @@ +/** + * Copyright (c) 2023 iSoftStone Information Technology (Group) 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, afterEach, it, expect, beforeAll} from "@ohos/hypium"; +import events_emitter from '@ohos.events.emitter'; +import Utils from './Utils.ets'; +import router from '@system.router'; + +let emitKey = "emitGetCookieInitErr"; +export default function webViewContCookieToGeoLocationError() { + describe('ActsAceWebDevWebViewContCookieToGeoLocationErrorTest', function () { + beforeAll(async function (done) { + let options = { + uri: 'MainAbility/pages/webViewContCookieToGeoLocationError', + } + try { + router.clear(); + let pages = router.getState(); + console.info("get webViewContCookieToGeoLocationError state success " + JSON.stringify(pages)); + if (!("webViewContCookieToGeoLocationError" == pages.name)) { + console.info("get webViewContCookieToGeoLocationError state success " + JSON.stringify(pages.name)); + let result = await router.push(options); + await Utils.sleep(2000); + console.info("push webViewContCookieToGeoLocationError page success " + JSON.stringify(result)); + } + } catch (err) { + console.error("push webViewContCookieToGeoLocationError page error: " + err); + } + done() + }); + beforeEach(async function (done) { + await Utils.sleep(2000); + console.info("webViewContCookieToGeoLocationError beforeEach start"); + done(); + }) + afterEach(async function (done) { + console.info("webViewContCookieToGeoLocationError afterEach start:"+emitKey); + try { + let backData = { + data: { + "ACTION": emitKey + } + } + let backEvent = { + eventId:10, + priority:events_emitter.EventPriority.LOW + } + console.info("start send emitKey"); + events_emitter.emit(backEvent, backData); + } catch (err) { + console.info("emit emitKey err: " + JSON.stringify(err)); + } + await Utils.sleep(2000); + done(); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERROR_7700 + *tc.name testGetCookieInitErr + *tc.desc test interface of getCookie with wrong format url + */ + it('testGetCookieInitErr',0,async function(done){ + emitKey="emitSetCookieInitErr"; + Utils.registerEvent("testGetCookieInitErr","17100002",752,done); + Utils.registerEvent("testGetCookieInitErr","Invalid url.",753,done); + sendEventByKey('webViewContCookieToGeoLocationError',10,''); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERROR_7800 + *tc.name testSetCookieInitErr + *tc.desc test interface of setCookie with wrong format url + */ + it('testSetCookieInitErr',0,async function(done){ + emitKey="emitSetCookieValueErr"; + Utils.registerEvent("testSetCookieInitErr","17100002",754,done); + Utils.registerEvent("testSetCookieInitErr","Invalid url.",755,done); + sendEventByKey('webViewContCookieToGeoLocationError',10,''); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERROR_7900 + *tc.name testSetCookieValueErr + *tc.desc test interface of setCookie with unsupported url value type + */ + it('testSetCookieValueErr',0,async function(done){ + emitKey="emitDeleteOriginValueNullErr"; + Utils.registerEvent("testSetCookieValueErr","17100005",756,done); + Utils.registerEvent("testSetCookieValueErr","Invalid cookie value.",757,done); + sendEventByKey('webViewContCookieToGeoLocationError',10,''); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERROR_8000 + *tc.name testDeleteOriginValueNullErr + *tc.desc test interface of deleteOrigin with origin null + */ + it('testDeleteOriginValueNullErr',0,async function(done){ + emitKey="emitDeleteOriginValueIllegalErr"; + Utils.registerEvent("testDeleteOriginValueNullErr","17100011",758,done); + Utils.registerEvent("testDeleteOriginValueNullErr","Invalid origin.",759,done); + sendEventByKey('webViewContCookieToGeoLocationError',10,''); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERROR_8100 + *tc.name testDeleteOriginValueIllegalErr + *tc.desc test interface of deleteOrigin with origin illegal + */ + it('testDeleteOriginValueIllegalErr',0,async function(done){ + emitKey="emitDeleteOriginValueErr"; + Utils.registerEvent("testDeleteOriginValueIllegalErr","17100011",760,done); + Utils.registerEvent("testDeleteOriginValueIllegalErr","Invalid origin.",761,done); + sendEventByKey('webViewContCookieToGeoLocationError',10,''); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERROR_8200 + *tc.name testDeleteOriginValueErr + *tc.desc test interface of deleteOrigin with origin wrong + */ + it('testDeleteOriginValueErr',0,async function(done){ + emitKey="emitGetOriginsCallbackUnAPIErr"; + Utils.registerEvent("testDeleteOriginValueErr","17100011",762,done); + Utils.registerEvent("testDeleteOriginValueErr","Invalid origin.",763,done); + sendEventByKey('webViewContCookieToGeoLocationError',10,''); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERROR_8300 + *tc.name testGetOriginsCallbackUnAPIErr + *tc.desc test interface of getOrigins (callback) with no using JS database API + */ + it('testGetOriginsCallbackUnAPIErr',0,async function(done){ + emitKey="emitGetOriginsPromiseUnAPIErr"; + Utils.registerEvent("testGetOriginsCallbackUnAPIErr",17100012,764,done); + Utils.registerEvent("testGetOriginsCallbackUnAPIErr","Invalid web storage origin.",765,done); + sendEventByKey('webViewContCookieToGeoLocationError',10,''); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERROR_8400 + *tc.name testGetOriginsPromiseUnAPIErr + *tc.desc test interface of getOrigins (promise) with no using JS database API + */ + it('testGetOriginsPromiseUnAPIErr',0,async function(done){ + emitKey="emitGetOriginQuotaCallbackValueErr"; + Utils.registerEvent("testGetOriginsPromiseUnAPIErr",17100012,766,done); + Utils.registerEvent("testGetOriginsPromiseUnAPIErr","Invalid web storage origin.",767,done); + sendEventByKey('webViewContCookieToGeoLocationError',10,''); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERROR_8500 + *tc.name testGetOriginQuotaCallbackValueErr + *tc.desc test interface of getOriginQuota (callback) with origin wrong + */ + it('testGetOriginQuotaCallbackValueErr',0,async function(done){ + emitKey="emitGetOriginQuotaCallbackValueIllegalErr"; + Utils.registerEvent("testGetOriginQuotaCallbackValueErr",17100011,768,done); + Utils.registerEvent("testGetOriginQuotaCallbackValueErr","Invalid origin.",769,done); + sendEventByKey('webViewContCookieToGeoLocationError',10,''); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERROR_8600 + *tc.name testGetOriginQuotaCallbackValueIllegalErr + *tc.desc test interface of getOriginQuota (callback) with origin illegal + */ + it('testGetOriginQuotaCallbackValueIllegalErr',0,async function(done){ + emitKey="emitGetOriginQuotaCallbackValueNullErr"; + Utils.registerEvent("testGetOriginQuotaCallbackValueIllegalErr",17100011,770,done); + Utils.registerEvent("testGetOriginQuotaCallbackValueIllegalErr","Invalid origin.",771,done); + sendEventByKey('webViewContCookieToGeoLocationError',10,''); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERROR_8700 + *tc.name testGetOriginQuotaCallbackValueNullErr + *tc.desc test interface of getOriginQuota (callback) with origin null + */ + it('testGetOriginQuotaCallbackValueNullErr',0,async function(done){ + emitKey="emitGetOriginQuotaPromiseValueErr"; + Utils.registerEvent("testGetOriginQuotaCallbackValueNullErr",17100011,772,done); + Utils.registerEvent("testGetOriginQuotaCallbackValueNullErr","Invalid origin.",773,done); + sendEventByKey('webViewContCookieToGeoLocationError',10,''); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERROR_8800 + *tc.name testGetOriginQuotaPromiseValueErr + *tc.desc test interface of getOriginQuota (promise) with origin wrong + */ + it('testGetOriginQuotaPromiseValueErr',0,async function(done){ + emitKey="emitGetOriginQuotaPromiseValueIllegalErr"; + Utils.registerEvent("testGetOriginQuotaPromiseValueErr",17100011,774,done); + Utils.registerEvent("testGetOriginQuotaPromiseValueErr","Invalid origin.",775,done); + sendEventByKey('webViewContCookieToGeoLocationError',10,''); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERROR_8900 + *tc.name testGetOriginQuotaPromiseValueIllegalErr + *tc.desc test interface of getOriginQuota (promise) with origin illegal + */ + it('testGetOriginQuotaPromiseValueIllegalErr',0,async function(done){ + emitKey="emitGetOriginQuotaPromiseValueNullErr"; + Utils.registerEvent("testGetOriginQuotaPromiseValueIllegalErr",17100011,776,done); + Utils.registerEvent("testGetOriginQuotaPromiseValueIllegalErr","Invalid origin.",777,done); + sendEventByKey('webViewContCookieToGeoLocationError',10,''); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERROR_9000 + *tc.name testGetOriginQuotaPromiseValueNullErr + *tc.desc test interface of getOriginQuota (promise) with origin null + */ + it('testGetOriginQuotaPromiseValueNullErr',0,async function(done){ + emitKey="emitGetOriginUsageCallbackValueErr"; + Utils.registerEvent("testGetOriginQuotaPromiseValueNullErr",17100011,778,done); + Utils.registerEvent("testGetOriginQuotaPromiseValueNullErr","Invalid origin.",779,done); + sendEventByKey('webViewContCookieToGeoLocationError',10,''); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERROR_9100 + *tc.name testGetOriginUsageCallbackValueErr + *tc.desc test interface of getOriginUsage (callback) with origin wrong + */ + it('testGetOriginUsageCallbackValueErr',0,async function(done){ + emitKey="emitGetOriginUsageCallbackValueIllegalErr"; + Utils.registerEvent("testGetOriginUsageCallbackValueErr",17100011,780,done); + Utils.registerEvent("testGetOriginUsageCallbackValueErr","Invalid origin.",781,done); + sendEventByKey('webViewContCookieToGeoLocationError',10,''); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERROR_9200 + *tc.name testGetOriginUsageCallbackValueIllegalErr + *tc.desc test interface of getOriginUsage (callback) with origin illegal + */ + it('testGetOriginUsageCallbackValueIllegalErr',0,async function(done){ + emitKey="emitGetOriginUsageCallbackValueNullErr"; + Utils.registerEvent("testGetOriginUsageCallbackValueIllegalErr",17100011,782,done); + Utils.registerEvent("testGetOriginUsageCallbackValueIllegalErr","Invalid origin.",783,done); + sendEventByKey('webViewContCookieToGeoLocationError',10,''); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERROR_9300 + *tc.name testGetOriginUsageCallbackValueNullErr + *tc.desc test interface of getOriginUsage (callback) with origin null + */ + it('testGetOriginUsageCallbackValueNullErr',0,async function(done){ + emitKey="emitGetOriginUsagePromiseValueErr"; + Utils.registerEvent("testGetOriginUsageCallbackValueNullErr",17100011,784,done); + Utils.registerEvent("testGetOriginUsageCallbackValueNullErr","Invalid origin.",785,done); + sendEventByKey('webViewContCookieToGeoLocationError',10,''); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERROR_9400 + *tc.name testGetOriginUsagePromiseValueErr + *tc.desc test interface of getOriginUsage (promise) with origin wrong + */ + it('testGetOriginUsagePromiseValueErr',0,async function(done){ + emitKey="emitGetOriginUsagePromiseValueIllegalErr"; + Utils.registerEvent("testGetOriginUsagePromiseValueErr",17100011,786,done); + Utils.registerEvent("testGetOriginUsagePromiseValueErr","Invalid origin.",787,done); + sendEventByKey('webViewContCookieToGeoLocationError',10,''); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERROR_9500 + *tc.name testGetOriginUsagePromiseValueIllegalErr + *tc.desc test interface of getOriginUsage (promise) with origin illegal + */ + it('testGetOriginUsagePromiseValueIllegalErr',0,async function(done){ + emitKey="emitGetOriginUsagePromiseValueNullErr"; + Utils.registerEvent("testGetOriginUsagePromiseValueIllegalErr",17100011,788,done); + Utils.registerEvent("testGetOriginUsagePromiseValueIllegalErr","Invalid origin.",789,done); + sendEventByKey('webViewContCookieToGeoLocationError',10,''); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERROR_9600 + *tc.name testGetOriginUsagePromiseValueNullErr + *tc.desc test interface of getOriginUsage (promise) with origin null + */ + it('testGetOriginUsagePromiseValueNullErr',0,async function(done){ + emitKey="emitAllowGeolocationValueErr"; + Utils.registerEvent("testGetOriginUsagePromiseValueNullErr",17100011,790,done); + Utils.registerEvent("testGetOriginUsagePromiseValueNullErr","Invalid origin.",791,done); + sendEventByKey('webViewContCookieToGeoLocationError',10,''); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERROR_9700 + *tc.name testAllowGeolocationValueErr + *tc.desc test interface of allowGeolocation with origin wrong + */ + it('testAllowGeolocationValueErr',0,async function(done){ + emitKey="emitAllowGeolocationValueIllegalErr"; + Utils.registerEvent("testAllowGeolocationValueErr","17100011",792,done); + Utils.registerEvent("testAllowGeolocationValueErr","Invalid origin.",793,done); + sendEventByKey('webViewContCookieToGeoLocationError',10,''); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERROR_9800 + *tc.name testAllowGeolocationValueIllegalErr + *tc.desc test interface of allowGeolocation with origin illegal + */ + it('testAllowGeolocationValueIllegalErr',0,async function(done){ + emitKey="emitAllowGeolocationValueNullErr"; + Utils.registerEvent("testAllowGeolocationValueIllegalErr","17100011",794,done); + Utils.registerEvent("testAllowGeolocationValueIllegalErr","Invalid origin.",795,done); + sendEventByKey('webViewContCookieToGeoLocationError',10,''); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERROR_9900 + *tc.name testAllowGeolocationValueNullErr + *tc.desc test interface of allowGeolocation with origin null + */ + it('testAllowGeolocationValueNullErr',0,async function(done){ + emitKey="emitDeleteGeolocationValueErr"; + Utils.registerEvent("testAllowGeolocationValueNullErr","17100011",796,done); + Utils.registerEvent("testAllowGeolocationValueNullErr","Invalid origin.",797,done); + sendEventByKey('webViewContCookieToGeoLocationError',10,''); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERRORHUNDRED_0100 + *tc.name testDeleteGeolocationValueErr + *tc.desc test interface of deleteGeolocation with origin wrong + */ + it('testDeleteGeolocationValueErr',0,async function(done){ + emitKey="emitDeleteGeolocationValueIllegalErr"; + Utils.registerEvent("testDeleteGeolocationValueErr","17100011",798,done); + Utils.registerEvent("testDeleteGeolocationValueErr","Invalid origin.",799,done); + sendEventByKey('webViewContCookieToGeoLocationError',10,''); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERRORHUNDRED_0200 + *tc.name testDeleteGeolocationValueIllegalErr + *tc.desc test interface of deleteGeolocation with origin illegal + */ + it('testDeleteGeolocationValueIllegalErr',0,async function(done){ + emitKey="emitDeleteGeolocationValueNullErr"; + Utils.registerEvent("testDeleteGeolocationValueIllegalErr","17100011",800,done); + Utils.registerEvent("testDeleteGeolocationValueIllegalErr","Invalid origin.",801,done); + sendEventByKey('webViewContCookieToGeoLocationError',10,''); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERRORHUNDRED_0300 + *tc.name testDeleteGeolocationValueNullErr + *tc.desc test interface of deleteGeolocation with origin null + */ + it('testDeleteGeolocationValueNullErr',0,async function(done){ + emitKey="emitGetAccessibleGeolocationCallbackValueErr"; + Utils.registerEvent("testDeleteGeolocationValueNullErr","17100011",802,done); + Utils.registerEvent("testDeleteGeolocationValueNullErr","Invalid origin.",803,done); + sendEventByKey('webViewContCookieToGeoLocationError',10,''); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERRORHUNDRED_0400 + *tc.name testGetAccessibleGeolocationCallbackValueErr + *tc.desc test interface of getAccessibleGeolocation (callback) with origin wrong + */ + it('testGetAccessibleGeolocationCallbackValueErr',0,async function(done){ + emitKey="emitGetAccessibleGeolocationCallbackValueIllegalErr"; + Utils.registerEvent("testGetAccessibleGeolocationCallbackValueErr",17100011,804,done); + Utils.registerEvent("testGetAccessibleGeolocationCallbackValueErr","Invalid origin.",805,done); + sendEventByKey('webViewContCookieToGeoLocationError',10,''); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERRORHUNDRED_0500 + *tc.name testGetAccessibleGeolocationCallbackValueIllegalErr + *tc.desc test interface of getAccessibleGeolocation (callback) with origin illegal + */ + it('testGetAccessibleGeolocationCallbackValueIllegalErr',0,async function(done){ + emitKey="emitGetAccessibleGeolocationCallbackValueNullErr"; + Utils.registerEvent("testGetAccessibleGeolocationCallbackValueIllegalErr",17100011,806,done); + Utils.registerEvent("testGetAccessibleGeolocationCallbackValueIllegalErr","Invalid origin.",807,done); + sendEventByKey('webViewContCookieToGeoLocationError',10,''); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERRORHUNDRED_0600 + *tc.name testGetAccessibleGeolocationCallbackValueNullErr + *tc.desc test interface of getAccessibleGeolocation (callback) with origin null + */ + it('testGetAccessibleGeolocationCallbackValueNullErr',0,async function(done){ + emitKey="emitGetAccessibleGeolocationPromiseValueErr"; + Utils.registerEvent("testGetAccessibleGeolocationCallbackValueNullErr",17100011,808,done); + Utils.registerEvent("testGetAccessibleGeolocationCallbackValueNullErr","Invalid origin.",809,done); + sendEventByKey('webViewContCookieToGeoLocationError',10,''); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERRORHUNDRED_0700 + *tc.name testGetAccessibleGeolocationPromiseValueErr + *tc.desc test interface of getAccessibleGeolocation (promise) with origin wrong + */ + it('testGetAccessibleGeolocationPromiseValueErr',0,async function(done){ + emitKey="emitGetAccessibleGeolocationPromiseValueIllegalErr"; + Utils.registerEvent("testGetAccessibleGeolocationPromiseValueErr",17100011,810,done); + Utils.registerEvent("testGetAccessibleGeolocationPromiseValueErr","Invalid origin.",811,done); + sendEventByKey('webViewContCookieToGeoLocationError',10,''); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERRORHUNDRED_0800 + *tc.name testGetAccessibleGeolocationPromiseValueIllegalErr + *tc.desc test interface of getAccessibleGeolocation (promise) with origin illegal + */ + it('testGetAccessibleGeolocationPromiseValueIllegalErr',0,async function(done){ + emitKey="emitGetAccessibleGeolocationPromiseValueNullErr"; + Utils.registerEvent("testGetAccessibleGeolocationPromiseValueIllegalErr",17100011,812,done); + Utils.registerEvent("testGetAccessibleGeolocationPromiseValueIllegalErr","Invalid origin.",813,done); + sendEventByKey('webViewContCookieToGeoLocationError',10,''); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERRORHUNDRED_0900 + *tc.name testGetAccessibleGeolocationPromiseValueNullErr + *tc.desc test interface of getAccessibleGeolocation (promise) with origin null + */ + it('testGetAccessibleGeolocationPromiseValueNullErr',0,async function(done){ + emitKey="emitGetAccessibleGeolocationPromiseValueNullErr"; + Utils.registerEvent("testGetAccessibleGeolocationPromiseValueNullErr",17100011,814,done); + Utils.registerEvent("testGetAccessibleGeolocationPromiseValueNullErr","Invalid origin.",815,done); + sendEventByKey('webViewContCookieToGeoLocationError',10,''); + }) + }) +} \ No newline at end of file diff --git a/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/ets/test/webViewContGetUrlAndOthersError.test.ets b/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/ets/test/webViewContGetUrlAndOthersError.test.ets new file mode 100644 index 000000000..03069a7eb --- /dev/null +++ b/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/ets/test/webViewContGetUrlAndOthersError.test.ets @@ -0,0 +1,288 @@ +/** + * Copyright (c) 2023 iSoftStone Information Technology (Group) 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, afterEach, it, expect, beforeAll} from "@ohos/hypium"; +import events_emitter from '@ohos.events.emitter'; +import Utils from './Utils.ets'; +import router from '@system.router'; + +let emitKey = "emitGetUrlInitErr"; +export default function webViewContGetUrlAndOthersError() { + describe('ActsAceWebDevWebViewContGetUrlAndOthersErrorTest', function () { + beforeAll(async function (done) { + let options = { + uri: 'MainAbility/pages/webViewContGetUrlAndOthersError', + } + try { + router.clear(); + let pages = router.getState(); + console.info("get webViewContGetUrlAndOthersError state success " + JSON.stringify(pages)); + if (!("webViewContGetUrlAndOthersError" == pages.name)) { + console.info("get webViewContGetUrlAndOthersError state success " + JSON.stringify(pages.name)); + let result = await router.push(options); + await Utils.sleep(2000); + console.info("push webViewContGetUrlAndOthersError page success " + JSON.stringify(result)); + } + } catch (err) { + console.error("push webViewContGetUrlAndOthersError page error: " + err); + } + done() + }); + beforeEach(async function (done) { + await Utils.sleep(2000); + console.info("webViewContGetUrlAndOthersError beforeEach start"); + done(); + }) + afterEach(async function (done) { + console.info("webViewContGetUrlAndOthersError afterEach start:"+emitKey); + try { + let backData = { + data: { + "ACTION": emitKey + } + } + let backEvent = { + eventId:10, + priority:events_emitter.EventPriority.LOW + } + console.info("start send emitKey"); + events_emitter.emit(backEvent, backData); + } catch (err) { + console.info("emit emitKey err: " + JSON.stringify(err)); + } + await Utils.sleep(2000); + done(); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERROR_5700 + *tc.name testGetUrlInitErr + *tc.desc test interface of getUrl with not been associated with specific Web Components + */ + it('testGetUrlInitErr',0,async function(done){ + emitKey="emitStopInitErr"; + Utils.registerEvent("testGetUrlInitErr","17100001",712,done); + Utils.registerEvent("testGetUrlInitErr","Init error. The WebviewController must be associated with a Web component.",713,done); + sendEventByKey('webViewContGetUrlAndOthersError',10,''); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERROR_5800 + *tc.name testStopInitErr + *tc.desc test interface of stop with not been associated with specific Web Components + */ + it('testStopInitErr',0,async function(done){ + emitKey="emitBackOrForwardInitErr"; + Utils.registerEvent("testStopInitErr","17100001",714,done); + Utils.registerEvent("testStopInitErr","Init error. The WebviewController must be associated with a Web component.",715,done); + sendEventByKey('webViewContGetUrlAndOthersError',10,''); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERROR_5900 + *tc.name testBackOrForwardInitErr + *tc.desc test interface of backOrForward with not been associated with specific Web Components + */ + it('testBackOrForwardInitErr',0,async function(done){ + emitKey="emitScrollToInitErr"; + Utils.registerEvent("testBackOrForwardInitErr","17100001",716,done); + Utils.registerEvent("testBackOrForwardInitErr","Init error. The WebviewController must be associated with a Web component.",717,done); + sendEventByKey('webViewContGetUrlAndOthersError',10,''); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERROR_6000 + *tc.name testScrollToInitErr + *tc.desc test interface of scrollTo with not been associated with specific Web Components + */ + it('testScrollToInitErr',0,async function(done){ + emitKey="emitScrollByInitErr"; + Utils.registerEvent("testScrollToInitErr","17100001",718,done); + Utils.registerEvent("testScrollToInitErr","Init error. The WebviewController must be associated with a Web component.",719,done); + sendEventByKey('webViewContGetUrlAndOthersError',10,''); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERROR_6100 + *tc.name testScrollByInitErr + *tc.desc test interface of scrollBy with not been associated with specific Web Components + */ + it('testScrollByInitErr',0,async function(done){ + emitKey="emitSlideScrollInitErr"; + Utils.registerEvent("testScrollByInitErr","17100001",720,done); + Utils.registerEvent("testScrollByInitErr","Init error. The WebviewController must be associated with a Web component.",721,done); + sendEventByKey('webViewContGetUrlAndOthersError',10,''); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERROR_6200 + *tc.name testSlideScrollInitErr + *tc.desc test interface of slideScroll with not been associated with specific Web Components + */ + it('testSlideScrollInitErr',0,async function(done){ + emitKey="emitGetOriginalUrlInitErr"; + Utils.registerEvent("testSlideScrollInitErr","17100001",722,done); + Utils.registerEvent("testSlideScrollInitErr","Init error. The WebviewController must be associated with a Web component.",723,done); + sendEventByKey('webViewContGetUrlAndOthersError',10,''); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERROR_6300 + *tc.name testGetOriginalUrlInitErr + *tc.desc test interface of getOriginalUrl with not been associated with specific Web Components + */ + it('testGetOriginalUrlInitErr',0,async function(done){ + emitKey="emitGetFaviconInitErr"; + Utils.registerEvent("testGetOriginalUrlInitErr","17100001",724,done); + Utils.registerEvent("testGetOriginalUrlInitErr","Init error. The WebviewController must be associated with a Web component.",725,done); + sendEventByKey('webViewContGetUrlAndOthersError',10,''); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERROR_6400 + *tc.name testGetFaviconInitErr + *tc.desc test interface of getFavicon with not been associated with specific Web Components + */ + it('testGetFaviconInitErr',0,async function(done){ + emitKey="emitSetNetworkAvailableInitErr"; + Utils.registerEvent("testGetFaviconInitErr","17100001",726,done); + Utils.registerEvent("testGetFaviconInitErr","Init error. The WebviewController must be associated with a Web component.",727,done); + sendEventByKey('webViewContGetUrlAndOthersError',10,''); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERROR_6500 + *tc.name testSetNetworkAvailableInitErr + *tc.desc test interface of setNetworkAvailable with not been associated with specific Web Components + */ + it('testSetNetworkAvailableInitErr',0,async function(done){ + emitKey="emitHasImageCallBackInitErr"; + Utils.registerEvent("testSetNetworkAvailableInitErr","17100001",728,done); + Utils.registerEvent("testSetNetworkAvailableInitErr","Init error. The WebviewController must be associated with a Web component.",729,done); + sendEventByKey('webViewContGetUrlAndOthersError',10,''); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERROR_6600 + *tc.name testHasImageCallBackInitErr + *tc.desc test interface of hasImage (callback) with not been associated with specific Web Components + */ + it('testHasImageCallBackInitErr',0,async function(done){ + emitKey="emitHasImagePromiseInitErr"; + Utils.registerEvent("testHasImageCallBackInitErr","17100001",730,done); + Utils.registerEvent("testHasImageCallBackInitErr","Init error. The WebviewController must be associated with a Web component.",731,done); + sendEventByKey('webViewContGetUrlAndOthersError',10,''); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERROR_6700 + *tc.name testHasImagePromiseInitErr + *tc.desc test interface of hasImage (promise) with not been associated with specific Web Components + */ + it('testHasImagePromiseInitErr',0,async function(done){ + emitKey="emitRemoveCacheInitErr"; + Utils.registerEvent("testHasImagePromiseInitErr","17100001",732,done); + Utils.registerEvent("testHasImagePromiseInitErr","Init error. The WebviewController must be associated with a Web component.",733,done); + sendEventByKey('webViewContGetUrlAndOthersError',10,''); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERROR_6800 + *tc.name testRemoveCacheInitErr + *tc.desc test interface of removeCache with not been associated with specific Web Components + */ + it('testRemoveCacheInitErr',0,async function(done){ + emitKey="emitPageUpInitErr"; + Utils.registerEvent("testRemoveCacheInitErr","17100001",734,done); + Utils.registerEvent("testRemoveCacheInitErr","Init error. The WebviewController must be associated with a Web component.",735,done); + sendEventByKey('webViewContGetUrlAndOthersError',10,''); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERROR_6900 + *tc.name testPageUpInitErr + *tc.desc test interface of pageUp with not been associated with specific Web Components + */ + it('testPageUpInitErr',0,async function(done){ + emitKey="emitPageDownInitErr"; + Utils.registerEvent("testPageUpInitErr","17100001",736,done); + Utils.registerEvent("testPageUpInitErr","Init error. The WebviewController must be associated with a Web component.",737,done); + sendEventByKey('webViewContGetUrlAndOthersError',10,''); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERROR_7000 + *tc.name testPageDownInitErr + *tc.desc test interface of pageDown with not been associated with specific Web Components + */ + it('testPageDownInitErr',0,async function(done){ + emitKey="emitGetBackForwardEntriesInitErr"; + Utils.registerEvent("testPageDownInitErr","17100001",738,done); + Utils.registerEvent("testPageDownInitErr","Init error. The WebviewController must be associated with a Web component.",739,done); + sendEventByKey('webViewContGetUrlAndOthersError',10,''); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERROR_7100 + *tc.name testGetBackForwardEntriesInitErr + *tc.desc test interface of getBackForwardEntries with not been associated with specific Web Components + */ + it('testGetBackForwardEntriesInitErr',0,async function(done){ + emitKey="emitSerializeWebStateInitErr"; + Utils.registerEvent("testGetBackForwardEntriesInitErr","17100001",740,done); + Utils.registerEvent("testGetBackForwardEntriesInitErr","Init error. The WebviewController must be associated with a Web component.",741,done); + sendEventByKey('webViewContGetUrlAndOthersError',10,''); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERROR_7200 + *tc.name testSerializeWebStateInitErr + *tc.desc test interface of serializeWebState with not been associated with specific Web Components + */ + it('testSerializeWebStateInitErr',0,async function(done){ + emitKey="emitRestoreWebStateInitErr"; + Utils.registerEvent("testSerializeWebStateInitErr","17100001",742,done); + Utils.registerEvent("testSerializeWebStateInitErr","Init error. The WebviewController must be associated with a Web component.",743,done); + sendEventByKey('webViewContGetUrlAndOthersError',10,''); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERROR_7300 + *tc.name testRestoreWebStateInitErr + *tc.desc test interface of restoreWebState with not been associated with specific Web Components + */ + it('testRestoreWebStateInitErr',0,async function(done){ + emitKey="emitGetCertificatePromiseInitErr"; + Utils.registerEvent("testRestoreWebStateInitErr","17100001",744,done); + Utils.registerEvent("testRestoreWebStateInitErr","Init error. The WebviewController must be associated with a Web component.",745,done); + sendEventByKey('webViewContGetUrlAndOthersError',10,''); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERROR_7400 + *tc.name testGetCertificatePromiseInitErr + *tc.desc test interface of getCertificate (promise) with not been associated with specific Web Components + */ + it('testGetCertificatePromiseInitErr',0,async function(done){ + emitKey="emitGetCertificateCallbackInitErr"; + Utils.registerEvent("testGetCertificatePromiseInitErr","17100001",746,done); + Utils.registerEvent("testGetCertificatePromiseInitErr","Init error. The WebviewController must be associated with a Web component.",747,done); + sendEventByKey('webViewContGetUrlAndOthersError',10,''); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERROR_7500 + *tc.name testGetCertificateCallbackInitErr + *tc.desc test interface of getCertificate (callback) with not been associated with specific Web Components + */ + it('testGetCertificateCallbackInitErr',0,async function(done){ + emitKey="emitSetAudioMutedInitErr"; + Utils.registerEvent("testGetCertificateCallbackInitErr","17100001",748,done); + Utils.registerEvent("testGetCertificateCallbackInitErr","Init error. The WebviewController must be associated with a Web component.",749,done); + sendEventByKey('webViewContGetUrlAndOthersError',10,''); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERROR_7600 + *tc.name testSetAudioMutedInitErr + *tc.desc test interface of setAudioMuted with not been associated with specific Web Components + */ + it('testSetAudioMutedInitErr',0,async function(done){ + emitKey="emitSetAudioMutedInitErr"; + Utils.registerEvent("testSetAudioMutedInitErr","17100001",750,done); + Utils.registerEvent("testSetAudioMutedInitErr","Init error. The WebviewController must be associated with a Web component.",751,done); + sendEventByKey('webViewContGetUrlAndOthersError',10,''); + }) + }) +} \ No newline at end of file diff --git a/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/ets/test/webViewContJavaScriptError.test.ets b/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/ets/test/webViewContJavaScriptError.test.ets new file mode 100644 index 000000000..c2a3831dc --- /dev/null +++ b/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/ets/test/webViewContJavaScriptError.test.ets @@ -0,0 +1,145 @@ +/** + * Copyright (c) 2023 iSoftStone Information Technology (Group) 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, afterEach, it, expect, beforeAll} from "@ohos/hypium"; +import events_emitter from '@ohos.events.emitter'; +import Utils from './Utils.ets'; +import router from '@system.router'; + +let emitKey = "emitRegisterJavaScriptProxyInitErr"; +export default function webViewContJavaScriptError() { + describe('ActsAceWebDevWebViewContJavaScriptErrorTest', function () { + beforeAll(async function (done) { + let options = { + uri: 'MainAbility/pages/webViewContJavaScriptError', + } + try { + router.clear(); + let pages = router.getState(); + console.info("get webViewContJavaScriptError state success " + JSON.stringify(pages)); + if (!("webViewContJavaScriptError" == pages.name)) { + console.info("get webViewContJavaScriptError state success " + JSON.stringify(pages.name)); + let result = await router.push(options); + await Utils.sleep(2000); + console.info("push webViewContJavaScriptError page success " + JSON.stringify(result)); + } + } catch (err) { + console.error("push webViewContJavaScriptError page error: " + err); + } + done() + }); + beforeEach(async function (done) { + await Utils.sleep(2000); + console.info("webViewContJavaScriptError beforeEach start"); + done(); + }) + afterEach(async function (done) { + console.info("webViewContJavaScriptError afterEach start:"+emitKey); + try { + let backData = { + data: { + "ACTION": emitKey + } + } + let backEvent = { + eventId:10, + priority:events_emitter.EventPriority.LOW + } + console.info("start send emitKey"); + events_emitter.emit(backEvent, backData); + } catch (err) { + console.info("emit emitKey err: " + JSON.stringify(err)); + } + await Utils.sleep(2000); + done(); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERROR_2600 + *tc.name testRegisterJavaScriptProxyInitErr + *tc.desc test interface of registerJavaScriptProxy with not been associated with specific Web Components + */ + it('testRegisterJavaScriptProxyInitErr',0,async function(done){ + emitKey="emitRunJavaScriptCallbackInitErr"; + Utils.registerEvent("testRegisterJavaScriptProxyInitErr","17100001",650,done); + Utils.registerEvent("testRegisterJavaScriptProxyInitErr","Init error. The WebviewController must be associated with a Web component.",651,done); + sendEventByKey('webViewContJavaScriptError',10,''); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERROR_2700 + *tc.name testRunJavaScriptCallbackInitErr + *tc.desc test interface of runJavaScript (callback) with not been associated with specific Web Components + */ + it('testRunJavaScriptCallbackInitErr',0,async function(done){ + emitKey="emitRunJavaScriptPromiseInitErr"; + Utils.registerEvent("testRunJavaScriptCallbackInitErr","17100001",652,done); + Utils.registerEvent("testRunJavaScriptCallbackInitErr","Init error. The WebviewController must be associated with a Web component.",653,done); + sendEventByKey('webViewContJavaScriptError',10,''); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERROR_2800 + *tc.name testRunJavaScriptPromiseInitErr + *tc.desc test interface of runJavaScript (promise) with not been associated with specific Web Components + */ + it('testRunJavaScriptPromiseInitErr',0,async function(done){ + emitKey="emitRunJavaScriptExtCallbackInitErr"; + Utils.registerEvent("testRunJavaScriptPromiseInitErr","17100001",654,done); + Utils.registerEvent("testRunJavaScriptPromiseInitErr","Init error. The WebviewController must be associated with a Web component.",655,done); + sendEventByKey('webViewContJavaScriptError',10,''); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERROR_2900 + *tc.name testRunJavaScriptExtCallbackInitErr + *tc.desc test interface of runJavaScriptExt (callback) with not been associated with specific Web Components + */ + it('testRunJavaScriptExtCallbackInitErr',0,async function(done){ + emitKey="emitRunJavaScriptExtPromiseInitErr"; + Utils.registerEvent("testRunJavaScriptExtCallbackInitErr","17100001",656,done); + Utils.registerEvent("testRunJavaScriptExtCallbackInitErr","Init error. The WebviewController must be associated with a Web component.",657,done); + sendEventByKey('webViewContJavaScriptError',10,''); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERROR_3000 + *tc.name testRunJavaScriptExtPromiseInitErr + *tc.desc test interface of runJavaScriptExt (promise) with not been associated with specific Web Components + */ + it('testRunJavaScriptExtPromiseInitErr',0,async function(done){ + emitKey="emitDeleteJavaScriptRegisterInitErr"; + Utils.registerEvent("testRunJavaScriptExtPromiseInitErr","17100001",658,done); + Utils.registerEvent("testRunJavaScriptExtPromiseInitErr","Init error. The WebviewController must be associated with a Web component.",659,done); + sendEventByKey('webViewContJavaScriptError',10,''); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERROR_3100 + *tc.name testDeleteJavaScriptRegisterInitErr + *tc.desc test interface of deleteJavaScriptRegister with not been associated with specific Web Components + */ + it('testDeleteJavaScriptRegisterInitErr',0,async function(done){ + emitKey="emitDeleteJavaScriptRegisterNameErr"; + Utils.registerEvent("testDeleteJavaScriptRegisterInitErr","17100001",660,done); + Utils.registerEvent("testDeleteJavaScriptRegisterInitErr","Init error. The WebviewController must be associated with a Web component.",661,done); + sendEventByKey('webViewContJavaScriptError',10,''); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERROR_3200 + *tc.name testDeleteJavaScriptRegisterNameErr + *tc.desc test interface of deleteJavaScriptRegister with not been registered name + */ + it('testDeleteJavaScriptRegisterNameErr',0,async function(done){ + emitKey="emitDeleteJavaScriptRegisterNameErr"; + Utils.registerEvent("testDeleteJavaScriptRegisterNameErr","17100008",662,done); + Utils.registerEvent("testDeleteJavaScriptRegisterNameErr","Cannot delete JavaScriptProxy.",663,done); + sendEventByKey('webViewContJavaScriptError',10,''); + }) + }) +} \ No newline at end of file diff --git a/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/ets/test/webViewContJsMessageExtReturnError.test.ets b/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/ets/test/webViewContJsMessageExtReturnError.test.ets new file mode 100644 index 000000000..34f7e3c8f --- /dev/null +++ b/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/ets/test/webViewContJsMessageExtReturnError.test.ets @@ -0,0 +1,123 @@ +/** + * Copyright (c) 2023 iSoftStone Information Technology (Group) 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, afterEach, it, expect, beforeAll} from "@ohos/hypium"; +import events_emitter from '@ohos.events.emitter'; +import Utils from './Utils.ets'; +import router from '@system.router'; + +let emitKey = "emitJsMessageExtGetStringError"; +export default function webViewContJsMessageExtReturnError() { + describe('ActsAceWebDevWebViewContJsMessageExtReturnErrorTest', function () { + beforeAll(async function (done) { + let options = { + uri: 'MainAbility/pages/webViewContJsMessageExtReturnError', + } + try { + router.clear(); + let pages = router.getState(); + console.info("get webViewContJsMessageExtReturnError state success " + JSON.stringify(pages)); + if (!("webViewContJsMessageExtReturnError" == pages.name)) { + console.info("get webViewContJsMessageExtReturnError state success " + JSON.stringify(pages.name)); + let result = await router.push(options); + await Utils.sleep(2000); + console.info("push webViewContJsMessageExtReturnError page success " + JSON.stringify(result)); + } + } catch (err) { + console.error("push webViewContJsMessageExtReturnError page error: " + err); + } + done() + }); + beforeEach(async function (done) { + await Utils.sleep(2000); + console.info("webViewContJsMessageExtReturnError beforeEach start"); + done(); + }) + afterEach(async function (done) { + console.info("webViewContJsMessageExtReturnError afterEach start:"+emitKey); + try { + let backData = { + data: { + "ACTION": emitKey + } + } + let backEvent = { + eventId:10, + priority:events_emitter.EventPriority.LOW + } + console.info("start send emitKey"); + events_emitter.emit(backEvent, backData); + } catch (err) { + console.info("emit emitKey err: " + JSON.stringify(err)); + } + await Utils.sleep(2000); + done(); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERRORHUNDRED_1000 + *tc.name testJsMessageExtGetStringError + *tc.desc test interface of JsMessageExt getString with unmatched type + */ + it('testJsMessageExtGetStringError',0,async function(done){ + emitKey="emitJsMessageExtGetNumberError"; + Utils.registerEvent("testJsMessageExtGetStringError","17100014",816,done); + Utils.registerEvent("testJsMessageExtGetStringError","The type does not match with the value of the result.",817,done); + sendEventByKey('webViewContJsMessageExtReturnError',10,''); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERRORHUNDRED_1100 + *tc.name testJsMessageExtGetNumberError + *tc.desc test interface of JsMessageExt getNumber with unmatched type + */ + it('testJsMessageExtGetNumberError',0,async function(done){ + emitKey="emitJsMessageExtGetBooleanError"; + Utils.registerEvent("testJsMessageExtGetNumberError","17100014",818,done); + Utils.registerEvent("testJsMessageExtGetNumberError","The type does not match with the value of the result.",819,done); + sendEventByKey('webViewContJsMessageExtReturnError',10,''); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERRORHUNDRED_1200 + *tc.name testJsMessageExtGetBooleanError + *tc.desc test interface of JsMessageExt getBoolean with unmatched type + */ + it('testJsMessageExtGetBooleanError',0,async function(done){ + emitKey="emitJsMessageExtGetArrayBufferError"; + Utils.registerEvent("testJsMessageExtGetBooleanError","17100014",820,done); + Utils.registerEvent("testJsMessageExtGetBooleanError","The type does not match with the value of the result.",821,done); + sendEventByKey('webViewContJsMessageExtReturnError',10,''); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERRORHUNDRED_1300 + *tc.name testJsMessageExtGetArrayBufferError + *tc.desc test interface of JsMessageExt getArrayBuffer with unmatched type + */ + it('testJsMessageExtGetArrayBufferError',0,async function(done){ + emitKey="emitJsMessageExtGetArrayError"; + Utils.registerEvent("testJsMessageExtGetArrayBufferError","17100014",822,done); + Utils.registerEvent("testJsMessageExtGetArrayBufferError","The type does not match with the value of the result.",823,done); + sendEventByKey('webViewContJsMessageExtReturnError',10,''); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERRORHUNDRED_1400 + *tc.name testJsMessageExtGetArrayError + *tc.desc test interface of JsMessageExt getArray with unmatched type + */ + it('testJsMessageExtGetArrayError',0,async function(done){ + emitKey="emitJsMessageExtGetArrayError"; + Utils.registerEvent("testJsMessageExtGetArrayError","17100014",824,done); + Utils.registerEvent("testJsMessageExtGetArrayError","The type does not match with the value of the result.",825,done); + sendEventByKey('webViewContJsMessageExtReturnError',10,''); + }) + }) +} \ No newline at end of file diff --git a/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/ets/test/webViewContMessageError.test.ets b/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/ets/test/webViewContMessageError.test.ets new file mode 100644 index 000000000..75320a1ea --- /dev/null +++ b/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/ets/test/webViewContMessageError.test.ets @@ -0,0 +1,69 @@ +/** + * Copyright (c) 2023 iSoftStone Information Technology (Group) 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, afterEach, it, expect } from "@ohos/hypium"; +import events_emitter from '@ohos.events.emitter'; +import Utils from './Utils.ets'; +let emitKey = "emitPostMessageInitErr"; +export default function webViewContMessageError() { + describe('ActsAceWebDevWebViewContMessageErrorTest', function () { + beforeEach(async function (done) { + await Utils.sleep(2000); + console.info("webViewContMessageError beforeEach start"); + done(); + }) + afterEach(async function (done) { + console.info("webViewContMessageError afterEach start:"+emitKey); + try { + let backData = { + data: { + "ACTION": emitKey + } + } + let backEvent = { + eventId:10, + priority:events_emitter.EventPriority.LOW + } + console.info("start send emitKey"); + events_emitter.emit(backEvent, backData); + } catch (err) { + console.info("emit emitKey err: " + JSON.stringify(err)); + } + await Utils.sleep(2000); + done(); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERROR_0100 + *tc.name testPostMessageInitErr + *tc.desc test interface of postMessage with not been associated with specific Web Components + */ + it('testPostMessageInitErr',0,async function(done){ + emitKey="emitPostMessageEventUnPortErr"; + Utils.registerEvent("testPostMessageInitErr","17100001",600,done); + Utils.registerEvent("testPostMessageInitErr","Init error. The WebviewController must be associated with a Web component",601,done); + sendEventByKey('webViewContMessageError',10,''); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERROR_0200 + *tc.name testPostMessageEventPortClose + *tc.desc test interface of postMessageEvent with WebMessagePort been closed by ets + */ + it('testPostMessageEventPortClose',0,async function(done){ + emitKey="emitPostMessageEventUnPortErr"; + Utils.registerEvent("testPostMessageEventPortClose","17100010",602,done); + Utils.registerEvent("testPostMessageEventPortClose","Can not post message using this port.",603,done); + sendEventByKey('webViewContMessageError',10,''); + }) + }) +} \ No newline at end of file diff --git a/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/ets/test/webViewContPageOperationsError.test.ets b/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/ets/test/webViewContPageOperationsError.test.ets new file mode 100644 index 000000000..6486eccf8 --- /dev/null +++ b/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/ets/test/webViewContPageOperationsError.test.ets @@ -0,0 +1,178 @@ +/** + * Copyright (c) 2023 iSoftStone Information Technology (Group) 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, afterEach, it, expect, beforeAll} from "@ohos/hypium"; +import events_emitter from '@ohos.events.emitter'; +import Utils from './Utils.ets'; +import router from '@system.router'; + +let emitKey = "emitAccessForwardInitErr"; +export default function webViewContPageOperationsError() { + describe('ActsAceWebDevWebViewContPageOperationsErrorTest', function () { + beforeAll(async function (done) { + let options = { + uri: 'MainAbility/pages/webViewContPageOperationsError', + } + try { + router.clear(); + let pages = router.getState(); + console.info("get webViewContPageOperationsError state success " + JSON.stringify(pages)); + if (!("webViewContPageOperationsError" == pages.name)) { + console.info("get webViewContPageOperationsError state success " + JSON.stringify(pages.name)); + let result = await router.push(options); + await Utils.sleep(2000); + console.info("push webViewContPageOperationsError page success " + JSON.stringify(result)); + } + } catch (err) { + console.error("push webViewContPageOperationsError page error: " + err); + } + done() + }); + beforeEach(async function (done) { + await Utils.sleep(2000); + console.info("webViewContPageOperationsError beforeEach start"); + done(); + }) + afterEach(async function (done) { + console.info("webViewContPageOperationsError afterEach start:"+emitKey); + try { + let backData = { + data: { + "ACTION": emitKey + } + } + let backEvent = { + eventId:10, + priority:events_emitter.EventPriority.LOW + } + console.info("start send emitKey"); + events_emitter.emit(backEvent, backData); + } catch (err) { + console.info("emit emitKey err: " + JSON.stringify(err)); + } + await Utils.sleep(2000); + done(); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERROR_1600 + *tc.name testAccessForwardInitErr + *tc.desc test interface of accessForward with not been associated with specific Web Components + */ + it('testAccessForwardInitErr',0,async function(done){ + emitKey="emitForwardInitErr"; + Utils.registerEvent("testAccessForwardInitErr","17100001",630,done); + Utils.registerEvent("testAccessForwardInitErr","Init error. The WebviewController must be associated with a Web component.",631,done); + sendEventByKey('webViewContPageOperationsError',10,''); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERROR_1700 + *tc.name testForwardInitErr + *tc.desc test interface of forward with not been associated with specific Web Components + */ + it('testForwardInitErr',0,async function(done){ + emitKey="emitAccessBackwardInitErr"; + Utils.registerEvent("testForwardInitErr","17100001",632,done); + Utils.registerEvent("testForwardInitErr","Init error. The WebviewController must be associated with a Web component.",633,done); + sendEventByKey('webViewContPageOperationsError',10,''); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERROR_1800 + *tc.name testAccessBackwardInitErr + *tc.desc test interface of accessBackward with not been associated with specific Web Components + */ + it('testAccessBackwardInitErr',0,async function(done){ + emitKey="emitBackwardInitErr"; + Utils.registerEvent("testAccessBackwardInitErr","17100001",634,done); + Utils.registerEvent("testAccessBackwardInitErr","Init error. The WebviewController must be associated with a Web component.",635,done); + sendEventByKey('webViewContPageOperationsError',10,''); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERROR_1900 + *tc.name testBackwardInitErr + *tc.desc test interface of backward with not been associated with specific Web Components + */ + it('testBackwardInitErr',0,async function(done){ + emitKey="emitOnActiveInitErr"; + Utils.registerEvent("testBackwardInitErr","17100001",636,done); + Utils.registerEvent("testBackwardInitErr","Init error. The WebviewController must be associated with a Web component.",637,done); + sendEventByKey('webViewContPageOperationsError',10,''); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERROR_2000 + *tc.name testOnActiveInitErr + *tc.desc test interface of onActive with not been associated with specific Web Components + */ + it('testOnActiveInitErr',0,async function(done){ + emitKey="emitOnInactiveInitErr"; + Utils.registerEvent("testOnActiveInitErr","17100001",638,done); + Utils.registerEvent("testOnActiveInitErr","Init error. The WebviewController must be associated with a Web component.",639,done); + sendEventByKey('webViewContPageOperationsError',10,''); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERROR_2100 + *tc.name testOnInactiveInitErr + *tc.desc test interface of onInactive with not been associated with specific Web Components + */ + it('testOnInactiveInitErr',0,async function(done){ + emitKey="emitRefreshInitErr"; + Utils.registerEvent("testOnInactiveInitErr","17100001",640,done); + Utils.registerEvent("testOnInactiveInitErr","Init error. The WebviewController must be associated with a Web component.",641,done); + sendEventByKey('webViewContPageOperationsError',10,''); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERROR_2200 + *tc.name testRefreshInitErr + *tc.desc test interface of refresh with not been associated with specific Web Components + */ + it('testRefreshInitErr',0,async function(done){ + emitKey="emitAccessStepInitErr"; + Utils.registerEvent("testRefreshInitErr","17100001",642,done); + Utils.registerEvent("testRefreshInitErr","Init error. The WebviewController must be associated with a Web component.",643,done); + sendEventByKey('webViewContPageOperationsError',10,''); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERROR_2300 + *tc.name testAccessStepInitErr + *tc.desc test interface of accessStep with not been associated with specific Web Components + */ + it('testAccessStepInitErr',0,async function(done){ + emitKey="emitClearHistoryInitErr"; + Utils.registerEvent("testAccessStepInitErr","17100001",644,done); + Utils.registerEvent("testAccessStepInitErr","Init error. The WebviewController must be associated with a Web component.",645,done); + sendEventByKey('webViewContPageOperationsError',10,''); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERROR_2400 + *tc.name testClearHistoryInitErr + *tc.desc test interface of clearHistory with not been associated with specific Web Components + */ + it('testClearHistoryInitErr',0,async function(done){ + emitKey="emitGetHitTestInitErr"; + Utils.registerEvent("testClearHistoryInitErr","17100001",646,done); + Utils.registerEvent("testClearHistoryInitErr","Init error. The WebviewController must be associated with a Web component.",647,done); + sendEventByKey('webViewContPageOperationsError',10,''); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERROR_2500 + *tc.name testGetHitTestInitErr + *tc.desc test interface of getHitTest with not been associated with specific Web Components + */ + it('testGetHitTestInitErr',0,async function(done){ + emitKey="emitGetHitTestInitErr"; + Utils.registerEvent("testGetHitTestInitErr","17100001",648,done); + Utils.registerEvent("testGetHitTestInitErr","Init error. The WebviewController must be associated with a Web component.",649,done); + sendEventByKey('webViewContPageOperationsError',10,''); + }) + }) +} \ No newline at end of file diff --git a/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/ets/test/webViewContStoreWebArchiveError.test.ets b/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/ets/test/webViewContStoreWebArchiveError.test.ets new file mode 100644 index 000000000..113f6d188 --- /dev/null +++ b/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/ets/test/webViewContStoreWebArchiveError.test.ets @@ -0,0 +1,134 @@ +/** + * Copyright (c) 2023 iSoftStone Information Technology (Group) 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, afterEach, it, expect, beforeAll} from "@ohos/hypium"; +import events_emitter from '@ohos.events.emitter'; +import Utils from './Utils.ets'; +import router from '@system.router'; + +let emitKey = "emitStoreWebArchiveCallBackInitErr"; +export default function webViewContStoreWebArchiveError() { + describe('ActsAceWebDevWebViewContStoreWebArchiveErrorTest', function () { + beforeAll(async function (done) { + let options = { + uri: 'MainAbility/pages/webViewContStoreWebArchiveError', + } + try { + router.clear(); + let pages = router.getState(); + console.info("get webViewContStoreWebArchiveError state success " + JSON.stringify(pages)); + if (!("webViewContStoreWebArchiveError" == pages.name)) { + console.info("get webViewContStoreWebArchiveError state success " + JSON.stringify(pages.name)); + let result = await router.push(options); + await Utils.sleep(2000); + console.info("push webViewContStoreWebArchiveError page success " + JSON.stringify(result)); + } + } catch (err) { + console.error("push webViewContStoreWebArchiveError page error: " + err); + } + done() + }); + beforeEach(async function (done) { + await Utils.sleep(2000); + console.info("webViewContStoreWebArchiveError beforeEach start"); + done(); + }) + afterEach(async function (done) { + console.info("webViewContStoreWebArchiveError afterEach start:"+emitKey); + try { + let backData = { + data: { + "ACTION": emitKey + } + } + let backEvent = { + eventId:10, + priority:events_emitter.EventPriority.LOW + } + console.info("start send emitKey"); + events_emitter.emit(backEvent, backData); + } catch (err) { + console.info("emit emitKey err: " + JSON.stringify(err)); + } + await Utils.sleep(2000); + done(); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERROR_5100 + *tc.name testStoreWebArchiveInitErr + *tc.desc test interface of storeWebArchive with not been associated with specific Web Components + */ + it('teststoreWebArchiveInitErr',0,async function(done){ + emitKey="emitStoreWebArchiveCallBackPathErr"; + Utils.registerEvent("teststoreWebArchiveInitErr","17100001",700,done); + Utils.registerEvent("teststoreWebArchiveInitErr","Init error. The WebviewController must be associated with a Web component.",701,done); + sendEventByKey('webViewContStoreWebArchiveError',10,''); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERROR_5200 + *tc.name testStoreWebArchiveCallBackPathErr + *tc.desc test interface of storeWebArchive with wrong resource path + */ + it('testStoreWebArchiveCallBackPathErr',0,async function(done){ + emitKey="emitStoreWebArchiveCallBackUnAccessErr"; + Utils.registerEvent("testStoreWebArchiveCallBackPathErr",17100003,702,done); + Utils.registerEvent("testStoreWebArchiveCallBackPathErr","Invalid resource path or file type.",703,done); + sendEventByKey('webViewContStoreWebArchiveError',10,''); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERROR_5300 + *tc.name testStoreWebArchiveCallBackUnAccessErr + *tc.desc test interface of storeWebArchive with resource path cannot access + */ + it('testStoreWebArchiveCallBackUnAccessErr',0,async function(done){ + emitKey="emitStoreWebArchivePromiseInitErr"; + Utils.registerEvent("testStoreWebArchiveCallBackUnAccessErr",17100003,704,done); + Utils.registerEvent("testStoreWebArchiveCallBackUnAccessErr","Invalid resource path or file type.",705,done); + sendEventByKey('webViewContStoreWebArchiveError',10,''); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERROR_5400 + *tc.name testStoreWebArchivePromiseInitErr + *tc.desc test interface of storeWebArchive promise with not been associated with specific Web Components + */ + it('testStoreWebArchivePromiseInitErr',0,async function(done){ + emitKey="emitStoreWebArchivePromisePathErr"; + Utils.registerEvent("testStoreWebArchivePromiseInitErr","17100001",706,done); + Utils.registerEvent("testStoreWebArchivePromiseInitErr","Init error. The WebviewController must be associated with a Web component.",707,done); + sendEventByKey('webViewContStoreWebArchiveError',10,''); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERROR_5500 + *tc.name testStoreWebArchivePromisePathErr + *tc.desc test interface of storeWebArchive promise with wrong resource path + */ + it('testStoreWebArchivePromisePathErr',0,async function(done){ + emitKey="emitStoreWebArchivePromiseUnAccessErr"; + Utils.registerEvent("testStoreWebArchivePromisePathErr",17100003,708,done); + Utils.registerEvent("testStoreWebArchivePromisePathErr","Invalid resource path or file type.",709,done); + sendEventByKey('webViewContStoreWebArchiveError',10,''); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERROR_5600 + *tc.name testStoreWebArchivePromiseUnAccessErr + *tc.desc test interface of storeWebArchive promise with resource path cannot access + */ + it('testStoreWebArchivePromiseUnAccessErr',0,async function(done){ + emitKey="emitStoreWebArchivePromiseUnAccessErr"; + Utils.registerEvent("testStoreWebArchivePromiseUnAccessErr",17100003,710,done); + Utils.registerEvent("testStoreWebArchivePromiseUnAccessErr","Invalid resource path or file type.",711,done); + sendEventByKey('webViewContStoreWebArchiveError',10,''); + }) + }) +} \ No newline at end of file diff --git a/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/ets/test/webViewContWebMessageExtReturnError.test.ets b/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/ets/test/webViewContWebMessageExtReturnError.test.ets new file mode 100644 index 000000000..8843b948c --- /dev/null +++ b/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/ets/test/webViewContWebMessageExtReturnError.test.ets @@ -0,0 +1,134 @@ +/** + * Copyright (c) 2023 iSoftStone Information Technology (Group) 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, afterEach, it, expect, beforeAll} from "@ohos/hypium"; +import events_emitter from '@ohos.events.emitter'; +import Utils from './Utils.ets'; +import router from '@system.router'; + +let emitKey = "emitWebMessageExtGetStringError"; +export default function webViewContWebMessageExtReturnError() { + describe('ActsAceWebDevWebViewContWebMessageExtReturnErrorTest', function () { + beforeAll(async function (done) { + let options = { + uri: 'MainAbility/pages/webViewContWebMessageExtReturnError', + } + try { + router.clear(); + let pages = router.getState(); + console.info("get webViewContWebMessageExtReturnError state success " + JSON.stringify(pages)); + if (!("webViewContWebMessageExtReturnError" == pages.name)) { + console.info("get webViewContWebMessageExtReturnError state success " + JSON.stringify(pages.name)); + let result = await router.push(options); + await Utils.sleep(2000); + console.info("push webViewContWebMessageExtReturnError page success " + JSON.stringify(result)); + } + } catch (err) { + console.error("push webViewContWebMessageExtReturnError page error: " + err); + } + done() + }); + beforeEach(async function (done) { + await Utils.sleep(2000); + console.info("webViewContWebMessageExtReturnError beforeEach start"); + done(); + }) + afterEach(async function (done) { + console.info("webViewContWebMessageExtReturnError afterEach start:"+emitKey); + try { + let backData = { + data: { + "ACTION": emitKey + } + } + let backEvent = { + eventId:10, + priority:events_emitter.EventPriority.LOW + } + console.info("start send emitKey"); + events_emitter.emit(backEvent, backData); + } catch (err) { + console.info("emit emitKey err: " + JSON.stringify(err)); + } + await Utils.sleep(2000); + done(); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERRORHUNDRED_1500 + *tc.name testWebMessageExtGetStringError + *tc.desc test interface of WebMessageExt getString with unmatched type + */ + it('testWebMessageExtGetStringError',0,async function(done){ + emitKey="emitWebMessageExtGetNumberError"; + Utils.registerEvent("testWebMessageExtGetStringError","17100014",826,done); + Utils.registerEvent("testWebMessageExtGetStringError","The type does not match with the value of the result.",827,done); + sendEventByKey('webViewContWebMessageExtReturnError',10,''); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERRORHUNDRED_1600 + *tc.name testWebMessageExtGetNumberError + *tc.desc test interface of WebMessageExt getNumber with unmatched type + */ + it('testWebMessageExtGetNumberError',0,async function(done){ + emitKey="emitWebMessageExtGetBooleanError"; + Utils.registerEvent("testWebMessageExtGetNumberError","17100014",828,done); + Utils.registerEvent("testWebMessageExtGetNumberError","The type does not match with the value of the result.",829,done); + sendEventByKey('webViewContWebMessageExtReturnError',10,''); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERRORHUNDRED_1700 + *tc.name testWebMessageExtGetBooleanError + *tc.desc test interface of WebMessageExt getBoolean with unmatched type + */ + it('testWebMessageExtGetBooleanError',0,async function(done){ + emitKey="emitWebMessageExtGetArrayBufferError"; + Utils.registerEvent("testWebMessageExtGetBooleanError","17100014",830,done); + Utils.registerEvent("testWebMessageExtGetBooleanError","The type does not match with the value of the result.",831,done); + sendEventByKey('webViewContWebMessageExtReturnError',10,''); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERRORHUNDRED_1800 + *tc.name testWebMessageExtGetArrayBufferError + *tc.desc test interface of WebMessageExt getArrayBuffer with unmatched type + */ + it('testWebMessageExtGetArrayBufferError',0,async function(done){ + emitKey="emitWebMessageExtGetArrayError"; + Utils.registerEvent("testWebMessageExtGetArrayBufferError","17100014",832,done); + Utils.registerEvent("testWebMessageExtGetArrayBufferError","The type does not match with the value of the result.",833,done); + sendEventByKey('webViewContWebMessageExtReturnError',10,''); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERRORHUNDRED_1900 + *tc.name testWebMessageExtGetArrayError + *tc.desc test interface of WebMessageExt getArray with unmatched type + */ + it('testWebMessageExtGetArrayError',0,async function(done){ + emitKey="emitWebMessageExtGetErrorError"; + Utils.registerEvent("testWebMessageExtGetArrayError","17100014",834,done); + Utils.registerEvent("testWebMessageExtGetArrayError","The type does not match with the value of the result.",835,done); + sendEventByKey('webViewContWebMessageExtReturnError',10,''); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERRORHUNDRED_2000 + *tc.name testWebMessageExtGetErrorError + *tc.desc test interface of WebMessageExt getError with unmatched type + */ + it('testWebMessageExtGetErrorError',0,async function(done){ + emitKey="emitWebMessageExtGetErrorError"; + Utils.registerEvent("testWebMessageExtGetErrorError","17100014",836,done); + Utils.registerEvent("testWebMessageExtGetErrorError","The type does not match with the value of the result.",837,done); + sendEventByKey('webViewContWebMessageExtReturnError',10,''); + }) + }) +} \ No newline at end of file diff --git a/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/ets/test/webViewContZoomAndOthersError.test.ets b/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/ets/test/webViewContZoomAndOthersError.test.ets new file mode 100644 index 000000000..9c219986f --- /dev/null +++ b/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/ets/test/webViewContZoomAndOthersError.test.ets @@ -0,0 +1,266 @@ +/** + * Copyright (c) 2023 iSoftStone Information Technology (Group) 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, afterEach, it, expect, beforeAll} from "@ohos/hypium"; +import events_emitter from '@ohos.events.emitter'; +import Utils from './Utils.ets'; +import router from '@system.router'; + +let emitKey = "emitZoomInitErr"; +export default function webViewContZoomAndOthersError() { + describe('ActsAceWebDevWebViewContZoomAndOthersErrorTest', function () { + beforeAll(async function (done) { + let options = { + uri: 'MainAbility/pages/webViewContZoomAndOthersError', + } + try { + router.clear(); + let pages = router.getState(); + console.info("get webViewContZoomAndOthersError state success " + JSON.stringify(pages)); + if (!("webViewContZoomAndOthersError" == pages.name)) { + console.info("get webViewContZoomAndOthersError state success " + JSON.stringify(pages.name)); + let result = await router.push(options); + await Utils.sleep(2000); + console.info("push webViewContZoomAndOthersError page success " + JSON.stringify(result)); + } + } catch (err) { + console.error("push webViewContZoomAndOthersError page error: " + err); + } + done() + }); + beforeEach(async function (done) { + await Utils.sleep(2000); + console.info("webViewContZoomAndOthersError beforeEach start"); + done(); + }) + afterEach(async function (done) { + console.info("webViewContZoomAndOthersError afterEach start:"+emitKey); + try { + let backData = { + data: { + "ACTION": emitKey + } + } + let backEvent = { + eventId:10, + priority:events_emitter.EventPriority.LOW + } + console.info("start send emitKey"); + events_emitter.emit(backEvent, backData); + } catch (err) { + console.info("emit emitKey err: " + JSON.stringify(err)); + } + await Utils.sleep(2000); + done(); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERROR_3300 + *tc.name testZoomInitErr + *tc.desc test interface of zoom with not been associated with specific Web Components + */ + it('testZoomInitErr',0,async function(done){ + emitKey="emitZoomEnableErr"; + Utils.registerEvent("testZoomInitErr","17100001",664,done); + Utils.registerEvent("testZoomInitErr","Init error. The WebviewController must be associated with a Web component.",665,done); + sendEventByKey('webViewContZoomAndOthersError',10,''); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERROR_3400 + *tc.name testZoomEnableErr + *tc.desc test interface of zoom with not been enabled + */ + it('testZoomEnableErr',0,async function(done){ + emitKey="emitSearchAllAsyncInitErr"; + Utils.registerEvent("testZoomEnableErr","17100004",666,done); + Utils.registerEvent("testZoomEnableErr","Function not enable.",667,done); + sendEventByKey('webViewContZoomAndOthersError',10,''); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERROR_3500 + *tc.name testSearchAllAsyncInitErr + *tc.desc test interface of searchAllAsync with not been associated with specific Web Components + */ + it('testSearchAllAsyncInitErr',0,async function(done){ + emitKey="emitClearMatchesInitErr"; + Utils.registerEvent("testSearchAllAsyncInitErr","17100001",668,done); + Utils.registerEvent("testSearchAllAsyncInitErr","Init error. The WebviewController must be associated with a Web component.",669,done); + sendEventByKey('webViewContZoomAndOthersError',10,''); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERROR_3600 + *tc.name testClearMatchesInitErr + *tc.desc test interface of clearMatches with not been associated with specific Web Components + */ + it('testClearMatchesInitErr',0,async function(done){ + emitKey="emitSearchNextInitErr"; + Utils.registerEvent("testClearMatchesInitErr","17100001",670,done); + Utils.registerEvent("testClearMatchesInitErr","Init error. The WebviewController must be associated with a Web component.",671,done); + sendEventByKey('webViewContZoomAndOthersError',10,''); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERROR_3700 + *tc.name testSearchNextInitErr + *tc.desc test interface of searchNext with not been associated with specific Web Components + */ + it('testSearchNextInitErr',0,async function(done){ + emitKey="emitClearSslCacheInitErr"; + Utils.registerEvent("testSearchNextInitErr","17100001",672,done); + Utils.registerEvent("testSearchNextInitErr","Init error. The WebviewController must be associated with a Web component.",673,done); + sendEventByKey('webViewContZoomAndOthersError',10,''); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERROR_3800 + *tc.name testClearSslCacheInitErr + *tc.desc test interface of clearSslCache with not been associated with specific Web Components + */ + it('testClearSslCacheInitErr',0,async function(done){ + emitKey="emitClearClientAuthenticationCacheInitErr"; + Utils.registerEvent("testClearSslCacheInitErr","17100001",674,done); + Utils.registerEvent("testClearSslCacheInitErr","Init error. The WebviewController must be associated with a Web component.",675,done); + sendEventByKey('webViewContZoomAndOthersError',10,''); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERROR_3900 + *tc.name testClearClientAuthenticationCacheInitErr + *tc.desc test interface of clearClientAuthenticationCache with not been associated with specific Web Components + */ + it('testClearClientAuthenticationCacheInitErr',0,async function(done){ + emitKey="emitCreateWebMessagePortsInitErr"; + Utils.registerEvent("testClearClientAuthenticationCacheInitErr","17100001",676,done); + Utils.registerEvent("testClearClientAuthenticationCacheInitErr","Init error. The WebviewController must be associated with a Web component.",677,done); + sendEventByKey('webViewContZoomAndOthersError',10,''); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERROR_4000 + *tc.name testCreateWebMessagePortsInitErr + *tc.desc test interface of createWebMessagePorts with not been associated with specific Web Components + */ + it('testCreateWebMessagePortsInitErr',0,async function(done){ + emitKey="emitRequestFocusInitErr"; + Utils.registerEvent("testCreateWebMessagePortsInitErr","17100001",678,done); + Utils.registerEvent("testCreateWebMessagePortsInitErr","Init error. The WebviewController must be associated with a Web component.",679,done); + sendEventByKey('webViewContZoomAndOthersError',10,''); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERROR_4100 + *tc.name testRequestFocusInitErr + *tc.desc test interface of requestFocus with not been associated with specific Web Components + */ + it('testRequestFocusInitErr',0,async function(done){ + emitKey="emitZoomInInitErr"; + Utils.registerEvent("testRequestFocusInitErr","17100001",680,done); + Utils.registerEvent("testRequestFocusInitErr","Init error. The WebviewController must be associated with a Web component.",681,done); + sendEventByKey('webViewContZoomAndOthersError',10,''); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERROR_4200 + *tc.name testZoomInInitErr + *tc.desc test interface of zoomIn with not been associated with specific Web Components + */ + it('testZoomInInitErr',0,async function(done){ + emitKey="emitZoomInEnableErr"; + Utils.registerEvent("testZoomInInitErr","17100001",682,done); + Utils.registerEvent("testZoomInInitErr","Init error. The WebviewController must be associated with a Web component.",683,done); + sendEventByKey('webViewContZoomAndOthersError',10,''); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERROR_4300 + *tc.name testZoomInEnableErr + *tc.desc test interface of zoomIn with not been enabled + */ + it('testZoomInEnableErr',0,async function(done){ + emitKey="emitZoomOutInitErr"; + Utils.registerEvent("testZoomInEnableErr","17100004",684,done); + Utils.registerEvent("testZoomInEnableErr","Function not enable.",685,done); + sendEventByKey('webViewContZoomAndOthersError',10,''); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERROR_4400 + *tc.name testZoomOutInitErr + *tc.desc test interface of zoomOut with not been associated with specific Web Components + */ + it('testZoomOutInitErr',0,async function(done){ + emitKey="emitZoomOutEnableErr"; + Utils.registerEvent("testZoomOutInitErr","17100001",686,done); + Utils.registerEvent("testZoomOutInitErr","Init error. The WebviewController must be associated with a Web component.",687,done); + sendEventByKey('webViewContZoomAndOthersError',10,''); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERROR_4500 + *tc.name testZoomOutEnableErr + *tc.desc test interface of zoomOut with not been enabled + */ + it('testZoomOutEnableErr',0,async function(done){ + emitKey="emitGetHitTestValueInitErr"; + Utils.registerEvent("testZoomOutEnableErr","17100004",688,done); + Utils.registerEvent("testZoomOutEnableErr","Function not enable.",689,done); + sendEventByKey('webViewContZoomAndOthersError',10,''); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERROR_4600 + *tc.name testGetHitTestValueInitErr + *tc.desc test interface of getHitTestValue with not been associated with specific Web Components + */ + it('testGetHitTestValueInitErr',0,async function(done){ + emitKey="emitGetWebIdInitErr"; + Utils.registerEvent("testGetHitTestValueInitErr","17100001",690,done); + Utils.registerEvent("testGetHitTestValueInitErr","Init error. The WebviewController must be associated with a Web component.",691,done); + sendEventByKey('webViewContZoomAndOthersError',10,''); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERROR_4700 + *tc.name testGetWebIdInitErr + *tc.desc test interface of getWebId with not been associated with specific Web Components + */ + it('testGetWebIdInitErr',0,async function(done){ + emitKey="emitGetUserAgentInitErr"; + Utils.registerEvent("testGetWebIdInitErr","17100001",692,done); + Utils.registerEvent("testGetWebIdInitErr","Init error. The WebviewController must be associated with a Web component.",639,done); + sendEventByKey('webViewContZoomAndOthersError',10,''); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERROR_4800 + *tc.name testGetUserAgentInitErr + *tc.desc test interface of getUserAgent with not been associated with specific Web Components + */ + it('testGetUserAgentInitErr',0,async function(done){ + emitKey="emitGetTitleInitErr"; + Utils.registerEvent("testGetUserAgentInitErr","17100001",694,done); + Utils.registerEvent("testGetUserAgentInitErr","Init error. The WebviewController must be associated with a Web component.",695,done); + sendEventByKey('webViewContZoomAndOthersError',10,''); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERROR_4900 + *tc.name testGetTitleInitErr + *tc.desc test interface of getTitle with not been associated with specific Web Components + */ + it('testGetTitleInitErr',0,async function(done){ + emitKey="emitGetPageHeightInitErr"; + Utils.registerEvent("testGetTitleInitErr","17100001",696,done); + Utils.registerEvent("testGetTitleInitErr","Init error. The WebviewController must be associated with a Web component.",697,done); + sendEventByKey('webViewContZoomAndOthersError',10,''); + }) + /* + *tc.number SUB_ACE_BASIC_ETS_WEBVIEWERROR_5000 + *tc.name testGetPageHeightInitErr + *tc.desc test interface of getPageHeight with not been associated with specific Web Components + */ + it('testGetPageHeightInitErr',0,async function(done){ + emitKey="emitGetPageHeightInitErr"; + Utils.registerEvent("testGetPageHeightInitErr","17100001",698,done); + Utils.registerEvent("testGetPageHeightInitErr","Init error. The WebviewController must be associated with a Web component.",699,done); + sendEventByKey('webViewContZoomAndOthersError',10,''); + }) + }) +} \ No newline at end of file diff --git a/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/module.json b/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/module.json new file mode 100644 index 000000000..0729db882 --- /dev/null +++ b/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/module.json @@ -0,0 +1,49 @@ +{ + "module": { + "name": "phone", + "type": "entry", + "srcEntrance": "./ets/Application/AbilityStage.ts", + "description": "$string:phone_entry_dsc", + "mainElement": "MainAbility", + "deviceTypes": [ + "tablet", + "default", + "phone" + ], + "deliveryWithInstall": true, + "installationFree": false, + "uiSyntax": "ets", + "pages": "$profile:main_pages", + "metadata": [ + { + "name": "ArkTSPartialUpdate", + "value": "true" + } + ], + "abilities": [{ + "name": "com.example.myapplication.MainAbility", + "srcEntrance": "./ets/MainAbility/MainAbility.ts", + "description": "$string:phone_entry_main", + "icon": "$media:icon", + "label": "$string:entry_label", + "visible": true, + "orientation": "portrait", + "skills": [{ + "actions": [ + "action.system.home" + ], + "entities": [ + "entity.system.home" + ] + }] + }], + "requestPermissions": [ + { + "name": "ohos.permission.LOCATION" + }, + { + "name": "ohos.permission.INTERNET" + } + ] + } +} \ No newline at end of file diff --git a/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/resources/base/element/string.json b/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/resources/base/element/string.json new file mode 100644 index 000000000..2977b612e --- /dev/null +++ b/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/resources/base/element/string.json @@ -0,0 +1,32 @@ +{ + "string": [ + { + "name": "phone_entry_dsc", + "value": "i am an entry for phone" + }, + { + "name": "phone_entry_main", + "value": "the phone entry ability" + }, + { + "name": "entry_label", + "value": "ActsContextTest" + }, + { + "name": "form_description", + "value": "my form" + }, + { + "name": "serviceability_description", + "value": "my whether" + }, + { + "name": "description_application", + "value": "demo for test" + }, + { + "name": "app_name", + "value": "Demo" + } + ] +} diff --git a/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/resources/base/media/icon.png b/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/resources/base/media/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..474a55588fd7216113dd42073aadf254d4dba023 GIT binary patch literal 15458 zcmV-oJe|XdP)<h;3K|Lk000e1NJLTq0043T0043b1^@s6kKKiR00001b5ch_0Itp) z=>Px#1ZP1_K>z@;j|==^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KqpXab7ytkO07*qoM6N<$f;yQ2zW@LL literal 0 HcmV?d00001 diff --git a/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/resources/base/profile/main_pages.json b/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/resources/base/profile/main_pages.json new file mode 100644 index 000000000..b9566994c --- /dev/null +++ b/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/resources/base/profile/main_pages.json @@ -0,0 +1,13 @@ +{ + "src": [ + "MainAbility/pages/webViewContMessageError", + "MainAbility/pages/webViewContPageOperationsError", + "MainAbility/pages/webViewContJavaScriptError", + "MainAbility/pages/webViewContZoomAndOthersError", + "MainAbility/pages/webViewContStoreWebArchiveError", + "MainAbility/pages/webViewContGetUrlAndOthersError", + "MainAbility/pages/webViewContCookieToGeoLocationError", + "MainAbility/pages/webViewContJsMessageExtReturnError", + "MainAbility/pages/webViewContWebMessageExtReturnError" + ] +} \ No newline at end of file diff --git a/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/resources/rawfile/icon.png b/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/resources/rawfile/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..474a55588fd7216113dd42073aadf254d4dba023 GIT binary patch literal 15458 zcmV-oJe|XdP)<h;3K|Lk000e1NJLTq0043T0043b1^@s6kKKiR00001b5ch_0Itp) z=>Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!~g&e!~vBn4jTXfJNHRMK~#8N)t$?W zZ`*d)f6uD@IOn2&LJ;lP6@!gHh#>Y<V%wGxg4)xzw<9PC@qtkU#TyJH4Y4DF7!+GJ z#s5S!-n(~I{i@2(=R4+DYu4Jos(sGA7sYYT*mJG<7<0_=nvb=9tM-5X*Z$G-4tRb} zl2m*e*Zci3`TPAo*w@G1es?$=cF*8k_OzkXaG>1!r&0HL_gDqb&`3X(Z=GaQp8SP` z92In5!tr>lHv4nxKS1{J@p1P!+F4$_JksuYcRrnVr_*tFKEi|jF}%m8r`_Y_l6p^% z@<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@nJZgr1<2a{xBQ-lIK~pAH?^`km{I01IzdD7@r|t*_4y`9@NA5 zq$<1;c6}R8!%NJeZ{_C?c;3;(Bhvgl9`1TUrhJs+)3eHTVN^Wtf9v1;w`bk-!U80# zPb<NI-=d4a9U|7?Anxw&u*!FM29xs%tKvUB>4Nai`;Q4VyWJmBm(HGVb%x!$o9g(m z@BNm8)L5LW41ks^%nDsO9dc#n{!ihj%?OK8jS5s)q|ox6AsyuMaEws?(61<4>Dl&% z(AowWE}sZbd2$Fpd3X!W{44-|eRU%5z)~*gA?R**Vyu2$E5~BWM~PgBBq$=kqGE67 z`@|=dDkKs@MXyRk(q=Sb__5!7i&kaqd|~>q`yW64akf!;YC=W70<8l5tW13-+~|Y; zkOj7<h0&QjqA&U}5-QjI-~IjnPH1K2W)yM|bfi+xr}q)044+*_LDW!qJijMQ_>m+O z!5pPf&u5hW8I_=f<LN%iXWEXC4kuzew2!-Y41gZsMh4IU%5a%|WI{*0Dxb}@C$k>D zD*;20N{)BIOQ{tj;NRl5w-|ch2}M5c{wK!f>CfqKoBq&WEM66Pqk<HuzXlUreTFvu zNvn-U1$e$`h<lHs{D7fP9{izAew%1Kr_%lX=iS*d1fPfkuPXbDq33Ir$Us_5Hj%^m z;IEC{1vr(!7uN3BT}<Yn!+kT>aN5`Y)t8TRI`--F?$f7FyF2*vpx(dgmuRWV_Q&1- Y0jIQKqpXab7ytkO07*qoM6N<$f;yQ2zW@LL literal 0 HcmV?d00001 diff --git a/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/resources/rawfile/index.html b/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/resources/rawfile/index.html new file mode 100644 index 000000000..5affaa710 --- /dev/null +++ b/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/resources/rawfile/index.html @@ -0,0 +1,73 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="UTF-8"> + <meta http-equiv="X-UA-Compatible" content="IE=edge"> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <title>index</title> + <style> + #pageHeight{ + height:1300px + } + </style> +</head> +<body> + <div id="container">首页</div> + <div id="pageHeight"></div> + <a href="second.html" id="fileAccess">打开rawfile文件</a> + <img src="icon.png" alt="icon" id="imgs"> +</body> +<script> + let ele=document.getElementById("imgs"); + let loadImage; + ele.onload=function(){ + loadImage="load complete" + } + function getUserAgent(){ + return navigator.userAgent + } + function test(){ + backToEts.test("backToEts") + } + function testRunJavaScript(){ + return "testRunJavaScript" + } + function getPageHeight(){ + let height=document.body.scrollHeight + return height + } + function proxy(){ + objName.register("backToEts") + } + function registerTest(){ + let str=objName.register(); + console.log(str); + return str + } + function jsAccess(){ + console.log("web111") + } + function consoleTest(){ + console.log("console test") + } + function alertTest(){ + alert('alert test') + } + function confirmTest(){ + confirm("confirm test") + } + function getImgResult(){ + return loadImage + } + function toPrompt(){ + let result=prompt("age","20"); + console.log("result:"+result) + } + function openRawFile(){ + document.getElementById("fileAccess").click() + } + function gettitle(){ + return document.title + } +</script> +</html> \ No newline at end of file diff --git a/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/resources/rawfile/index.js b/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/resources/rawfile/index.js new file mode 100644 index 000000000..bf25482c8 --- /dev/null +++ b/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/resources/rawfile/index.js @@ -0,0 +1,150 @@ +/** + * Copyright (c) 2023 iSoftStone Information Technology (Group) 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. + */ + +//index.js +var h5Port; +window.addEventListener('message', function(event) { + if (event.data == 'init_web_messageport') { + if(event.ports[0] != null) { + h5Port = event.ports[0]; // 1. ä¿å˜ä»Žets侧å‘é€è¿‡æ¥çš„ç«¯å£ + h5Port.onmessage = function(event) { + console.log("hwd In html got message"); + // 2. 接收ets侧å‘é€è¿‡æ¥çš„消æ¯. + var result = event.data; + console.log("In html got message, typeof: ", typeof(result)); + console.log("In html got message, result: ", (result)); + if (typeof(result) == "string") { + console.log("In html got message, String: ", result); + document.getElementById("msg").innerHTML = "String:" + result; + } else if (typeof(result) == "number") { + console.log("In html side got message, number: ", result); + document.getElementById("msg").innerHTML = "Number:" + result; + } else if (typeof(result) == "boolean") { + console.log("In html side got message, boolean: ", result); + document.getElementById("msg").innerHTML = "Boolean:" + result; + } else if (typeof(result) == "object") { + if (result instanceof ArrayBuffer) { + document.getElementById("msg2").innerHTML = "ArrayBuffer:" + result.byteLength; + console.log("In html got message, byteLength: ", result.byteLength); + } else if (result instanceof Error) { + console.log("In html error message, err:" + (result)); + console.log("In html error message, typeof err:" + typeof(result)); + document.getElementById("msg2").innerHTML = "Error:" + result.name + ", msg:" + result.message; + } else if (result instanceof Array) { + console.log("In html got message, Array"); + console.log("In html got message, Array length:" + result.length); + console.log("In html got message, Array[0]:" + (result[0])); + console.log("In html got message, typeof Array[0]:" + typeof(result[0])); + document.getElementById("msg2").innerHTML = "Array len:" + result.length + ", value:" + result; + } else { + console.log("In html got message, not any instance of support type"); + document.getElementById("msg").innerHTML = "not any instance of support type"; + } + } else { + console.log("In html got message, not support type"); + document.getElementById("msg").innerHTML = "not support type"; + } + } + h5Port.onmessageerror = (event) => { + console.error(`hwd In html Error receiving message: ${event}`); + }; + } + } +}) + +// 使用h5Portå¾€ets侧å‘é€String类型的消æ¯. +function postStringToApp() { + if (h5Port) { + console.log("In html send string message"); + h5Port.postMessage("hello"); + console.log("In html send string message end"); + } else { + console.error("In html h5port is null, please init first"); + } +} + +// 使用h5Portå¾€ets侧å‘é€Number类型的消æ¯. +function postNumberToApp() { + if (h5Port) { + console.log("In html send number message"); + h5Port.postMessage(123456); + console.log("In html send number message end"); + } else { + console.error("In html h5port is null, please init first"); + } +} + +// 使用h5Portå¾€ets侧å‘é€Boolean类型的消æ¯. +function postBooleanToApp() { + if (h5Port) { + console.log("In html send boolean message"); + h5Port.postMessage(true); + console.log("In html send boolean message end"); + } else { + console.error("In html h5port is null, please init first"); + } +} + +// 使用h5Portå¾€ets侧å‘é€ArrayBuffer类型的消æ¯. +function postArrayBufferToApp() { + if (h5Port) { + console.log("In html send ArrayBuffer message"); + let buffer = new ArrayBuffer(12); + buffer[0] = 'a'; + h5Port.postMessage(buffer); + console.log("In html send ArrayBuffer message end"); + } else { + console.error("In html h5port is null, please init first"); + } +} + +// 使用h5Portå¾€ets侧å‘é€Array类型的消æ¯. +function postArrayToApp() { + if (h5Port) { + console.log("In html send Array message"); + let a = Array("apple", "banana", "cherry"); + h5Port.postMessage(a); + console.log("In html send Array message end"); + } else { + console.error("In html h5port is null, please init first"); + } +} + +// 使用h5Portå¾€ets侧å‘é€Error类型的消æ¯. +function postErrorToApp() { + if (h5Port) { + console.log("In html send Error message"); + let err = new Error('An error occurred!', { cause: '4321' }) + h5Port.postMessage(err); + console.log("In html send Error message end"); + } else { + console.error("In html h5port is null, please init first"); + } +} + +function closeWin() { + window.opener = null + window.open('', '_self',) + window.close() + return true +} + +function portClose() { + h5Port.close() +} + +function test() { + backToEts.test("backToEts") +} \ No newline at end of file diff --git a/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/resources/rawfile/indexEdit.html b/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/resources/rawfile/indexEdit.html new file mode 100644 index 000000000..a03bb4b35 --- /dev/null +++ b/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/resources/rawfile/indexEdit.html @@ -0,0 +1,22 @@ +<!--index.html--> +<!DOCTYPE html> +<html lang="en-gb"> +<head> + <title>WebView MessagePort Demo</title> +</head> + +<body> +<h1>Html5 Send and Receive Message</h1> +<h3 id="msg">Receive string:</h3> +<h3 id="msg2">Receive arraybuffer:</h3> +<div style="font-size: 10pt; text-align: center;"> + <input type="button" value="Send String" onclick="postStringToApp();" /><br/> + <input type="button" value="Send Number" onclick="postNumberToApp();" /><br/> + <input type="button" value="Send Boolean" onclick="postBooleanToApp();" /><br/> + <input type="button" value="Send ArrayBuffer" onclick="postArrayBufferToApp();" /><br/> + <input type="button" value="Send Array" onclick="postArrayToApp();" /><br/> + <input type="button" value="Send Error" onclick="postErrorToApp();" /><br/> +</div> +</body> +<script src="./index.js"></script> +</html> \ No newline at end of file diff --git a/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/resources/rawfile/indexNoPermission.html b/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/resources/rawfile/indexNoPermission.html new file mode 100644 index 000000000..5affaa710 --- /dev/null +++ b/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/resources/rawfile/indexNoPermission.html @@ -0,0 +1,73 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="UTF-8"> + <meta http-equiv="X-UA-Compatible" content="IE=edge"> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <title>index</title> + <style> + #pageHeight{ + height:1300px + } + </style> +</head> +<body> + <div id="container">首页</div> + <div id="pageHeight"></div> + <a href="second.html" id="fileAccess">打开rawfile文件</a> + <img src="icon.png" alt="icon" id="imgs"> +</body> +<script> + let ele=document.getElementById("imgs"); + let loadImage; + ele.onload=function(){ + loadImage="load complete" + } + function getUserAgent(){ + return navigator.userAgent + } + function test(){ + backToEts.test("backToEts") + } + function testRunJavaScript(){ + return "testRunJavaScript" + } + function getPageHeight(){ + let height=document.body.scrollHeight + return height + } + function proxy(){ + objName.register("backToEts") + } + function registerTest(){ + let str=objName.register(); + console.log(str); + return str + } + function jsAccess(){ + console.log("web111") + } + function consoleTest(){ + console.log("console test") + } + function alertTest(){ + alert('alert test') + } + function confirmTest(){ + confirm("confirm test") + } + function getImgResult(){ + return loadImage + } + function toPrompt(){ + let result=prompt("age","20"); + console.log("result:"+result) + } + function openRawFile(){ + document.getElementById("fileAccess").click() + } + function gettitle(){ + return document.title + } +</script> +</html> \ No newline at end of file diff --git a/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/resources/rawfile/second.html b/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/resources/rawfile/second.html new file mode 100644 index 000000000..96f9f67ac --- /dev/null +++ b/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/resources/rawfile/second.html @@ -0,0 +1,17 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="UTF-8"> + <meta http-equiv="X-UA-Compatible" content="IE=edge"> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <title>second</title> +</head> +<body> + <div style="height: 1300px;background-color: #999999;">second pages</div> +</body> +<script> +function gettitle(){ + return document.title +} +</script> +</html> \ No newline at end of file diff --git a/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/resources/rawfile/testMessageExt.html b/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/resources/rawfile/testMessageExt.html new file mode 100644 index 000000000..1d288c312 --- /dev/null +++ b/arkui/ace_ets_web_dev_webviewControllerError/entry/src/main/resources/rawfile/testMessageExt.html @@ -0,0 +1,26 @@ +<!DOCTYPE html> +<html lang="en-gb"> +<body> +<h1>run JavaScript Ext demo</h1> +</body> +<script type="text/javascript"> +function testString() { + return "hello, world"; +} +function testNumber() { + return 01234567; +} +function testBoolean() { + return true; +} +function testArrayBuffer() { + let buffer = new ArrayBuffer(12); + buffer[0] = 'a'; + return buffer +} +function testArray() { + let a = Array("apple", "banana", "cherry"); + return a +} +</script> +</html> \ No newline at end of file diff --git a/arkui/ace_ets_web_dev_webviewControllerError/signature/openharmony_sx.p7b b/arkui/ace_ets_web_dev_webviewControllerError/signature/openharmony_sx.p7b new file mode 100644 index 0000000000000000000000000000000000000000..70b40a5b885d567268e5dd0a7c7ed3f2e8952634 GIT binary patch literal 3470 zcmcgvd2kcg9kvde7$ajaU@*5Jm;kch%91UahGbV-U9gf@mTb$2n3c3TY-v}PR$f^y zN9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