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

!6254 【ACE子系统】适配开发侧的修改&修复aplilack编译和部分失败用例问题

Merge pull request !6254 from hekun/master
......@@ -71,7 +71,7 @@ export default struct Common_ts_ets_apiStaticClear {
.textOverflow({ overflow: TextOverflow.None })
.key("staticClearText")
.onClick(() => {
AppStorage.staticClear()
AppStorage.Clear()
})
Text("common_ts_ets_api-EnvProp")
......@@ -152,7 +152,7 @@ export default struct Common_ts_ets_apiStaticClear {
.textOverflow({ overflow: TextOverflow.None })
.key("staticClearText")
.onClick(() => {
AppStorage.clear()
AppStorage.Clear()
})
......
......@@ -75,8 +75,8 @@ struct StateManagementGetShared {
} catch (err) {
console.info("setAndLink emit action state err: " + JSON.stringify(err.message))
}
storage1.setAndLink("storageSimpleProp",48)
console.log("storage1.setAndLink('PropA',48) :" + this.simpleVarName )
// storage1.setAndLink("storageSimpleProp",48)
// console.log("storage1.setAndLink('PropA',48) :" + this.simpleVarName )
})
Text(`Parent from LocalStorage ${ this.simpleVarName }`)
......@@ -97,8 +97,8 @@ struct StateManagementGetShared {
} catch (err) {
console.info("setOrCreate emit action state err: " + JSON.stringify(err.message))
}
storage1.setOrCreate("storageSimpleProp",47)
console.log("storageSimpleProp setOrCreate is : " + this.simpleVarName)
// storage1.setOrCreate("storageSimpleProp",47)
// console.log("storageSimpleProp setOrCreate is : " + this.simpleVarName)
})
Text(`Parent from LocalStorage ${ this.simpleVarName }`)
......@@ -120,8 +120,8 @@ struct StateManagementGetShared {
console.info("setAndProp emit action state err: " + JSON.stringify(err.message))
}
storage1.setAndProp("storageSimpleProp",49)
console.log("storageSimpleProp setAndProp is : " + this.simpleVarName)
// storage1.setAndProp("storageSimpleProp",49)
//console.log("storageSimpleProp setAndProp is : " + this.simpleVarName)
})
}.width("100%").height("100%")
......
// @ts-nocheck
/**
* Copyright (c) 2022 Shenzhen Kaihong Digital Industry Development Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
......
// @ts-nocheck
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
......@@ -40,7 +41,7 @@ struct WebComponent {
.padding(20)
.blur(2)
.userAgent("Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36")
.fileFromUrlAccess(true)
// .fileFromUrlAccess(true)
.initialScale(2)
.webDebuggingAccess(true)
.onPrompt((event) => {
......@@ -129,6 +130,7 @@ struct WebComponent {
console.info('onScaleChange newScale: ', event.newScale);
})
.onHttpErrorReceive((event) => {
try {
console.log('url:' + event.request.getRequestUrl());
console.log('isMainFrame:' + event.request.isMainFrame());
console.log('isRedirect:' + event.request.isRedirect());
......@@ -154,10 +156,14 @@ struct WebComponent {
console.log('web deleteSessionCookie:' + this.controller.getCookieManager().deleteSessionCookie());
console.log('web isCookieAllowed:' + this.controller.getCookieManager().isCookieAllowed());
console.log('web isFileURICookieAllowed:' + this.controller.getCookieManager().isFileURICookieAllowed());
console.log('web isThirdPartyCookieAllowed:' + this.controller.getCookieManager().isThirdPartyCookieAllowed());
console.log('web putAcceptCookieEnabled:' + this.controller.getCookieManager().putAcceptCookieEnabled(true));
console.log('web putAcceptFileURICookieEnabled:' + this.controller.getCookieManager().putAcceptFileURICookieEnabled(true));
console.log('web putAcceptThirdPartyCookieEnabled:' + this.controller.getCookieManager().putAcceptThirdPartyCookieEnabled(true));
console.log('web isThirdPartyCookieAllowed:' + this.controller.getCookieManager()
.isThirdPartyCookieAllowed());
console.log('web putAcceptCookieEnabled:' + this.controller.getCookieManager()
.putAcceptCookieEnabled(true));
console.log('web putAcceptFileURICookieEnabled:' + this.controller.getCookieManager()
.putAcceptFileURICookieEnabled(true));
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());
......@@ -167,6 +173,9 @@ struct WebComponent {
console.log('web getTitle:' + this.controller.getTitle());
console.log('web getPageHeight:' + this.controller.getPageHeight());
console.log('web backOrForward:' + this.controller.backOrForward(2));
} catch (error) {
console.info('the error is ' + JSON.stringify(error));
}
let result = event.request.getRequestHeader();
......
// @ts-nocheck
/**
* Copyright (c) 2022 Shenzhen Kaihong Digital Industry Development Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
......@@ -82,8 +83,31 @@ export default function globalJsunit() {
it('testglobal_sendMouseEvent0003', 0, async function (done) {
console.info('testglobal_sendMouseEvent0003 START');
await Utils.sleep(2000);
let mouseEvent = {button:0,action:3,screenX:202.66666666666666,screenY:102.66666666666667,x:34,y:34,timestamp:8261302454000,source:1,
target:{area:{position:{x:158.66666666666666,y:58.666666666666664},globalPosition:{x:168.66666666666666,y:68.66666666666666},width:142.66666666666666,height:58.666666666666664}}};
let mouseEvent: MouseEvent = {
button: 0,
action: 3,
x: 34,
y: 34,
screenX: 202.66666666666666,
screenY: 102.66666666666667,
timestamp: 8261302454000,
target: {
area: {
width: 142.66666666666666,
height:58.666666666666664,
position: {
x: 158.66666666666666,
y: 58.666666666666664,
},
globalPosition: {
x: 168.66666666666666,
y: 68.66666666666666,
}
}
},
source: 1
}
let result = sendMouseEvent(mouseEvent);
console.info("[testglobal_sendMouseEvent0003] result:" + result);
expect(JSON.stringify(result)).assertEqual("true");
......
......@@ -57,7 +57,7 @@ export default function lineNeJsunit() {
console.info("[testlineNe0001] component width strJson:" + strJson);
let obj = JSON.parse(strJson);
expect(obj.$type).assertEqual('Shape');
expect(obj.$attrs.width).assertEqual("75.00px");
expect(obj.$attrs.width).assertEqual("50.00vp");
console.info("[testlineNe0001] width value :" + obj.$attrs.width);
done();
});
......@@ -74,7 +74,7 @@ export default function lineNeJsunit() {
console.info("[testlineNe0002] component height strJson:" + strJson);
let obj = JSON.parse(strJson);
expect(obj.$type).assertEqual('Shape');
expect(obj.$attrs.height).assertEqual("150.00px");
expect(obj.$attrs.height).assertEqual("100.00vp");
console.info("[testlineNe0002] height value :" + obj.$attrs.height);
done();
});
......@@ -91,7 +91,7 @@ export default function lineNeJsunit() {
console.info("[testlineNe0005] component width strJson:" + strJson);
let obj = JSON.parse(strJson);
expect(obj.$type).assertEqual('Shape');
expect(obj.$attrs.width).assertEqual("300.00px");
expect(obj.$attrs.width).assertEqual("200.00vp");
console.info("[testlineNe0005] width value :" + obj.$attrs.width);
done();
});
......@@ -108,7 +108,7 @@ export default function lineNeJsunit() {
console.info("[testlineNe0006] component height strJson:" + strJson);
let obj = JSON.parse(strJson);
expect(obj.$type).assertEqual('Shape');
expect(obj.$attrs.height).assertEqual("300.00px");
expect(obj.$attrs.height).assertEqual("200.00");
console.info("[testlineNe0006] height value :" + obj.$attrs.height);
done();
});
......
......@@ -21,7 +21,7 @@ import Utils from './Utils.ets'
export default function list_itemOnSelectJsunit() {
describe('list_itemOnSelectTest', function () {
beforeAll(async function (done) {
console.info("flex beforeEach start");
console.info("flex beforeEach start");testlist_itemOnSelect0002
let options = {
uri: 'pages/list_item',
}
......@@ -75,7 +75,7 @@ export default function list_itemOnSelectJsunit() {
console.info("[testlist_itemOnSelect0002] component border strJson:" + strJson);
let obj = JSON.parse(strJson);
expect(obj.$type).assertEqual('ListItem');
expect(obj.$attrs.selectable).assertEqual(undefined);
expect(obj.$attrs.selectable).assertEqual(false);
console.info("[testlist_itemOnSelect0002] selectable value :" + obj.$attrs.selectable);
done();
});
......
......@@ -28,7 +28,7 @@ export default function swiperCurveJsunit() {
router.clear();
let pages = router.getState();
console.info("get swiper state success " + JSON.stringify(pages));
if (!("swiper" == pages.name)) {
if (!("swiper" == pages.name))
console.info("get swiper state success " + JSON.stringify(pages.name));
let result = await router.push(options);
await Utils.sleep(2000);
......@@ -74,7 +74,7 @@ export default function swiperCurveJsunit() {
console.info("[testswiperCurve0002] component cachedCount strJson:" + strJson);
let obj = JSON.parse(strJson);
expect(obj.$type).assertEqual('Swiper');
expect(obj.$attrs.cachedCount).assertEqual("2");
expect(obj.$attrs.cachedCount).assertEqual(2);
console.info("[testswiperCurve0002] cachedCount value :" + obj.$attrs.cachedCount);
done();
});
......
......@@ -283,7 +283,8 @@ export default function progressJsunit() {
let strJson = getInspectorByKey('LPValue');
let obj = JSON.parse(strJson);
console.info("testProgress_1000 component obj is: " + JSON.stringify(obj));
expect(obj.$attrs.value).assertEqual("-5.000000");
// 非法入参默认初始值
expect(obj.$attrs.value).assertEqual("0.000000");
console.info('testProgress_1000 END');
done();
});
......@@ -313,7 +314,8 @@ export default function progressJsunit() {
let strJson = getInspectorByKey('LPValue');
let obj = JSON.parse(strJson);
console.info("testProgress_1100 component obj is: " + JSON.stringify(obj));
expect(obj.$attrs.value).assertEqual("121212121.000000");
// 非法入参默认初始值
expect(obj.$attrs.value).assertEqual("100.000000");
console.info('testProgress_1100 END');
done();
});
......
......@@ -183,7 +183,8 @@ export default function qrCodeJsunit() {
var strJson = getInspectorByKey('QrCodeColor');
var obj = JSON.parse(strJson);
console.info("[test_qrCode_006] component obj is: " + JSON.stringify(obj));
expect(obj.$attrs.backgroundColor).assertEqual('#FF000000');
// 非法入参默认初始值
expect(obj.$attrs.backgroundColor).assertEqual('#FFFFFFFF');
done();
});
......
......@@ -153,7 +153,8 @@ export default function ToggleJsunit() {
let strJsonNew = getInspectorByKey('toggle');
let objNew = JSON.parse(strJsonNew);
console.info("testToggle06 component objNew is: " + JSON.stringify(objNew));
expect(objNew.$attrs.selectedColor).assertEqual('#FF000000');
// 非法入参默认初始值
expect(objNew.$attrs.selectedColor).assertEqual('#33007DFF');
console.info('testToggle06 END');
done();
});
......@@ -179,7 +180,7 @@ export default function ToggleJsunit() {
let strJsonNew = getInspectorByKey('toggle');
let objNew = JSON.parse(strJsonNew);
console.info("testToggle07 component objNew is: " + JSON.stringify(objNew));
expect(objNew.$attrs.selectedColor).assertEqual('#FF000000');
expect(objNew.$attrs.selectedColor).assertEqual('#33007DFF');
console.info('testToggle07 END');
done();
});
......
......@@ -101,7 +101,8 @@ export default function transitionJsunit() {
let strJsonNew = getInspectorByKey('button');
let objNew = JSON.parse(strJsonNew);
console.info("transitionTest_0300 component objNew is: " + JSON.stringify(objNew));
expect(objNew.$attrs.opacity).assertEqual(2);
//非法入参默认初始值
expect(objNew.$attrs.opacity).assertEqual(1);
console.info('transitionTest_0300 END');
done();
});
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册