提交 fbf40f37 编写于 作者: W wang-xupeng2

revise api

Signed-off-by: Nwang-xupeng2 <wangxupeng2@huawei.com>
上级 b3fcf6e7
......@@ -309,10 +309,6 @@ struct Index {
Utils.emitEvent(hitType,118)
break;
}
case "emitGetWebId":{
Utils.emitEvent(webId,120)
break;
}
case "emitGetRequestFocus":{
this.controller.loadUrl({url:"file:///data/storage/el1/bundle/phone/resources/rawfile/second.html"});
await Utils.sleep(2000)
......@@ -619,10 +615,7 @@ struct Index {
setTimeout(()=>{
this.controller.runJavaScript({script:"gettitle()",callback:(res)=>{
console.info("gettitle++++++"+res)
if(res == "\"index\""){
onInactiveCalled = true
}
Utils.emitEvent(onInactiveCalled,84)
Utils.emitEvent(res,84)
}})
},3000)
break;
......
......@@ -138,18 +138,8 @@ export default function webJsunit() {
*tc.desic Gets the type of HitTest
*/
it('getHitTest',0,async function(done){
emitKey="emitGetWebId";
Utils.registerEvent("getHitTest","7",118,done);
sendEventByKey('webcomponent',10,'');
})
/*
*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){
emitKey="emitGetRequestFocus";
Utils.registerEvent("getWebId","1",120,done);
Utils.registerEvent("getHitTest","7",118,done);
sendEventByKey('webcomponent',10,'');
})
/*
......@@ -509,7 +499,7 @@ export default function webJsunit() {
*/
it('onInactive',0,async function(done){
emitKey="emitOnActive";
Utils.registerEvent("onInactive",true,84,done);
Utils.registerEvent("onInactive","\"index\"",84,done);
sendEventByKey('webcomponent',10,'');
})
/*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册