未验证 提交 de2841b6 编写于 作者: O openharmony_ci 提交者: Gitee

!6755 Web添加Visibility XTS测试用例

Merge pull request !6755 from pilipala195/web_visibility_1130
...@@ -55,6 +55,7 @@ struct Index { ...@@ -55,6 +55,7 @@ struct Index {
@State mixedSwitch:boolean=false @State mixedSwitch:boolean=false
@State mixedAllSwitch:boolean=false @State mixedAllSwitch:boolean=false
@State overViewFalseHeight:number=0 @State overViewFalseHeight:number=0
@State webVisibility: Visibility = Visibility.Visible
onPageShow(){ onPageShow(){
let valueChangeEvent={ let valueChangeEvent={
eventId:10, eventId:10,
...@@ -89,7 +90,7 @@ struct Index { ...@@ -89,7 +90,7 @@ struct Index {
let abilityDelegatorArguments: any let abilityDelegatorArguments: any
abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments() abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments()
console.info('start run testcase!!!') console.info('start run testcase!!!')
Hypium.hypiumTest(abilityDelegator, abilityDelegatorArguments, testsuite) Hypium.hypiumTest(abilityDelegator, abilityDelegatorArguments, testsuite)
} }
build(){ build(){
Column(){ Column(){
...@@ -623,6 +624,17 @@ struct Index { ...@@ -623,6 +624,17 @@ struct Index {
},3000) },3000)
break; 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: default:
console.info("can not match case") console.info("can not match case")
} }
...@@ -647,6 +659,7 @@ struct Index { ...@@ -647,6 +659,7 @@ struct Index {
console.info("TextInput click") console.info("TextInput click")
}) })
Web({src:$rawfile('index.html'),controller:this.controller}) Web({src:$rawfile('index.html'),controller:this.controller})
.visibility(this.webVisibility)
.javaScriptAccess(this.javaScriptAccess) .javaScriptAccess(this.javaScriptAccess)
.fileAccess(this.fileAccess) .fileAccess(this.fileAccess)
.imageAccess(this.imageAccess) .imageAccess(this.imageAccess)
...@@ -728,10 +741,10 @@ struct Index { ...@@ -728,10 +741,10 @@ struct Index {
if(this.cacheError){ if(this.cacheError){
Utils.emitEvent("cacheError",182) Utils.emitEvent("cacheError",182)
this.cacheError=false this.cacheError=false
} }
}) })
.onHttpErrorReceive((event) => { .onHttpErrorReceive((event) => {
this.httpErrorReceive = event.response.getResponseCode() this.httpErrorReceive = event.response.getResponseCode()
}) })
.onTitleReceive((event) => { .onTitleReceive((event) => {
this.titleReceive = event.title this.titleReceive = event.title
...@@ -760,7 +773,7 @@ struct Index { ...@@ -760,7 +773,7 @@ struct Index {
} }
}) })
.onBlur(()=>{ .onBlur(()=>{
console.info("onBlur==>") console.info("onBlur==>")
this.controller.requestFocus() this.controller.requestFocus()
}) })
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册