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

!9812 UserAgent设置与获取断言

Merge pull request !9812 from 黄磊/master
......@@ -948,7 +948,17 @@ struct Index {
}
break;
}
case "emitGetCustomUserAgent":{
try {
let setUA = "userAgent"
this.controller.setCustomUserAgent(setUA)
Utils.emitEvent(this.controller.getCustomUserAgent(), 522);
} catch (error) {
console.error(`ErrorCode: ${error.code}, Message: ${error.message}`);
}
break;
}
......
......@@ -652,9 +652,19 @@ export default function webJsunit() {
*tc.desic Save current page
*/
it('GetStoredGeolocationPromise',0,async function(done){
emitKey="emitGetStoredGeolocationPromise";
emitKey="emitGetCustomUserAgent";
Utils.registerEvent("GetStoredGeolocationPromise","file:///",521,done);
sendEventByKey('webcomponent',10,'');
})
/*
*tc.number SUB_ACE_BASIC_ETS_API_061
*tc.name getCustomUserAgent
*tc.desic Save current page
*/
it('GetCustomUserAgent',0,async function(done){
emitKey="emitGetCustomUserAgent";
Utils.registerEvent("GetCustomUserAgent","userAgent",522,done);
sendEventByKey('webcomponent',10,'');
})
})
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册