Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
0417937a
X
Xts Acts
项目概览
OpenHarmony
/
Xts Acts
1 年多 前同步成功
通知
9
Star
22
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
X
Xts Acts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
0417937a
编写于
11月 16, 2022
作者:
Z
zhangxinyue
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
bug fix
Signed-off-by:
N
zhangxinyue
<
zhangxinyue38@huawei.com
>
上级
fae323fd
变更
5
显示空白变更内容
内联
并排
Showing
5 changed file
with
24 addition
and
30 deletion
+24
-30
arkui/ace_ets_web_dev/entry/src/main/ets/MainAbility/pages/web.ets
..._ets_web_dev/entry/src/main/ets/MainAbility/pages/web.ets
+2
-3
arkui/ace_ets_web_dev/entry/src/main/ets/test/WebJsunit.test.ets
...ce_ets_web_dev/entry/src/main/ets/test/WebJsunit.test.ets
+2
-2
arkui/ace_ets_web_dev/entry/src/main/resources/rawfile/geo.html
...ace_ets_web_dev/entry/src/main/resources/rawfile/geo.html
+1
-0
arkui/ace_ets_web_dev_two/entry/src/main/ets/MainAbility/pages/web.ets
..._web_dev_two/entry/src/main/ets/MainAbility/pages/web.ets
+18
-14
arkui/ace_ets_web_dev_two/entry/src/main/ets/test/WebJsunit.test.ets
...ts_web_dev_two/entry/src/main/ets/test/WebJsunit.test.ets
+1
-11
未找到文件。
arkui/ace_ets_web_dev/entry/src/main/ets/MainAbility/pages/web.ets
浏览文件 @
0417937a
...
...
@@ -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,7 +513,7 @@ struct Index {
break;
}
case "emitZoomOut":{
this.controller.zoomOut()
var zoomOutCalled = true
setTimeout(()=>{
if(this.controller.getPageHeight() < 1500){
var zoomOutCalled = true
...
...
arkui/ace_ets_web_dev/entry/src/main/ets/test/WebJsunit.test.ets
浏览文件 @
0417937a
...
...
@@ -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",
tru
e,79,done);
Utils.registerEvent("zoomIn",
fals
e,79,done);
sendEventByKey('webcomponent',10,'');
})
/*
...
...
arkui/ace_ets_web_dev/entry/src/main/resources/rawfile/geo.html
浏览文件 @
0417937a
...
...
@@ -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
(){
...
...
arkui/ace_ets_web_dev_two/entry/src/main/ets/MainAbility/pages/web.ets
浏览文件 @
0417937a
...
...
@@ -24,6 +24,7 @@ let loadedUrl;
@Component
struct Index {
controller:WebController = new WebController()
controllerTwo: web_webview.WebviewController = new web_webview.WebviewController();
responseweb: WebResourceResponse = new WebResourceResponse()
@State str:string="emitStoreWebArchive"
@State text:string=""
...
...
@@ -180,7 +181,7 @@ struct Index {
var origin = this.controller.getPageHeight()
var zoomInCalled = false
setTimeout(()=>{
this.controller.zoomIn()
this.controller
Two
.zoomIn()
if (this.controller.getPageHeight() > origin) {
zoomInCalled = true
}
...
...
@@ -213,13 +214,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,13 +237,23 @@ struct Index {
},3000)
return false
})
.onSearchResultReceive(ret=>{
var searchResult = ret.activeMatchOrdinal.toString() +
ret.numberOfMatches.toString()
console.log("searchResult" + searchResult)
Web({src:$rawfile('index.html'),controller:this.controllerTwo})
.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(
searchResult,426
)
Utils.emitEvent(
lineNumber,420
)
},3000)
setTimeout(()=>{
Utils.emitEvent(sourceId,422)
},3000)
return false
})
}
}
...
...
arkui/ace_ets_web_dev_two/entry/src/main/ets/test/WebJsunit.test.ets
浏览文件 @
0417937a
...
...
@@ -190,19 +190,9 @@ export default function webJsunit() {
*tc.desic delete credentials
*/
it('deleteHttpAuthCredentials',0,async function(done){
emitKey="emit
SearchAllAsync
";
emitKey="emit
DeleteHttpAuthCredentials
";
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,'');
})
})
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录