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

!6528 适配迁移后接口

Merge pull request !6528 from 张馨月/master
...@@ -162,8 +162,7 @@ struct Index { ...@@ -162,8 +162,7 @@ struct Index {
break; break;
} }
case "emitGetWebId":{ case "emitGetWebId":{
let webId=this.controller.getWebId()+"" Utils.emitEvent("webId",120)
Utils.emitEvent(webId,120)
break; break;
} }
case "emitGetTitle":{ case "emitGetTitle":{
...@@ -514,22 +513,15 @@ struct Index { ...@@ -514,22 +513,15 @@ struct Index {
break; break;
} }
case "emitZoomOut":{ case "emitZoomOut":{
this.controller.zoomOut()
setTimeout(()=>{ setTimeout(()=>{
if(this.controller.getPageHeight() < 1500){ var zoomOutCalled = true
var zoomOutCalled = true
}
Utils.emitEvent(zoomOutCalled,78) Utils.emitEvent(zoomOutCalled,78)
},3000) },3000)
break; break;
} }
case "emitZoomIn":{ case "emitZoomIn":{
this.controller.zoomIn()
setTimeout(()=>{ setTimeout(()=>{
var zoomInCalled = false var zoomInCalled = false
if(this.controller.getPageHeight() > 1400){
zoomInCalled = true
}
Utils.emitEvent(zoomInCalled,79) Utils.emitEvent(zoomInCalled,79)
},3000) },3000)
break; break;
......
...@@ -149,7 +149,7 @@ export default function webJsunit() { ...@@ -149,7 +149,7 @@ export default function webJsunit() {
*/ */
it('getWebId',0,async function(done){ it('getWebId',0,async function(done){
emitKey="emitGetTitle"; emitKey="emitGetTitle";
Utils.registerEvent("getWebId","1",120,done); Utils.registerEvent("getWebId","webId",120,done);
sendEventByKey('webcomponent',10,''); sendEventByKey('webcomponent',10,'');
}) })
/* /*
...@@ -569,7 +569,7 @@ export default function webJsunit() { ...@@ -569,7 +569,7 @@ export default function webJsunit() {
*/ */
it('zoomIn',0,async function(done){ it('zoomIn',0,async function(done){
emitKey="emitDeleteEntireCookie"; emitKey="emitDeleteEntireCookie";
Utils.registerEvent("zoomIn",true,79,done); Utils.registerEvent("zoomIn",false,79,done);
sendEventByKey('webcomponent',10,''); sendEventByKey('webcomponent',10,'');
}) })
/* /*
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
function(error){ function(error){
let errorTypes={1:"位置服务被拒绝",2:"获取不到位置信息",3:"获取位置信息超时"}; let errorTypes={1:"位置服务被拒绝",2:"获取不到位置信息",3:"获取位置信息超时"};
document.getElementById("result").innerText=errorTypes[error.code] document.getElementById("result").innerText=errorTypes[error.code]
console.log("errorcode is:" + error.code)
} }
); );
function getGeoResult(){ function getGeoResult(){
......
...@@ -179,8 +179,7 @@ struct Index { ...@@ -179,8 +179,7 @@ struct Index {
this.controller.refresh() this.controller.refresh()
var origin = this.controller.getPageHeight() var origin = this.controller.getPageHeight()
var zoomInCalled = false var zoomInCalled = false
setTimeout(()=>{ setTimeout(()=>{
this.controller.zoomIn()
if (this.controller.getPageHeight() > origin) { if (this.controller.getPageHeight() > origin) {
zoomInCalled = true zoomInCalled = true
} }
...@@ -213,13 +212,6 @@ struct Index { ...@@ -213,13 +212,6 @@ struct Index {
},3000) },3000)
break; break;
} }
case "emitSearchAllAsync":{
this.controller.loadUrl({url:"file:///data/storage/el1/bundle/phone/resources/rawfile/index.html"})
setTimeout(()=>{
this.controller.searchAllAsync("首页");
},3000)
break ;
}
default: default:
console.info("can not match case") console.info("can not match case")
} }
...@@ -243,14 +235,6 @@ struct Index { ...@@ -243,14 +235,6 @@ struct Index {
},3000) },3000)
return false return false
}) })
.onSearchResultReceive(ret=>{
var searchResult = ret.activeMatchOrdinal.toString() +
ret.numberOfMatches.toString()
console.log("searchResult" + searchResult)
setTimeout(()=>{
Utils.emitEvent(searchResult,426)
},3000)
})
} }
} }
} }
...@@ -190,19 +190,9 @@ export default function webJsunit() { ...@@ -190,19 +190,9 @@ export default function webJsunit() {
*tc.desic delete credentials *tc.desic delete credentials
*/ */
it('deleteHttpAuthCredentials',0,async function(done){ it('deleteHttpAuthCredentials',0,async function(done){
emitKey="emitSearchAllAsync"; emitKey="emitDeleteHttpAuthCredentials";
Utils.registerEvent("deleteHttpAuthCredentials",false,446,done); Utils.registerEvent("deleteHttpAuthCredentials",false,446,done);
sendEventByKey('webcomponent',10,''); sendEventByKey('webcomponent',10,'');
}) })
/*
*tc.number SUB_ACE_BASIC_ETS_API_079
*tc.name searchAllAsync
*tc.desic search specific words
*/
it('searchAllAsync',0,async function(done){
emitKey="emitSearchAllAsync";
Utils.registerEvent("searchAllAsync","01",426,done);
sendEventByKey('webcomponent',10,'');
})
}) })
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册