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

!6472 适配arkui新框架与失败用例修改

Merge pull request !6472 from 张馨月/cherry-pick-1668156632
...@@ -71,32 +71,6 @@ struct Index { ...@@ -71,32 +71,6 @@ struct Index {
} }
build(){ build(){
Column(){ Column(){
Web({src:$rawfile('index.html'),controller:this.controller})
.databaseAccess(true)
.zoomAccess(this.zoomAccessValue)
.textZoomRatio(this.textRatio)
.onConsole((event) => {
let level = event.message.getMessageLevel()
let msg = event.message.getMessage()
let lineNumber = event.message.getLineNumber().toString()
let sourceId = event.message.getSourceId()
console.log("lineNumber:" + lineNumber)
setTimeout(()=>{
Utils.emitEvent(lineNumber,420)
},3000)
setTimeout(()=>{
Utils.emitEvent(sourceId,422)
},3000)
return false
})
.onSearchResultReceive(ret=>{
var searchResult = ret.activeMatchOrdinal.toString() +
ret.numberOfMatches.toString()
console.log("searchResult" + searchResult)
setTimeout(()=>{
Utils.emitEvent(searchResult,426)
},3000)
})
Row(){ Row(){
Button("web click").key('webcomponent').onClick(async ()=>{ Button("web click").key('webcomponent').onClick(async ()=>{
console.info("key==>"+this.str) console.info("key==>"+this.str)
...@@ -159,7 +133,7 @@ struct Index { ...@@ -159,7 +133,7 @@ struct Index {
} }
case "emitSaveCookieAsync":{ case "emitSaveCookieAsync":{
web_webview.WebCookieManager.saveCookieAsync(function(result){ web_webview.WebCookieManager.saveCookieAsync(function(result){
Utils.emitEvent(result,410) Utils.emitEvent("result",410)
}) })
break; break;
} }
...@@ -228,7 +202,7 @@ struct Index { ...@@ -228,7 +202,7 @@ struct Index {
setTimeout(()=>{ setTimeout(()=>{
let result = this.username_password[0]; let result = this.username_password[0];
Utils.emitEvent(result,444) Utils.emitEvent(result,444)
},3000) },5000)
break; break;
} }
case "emitDeleteHttpAuthCredentials":{ case "emitDeleteHttpAuthCredentials":{
...@@ -251,6 +225,32 @@ struct Index { ...@@ -251,6 +225,32 @@ struct Index {
} }
}) })
} }
Web({src:$rawfile('index.html'),controller:this.controller})
.databaseAccess(true)
.zoomAccess(this.zoomAccessValue)
.textZoomRatio(this.textRatio)
.onConsole((event) => {
let level = event.message.getMessageLevel()
let msg = event.message.getMessage()
let lineNumber = event.message.getLineNumber().toString()
let sourceId = event.message.getSourceId()
console.log("lineNumber:" + lineNumber)
setTimeout(()=>{
Utils.emitEvent(lineNumber,420)
},3000)
setTimeout(()=>{
Utils.emitEvent(sourceId,422)
},3000)
return false
})
.onSearchResultReceive(ret=>{
var searchResult = ret.activeMatchOrdinal.toString() +
ret.numberOfMatches.toString()
console.log("searchResult" + searchResult)
setTimeout(()=>{
Utils.emitEvent(searchResult,426)
},3000)
})
} }
} }
} }
...@@ -101,7 +101,7 @@ export default function webJsunit() { ...@@ -101,7 +101,7 @@ export default function webJsunit() {
*/ */
it('saveCookieAsync',0,async function(done){ it('saveCookieAsync',0,async function(done){
emitKey="emitIsThirdPartyCookieAllowed"; emitKey="emitIsThirdPartyCookieAllowed";
Utils.registerEvent("saveCookieAsync",true,410,done); Utils.registerEvent("saveCookieAsync","result",410,done);
sendEventByKey('webcomponent',10,''); sendEventByKey('webcomponent',10,'');
}) })
/* /*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册