diff --git a/arkui/ace_ets_web_dev/entry/src/main/ets/MainAbility/pages/web.ets b/arkui/ace_ets_web_dev/entry/src/main/ets/MainAbility/pages/web.ets index 6979859110c295c31db9b8757f4059dd803474a0..744bb9b1fc7a2030995cac399ee05a980b431d83 100644 --- a/arkui/ace_ets_web_dev/entry/src/main/ets/MainAbility/pages/web.ets +++ b/arkui/ace_ets_web_dev/entry/src/main/ets/MainAbility/pages/web.ets @@ -55,6 +55,7 @@ struct Index { @State mixedSwitch:boolean=false @State mixedAllSwitch:boolean=false @State overViewFalseHeight:number=0 + @State webVisibility: Visibility = Visibility.Visible onPageShow(){ let valueChangeEvent={ eventId:10, @@ -89,7 +90,7 @@ struct Index { let abilityDelegatorArguments: any abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments() console.info('start run testcase!!!') - Hypium.hypiumTest(abilityDelegator, abilityDelegatorArguments, testsuite) + Hypium.hypiumTest(abilityDelegator, abilityDelegatorArguments, testsuite) } build(){ Column(){ @@ -623,6 +624,17 @@ struct Index { },3000) break; } + case "emitWebVisibility":{ + this.webVisibility = Visibility.Hidden; + setTimeout(()=>{ + this.webVisibility = Visibility.None; + setTimeout(()=>{ + this.webVisibility = Visibility.Visible; + Utils.emitEvent(0,90) + }, 3000) + },3000) + break; + } default: console.info("can not match case") } @@ -647,6 +659,7 @@ struct Index { console.info("TextInput click") }) Web({src:$rawfile('index.html'),controller:this.controller}) + .visibility(this.webVisibility) .javaScriptAccess(this.javaScriptAccess) .fileAccess(this.fileAccess) .imageAccess(this.imageAccess) @@ -728,10 +741,10 @@ struct Index { if(this.cacheError){ Utils.emitEvent("cacheError",182) this.cacheError=false - } + } }) .onHttpErrorReceive((event) => { - this.httpErrorReceive = event.response.getResponseCode() + this.httpErrorReceive = event.response.getResponseCode() }) .onTitleReceive((event) => { this.titleReceive = event.title @@ -760,7 +773,7 @@ struct Index { } }) .onBlur(()=>{ - console.info("onBlur==>") + console.info("onBlur==>") this.controller.requestFocus() }) } diff --git a/arkui/ace_ets_web_dev/entry/src/main/ets/test/WebJsunit.test.ets b/arkui/ace_ets_web_dev/entry/src/main/ets/test/WebJsunit.test.ets index a2c7700c5e4fa3789656abf243aa83da5565e9d5..e6b345376329e501d502d6cc58d32a191b513366 100644 --- a/arkui/ace_ets_web_dev/entry/src/main/ets/test/WebJsunit.test.ets +++ b/arkui/ace_ets_web_dev/entry/src/main/ets/test/WebJsunit.test.ets @@ -44,9 +44,9 @@ export default function webJsunit() { await Utils.sleep(2000); done(); }) - /* - *tc.number SUB_ACE_BASIC_ETS_API_001 - *tc.name userAgent + /* + *tc.number SUB_ACE_BASIC_ETS_API_001 + *tc.name userAgent *tc.desic Sets the Web's user agent */ it('userAgent',0,async function(done){ @@ -55,8 +55,8 @@ export default function webJsunit() { Utils.registerEvent("",userAgent,100,done); sendEventByKey('webcomponent',10,''); }) - /* - *tc.number SUB_ACE_BASIC_ETS_API_002 + /* + *tc.number SUB_ACE_BASIC_ETS_API_002 *tc.name javaScriptProxy *tc.desic Injects the JavaScript object into window and invoke the function in window */ it('javaScriptProxy',0,async function(done){ @@ -64,8 +64,8 @@ export default function webJsunit() { Utils.registerEvent("javaScriptProxy","backToEts",102,done); sendEventByKey('webcomponent',10,''); }) - /* - *tc.number SUB_ACE_BASIC_ETS_API_003 + /* + *tc.number SUB_ACE_BASIC_ETS_API_003 *tc.name onUrlLoadIntercept *tc.desic Triggered when the URL loading is intercepted */ it('onUrlLoadIntercept',0,async function(done){ @@ -73,9 +73,9 @@ export default function webJsunit() { Utils.registerEvent("onUrlLoadIntercept","https://gitee.com/",104,done); sendEventByKey('webcomponent',10,''); }) - /* - *tc.number SUB_ACE_BASIC_ETS_API_004 - *tc.name onRenderExited + /* + *tc.number SUB_ACE_BASIC_ETS_API_004 + *tc.name onRenderExited *tc.desic Triggered when the render process exits */ it('onRenderExited',0,async function(done){ @@ -84,9 +84,9 @@ export default function webJsunit() { Utils.registerEvent("onRenderExited",2,106,done); sendEventByKey('webcomponent',10,''); }) - /* - *tc.number SUB_ACE_BASIC_ETS_API_005 - *tc.name onResourceLoad + /* + *tc.number SUB_ACE_BASIC_ETS_API_005 + *tc.name onResourceLoad *tc.desic Triggered when the url loading */ it('onResourceLoad',0,async function(done){ @@ -94,9 +94,9 @@ export default function webJsunit() { Utils.registerEvent("onResourceLoad","file:///data/storage/el1/bundle/phone/resources/rawfile/second.html",108,done); sendEventByKey('webcomponent',10,''); }) - /* - *tc.number SUB_ACE_BASIC_ETS_API_006 - *tc.name loadUrl + /* + *tc.number SUB_ACE_BASIC_ETS_API_006 + *tc.name loadUrl *tc.desic Loads the given URL */ it('loadUrl',0,async function(done){ @@ -104,9 +104,9 @@ export default function webJsunit() { Utils.registerContainEvent("loadUrl","代码托管和研发协作平台",110,done); sendEventByKey('webcomponent',10,''); }) - /* - *tc.number SUB_ACE_BASIC_ETS_API_007 - *tc.name runJavaScript + /* + *tc.number SUB_ACE_BASIC_ETS_API_007 + *tc.name runJavaScript *tc.desic Loads a piece of code and execute JS code in the context of the currently displayed page */ it('runJavaScript',0,async function(done){ @@ -114,8 +114,8 @@ export default function webJsunit() { Utils.registerEvent("runJavaScript","\"testRunJavaScript\"",112,done); sendEventByKey('webcomponent',10,''); }) - /* - *tc.number SUB_ACE_BASIC_ETS_API_008 + /* + *tc.number SUB_ACE_BASIC_ETS_API_008 *tc.name onProgressChange *tc.desic Triggered when the page loading progress changes */ it('onProgressChange',0,async function(done){ @@ -123,8 +123,8 @@ export default function webJsunit() { Utils.registerEvent("onProgressChange","100",114,done); sendEventByKey('webcomponent',10,''); }) - /* - *tc.number SUB_ACE_BASIC_ETS_API_009 + /* + *tc.number SUB_ACE_BASIC_ETS_API_009 *tc.name onRefreshAccessedHistory *tc.desic Triggered when the Web page refreshes accessed history */ it('onRefreshAccessedHistory',0,async function(done){ @@ -132,9 +132,9 @@ export default function webJsunit() { Utils.registerEvent("onRefreshAccessedHistory","file:///data/storage/el1/bundle/phone/resources/rawfile/second.html",116,done); sendEventByKey('webcomponent',10,''); }) - /* - *tc.number SUB_ACE_BASIC_ETS_API_010 - *tc.name getHitTest + /* + *tc.number SUB_ACE_BASIC_ETS_API_010 + *tc.name getHitTest *tc.desic Gets the type of HitTest */ it('getHitTest',0,async function(done){ @@ -142,9 +142,9 @@ export default function webJsunit() { Utils.registerEvent("getHitTest","7",118,done); sendEventByKey('webcomponent',10,''); }) - /* - *tc.number SUB_ACE_BASIC_ETS_API_011 - *tc.name getWebId + /* + *tc.number SUB_ACE_BASIC_ETS_API_011 + *tc.name getWebId *tc.desic Gets the id for the current Web */ it('getWebId',0,async function(done){ @@ -152,9 +152,9 @@ export default function webJsunit() { Utils.registerEvent("getWebId","webId",120,done); sendEventByKey('webcomponent',10,''); }) - /* - *tc.number SUB_ACE_BASIC_ETS_API_012 - *tc.name getTitle + /* + *tc.number SUB_ACE_BASIC_ETS_API_012 + *tc.name getTitle *tc.desic Gets the title of current Web page */ it('getTitle',0,async function(done){ @@ -162,9 +162,9 @@ export default function webJsunit() { Utils.registerEvent("getTitle","index",122,done); sendEventByKey('webcomponent',10,''); }) - /* - *tc.number SUB_ACE_BASIC_ETS_API_013 - *tc.name getPageHeight + /* + *tc.number SUB_ACE_BASIC_ETS_API_013 + *tc.name getPageHeight *tc.desic Gets the content height of current Web page */ it('getPageHeight',0,async function(done){ @@ -172,9 +172,9 @@ export default function webJsunit() { Utils.registerEventTwo("getPageHeight",124,done); sendEventByKey('webcomponent',10,''); }) - /* - *tc.number SUB_ACE_BASIC_ETS_API_014 - *tc.name requestFocus + /* + *tc.number SUB_ACE_BASIC_ETS_API_014 + *tc.name requestFocus *tc.desic Gets the request focus */ it('requestFocus',0,async function(done){ @@ -182,9 +182,9 @@ export default function webJsunit() { Utils.registerEvent("requestFocus","requestFocus",126,done); sendEventByKey('webcomponent',10,''); }) - /* - *tc.number SUB_ACE_BASIC_ETS_API_015 - *tc.name accessBackward + /* + *tc.number SUB_ACE_BASIC_ETS_API_015 + *tc.name accessBackward *tc.desic Checks whether the web page can go back */ it('accessBackward',0,async function(done){ @@ -192,9 +192,9 @@ export default function webJsunit() { Utils.registerEvent("accessBackward","true",128,done); sendEventByKey('webcomponent',10,''); }) - /* - *tc.number SUB_ACE_BASIC_ETS_API_016 - *tc.name accessForward + /* + *tc.number SUB_ACE_BASIC_ETS_API_016 + *tc.name accessForward *tc.desic Checks whether the web page can go forward */ it('accessForward',0,async function(done){ @@ -202,9 +202,9 @@ export default function webJsunit() { Utils.registerEvent("accessForward","false",130,done); sendEventByKey('webcomponent',10,''); }) - /* - *tc.number SUB_ACE_BASIC_ETS_API_017 - *tc.name accessStep + /* + *tc.number SUB_ACE_BASIC_ETS_API_017 + *tc.name accessStep *tc.desic Checks whether the web page can go back or forward the given number of steps */ it('accessStep',0,async function(done){ @@ -212,9 +212,9 @@ export default function webJsunit() { Utils.registerEvent("accessStep","true",132,done); sendEventByKey('webcomponent',10,''); }) - /* - *tc.number SUB_ACE_BASIC_ETS_API_018 - *tc.name backward + /* + *tc.number SUB_ACE_BASIC_ETS_API_018 + *tc.name backward *tc.desic Goes back in the history of the web page */ it('backward',0,async function(done){ @@ -222,9 +222,9 @@ export default function webJsunit() { Utils.registerEvent("backward","index",134,done); sendEventByKey('webcomponent',10,''); }) - /* - *tc.number SUB_ACE_BASIC_ETS_API_019 - *tc.name forward + /* + *tc.number SUB_ACE_BASIC_ETS_API_019 + *tc.name forward *tc.desic Goes forward in the history of the web page */ it('forward',0,async function(done){ @@ -232,9 +232,9 @@ export default function webJsunit() { Utils.registerEvent("forward","second",136,done); sendEventByKey('webcomponent',10,''); }) - /* - *tc.number SUB_ACE_BASIC_ETS_API_020 - *tc.name backOrForward + /* + *tc.number SUB_ACE_BASIC_ETS_API_020 + *tc.name backOrForward *tc.desic Goes forward or back backOrForward in the history of the web page */ it('backOrForward',0,async function(done){ @@ -242,9 +242,9 @@ export default function webJsunit() { Utils.registerEvent("backOrForward","index",138,done); sendEventByKey('webcomponent',10,''); }) - /* - *tc.number SUB_ACE_BASIC_ETS_API_021 - *tc.name geolocationAccessFalse + /* + *tc.number SUB_ACE_BASIC_ETS_API_021 + *tc.name geolocationAccessFalse *tc.desic Sets false not allow access to geographical locations */ it('geolocationAccessFalse',0,async function(done){ @@ -252,9 +252,9 @@ export default function webJsunit() { Utils.registerContainEvent("geolocationAccessFalse","位置服务被拒绝",96,done); sendEventByKey('webcomponent',10,''); }) - /* - *tc.number SUB_ACE_BASIC_ETS_API_022 - *tc.name initialScale + /* + *tc.number SUB_ACE_BASIC_ETS_API_022 + *tc.name initialScale *tc.desic Sets the initial scale for the Web */ it('initialScale',0,async function(done){ @@ -262,9 +262,9 @@ export default function webJsunit() { Utils.registerEvent("initialScale",120,97,done); sendEventByKey('webcomponent',10,''); }) - /* - *tc.number SUB_ACE_BASIC_ETS_API_023 - *tc.name onScaleChange + /* + *tc.number SUB_ACE_BASIC_ETS_API_023 + *tc.name onScaleChange *tc.desic Triggered when the scale of WebView changed */ it('onScaleChange',0,async function(done){ @@ -272,9 +272,9 @@ export default function webJsunit() { Utils.registerContainEvent("onScaleChange","onScaleChange",98,done); sendEventByKey('webcomponent',10,''); }) - /* - *tc.number SUB_ACE_BASIC_ETS_API_024 - *tc.name onGeolocationShow + /* + *tc.number SUB_ACE_BASIC_ETS_API_024 + *tc.name onGeolocationShow *tc.desic Triggered when requesting to show the geolocation permission */ it('onGeolocationShow',0,async function(done){ @@ -282,9 +282,9 @@ export default function webJsunit() { Utils.registerContainEvent("onGeolocationShow","onGeolocationShow",99,done); sendEventByKey('webcomponent',10,''); }) - /* - *tc.number SUB_ACE_BASIC_ETS_API_025 - *tc.name domStorageAccessFalse + /* + *tc.number SUB_ACE_BASIC_ETS_API_025 + *tc.name domStorageAccessFalse *tc.desic Sets not to enable the DOM Storage API permission */ it('domStorageAccessFalse',0,async function(done){ @@ -292,9 +292,9 @@ export default function webJsunit() { Utils.registerContainEvent("domStorageAccessFalse","sorry",144,done); sendEventByKey('webcomponent',10,''); }) - /* - *tc.number SUB_ACE_BASIC_ETS_API_026 - *tc.name domStorageAccessTrue + /* + *tc.number SUB_ACE_BASIC_ETS_API_026 + *tc.name domStorageAccessTrue *tc.desic Sets enable the DOM Storage API permission */ it('domStorageAccessTrue',0,async function(done){ @@ -302,9 +302,9 @@ export default function webJsunit() { Utils.registerContainEvent("domStorageAccessTrue","domapi",146,done); sendEventByKey('webcomponent',10,''); }) - /* - *tc.number SUB_ACE_BASIC_ETS_API_027 - *tc.name imageAccessFalse + /* + *tc.number SUB_ACE_BASIC_ETS_API_027 + *tc.name imageAccessFalse *tc.desic Sets Web can not automatically load image resources */ it('imageAccessFalse',0,async function(done){ @@ -312,9 +312,9 @@ export default function webJsunit() { Utils.registerEvent("imageAccessFalse","null",148,done); sendEventByKey('webcomponent',10,''); }) - /* - *tc.number SUB_ACE_BASIC_ETS_API_028 - *tc.name imageAccessTrue + /* + *tc.number SUB_ACE_BASIC_ETS_API_028 + *tc.name imageAccessTrue *tc.desic Sets Web can automatically load image resources */ it('imageAccessTrue',0,async function(done){ @@ -322,9 +322,9 @@ export default function webJsunit() { Utils.registerContainEvent("imageAccessTrue","load complete",150,done); sendEventByKey('webcomponent',10,''); }) - /* - *tc.number SUB_ACE_BASIC_ETS_API_029 - *tc.name onlineImageAccessFalse + /* + *tc.number SUB_ACE_BASIC_ETS_API_029 + *tc.name onlineImageAccessFalse *tc.desic Sets not to allow image resources to be loaded from the network */ it('onlineImageAccessFalse',0,async function(done){ @@ -332,9 +332,9 @@ export default function webJsunit() { Utils.registerEvent("onlineImageAccessFalse","null",156,done); sendEventByKey('webcomponent',10,''); }) - /* - *tc.number SUB_ACE_BASIC_ETS_API_030 - *tc.name onlineImageAccessTrue + /* + *tc.number SUB_ACE_BASIC_ETS_API_030 + *tc.name onlineImageAccessTrue *tc.desic Sets allow image resources to be loaded from the network */ it('onlineImageAccessTrue',0,async function(done){ @@ -342,9 +342,9 @@ export default function webJsunit() { Utils.registerContainEvent("onlineImageAccessTrue","load image complete",158,done); sendEventByKey('webcomponent',10,''); }) - /* - *tc.number SUB_ACE_BASIC_ETS_API_031 - *tc.name databaseAccessTrue + /* + *tc.number SUB_ACE_BASIC_ETS_API_031 + *tc.name databaseAccessTrue *tc.desic Sets allow the Web access the database */ it('databaseAccessTrue',0,async function(done){ @@ -352,9 +352,9 @@ export default function webJsunit() { Utils.registerContainEvent("databaseAccessTrue","openDatabase",164,done); sendEventByKey('webcomponent',10,''); }) - /* - *tc.number SUB_ACE_BASIC_ETS_API_032 - *tc.name overviewModeAccessFalse + /* + *tc.number SUB_ACE_BASIC_ETS_API_032 + *tc.name overviewModeAccessFalse *tc.desic Sets not allow the Web access overview mode */ it('overviewModeAccessFalse',0,async function(done){ @@ -362,9 +362,9 @@ export default function webJsunit() { Utils.registerEventTwo("overviewModeAccessFalse",168,done); sendEventByKey('webcomponent',10,''); }) - /* - *tc.number SUB_ACE_BASIC_ETS_API_033 - *tc.name overviewModeAccessTrue + /* + *tc.number SUB_ACE_BASIC_ETS_API_033 + *tc.name overviewModeAccessTrue *tc.desic Sets allow the Web access overview mode */ it('overviewModeAccessTrue',0,async function(done){ @@ -372,9 +372,9 @@ export default function webJsunit() { Utils.registerLargerEvent("overviewModeAccessTrue",170,done); sendEventByKey('webcomponent',10,''); }) - /* - *tc.number SUB_ACE_BASIC_ETS_API_034 - *tc.name onPrompt + /* + *tc.number SUB_ACE_BASIC_ETS_API_034 + *tc.name onPrompt *tc.desic Triggered when the web page wants to display a JavaScript prompt() dialog */ it('onPrompt',0,async function(done){ @@ -382,9 +382,9 @@ export default function webJsunit() { Utils.registerEvent("onPrompt","age",178,done); sendEventByKey('webcomponent',10,''); }) - /* - *tc.number SUB_ACE_BASIC_ETS_API_035 - *tc.name cacheModeOnly + /* + *tc.number SUB_ACE_BASIC_ETS_API_035 + *tc.name cacheModeOnly *tc.desic load cache and not online */ it('cacheModeOnly',0,async function(done){ @@ -392,9 +392,9 @@ export default function webJsunit() { Utils.registerEvent("cacheModeOnly","cacheError",182,done); sendEventByKey('webcomponent',10,''); }) - /* - *tc.number SUB_ACE_BASIC_ETS_API_036 - *tc.name cacheModeDefault + /* + *tc.number SUB_ACE_BASIC_ETS_API_036 + *tc.name cacheModeDefault *tc.desic load cache when they are available and not expired, otherwise load online */ it('cacheModeDefault',0,async function(done){ @@ -402,9 +402,9 @@ export default function webJsunit() { Utils.registerContainEvent("cacheModeDefault","OpenHarmony",184,done); sendEventByKey('webcomponent',10,''); }) - /* - *tc.number SUB_ACE_BASIC_ETS_API_037 - *tc.name mixedModeNone + /* + *tc.number SUB_ACE_BASIC_ETS_API_037 + *tc.name mixedModeNone *tc.desic Sets Don't allow unsecure sources from a secure origin */ it('mixedModeNone',0,async function(done){ @@ -412,9 +412,9 @@ export default function webJsunit() { Utils.registerContainEvent("mixedModeNone","insecure",186,done); sendEventByKey('webcomponent',10,''); }) - /* - *tc.number SUB_ACE_BASIC_ETS_API_038 - *tc.name mixedModeAll + /* + *tc.number SUB_ACE_BASIC_ETS_API_038 + *tc.name mixedModeAll *tc.desic Sets Allows all HTTP and HTTPS content can be loaded */ it('mixedModeAll',0,async function(done){ @@ -422,9 +422,9 @@ export default function webJsunit() { Utils.registerEvent("mixedModeAll",3,188,done); sendEventByKey('webcomponent',10,''); }) - /* - *tc.number SUB_ACE_BASIC_ETS_API_039 - *tc.name fileAccessTrue + /* + *tc.number SUB_ACE_BASIC_ETS_API_039 + *tc.name fileAccessTrue *tc.desic Sets enable local file system access in Web */ it('fileAccessTrue',0,async function(done){ @@ -432,9 +432,9 @@ export default function webJsunit() { Utils.registerContainEvent("fileAccessTrue","index",190,done); sendEventByKey('webcomponent',10,''); }) - /* - *tc.number SUB_ACE_BASIC_ETS_API_040 - *tc.name onPageBegin + /* + *tc.number SUB_ACE_BASIC_ETS_API_040 + *tc.name onPageBegin *tc.desic Triggered when the page loading progress changes */ it('onPageBegin',0,async function(done){ @@ -442,9 +442,9 @@ export default function webJsunit() { Utils.registerEvent("onPageBegin","file:///data/storage/el1/bundle/phone/resources/rawfile/index.html",59,done); sendEventByKey('webcomponent',10,''); }) - /* - *tc.number SUB_ACE_BASIC_ETS_API_041 - *tc.name onPageEnd + /* + *tc.number SUB_ACE_BASIC_ETS_API_041 + *tc.name onPageEnd *tc.desic Triggered at the begin of web page loading */ it('onPageEnd',0,async function(done){ @@ -452,9 +452,9 @@ export default function webJsunit() { Utils.registerEvent("onPageEnd","file:///data/storage/el1/bundle/phone/resources/rawfile/index.html",60,done); sendEventByKey('webcomponent',10,''); }) - /* - *tc.number SUB_ACE_BASIC_ETS_API_042 - *tc.name onConsole + /* + *tc.number SUB_ACE_BASIC_ETS_API_042 + *tc.name onConsole *tc.desic Triggered when the web page receives a JavaScript console message */ it('onConsole',0,async function(done){ @@ -462,9 +462,9 @@ export default function webJsunit() { Utils.registerEvent("onConsole","console test",62,done); sendEventByKey('webcomponent',10,''); }) - /* - *tc.number SUB_ACE_BASIC_ETS_API_043 - *tc.name onAlert + /* + *tc.number SUB_ACE_BASIC_ETS_API_043 + *tc.name onAlert *tc.desic Triggered when the Web wants to display a JavaScript alert() dialog */ it('onAlert',0,async function(done){ @@ -472,9 +472,9 @@ export default function webJsunit() { Utils.registerEvent("onAlert","alert test",63,done); sendEventByKey('webcomponent',10,''); }) - /* - *tc.number SUB_ACE_BASIC_ETS_API_044 - *tc.name onConfirm + /* + *tc.number SUB_ACE_BASIC_ETS_API_044 + *tc.name onConfirm *tc.desic Triggered when the web page wants to display a JavaScript confirm() dialog */ it('onConfirm',0,async function(done){ @@ -482,9 +482,9 @@ export default function webJsunit() { Utils.registerEvent("onConfirm","confirm test",64,done); sendEventByKey('webcomponent',10,''); }) - /* - *tc.number SUB_ACE_BASIC_ETS_API_045 - *tc.name onErrorReceive + /* + *tc.number SUB_ACE_BASIC_ETS_API_045 + *tc.name onErrorReceive *tc.desic Triggered when the web page receives a web resource loading error */ it('onErrorReceive',0,async function(done){ @@ -492,9 +492,9 @@ export default function webJsunit() { Utils.registerEvent("onErrorReceive","http://192.168.5.40:9006/sso_web/html/H5/doctor/aboutUs.html",65,done); sendEventByKey('webcomponent',10,''); }) - /* - *tc.number SUB_ACE_BASIC_ETS_API_046 - *tc.name onHttpErrorReceive + /* + *tc.number SUB_ACE_BASIC_ETS_API_046 + *tc.name onHttpErrorReceive *tc.desic Triggered when the web page receives a web resource loading HTTP error */ it('onHttpErrorReceive',0,async function(done){ @@ -502,9 +502,9 @@ export default function webJsunit() { Utils.registerEvent("onHttpErrorReceive",404,66,done); sendEventByKey('webcomponent',10,''); }) - /* - *tc.number SUB_ACE_BASIC_ETS_API_047 - *tc.name onTitleReceive + /* + *tc.number SUB_ACE_BASIC_ETS_API_047 + *tc.name onTitleReceive *tc.desic Triggered when the title of the main application document changes */ it('onTitleReceive',0,async function(done){ @@ -512,9 +512,9 @@ export default function webJsunit() { Utils.registerEvent("onTitleReceive","index",67,done); sendEventByKey('webcomponent',10,''); }) - /* - *tc.number SUB_ACE_BASIC_ETS_API_048 - *tc.name onDownloadStart + /* + *tc.number SUB_ACE_BASIC_ETS_API_048 + *tc.name onDownloadStart *tc.desic Triggered when starting to download */ it('onDownloadStart',0,async function(done){ @@ -522,9 +522,9 @@ export default function webJsunit() { Utils.registerEvent("onDownloadStart","https://consumer.huawei.com/content/dam/huawei-cbg-site/cn/mkt/mobileservices/2022/download/PC107f1b3947c942ffaa14334a879065d8.2107261020.exe",68,done); sendEventByKey('webcomponent',10,''); }) - /* - *tc.number SUB_ACE_BASIC_ETS_API_049 - *tc.name setCookie + /* + *tc.number SUB_ACE_BASIC_ETS_API_049 + *tc.name setCookie *tc.desic Sets the cookie */ it('setCookie',0,async function(done){ @@ -532,9 +532,9 @@ export default function webJsunit() { Utils.registerEvent("setCookie","e=f",76,done); sendEventByKey('webcomponent',10,''); }) - /* - *tc.number SUB_ACE_BASIC_ETS_API_050 - *tc.name getCookie + /* + *tc.number SUB_ACE_BASIC_ETS_API_050 + *tc.name getCookie *tc.desic Gets all cookies for the given URL */ it('getCookie',0,async function(done){ @@ -542,9 +542,9 @@ export default function webJsunit() { Utils.registerEvent("getCookie","e=f",69,done); sendEventByKey('webcomponent',10,''); }) - /* - *tc.number SUB_ACE_BASIC_ETS_API_051 - *tc.name zoom + /* + *tc.number SUB_ACE_BASIC_ETS_API_051 + *tc.name zoom *tc.desic Let the Web zoom by */ it('zoom',0,async function(done){ @@ -552,9 +552,9 @@ export default function webJsunit() { Utils.registerEvent("zoom",true,77,done); sendEventByKey('webcomponent',10,''); }) - /* - *tc.number SUB_ACE_BASIC_ETS_API_052 - *tc.name zoomOut + /* + *tc.number SUB_ACE_BASIC_ETS_API_052 + *tc.name zoomOut *tc.desic Let the Web zoom out */ it('zoomOut',0,async function(done){ @@ -562,9 +562,9 @@ export default function webJsunit() { Utils.registerEvent("zoomOut",true,78,done); sendEventByKey('webcomponent',10,''); }) - /* - *tc.number SUB_ACE_BASIC_ETS_API_053 - *tc.name zoomIn + /* + *tc.number SUB_ACE_BASIC_ETS_API_053 + *tc.name zoomIn *tc.desic Let the Web zoom in */ it('zoomIn',0,async function(done){ @@ -572,9 +572,9 @@ export default function webJsunit() { Utils.registerEvent("zoomIn",false,79,done); sendEventByKey('webcomponent',10,''); }) - /* - *tc.number SUB_ACE_BASIC_ETS_API_054 - *tc.name deleteEntireCookie + /* + *tc.number SUB_ACE_BASIC_ETS_API_054 + *tc.name deleteEntireCookie *tc.desic Delete all cookies */ it('deleteEntireCookie',0,async function(done){ @@ -582,9 +582,9 @@ export default function webJsunit() { Utils.registerEvent("deleteEntireCookie","",80,done); sendEventByKey('webcomponent',10,''); }) - /* - *tc.number SUB_ACE_BASIC_ETS_API_055 - *tc.name saveCookieSync + /* + *tc.number SUB_ACE_BASIC_ETS_API_055 + *tc.name saveCookieSync *tc.desic Saves the cookies */ it('saveCookieSync',0,async function(done){ @@ -592,9 +592,9 @@ export default function webJsunit() { Utils.registerEvent("saveCookieSync",true,81,done); sendEventByKey('webcomponent',10,''); }) - /* - *tc.number SUB_ACE_BASIC_ETS_API_056 - *tc.name clearHistory + /* + *tc.number SUB_ACE_BASIC_ETS_API_056 + *tc.name clearHistory *tc.desic Clears the history in the Web */ it('clearHistory',0,async function(done){ @@ -602,9 +602,9 @@ export default function webJsunit() { Utils.registerEvent("clearHistory",false,82,done); sendEventByKey('webcomponent',10,''); }) - /* - *tc.number SUB_ACE_BASIC_ETS_API_057 - *tc.name stop + /* + *tc.number SUB_ACE_BASIC_ETS_API_057 + *tc.name stop *tc.desic Stops the current load */ it('stop',0,async function(done){ @@ -612,9 +612,9 @@ export default function webJsunit() { Utils.registerEvent("stop",true,83,done); sendEventByKey('webcomponent',10,''); }) - /* - *tc.number SUB_ACE_BASIC_ETS_API_058 - *tc.name onInactive + /* + *tc.number SUB_ACE_BASIC_ETS_API_058 + *tc.name onInactive *tc.desic Let the Web inactive. */ it('onInactive',0,async function(done){ @@ -622,9 +622,9 @@ export default function webJsunit() { Utils.registerEvent("onInactive",true,84,done); sendEventByKey('webcomponent',10,''); }) - /* - *tc.number SUB_ACE_BASIC_ETS_API_059 - *tc.name onActive + /* + *tc.number SUB_ACE_BASIC_ETS_API_059 + *tc.name onActive *tc.desic Let the Web active */ it('onActive',0,async function(done){ @@ -632,9 +632,9 @@ export default function webJsunit() { Utils.registerEvent("onActive","file:///data/storage/el1/bundle/phone/resources/rawfile/index.html",85,done); sendEventByKey('webcomponent',10,''); }) - /* - *tc.number SUB_ACE_BASIC_ETS_API_060 - *tc.name registerJavaScriptProxy + /* + *tc.number SUB_ACE_BASIC_ETS_API_060 + *tc.name registerJavaScriptProxy *tc.desic Registers the JavaScript object and method list */ it('registerJavaScriptProxy',0,async function(done){ @@ -642,9 +642,9 @@ export default function webJsunit() { Utils.registerEvent("registerJavaScriptProxy","backToEts",86,done); sendEventByKey('webcomponent',10,''); }) - /* - *tc.number SUB_ACE_BASIC_ETS_API_061 - *tc.name deleteJavaScriptRegister + /* + *tc.number SUB_ACE_BASIC_ETS_API_061 + *tc.name deleteJavaScriptRegister *tc.desic Deletes a registered JavaScript object with given name */ it('deleteJavaScriptRegister',0,async function(done){ @@ -652,9 +652,9 @@ export default function webJsunit() { Utils.registerEvent("deleteJavaScriptRegister",true,87,done); sendEventByKey('webcomponent',10,''); }) - /* - *tc.number SUB_ACE_BASIC_ETS_API_062 - *tc.name javaScriptAccess + /* + *tc.number SUB_ACE_BASIC_ETS_API_062 + *tc.name javaScriptAccess *tc.desic Sets whether the Web allows JavaScript scripts to execute */ it('javaScriptAccess',0,async function(done){ @@ -662,15 +662,26 @@ export default function webJsunit() { Utils.registerEvent("javaScriptAccess",true,88,done); sendEventByKey('webcomponent',10,''); }) - /* - *tc.number SUB_ACE_BASIC_ETS_API_063 - *tc.name getCookieManager + /* + *tc.number SUB_ACE_BASIC_ETS_API_063 + *tc.name getCookieManager *tc.desic Gets network cookie manager */ it('getCookieManager',0,async function(done){ - emitKey="emitGetCookieManager"; + emitKey="emitWebVisibility"; Utils.registerEvent("getCookieManager","a=b",89,done); sendEventByKey('webcomponent',10,''); }) + + /* + *tc.number SUB_ACE_BASIC_ETS_API_064 + *tc.name webVisibility + *tc.desic Web Visibility test + */ + it('webVisibility',0,async function(done){ + emitKey="emitWebVisibility"; + Utils.registerEvent("webVisibility", 0, 90, done); + sendEventByKey('webcomponent',10,''); + }) }) }