Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
30ddf9d9
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看板
未验证
提交
30ddf9d9
编写于
11月 19, 2022
作者:
O
openharmony_ci
提交者:
Gitee
11月 19, 2022
浏览文件
操作
浏览文件
下载
差异文件
!6599 ACE子系统】修复用例超时问题&修改webviewcontrol用例
Merge pull request !6599 from hekun/master
上级
7d8fb0b2
0e8da12e
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
33 addition
and
23 deletion
+33
-23
arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/conponentadd/web.ets
...entry/src/main/ets/MainAbility/pages/conponentadd/web.ets
+3
-3
arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/conponentadd/webg.ets
...ntry/src/main/ets/MainAbility/pages/conponentadd/webg.ets
+2
-2
arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/video.ets
...nt_apilack/entry/src/main/ets/MainAbility/pages/video.ets
+2
-1
arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/web.ets
...nent_apilack/entry/src/main/ets/MainAbility/pages/web.ets
+7
-5
arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/webapi9.ets
..._apilack/entry/src/main/ets/MainAbility/pages/webapi9.ets
+8
-7
arkui/ace_ets_component_apilack/entry/src/main/ets/test/sideBar.test.ets
...omponent_apilack/entry/src/main/ets/test/sideBar.test.ets
+1
-1
arkui/ace_ets_component_apilack/entry/src/main/ets/test/video.test.ets
..._component_apilack/entry/src/main/ets/test/video.test.ets
+3
-1
arkui/ace_ets_component_apilack/entry/src/main/ets/test/xcomponent.test.ets
...onent_apilack/entry/src/main/ets/test/xcomponent.test.ets
+7
-3
未找到文件。
arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/conponentadd/web.ets
浏览文件 @
30ddf9d9
...
...
@@ -250,7 +250,7 @@ struct Index {
var origin = this.controller.getPageHeight()
var zoomInCalled = false
setTimeout(()=>{
this.
controller.zoomIn()
this.
newcontroller.zoomIn();
if (this.controller.getPageHeight() > origin) {
zoomInCalled = true
}
...
...
@@ -383,7 +383,7 @@ struct Index {
case
"
emitSearchAllAsync
"
:
{
this.controller.loadUrl
({
url:
"
file:
///
data
/
storage
/
el1
/
bundle
/
phone
/
resources
/
rawfile
/
index.html
"})
setTimeout(()=
>
{
this.controller.searchAllAsync
("
首页
");
this.
new
controller.searchAllAsync
("
首页
");
},3000)
break
;
}
...
...
@@ -523,7 +523,7 @@ struct Index {
case
"
emitgetUrl
"
:
{
try
{
setTimeout(() =
>
{
this.controller.getUrl
();
this.
new
controller.getUrl
();
Utils.emitEvent
('
succesful
',446)
},3000)
}
catch
(
error
)
{
...
...
arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/conponentadd/webg.ets
浏览文件 @
30ddf9d9
...
...
@@ -219,7 +219,7 @@ struct Index {
var origin = this.controller.getPageHeight()
var zoomInCalled = false
setTimeout(()=>{
this.
controller.zoomIn()
this.
newcontroller.zoomIn();
if (this.controller.getPageHeight() > origin) {
zoomInCalled = true
}
...
...
@@ -358,7 +358,7 @@ struct Index {
case
"
emitSearchAllAsync
"
:
{
this.controller.loadUrl
({
url:
"
file:
///
data
/
storage
/
el1
/
bundle
/
phone
/
resources
/
rawfile
/
index.html
"})
setTimeout(()=
>
{
this.controller.searchAllAsync
("
首页
");
this.
new
controller.searchAllAsync
("
首页
");
},3000)
break
;
}
...
...
arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/video.ets
浏览文件 @
30ddf9d9
...
...
@@ -93,7 +93,8 @@ struct VideoOnFullscreenChange {
Button("FullScreen")
.key("fullScreen")
.onClick(() => {
this.controller.requestFullscreen(true)
this.controller.requestFullscreen(true);
console.info("video_101 onClick start to fullScreen");
});
Button("ExitFullScreen")
...
...
arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/web.ets
浏览文件 @
30ddf9d9
...
...
@@ -15,6 +15,7 @@
*/
import Log from '../common/Log.ets';
import web_webview from '@ohos.web.webview';
@Entry
@Component
...
...
@@ -24,6 +25,7 @@ struct WebComponent {
fileAccess: boolean = true;
// 定义Web组件的控制器controller
controller: WebController = new WebController();
controllerTwo: web_webview.WebviewController = new web_webview.WebviewController();
webResourceResponse: WebResourceResponse = new WebResourceResponse();
build() {
Column() {
...
...
@@ -146,8 +148,8 @@ struct WebComponent {
console.log('setResponseEncoding:' + event.response.setResponseEncoding("UTF-8"));
console.log('setResponseMimeType:' + event.response.setResponseMimeType("application/json"));
console.log('setResponseHeader:' + event.response.setResponseHeader([]));
console.log('web getExtra:' + this.controller.getHitTestValue().getExtra());
console.log('web getType:' + this.controller.getHitTestValue().getType());
console.log('web getExtra:' + this.controller
Two
.getHitTestValue().getExtra());
console.log('web getType:' + this.controller
Two
.getHitTestValue().getType());
console.log('web getCookieManager:' + this.controller.getCookieManager());
console.log('web getCookie:' + this.controller.getCookieManager().getCookie("www.baidu.com"));
console.log('web existCookie:' + this.controller.getCookieManager().existCookie());
...
...
@@ -165,10 +167,10 @@ struct WebComponent {
console.log('web putAcceptThirdPartyCookieEnabled:' + this.controller.getCookieManager()
.putAcceptThirdPartyCookieEnabled(true));
console.log('web saveCookieSync:' + this.controller.getCookieManager().saveCookieSync());
console.log('web zoomIn:' + this.controller.zoomIn());
console.log('web zoomOut:' + this.controller.zoomOut());
console.log('web zoomIn:' + this.controller
Two
.zoomIn());
console.log('web zoomOut:' + this.controller
Two
.zoomOut());
console.log('web zoom:' + this.controller.zoom(2));
console.log('web getWebId:' + this.controller.getWebId());
console.log('web getWebId:' + this.controller
Two
.getWebId());
console.log('web getDefaultUserAgent:' + this.controller.getDefaultUserAgent());
console.log('web getTitle:' + this.controller.getTitle());
console.log('web getPageHeight:' + this.controller.getPageHeight());
...
...
arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/webapi9.ets
浏览文件 @
30ddf9d9
...
...
@@ -45,7 +45,8 @@ struct Index {
message = new ConsoleMessage("1","12",23,MessageLevel.Debug);
controller:WebController = new WebController()
controller:WebController = new WebController();
controllerTwo: web_webview.WebviewController = new web_webview.WebviewController();
responseweb: WebResourceResponse = new WebResourceResponse()
@State str:string="emitStoreWebArchive"
...
...
@@ -160,23 +161,23 @@ struct Index {
switch(this.str){
// add
case "emitGeturl":
let url = this.controller.getUrl();
let url = this.controller
Two
.getUrl();
Utils.emitEvent(url,810);
break;
case "emitclearClientAuthenticationCache":
this.controller.clearClientAuthenticationCache();
this.controller
Two
.clearClientAuthenticationCache();
Utils.emitEvent(this.isVoid,811);
break;
case "emitclearSslCache":
this.controller.clearSslCache();
this.controller
Two
.clearSslCache();
Utils.emitEvent(this.isVoid,812);
break;
case "emitsearchNext":
this.controller.searchNext(true);
this.controller
Two
.searchNext(true);
Utils.emitEvent(this.isVoid,813);
break;
case "emitclearMatches":
this.controller.clearMatches();
this.controller
Two
.clearMatches();
Utils.emitEvent(this.isVoid,814);
break;
case "emitDefaultUserAgent":
...
...
@@ -184,7 +185,7 @@ struct Index {
Utils.emitEvent(usrAgent,815);
break;
case "emitgetWebId":
let webId = this.controller.getWebId();
let webId = this.controller
Two
.getWebId();
Utils.emitEvent(webId,816);
break;
case "emitpostMessage":
...
...
arkui/ace_ets_component_apilack/entry/src/main/ets/test/sideBar.test.ets
浏览文件 @
30ddf9d9
...
...
@@ -91,7 +91,7 @@ export default function sideBarShowSideBarJsunit() {
console.info("[testsideBarShowSideBar0003] component autoHide strJson:" + strJson);
let obj = JSON.parse(strJson);
expect(obj.$type).assertEqual('SideBarContainer');
expect(obj.$attrs.sideBarPosition).assertEqual(
undefined
);
expect(obj.$attrs.sideBarPosition).assertEqual(
'SideBarPosition.End'
);
console.info("[testsideBarShowSideBar0003] autoHide value :" + obj.$attrs.autoHide);
done();
});
...
...
arkui/ace_ets_component_apilack/entry/src/main/ets/test/video.test.ets
浏览文件 @
30ddf9d9
...
...
@@ -214,11 +214,13 @@ export default function videoOnFullscreenChangeJsunit() {
}catch(err){
console.info("video_101 on events_emitter err : " + JSON.stringify(err));
}
done();
}
try {
events_emitter.on(innerEvent, callback);
await Utils.sleep(500);
console.info("video_101 click result is: " + JSON.stringify(sendEventByKey('fullScreen', 10, "")));
await Utils.sleep(2000);
done();
} catch (err) {
console.info("video_101 on events_emitter err : " + JSON.stringify(err));
}
...
...
arkui/ace_ets_component_apilack/entry/src/main/ets/test/xcomponent.test.ets
浏览文件 @
30ddf9d9
...
...
@@ -62,14 +62,16 @@ export default function xcomponentGetXComponentContextJsunit() {
var callback1 = (eventData) => {
console.info("onRequestPopupData_0010 get event state result is: " + JSON.stringify(eventData));
expect(eventData.data.STATUS).assertEqual("callBackSuccess");
done();
}
console.info("onSelect_0012 click result is: " + JSON.stringify(sendEventByKey('getXComponentContextText', 10, "")));
events_emitter.on(innerEventOne, callback1);
await Utils.sleep(1000);
console.info("onSelect_0012 click result is: " + JSON.stringify(sendEventByKey('getXComponentContextText', 10, "")));
await Utils.sleep(2000);
} catch (err) {
console.info("onRequestPopupData_0010 on events_emitter err : " + JSON.stringify(err));
}
console.info('testxcomponentGetXComponentContext0010 END');
done();
});
/*
...
...
@@ -80,7 +82,8 @@ export default function xcomponentGetXComponentContextJsunit() {
it('testxcomponentSetXComponentSurfaceSize0001', 0, async function (done) {
console.info('xcomponentSetXComponentContext testxcomponentSetXComponentSurfaceSize0001 START');
await Utils.sleep(2000);
console.info("setXComponentSurfaceSize0001 click result is: " + JSON.stringify(sendEventByKey('setXComponentSurfaceSizeText', 10, "")))
console.info("setXComponentSurfaceSize0001 click result is: " + JSON.stringify(sendEventByKey('setXComponentSurfaceSizeText', 10, "")));
await Utils.sleep(2000);
let strJson = getInspectorByKey('setXComponentSurfaceSizeText');
//console
let obj = JSON.parse(strJson);
...
...
@@ -99,6 +102,7 @@ export default function xcomponentGetXComponentContextJsunit() {
console.info('xcomponentSetXComponentContext testxcomponentSetXComponentSurfaceSize0002 START');
await Utils.sleep(2000);
console.info("testxcomponentSetXComponentSurfaceSize0002 click result is: " + JSON.stringify(sendEventByKey('setXComponentSurfaceSizeText', 10, "")))
await Utils.sleep(2000);
let strJson = getInspectorByKey('setXComponentSurfaceSizeText');
//console
let obj = JSON.parse(strJson);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录