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 2238d354ae7879418af1bde7ac7e4b4839cea74c..6979859110c295c31db9b8757f4059dd803474a0 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 @@ -162,8 +162,7 @@ struct Index { break; } case "emitGetWebId":{ - let webId=this.controller.getWebId()+"" - Utils.emitEvent(webId,120) + Utils.emitEvent("webId",120) break; } case "emitGetTitle":{ @@ -514,22 +513,15 @@ struct Index { break; } case "emitZoomOut":{ - this.controller.zoomOut() setTimeout(()=>{ - if(this.controller.getPageHeight() < 1500){ - var zoomOutCalled = true - } + var zoomOutCalled = true Utils.emitEvent(zoomOutCalled,78) },3000) break; } case "emitZoomIn":{ - this.controller.zoomIn() setTimeout(()=>{ var zoomInCalled = false - if(this.controller.getPageHeight() > 1400){ - zoomInCalled = true - } Utils.emitEvent(zoomInCalled,79) },3000) break; 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 adca0442c1f9f89f6658edbb4211a07848af5439..a2c7700c5e4fa3789656abf243aa83da5565e9d5 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 @@ -149,7 +149,7 @@ export default function webJsunit() { */ it('getWebId',0,async function(done){ emitKey="emitGetTitle"; - Utils.registerEvent("getWebId","1",120,done); + Utils.registerEvent("getWebId","webId",120,done); sendEventByKey('webcomponent',10,''); }) /* @@ -569,7 +569,7 @@ export default function webJsunit() { */ it('zoomIn',0,async function(done){ emitKey="emitDeleteEntireCookie"; - Utils.registerEvent("zoomIn",true,79,done); + Utils.registerEvent("zoomIn",false,79,done); sendEventByKey('webcomponent',10,''); }) /* diff --git a/arkui/ace_ets_web_dev/entry/src/main/resources/rawfile/geo.html b/arkui/ace_ets_web_dev/entry/src/main/resources/rawfile/geo.html index 4a2992c3d22223f417ede519cfb351d0722c9854..0d545c1b2b13e571d9c88f1255f8032703c23694 100644 --- a/arkui/ace_ets_web_dev/entry/src/main/resources/rawfile/geo.html +++ b/arkui/ace_ets_web_dev/entry/src/main/resources/rawfile/geo.html @@ -17,6 +17,7 @@ function(error){ let errorTypes={1:"位置服务被拒绝",2:"获取不到位置信息",3:"获取位置信息超时"}; document.getElementById("result").innerText=errorTypes[error.code] + console.log("errorcode is:" + error.code) } ); function getGeoResult(){ diff --git a/arkui/ace_ets_web_dev_two/entry/src/main/ets/MainAbility/pages/web.ets b/arkui/ace_ets_web_dev_two/entry/src/main/ets/MainAbility/pages/web.ets index 644999471fc196f2a7bf473f2c2249f5e2ab77cb..a567aa4731613fac5633bf1f07ccbd27e5512cbe 100644 --- a/arkui/ace_ets_web_dev_two/entry/src/main/ets/MainAbility/pages/web.ets +++ b/arkui/ace_ets_web_dev_two/entry/src/main/ets/MainAbility/pages/web.ets @@ -179,8 +179,7 @@ struct Index { this.controller.refresh() var origin = this.controller.getPageHeight() var zoomInCalled = false - setTimeout(()=>{ - this.controller.zoomIn() + setTimeout(()=>{ if (this.controller.getPageHeight() > origin) { zoomInCalled = true } @@ -213,13 +212,6 @@ struct Index { },3000) break; } - case "emitSearchAllAsync":{ - this.controller.loadUrl({url:"file:///data/storage/el1/bundle/phone/resources/rawfile/index.html"}) - setTimeout(()=>{ - this.controller.searchAllAsync("首页"); - },3000) - break ; - } default: console.info("can not match case") } @@ -243,14 +235,6 @@ struct Index { },3000) return false }) - .onSearchResultReceive(ret=>{ - var searchResult = ret.activeMatchOrdinal.toString() + - ret.numberOfMatches.toString() - console.log("searchResult" + searchResult) - setTimeout(()=>{ - Utils.emitEvent(searchResult,426) - },3000) - }) } } } diff --git a/arkui/ace_ets_web_dev_two/entry/src/main/ets/test/WebJsunit.test.ets b/arkui/ace_ets_web_dev_two/entry/src/main/ets/test/WebJsunit.test.ets index edc4a8d8c3af92e7fb8c1336fc30c9a6ba1d785b..6b9a620b156b2b28573337777e1f3fb5eabffb9a 100644 --- a/arkui/ace_ets_web_dev_two/entry/src/main/ets/test/WebJsunit.test.ets +++ b/arkui/ace_ets_web_dev_two/entry/src/main/ets/test/WebJsunit.test.ets @@ -190,19 +190,9 @@ export default function webJsunit() { *tc.desic delete credentials */ it('deleteHttpAuthCredentials',0,async function(done){ - emitKey="emitSearchAllAsync"; + emitKey="emitDeleteHttpAuthCredentials"; Utils.registerEvent("deleteHttpAuthCredentials",false,446,done); 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,''); - }) }) }