Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
d8f2f44d
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看板
提交
d8f2f44d
编写于
3月 16, 2023
作者:
T
tianwenzhe
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
change arkui and add experience
Signed-off-by:
N
tian-wenzhe411
<
tianwenzhe2@huawei.com
>
上级
d67e0639
变更
30
展开全部
隐藏空白更改
内联
并排
Showing
30 changed file
with
1485 addition
and
200 deletion
+1485
-200
validator/acts_validator/src/main/ets/pages/ArkUI/ArkUI_index.ets
...r/acts_validator/src/main/ets/pages/ArkUI/ArkUI_index.ets
+1
-1
validator/acts_validator/src/main/ets/pages/ArkUI/CanvasFillStyle.ets
...ts_validator/src/main/ets/pages/ArkUI/CanvasFillStyle.ets
+15
-3
validator/acts_validator/src/main/ets/pages/ArkUI/CanvasFont.ets
...or/acts_validator/src/main/ets/pages/ArkUI/CanvasFont.ets
+220
-44
validator/acts_validator/src/main/ets/pages/ArkUI/CanvasGlobalAlpha.ets
..._validator/src/main/ets/pages/ArkUI/CanvasGlobalAlpha.ets
+5
-2
validator/acts_validator/src/main/ets/pages/ArkUI/CanvasGlobalCompositeOperation.ets
...c/main/ets/pages/ArkUI/CanvasGlobalCompositeOperation.ets
+77
-11
validator/acts_validator/src/main/ets/pages/ArkUI/CanvasLineCap.ets
...acts_validator/src/main/ets/pages/ArkUI/CanvasLineCap.ets
+15
-3
validator/acts_validator/src/main/ets/pages/ArkUI/CanvasLineDashOffset.ets
...lidator/src/main/ets/pages/ArkUI/CanvasLineDashOffset.ets
+4
-2
validator/acts_validator/src/main/ets/pages/ArkUI/CanvasLineJoin.ets
...cts_validator/src/main/ets/pages/ArkUI/CanvasLineJoin.ets
+15
-3
validator/acts_validator/src/main/ets/pages/ArkUI/CanvasLineWidth.ets
...ts_validator/src/main/ets/pages/ArkUI/CanvasLineWidth.ets
+5
-2
validator/acts_validator/src/main/ets/pages/ArkUI/CanvasMiterLimit.ets
...s_validator/src/main/ets/pages/ArkUI/CanvasMiterLimit.ets
+0
-82
validator/acts_validator/src/main/ets/pages/ArkUI/CanvasShadowBlur.ets
...s_validator/src/main/ets/pages/ArkUI/CanvasShadowBlur.ets
+5
-3
validator/acts_validator/src/main/ets/pages/ArkUI/CanvasShadowColor.ets
..._validator/src/main/ets/pages/ArkUI/CanvasShadowColor.ets
+15
-3
validator/acts_validator/src/main/ets/pages/ArkUI/CanvasShadowOffsetX.ets
...alidator/src/main/ets/pages/ArkUI/CanvasShadowOffsetX.ets
+5
-2
validator/acts_validator/src/main/ets/pages/ArkUI/CanvasShadowOffsetY.ets
...alidator/src/main/ets/pages/ArkUI/CanvasShadowOffsetY.ets
+4
-2
validator/acts_validator/src/main/ets/pages/ArkUI/CanvasStrokeStyle.ets
..._validator/src/main/ets/pages/ArkUI/CanvasStrokeStyle.ets
+15
-3
validator/acts_validator/src/main/ets/pages/ArkUI/CanvasTextAlign.ets
...ts_validator/src/main/ets/pages/ArkUI/CanvasTextAlign.ets
+30
-10
validator/acts_validator/src/main/ets/pages/ArkUI/CanvasTextBaseline.ets
...validator/src/main/ets/pages/ArkUI/CanvasTextBaseline.ets
+30
-10
validator/acts_validator/src/main/ets/pages/Experience/ColdStartTest.ets
...validator/src/main/ets/pages/Experience/ColdStartTest.ets
+5
-5
validator/acts_validator/src/main/ets/pages/Experience/Experience_index.ets
...idator/src/main/ets/pages/Experience/Experience_index.ets
+7
-0
validator/acts_validator/src/main/ets/pages/Experience/HotStartTest.ets
..._validator/src/main/ets/pages/Experience/HotStartTest.ets
+5
-5
validator/acts_validator/src/main/ets/pages/Experience/KeyboardDisplayTest.ets
...tor/src/main/ets/pages/Experience/KeyboardDisplayTest.ets
+120
-0
validator/acts_validator/src/main/ets/pages/Experience/KeyboardInputTest.ets
...dator/src/main/ets/pages/Experience/KeyboardInputTest.ets
+120
-0
validator/acts_validator/src/main/ets/pages/Experience/PhotoFps.ets
...acts_validator/src/main/ets/pages/Experience/PhotoFps.ets
+0
-2
validator/acts_validator/src/main/ets/pages/Experience/ScrollPhotosList.ets
...idator/src/main/ets/pages/Experience/ScrollPhotosList.ets
+120
-0
validator/acts_validator/src/main/ets/pages/Experience/StartBackgroundTask.ets
...tor/src/main/ets/pages/Experience/StartBackgroundTask.ets
+118
-0
validator/acts_validator/src/main/ets/pages/Experience/StartNotification.ets
...dator/src/main/ets/pages/Experience/StartNotification.ets
+118
-0
validator/acts_validator/src/main/ets/pages/Experience/StartTaskManager.ets
...idator/src/main/ets/pages/Experience/StartTaskManager.ets
+118
-0
validator/acts_validator/src/main/ets/pages/Experience/ViewPhotoTest.ets
...validator/src/main/ets/pages/Experience/ViewPhotoTest.ets
+120
-0
validator/acts_validator/src/main/ets/pages/common/TimeExperienceCustomContainer.ets
...c/main/ets/pages/common/TimeExperienceCustomContainer.ets
+165
-0
validator/acts_validator/src/main/resources/base/profile/main_pages.json
...validator/src/main/resources/base/profile/main_pages.json
+8
-2
未找到文件。
validator/acts_validator/src/main/ets/pages/ArkUI/ArkUI_index.ets
浏览文件 @
d8f2f44d
...
...
@@ -51,9 +51,9 @@ struct IndexPage {
{title:'CanvasStrokeStyle',uri:'pages/ArkUI/CanvasStrokeStyle'},
{title:'CanvasLineCap',uri:'pages/ArkUI/CanvasLineCap'},
{title:'CanvasLineJoin',uri:'pages/ArkUI/CanvasLineJoin'},
{title:'CanvasMiterLimit',uri:'pages/ArkUI/CanvasMiterLimit'},
{title:'CanvasFont',uri:'pages/ArkUI/CanvasFont'},
{title:'CanvasTextAlign',uri:'pages/ArkUI/CanvasTextAlign'},
{title:'CanvasTextBaseline',uri:'pages/ArkUI/CanvasTextBaseline'},
{title:'CanvasGlobalAlpha',uri:'pages/ArkUI/CanvasGlobalAlpha'},
{title:'CanvasLineDashOffset',uri:'pages/ArkUI/CanvasLineDashOffset'},
{title:'CanvasGlobalCompositeOperation',uri:'pages/ArkUI/CanvasGlobalCompositeOperation'},
...
...
validator/acts_validator/src/main/ets/pages/ArkUI/CanvasFillStyle.ets
浏览文件 @
d8f2f44d
...
...
@@ -23,6 +23,9 @@ struct SetCircle {
@State name: string = 'CanvasFillStyle';
@State StepTips: string = '操作步骤:点击不同的颜色控件'+'\n'+'预期结果:原本默认黑色的填色区域会随点击变化';
@State Vue: boolean = false;
@State num1: number = 0;
@State num2: number = 0;
@State num3: number = 0;
async aboutToAppear(){
await FirstDialog.ChooseDialog(this.StepTips,this.name);
}
...
...
@@ -36,7 +39,10 @@ struct SetCircle {
this.FillColor = '#FFFF0000';
this.context.fillStyle = this.FillColor;
this.context.fillRect(100, 160, 150, 100);
this.Vue = true;
this.num1 = 1;
if ( this.num1 == this.num3 && this.num2 == 1 ){
this.Vue = true;
}
})
Text('Yellow').fontSize(16).border({width:2}).size({width:'25%',height:'20%'})
.onClick(()=>{
...
...
@@ -44,7 +50,10 @@ struct SetCircle {
this.FillColor = '#fffffc3c';
this.context.fillStyle = this.FillColor;
this.context.fillRect(100, 160, 150, 100);
this.Vue = true;
this.num2 = 1;
if ( this.num1 == 1 && this.num3 == this.num2 ){
this.Vue = true;
}
})
Text('Green').fontSize(16).border({width:2}).size({width:'25%',height:'20%'})
.onClick(()=>{
...
...
@@ -52,7 +61,10 @@ struct SetCircle {
this.FillColor = '#ff19fa00';
this.context.fillStyle = this.FillColor;
this.context.fillRect(100, 160, 150, 100);
this.Vue = true;
this.num3 = 1;
if ( this.num1 == 1 && this.num3 == this.num2 ){
this.Vue = true;
}
})
}.width('70%').height('30%')
Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) {
...
...
validator/acts_validator/src/main/ets/pages/ArkUI/CanvasFont.ets
浏览文件 @
d8f2f44d
此差异已折叠。
点击以展开。
validator/acts_validator/src/main/ets/pages/ArkUI/CanvasGlobalAlpha.ets
浏览文件 @
d8f2f44d
...
...
@@ -47,8 +47,11 @@ struct SetCircle {
console.info('Pan end');
})
)
}.width('70%').height('25%')
Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }){
Text('透明度: ' + (this.X)*0.005 )
}.width('
70%').height('3
0%')
}.width('
100%').height('2
0%')
Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) {
Canvas(this.context)
.width('100%')
...
...
@@ -61,7 +64,7 @@ struct SetCircle {
this.context.fillStyle = 'rgb(0,0,255)';
this.context.fillRect(200, 200, 50, 50);
})
}.width('100%').height('
70
%')
}.width('100%').height('
55
%')
}.width('100%').height('80%').backgroundColor(Color.White)
}
build() {
...
...
validator/acts_validator/src/main/ets/pages/ArkUI/CanvasGlobalCompositeOperation.ets
浏览文件 @
d8f2f44d
...
...
@@ -23,6 +23,17 @@ struct SetCircle {
@State name: string = 'CanvasGlobalCompositeOperation';
@State StepTips: string = '操作步骤:点击不同的合成操作的方式'+'\n'+'预期结果:原本默认合成方式会随点击变化';
@State Vue: boolean = false;
@State num1: number = 0;
@State num2: number = 0;
@State num3: number = 0;
@State num4: number = 0;
@State num5: number = 0;
@State num6: number = 0;
@State num7: number = 0;
@State num8: number = 0;
@State num9: number = 0;
@State num10: number = 0;
@State num11: number = 0;
async aboutToAppear(){
await FirstDialog.ChooseDialog(this.StepTips,this.name);
}
...
...
@@ -41,7 +52,12 @@ struct SetCircle {
this.context.globalCompositeOperation = 'source-over';
this.context.fillStyle = 'rgb(0,0,255)';
this.context.fillRect(180, 180, 50, 50);
this.Vue = true;
this.num1 = 1;
if( this.num1 == 1 && this.num2 == 1 && this.num3 == 1 && this.num4 == 1 && this.num5 == 1
&& this.num6 == 1 && this.num7 == 1 && this.num8 == 1 && this.num9 == 1 && this.num10 == 1
&& this.num11 == 1 ){
this.Vue = true;
}
})
Text('s-atop').fontSize(13).border({width:2}).size({width:'18%',height:'20%'})
.onClick(()=>{
...
...
@@ -51,7 +67,12 @@ struct SetCircle {
this.context.globalCompositeOperation = 'source-atop';
this.context.fillStyle = 'rgb(0,0,255)';
this.context.fillRect(180, 180, 50, 50);
this.Vue = true;
this.num2 = 1;
if( this.num1 == 1 && this.num2 == 1 && this.num3 == 1 && this.num4 == 1 && this.num5 == 1
&& this.num6 == 1 && this.num7 == 1 && this.num8 == 1 && this.num9 == 1 && this.num10 == 1
&& this.num11 == 1 ){
this.Vue = true;
}
})
Text('s-in').fontSize(13).border({width:2}).size({width:'18%',height:'20%'})
.onClick(()=>{
...
...
@@ -61,7 +82,12 @@ struct SetCircle {
this.context.globalCompositeOperation = 'source-in';
this.context.fillStyle = 'rgb(0,0,255)';
this.context.fillRect(180, 180, 50, 50);
this.Vue = true;
this.num3 = 1;
if( this.num1 == 1 && this.num2 == 1 && this.num3 == 1 && this.num4 == 1 && this.num5 == 1
&& this.num6 == 1 && this.num7 == 1 && this.num8 == 1 && this.num9 == 1 && this.num10 == 1
&& this.num11 == 1 ){
this.Vue = true;
}
})
Text('s-out').fontSize(13).border({width:2}).size({width:'18%',height:'20%'})
.onClick(()=>{
...
...
@@ -71,7 +97,12 @@ struct SetCircle {
this.context.globalCompositeOperation = 'source-out';
this.context.fillStyle = 'rgb(0,0,255)';
this.context.fillRect(180, 180, 50, 50);
this.Vue = true;
this.num4 = 1;
if( this.num1 == 1 && this.num2 == 1 && this.num3 == 1 && this.num4 == 1 && this.num5 == 1
&& this.num6 == 1 && this.num7 == 1 && this.num8 == 1 && this.num9 == 1 && this.num10 == 1
&& this.num11 == 1 ){
this.Vue = true;
}
})
}
Row({space:10}){
...
...
@@ -83,7 +114,12 @@ struct SetCircle {
this.context.globalCompositeOperation = 'destination-over';
this.context.fillStyle = 'rgb(0,0,255)';
this.context.fillRect(180, 180, 50, 50);
this.Vue = true;
this.num5 = 1;
if( this.num1 == 1 && this.num2 == 1 && this.num3 == 1 && this.num4 == 1 && this.num5 == 1
&& this.num6 == 1 && this.num7 == 1 && this.num8 == 1 && this.num9 == 1 && this.num10 == 1
&& this.num11 == 1 ){
this.Vue = true;
}
})
Text('d-atop').fontSize(13).border({width:2}).size({width:'18%',height:'20%'})
.onClick(()=> {
...
...
@@ -93,7 +129,12 @@ struct SetCircle {
this.context.globalCompositeOperation = 'destination-atop';
this.context.fillStyle = 'rgb(0,0,255)';
this.context.fillRect(180, 180, 50, 50);
this.Vue = true;
this.num6 = 1;
if( this.num1 == 1 && this.num2 == 1 && this.num3 == 1 && this.num4 == 1 && this.num5 == 1
&& this.num6 == 1 && this.num7 == 1 && this.num8 == 1 && this.num9 == 1 && this.num10 == 1
&& this.num11 == 1 ){
this.Vue = true;
}
})
Text('d-in').fontSize(13).border({width:2}).size({width:'18%',height:'20%'})
.onClick(()=> {
...
...
@@ -103,7 +144,12 @@ struct SetCircle {
this.context.globalCompositeOperation = 'destination-in';
this.context.fillStyle = 'rgb(0,0,255)';
this.context.fillRect(180, 180, 50, 50);
this.Vue = true;
this.num7 = 1;
if( this.num1 == 1 && this.num2 == 1 && this.num3 == 1 && this.num4 == 1 && this.num5 == 1
&& this.num6 == 1 && this.num7 == 1 && this.num8 == 1 && this.num9 == 1 && this.num10 == 1
&& this.num11 == 1 ){
this.Vue = true;
}
})
Text('d-out').fontSize(13).border({width:2}).size({width:'18%',height:'20%'})
.onClick(()=> {
...
...
@@ -113,7 +159,12 @@ struct SetCircle {
this.context.globalCompositeOperation = 'destination-out';
this.context.fillStyle = 'rgb(0,0,255)';
this.context.fillRect(180, 180, 50, 50);
this.Vue = true;
this.num8 = 1;
if( this.num1 == 1 && this.num2 == 1 && this.num3 == 1 && this.num4 == 1 && this.num5 == 1
&& this.num6 == 1 && this.num7 == 1 && this.num8 == 1 && this.num9 == 1 && this.num10 == 1
&& this.num11 == 1 ){
this.Vue = true;
}
})
}
Row({space:10}){
...
...
@@ -125,7 +176,12 @@ struct SetCircle {
this.context.globalCompositeOperation = 'lighter';
this.context.fillStyle = 'rgb(0,0,255)';
this.context.fillRect(180, 180, 50, 50);
this.Vue = true;
this.num9 = 1;
if( this.num1 == 1 && this.num2 == 1 && this.num3 == 1 && this.num4 == 1 && this.num5 == 1
&& this.num6 == 1 && this.num7 == 1 && this.num8 == 1 && this.num9 == 1 && this.num10 == 1
&& this.num11 == 1 ){
this.Vue = true;
}
})
Text('copy').fontSize(13).border({width:2}).size({width:'18%',height:'20%'})
.onClick(()=> {
...
...
@@ -135,7 +191,12 @@ struct SetCircle {
this.context.globalCompositeOperation = 'copy';
this.context.fillStyle = 'rgb(0,0,255)';
this.context.fillRect(180, 180, 50, 50);
this.Vue = true;
this.num10 = 1;
if( this.num1 == 1 && this.num2 == 1 && this.num3 == 1 && this.num4 == 1 && this.num5 == 1
&& this.num6 == 1 && this.num7 == 1 && this.num8 == 1 && this.num9 == 1 && this.num10 == 1
&& this.num11 == 1 ){
this.Vue = true;
}
})
Text('xor').fontSize(13).border({width:2}).size({width:'18%',height:'20%'})
.onClick(()=> {
...
...
@@ -145,7 +206,12 @@ struct SetCircle {
this.context.globalCompositeOperation = 'xor';
this.context.fillStyle = 'rgb(0,0,255)';
this.context.fillRect(180, 180, 50, 50);
this.Vue = true;
this.num11 = 1;
if( this.num1 == 1 && this.num2 == 1 && this.num3 == 1 && this.num4 == 1 && this.num5 == 1
&& this.num6 == 1 && this.num7 == 1 && this.num8 == 1 && this.num9 == 1 && this.num10 == 1
&& this.num11 == 1 ){
this.Vue = true;
}
})
Text('').fontSize(0).border({width:0}).size({width:'18%',height:'20%'})
}
...
...
validator/acts_validator/src/main/ets/pages/ArkUI/CanvasLineCap.ets
浏览文件 @
d8f2f44d
...
...
@@ -23,6 +23,9 @@ struct SetCircle {
@State name: string = 'CanvasLineCap';
@State StepTips: string = '操作步骤:点击不同的端点样式控件'+'\n'+'预期结果:原本默认端点样式会随点击变化';
@State Vue: boolean = false;
@State num1: number = 0;
@State num2: number = 0;
@State num3: number = 0;
async aboutToAppear(){
await FirstDialog.ChooseDialog(this.StepTips,this.name);
}
...
...
@@ -38,7 +41,10 @@ struct SetCircle {
this.context.moveTo(100, 100);
this.context.lineTo(250, 100);
this.context.stroke();
this.Vue = true;
this.num1 = 1;
if ( this.num1 == this.num3 && this.num2 == 1 ){
this.Vue = true;
}
})
Text('round').fontSize(16).border({width:2}).size({width:'25%',height:'20%'})
.onClick(()=>{
...
...
@@ -49,7 +55,10 @@ struct SetCircle {
this.context.moveTo(100, 100);
this.context.lineTo(250, 100);
this.context.stroke();
this.Vue = true;
this.num2 = 1;
if ( this.num1 == 1 && this.num3 == this.num2 ){
this.Vue = true;
}
})
Text('square').fontSize(16).border({width:2}).size({width:'25%',height:'20%'})
.onClick(()=>{
...
...
@@ -60,7 +69,10 @@ struct SetCircle {
this.context.moveTo(100, 100);
this.context.lineTo(250, 100);
this.context.stroke();
this.Vue = true;
this.num3 = 1;
if ( this.num1 == 1 && this.num3 == this.num2 ){
this.Vue = true;
}
})
}.width('70%').height('30%')
Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) {
...
...
validator/acts_validator/src/main/ets/pages/ArkUI/CanvasLineDashOffset.ets
浏览文件 @
d8f2f44d
...
...
@@ -46,8 +46,10 @@ struct SetCircle {
console.info('Pan end');
})
)
}.width('70%').height('25%')
Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) {
Text('虚线偏移量: ' + (this.X)*0.1 )
}.width('
70%').height('3
0%')
}.width('
100%').height('2
0%')
Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) {
Canvas(this.context)
.width('100%')
...
...
@@ -59,7 +61,7 @@ struct SetCircle {
this.context.lineDashOffset = (this.X)*0.1;
this.context.stroke();
})
}.width('100%').height('
70
%')
}.width('100%').height('
55
%')
}.width('100%').height('80%').backgroundColor(Color.White)
}
build() {
...
...
validator/acts_validator/src/main/ets/pages/ArkUI/CanvasLineJoin.ets
浏览文件 @
d8f2f44d
...
...
@@ -23,6 +23,9 @@ struct SetCircle {
@State name: string = 'CanvasLineJoin';
@State StepTips: string = '操作步骤:点击不同的交点样式控件'+'\n'+'预期结果:原本默认交点样式会随点击变化';
@State Vue: boolean = false;
@State num1: number = 0;
@State num2: number = 0;
@State num3: number = 0;
async aboutToAppear(){
await FirstDialog.ChooseDialog(this.StepTips,this.name);
}
...
...
@@ -39,7 +42,10 @@ struct SetCircle {
this.context.lineTo(210, 130);
this.context.lineTo(120, 180);
this.context.stroke();
this.Vue = true;
this.num1 = 1;
if ( this.num1 == this.num3 && this.num2 == 1 ){
this.Vue = true;
}
})
Text('bevel').fontSize(16).border({width:2}).size({width:'25%',height:'20%'})
.onClick(()=>{
...
...
@@ -51,7 +57,10 @@ struct SetCircle {
this.context.lineTo(210, 130);
this.context.lineTo(120, 180);
this.context.stroke();
this.Vue = true;
this.num2 = 1;
if ( this.num1 == 1 && this.num3 == this.num2 ){
this.Vue = true;
}
})
Text('miter').fontSize(16).border({width:2}).size({width:'25%',height:'20%'})
.onClick(()=>{
...
...
@@ -63,7 +72,10 @@ struct SetCircle {
this.context.lineTo(210, 130);
this.context.lineTo(120, 180);
this.context.stroke();
this.Vue = true;
this.num3 = 1;
if ( this.num1 == 1 && this.num3 == this.num2 ){
this.Vue = true;
}
})
}.width('70%').height('30%')
Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) {
...
...
validator/acts_validator/src/main/ets/pages/ArkUI/CanvasLineWidth.ets
浏览文件 @
d8f2f44d
...
...
@@ -46,8 +46,11 @@ struct SetCircle {
console.info('Pan end');
})
)
Text('边框粗细: ' + (this.X)*0.05 )
}.width('70%').height('30%')
Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) {
Text('边框粗细: ' + (this.X)*0.05 )
}.width('100%').height('20%')
Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) {
Canvas(this.context)
.width('100%')
...
...
@@ -57,7 +60,7 @@ struct SetCircle {
this.context.lineWidth = (this.X)*0.05;
this.context.strokeRect(120, 120, 120, 120);
})
}.width('100%').height('
7
0%')
}.width('100%').height('
5
0%')
}.width('100%').height('80%').backgroundColor(Color.White)
}
build() {
...
...
validator/acts_validator/src/main/ets/pages/ArkUI/CanvasMiterLimit.ets
已删除
100644 → 0
浏览文件 @
d67e0639
/*
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import {CustomContainer} from '../common/CanvasCustomContainer2';
import FirstDialog from '../model/FirstDialog';
@Entry
@Component
struct SetCircle {
private settings: RenderingContextSettings = new RenderingContextSettings(true);
private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings);
@State FillColor: string = '#FF000000';
@State X: number = 0;
@State name: string = 'CanvasMiterLimit';
@State StepTips: string = '操作步骤:向右拖动MiterLimit按键'+'\n'+'预期结果:斜接面限制值会随拖动距离变化,并显示限制值大小';
@State Vue: boolean = false;
async aboutToAppear(){
await FirstDialog.ChooseDialog(this.StepTips,this.name);
}
@Builder specificNoParam() {
Column() {
Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceBetween }){
Text('MiterLimit').fontSize(18).border({width:2}).size({width:'40%',height:'30%'})
.translate({ x: this.X, y: 20, z: 5 })
.gesture(
PanGesture({})
.onActionStart((event: GestureEvent) => {
this.context.clearRect(100, 100, 250, 200);
console.info('Pan start');
this.Vue = true;
})
.onActionUpdate((event: GestureEvent) => {
this.X = event.offsetX;
})
.onActionEnd(() => {
console.info('Pan end');
})
)
Text('边框粗细: ' + (this.X)*0.05 )
}.width('70%').height('30%')
Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) {
Canvas(this.context)
.width('100%')
.height('100%')
.backgroundColor('#ffffffff')
.onReady(() =>{
this.context.lineWidth = 8;
this.context.lineJoin = 'miter';
this.context.miterLimit = (this.X)*0.05;
this.context.moveTo(160, 100);
this.context.lineTo(190, 105);
this.context.lineTo(160, 107);
this.context.stroke();
})
}.width('100%').height('70%')
}.width('100%').height('80%').backgroundColor(Color.White)
}
build() {
Column() {
CustomContainer({
title: this.name,
Url: 'pages/ArkUI/ArkUI_index',
StepTips: this.StepTips,
content: this.specificNoParam,
FillColor: $FillColor,
X: $X,
name: $name,
Vue: $Vue,
})
}.width('100%').height('100%').backgroundColor(Color.Black)
}
}
\ No newline at end of file
validator/acts_validator/src/main/ets/pages/ArkUI/CanvasShadowBlur.ets
浏览文件 @
d8f2f44d
...
...
@@ -35,7 +35,7 @@ struct SetCircle {
.gesture(
PanGesture({})
.onActionStart((event: GestureEvent) => {
this.context.clearRect(
10, 50, 400, 3
00);
this.context.clearRect(
0, 0, 600, 5
00);
this.context.fillStyle = 'rgb(255,0,0)';
this.context.fillRect(150, 150, 100, 100);
console.info('Pan start');
...
...
@@ -48,8 +48,10 @@ struct SetCircle {
console.info('Pan end');
})
)
}.width('70%').height('25%')
Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) {
Text('阴影模糊: ' + this.X )
}.width('
70%').height('3
0%')
}.width('
100%').height('2
0%')
Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) {
Canvas(this.context)
.width('100%')
...
...
@@ -61,7 +63,7 @@ struct SetCircle {
this.context.fillStyle = 'rgb(255,0,0)';
this.context.fillRect(150, 150, 100, 100);
})
}.width('100%').height('
70
%')
}.width('100%').height('
55
%')
}.width('100%').height('80%').backgroundColor(Color.White)
}
build() {
...
...
validator/acts_validator/src/main/ets/pages/ArkUI/CanvasShadowColor.ets
浏览文件 @
d8f2f44d
...
...
@@ -24,6 +24,9 @@ struct SetCircle {
@State name: string = 'CanvasShadowColor';
@State StepTips: string = '操作步骤:点击不同的颜色控件'+'\n'+'预期结果:原本默认蓝色的阴影会随点击变化';
@State Vue: boolean = false;
@State num1: number = 0;
@State num2: number = 0;
@State num3: number = 0;
async aboutToAppear(){
await FirstDialog.ChooseDialog(this.StepTips,this.name);
}
...
...
@@ -37,7 +40,10 @@ struct SetCircle {
this.context.shadowColor = 'rgb(0,0,255)';
this.context.fillStyle = 'rgb(255,0,0)';
this.context.fillRect(150, 150, 100, 100);
this.Vue = true;
this.num1 = 1;
if ( this.num1 == 1 && this.num3 == 1 && this.num2 == 1 ){
this.Vue = true;
}
})
Text('Yellow').fontSize(16).border({width:2}).size({width:'25%',height:'20%'})
.onClick(()=>{
...
...
@@ -46,7 +52,10 @@ struct SetCircle {
this.context.shadowColor = '#fffffc3c';
this.context.fillStyle = 'rgb(255,0,0)';
this.context.fillRect(150, 150, 100, 100);
this.Vue = true;
this.num2 = 1;
if ( this.num1 == 1 && this.num3 == 1 && this.num2 == 1 ){
this.Vue = true;
}
})
Text('Green').fontSize(16).border({width:2}).size({width:'25%',height:'20%'})
.onClick(()=>{
...
...
@@ -55,7 +64,10 @@ struct SetCircle {
this.context.shadowColor = '#ff19fa00';
this.context.fillStyle = 'rgb(255,0,0)';
this.context.fillRect(150, 150, 100, 100);
this.Vue = true;
this.num3 = 1;
if ( this.num1 == 1 && this.num3 == 1 && this.num2 == 1 ){
this.Vue = true;
}
})
}.width('70%').height('30%')
Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) {
...
...
validator/acts_validator/src/main/ets/pages/ArkUI/CanvasShadowOffsetX.ets
浏览文件 @
d8f2f44d
...
...
@@ -49,8 +49,11 @@ struct SetCircle {
console.info('Pan end');
})
)
}.width('70%').height('25%')
Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }){
Text('阴影偏移: ' + (this.X)*0.05 )
}.width('
70%').height('3
0%')
}.width('
100%').height('2
0%')
Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) {
Canvas(this.context)
.width('100%')
...
...
@@ -63,7 +66,7 @@ struct SetCircle {
this.context.fillStyle = 'rgb(255,0,0)';
this.context.fillRect(150, 150, 100, 100);
})
}.width('100%').height('
70
%')
}.width('100%').height('
55
%')
}.width('100%').height('80%').backgroundColor(Color.White)
}
build() {
...
...
validator/acts_validator/src/main/ets/pages/ArkUI/CanvasShadowOffsetY.ets
浏览文件 @
d8f2f44d
...
...
@@ -49,8 +49,10 @@ struct SetCircle {
console.info('Pan end');
})
)
}.width('70%').height('25%')
Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }){
Text('阴影偏移: ' + (this.X)*0.05 )
}.width('
70%').height('3
0%')
}.width('
100%').height('2
0%')
Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) {
Canvas(this.context)
.width('100%')
...
...
@@ -63,7 +65,7 @@ struct SetCircle {
this.context.fillStyle = 'rgb(255,0,0)';
this.context.fillRect(150, 150, 100, 100);
})
}.width('100%').height('
70
%')
}.width('100%').height('
55
%')
}.width('100%').height('80%').backgroundColor(Color.White)
}
build() {
...
...
validator/acts_validator/src/main/ets/pages/ArkUI/CanvasStrokeStyle.ets
浏览文件 @
d8f2f44d
...
...
@@ -23,6 +23,9 @@ struct SetCircle {
@State name: string = 'CanvasStrokeStyle';
@State StepTips: string = '操作步骤:点击不同的颜色控件'+'\n'+'预期结果:原本默认黑色的边框会随点击变化';
@State Vue: boolean = false;
@State num1: number = 0;
@State num2: number = 0;
@State num3: number = 0;
async aboutToAppear(){
await FirstDialog.ChooseDialog(this.StepTips,this.name);
}
...
...
@@ -36,7 +39,10 @@ struct SetCircle {
this.context.lineWidth = 10;
this.context.strokeStyle = '#FFFF0000';
this.context.strokeRect(100, 160, 150, 100);
this.Vue = true;
this.num1 = 1;
if ( this.num1 == this.num3 && this.num2 == 1 ){
this.Vue = true;
}
})
Text('Yellow').fontSize(16).border({width:2}).size({width:'25%',height:'20%'})
.onClick(()=>{
...
...
@@ -45,7 +51,10 @@ struct SetCircle {
this.context.lineWidth = 10;
this.context.strokeStyle = '#fffffc3c';
this.context.strokeRect(100, 160, 150, 100);
this.Vue = true;
this.num2 = 1;
if ( this.num1 == 1 && this.num3 == this.num2 ){
this.Vue = true;
}
})
Text('Green').fontSize(16).border({width:2}).size({width:'25%',height:'20%'})
.onClick(()=>{
...
...
@@ -54,7 +63,10 @@ struct SetCircle {
this.context.lineWidth = 10;
this.context.strokeStyle = '#ff19fa00';
this.context.strokeRect(100, 160, 150, 100);
this.Vue = true;
this.num3 = 1;
if ( this.num1 == 1 && this.num3 == this.num2 ){
this.Vue = true;
}
})
}.width('70%').height('30%')
Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) {
...
...
validator/acts_validator/src/main/ets/pages/ArkUI/CanvasTextAlign.ets
浏览文件 @
d8f2f44d
...
...
@@ -23,6 +23,11 @@ struct SetCircle {
@State name: string = 'CanvasTextAlign';
@State StepTips: string = '操作步骤:点击不同的文本对齐方式控件'+'\n'+'预期结果:原本默认的对齐方式会随点击变化';
@State Vue: boolean = false;
@State num1: number = 0;
@State num2: number = 0;
@State num3: number = 0;
@State num4: number = 0;
@State num5: number = 0;
async aboutToAppear(){
await FirstDialog.ChooseDialog(this.StepTips,this.name);
}
...
...
@@ -31,58 +36,73 @@ struct SetCircle {
Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceBetween }){
Text('start').fontSize(13).border({width:2}).size({width:'18%',height:'20%'})
.onClick(()=>{
this.context.clearRect(0, 10,
350, 3
00);
this.context.clearRect(0, 10,
500, 5
00);
this.context.lineWidth = 2;
this.context.moveTo(180, 10);
this.context.lineTo(180, 310);
this.context.stroke();
this.context.textAlign = 'start';
this.context.fillText('textAlign=start', 180, 160);
this.Vue = true;
this.num1 = 1;
if ( this.num1 == 1 && this.num2 == 1 && this.num3 == 1 && this.num4 == 1 && this.num5 == 1 ){
this.Vue = true;
}
})
Text('end').fontSize(13).border({width:2}).size({width:'18%',height:'20%'})
.onClick(()=>{
this.context.clearRect(0, 10,
350, 3
00);
this.context.clearRect(0, 10,
500, 5
00);
this.context.lineWidth = 2;
this.context.moveTo(180, 10);
this.context.lineTo(180, 310);
this.context.stroke();
this.context.textAlign = 'end';
this.context.fillText('textAlign=end', 180, 160);
this.Vue = true;
this.num2 = 1;
if ( this.num1 == 1 && this.num2 == 1 && this.num3 == 1 && this.num4 == 1 && this.num5 == 1 ){
this.Vue = true;
}
})
Text('left').fontSize(13).border({width:2}).size({width:'18%',height:'20%'})
.onClick(()=>{
this.context.clearRect(0, 10,
350, 3
00);
this.context.clearRect(0, 10,
500, 5
00);
this.context.lineWidth = 2;
this.context.moveTo(180, 10);
this.context.lineTo(180, 310);
this.context.stroke();
this.context.textAlign = 'left';
this.context.fillText('textAlign=left', 180, 160);
this.Vue = true;
this.num3 = 1;
if ( this.num1 == 1 && this.num2 == 1 && this.num3 == 1 && this.num4 == 1 && this.num5 == 1 ){
this.Vue = true;
}
})
Text('center').fontSize(13).border({width:2}).size({width:'18%',height:'20%'})
.onClick(()=>{
this.context.clearRect(0, 10,
350, 3
00);
this.context.clearRect(0, 10,
500, 5
00);
this.context.lineWidth = 2;
this.context.moveTo(180, 10);
this.context.lineTo(180, 310);
this.context.stroke();
this.context.textAlign = 'center';
this.context.fillText('textAlign=center', 180, 160);
this.Vue = true;
this.num4 = 1;
if ( this.num1 == 1 && this.num2 == 1 && this.num3 == 1 && this.num4 == 1 && this.num5 == 1 ){
this.Vue = true;
}
})
Text('right').fontSize(13).border({width:2}).size({width:'18%',height:'20%'})
.onClick(()=> {
this.context.clearRect(0, 10,
350, 3
00);
this.context.clearRect(0, 10,
500, 5
00);
this.context.lineWidth = 2;
this.context.moveTo(180, 10);
this.context.lineTo(180, 310);
this.context.stroke();
this.context.textAlign = 'right';
this.context.fillText('textAlign=right', 180, 160);
this.Vue = true;
this.num5 = 1;
if ( this.num1 == 1 && this.num2 == 1 && this.num3 == 1 && this.num4 == 1 && this.num5 == 1 ){
this.Vue = true;
}
})
}.width('90%').height('30%')
Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) {
...
...
validator/acts_validator/src/main/ets/pages/ArkUI/CanvasTextBaseline.ets
浏览文件 @
d8f2f44d
...
...
@@ -23,6 +23,11 @@ struct SetCircle {
@State name: string = 'CanvasTextBaseline';
@State StepTips: string = '操作步骤:点击不同的水平对齐方式'+'\n'+'预期结果:原本默认水平对齐方式会随点击变化';
@State Vue: boolean = false;
@State num1: number = 0;
@State num2: number = 0;
@State num3: number = 0;
@State num4: number = 0;
@State num5: number = 0;
async aboutToAppear(){
await FirstDialog.ChooseDialog(this.StepTips,this.name);
}
...
...
@@ -31,7 +36,7 @@ struct SetCircle {
Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceBetween }){
Text('Top').fontSize(13).border({width:2}).size({width:'18%',height:'20%'})
.onClick(()=>{
this.context.clearRect(0, 10,
350, 3
00);
this.context.clearRect(0, 10,
500, 5
00);
this.context.strokeStyle = '#0000ff';
this.context.lineWidth = 2;
this.context.moveTo(0, 120);
...
...
@@ -39,11 +44,14 @@ struct SetCircle {
this.context.stroke();
this.context.textBaseline = 'top';
this.context.fillText('Top', 160, 120);
this.Vue = true;
this.num1 = 1;
if ( this.num1 == 1 && this.num2 == 1 && this.num3 == 1 && this.num4 == 1 && this.num5 == 1 ){
this.Vue = true;
}
})
Text('Bottom').fontSize(13).border({width:2}).size({width:'18%',height:'20%'})
.onClick(()=>{
this.context.clearRect(0, 10,
350, 3
00);
this.context.clearRect(0, 10,
500, 5
00);
this.context.strokeStyle = '#0000ff';
this.context.lineWidth = 2;
this.context.moveTo(0, 120);
...
...
@@ -51,11 +59,14 @@ struct SetCircle {
this.context.stroke();
this.context.textBaseline = 'bottom';
this.context.fillText('Bottom', 160, 120);
this.Vue = true;
this.num2 = 1;
if ( this.num1 == 1 && this.num2 == 1 && this.num3 == 1 && this.num4 == 1 && this.num5 == 1 ){
this.Vue = true;
}
})
Text('Middle').fontSize(13).border({width:2}).size({width:'18%',height:'20%'})
.onClick(()=>{
this.context.clearRect(0, 10,
350, 3
00);
this.context.clearRect(0, 10,
500, 5
00);
this.context.strokeStyle = '#0000ff';
this.context.lineWidth = 2;
this.context.moveTo(0, 120);
...
...
@@ -63,11 +74,14 @@ struct SetCircle {
this.context.stroke();
this.context.textBaseline = 'middle';
this.context.fillText('Middle', 160, 120);
this.Vue = true;
this.num3 = 1;
if ( this.num1 == 1 && this.num2 == 1 && this.num3 == 1 && this.num4 == 1 && this.num5 == 1 ){
this.Vue = true;
}
})
Text('Alphabetic').fontSize(13).border({width:2}).size({width:'18%',height:'20%'})
.onClick(()=>{
this.context.clearRect(0, 10,
350, 3
00);
this.context.clearRect(0, 10,
500, 5
00);
this.context.strokeStyle = '#0000ff';
this.context.lineWidth = 2;
this.context.moveTo(0, 120);
...
...
@@ -75,11 +89,14 @@ struct SetCircle {
this.context.stroke();
this.context.textBaseline = 'alphabetic';
this.context.fillText('Alphabetic', 160, 120);
this.Vue = true;
this.num4 = 1;
if ( this.num1 == 1 && this.num2 == 1 && this.num3 == 1 && this.num4 == 1 && this.num5 == 1 ){
this.Vue = true;
}
})
Text('Hanging').fontSize(13).border({width:2}).size({width:'18%',height:'20%'})
.onClick(()=> {
this.context.clearRect(0, 10,
350, 3
00);
this.context.clearRect(0, 10,
500, 5
00);
this.context.strokeStyle = '#0000ff';
this.context.lineWidth = 2;
this.context.moveTo(0, 120);
...
...
@@ -87,7 +104,10 @@ struct SetCircle {
this.context.stroke();
this.context.textBaseline = 'hanging';
this.context.fillText('Hanging', 160, 120);
this.Vue = true;
this.num5 = 1;
if ( this.num1 == 1 && this.num2 == 1 && this.num3 == 1 && this.num4 == 1 && this.num5 == 1 ){
this.Vue = true;
}
})
}.width('90%').height('30%')
Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) {
...
...
validator/acts_validator/src/main/ets/pages/Experience/ColdStartTest.ets
浏览文件 @
d8f2f44d
...
...
@@ -19,11 +19,11 @@ import context from '@ohos.app.ability.common';
let abilityContext = getContext(this) as context.UIAbilityContext;
let path = globalThis.dir;
let SettingsColdPath = path + '/
coldStartSettings
.log';
let PhotosColdPath = path + '/
c
oldStartPhotos.log';
let MmsColdPath = path + '/
c
oldStartMms.log';
let CameraColdPath = path + '/
c
oldStartCamera.log';
let ContactsColdPath = path + '/
c
oldStartContacts.log';
let SettingsColdPath = path + '/
ColdStartSetting
.log';
let PhotosColdPath = path + '/
C
oldStartPhotos.log';
let MmsColdPath = path + '/
C
oldStartMms.log';
let CameraColdPath = path + '/
C
oldStartCamera.log';
let ContactsColdPath = path + '/
C
oldStartContacts.log';
@Entry
@Component
struct CustomContainerUser {
...
...
validator/acts_validator/src/main/ets/pages/Experience/Experience_index.ets
浏览文件 @
d8f2f44d
...
...
@@ -43,6 +43,13 @@ struct IndexPage {
{title:'PhotoFps',uri:'pages/Experience/PhotoFps'},
{title:'ColdStart',uri:'pages/Experience/ColdStartTest'},
{title:'HotStart',uri:'pages/Experience/HotStartTest'},
{title:'ViewPhoto',uri:'pages/Experience/ViewPhotoTest'},
{title:'KeyboardDisplay',uri:'pages/Experience/KeyboardDisplayTest'},
{title:'StartTaskManager',uri:'pages/Experience/StartTaskManager'},
{title:'StartBackgroundTask',uri:'pages/Experience/StartBackgroundTask'},
{title:'StartNotification',uri:'pages/Experience/StartNotification'},
{title:'ScrollPhotosList',uri:'pages/Experience/ScrollPhotosList'},
{title:'KeyboardInput',uri:'pages/Experience/KeyboardInputTest'},
]
@State ColorObject : string[] = VarColor;
async onPageShow(){
...
...
validator/acts_validator/src/main/ets/pages/Experience/HotStartTest.ets
浏览文件 @
d8f2f44d
...
...
@@ -19,11 +19,11 @@ import context from '@ohos.app.ability.common';
let abilityContext = getContext(this) as context.UIAbilityContext;
let path = globalThis.dir;
let SettingsColdPath = path + '/
hotStartSettings
.log';
let PhotosColdPath = path + '/
h
otStartPhotos.log';
let MmsColdPath = path + '/
h
otStartMms.log';
let CameraColdPath = path + '/
h
otStartCamera.log';
let ContactsColdPath = path + '/
h
otStartContacts.log';
let SettingsColdPath = path + '/
HotStartSetting
.log';
let PhotosColdPath = path + '/
H
otStartPhotos.log';
let MmsColdPath = path + '/
H
otStartMms.log';
let CameraColdPath = path + '/
H
otStartCamera.log';
let ContactsColdPath = path + '/
H
otStartContacts.log';
@Entry
@Component
struct CustomContainerUser {
...
...
validator/acts_validator/src/main/ets/pages/Experience/KeyboardDisplayTest.ets
0 → 100644
浏览文件 @
d8f2f44d
/*
* Copyright (c) 2022-2023 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import fileio from '@ohos.fileio';
import {CustomContainer} from '../common/TimeExperienceCustomContainer';
import FirstDialog from '../model/FirstDialog';
let path = globalThis.dir;
let Xpath = path + '/CompleteTimeKeyboard.log';
@Entry
@Component
struct CustomContainerUser {
@State name: string = 'KeyboardDisplay';
@State StepTips: string = '操作步骤:根据操作提示点击输入框等待键盘加载'+'\n'+'预期结果:输入键盘弹出时延低于1000ms测试通过';
@State Vue: boolean = false;
@State StartEnable: boolean = true;
@State time: string = '0';
async aboutToAppear(){
await FirstDialog.ChooseDialog(this.StepTips,this.name);
this.Vue = false;
}
@Builder specificNoParam() {
Column() {
Flex({direction:FlexDirection.Column,alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceBetween }) {
Column(){
Row(){
Text(`根据以下操作步骤完成测试`+ '\n' + '\n' + '\n' + '\n'+ '\n' + '\n' + '\n' + '\n')
.fontColor(Color.White).fontSize('24fp')
}
Row(){
Text(`测试步骤:`+ '\n' + '\n' + `1.点击开始键进入信息` + '\n' + '\n' +'2.新建一条信息显示输入框'+ '\n' + '\n'
+ `3.双击执行.bat选择完成时延>键盘按键弹出`+ '\n' + '\n' +`4.点击一张图库缩略图等待响应` + '\n' + '\n'
+ '5.待脚本执行结束回到Validator点击停止键' + '\n' + '\n' + `6.若弹出键盘时延小于或等于1000ms则通过测试`
+ '\n' + '\n' + '\n' + '\n' )
.fontColor(Color.White).fontSize('20fp')
}
Row(){
Column(){
Button(`开始`)
.borderRadius(8)
.backgroundColor(0x317aff)
.width('30%')
.enabled(this.StartEnable)
.opacity(this.StartEnable? 1 : 0.4)
.onClick(async () => {
this.StartEnable = !this.StartEnable;
let bundleName=new String("com.ohos.mms").toString();
let abilityName=new String("com.ohos.mms.MainAbility").toString();
let str = {
"bundleName": bundleName,
"abilityName": abilityName,
}
globalThis.abilityContext.startAbility(str, (err, data) => {
if(err) {
return;
}
})
})
}
Column(){
Button(`结束`)
.borderRadius(8)
.backgroundColor(0x317aff)
.width('30%')
.enabled(!this.StartEnable)
.opacity(!this.StartEnable? 1 : 0.4)
.onClick(() => {
this.StartEnable = !this.StartEnable
let fd = fileio.openSync(Xpath, 0o100 | 0o2002, 0o664);
let buf = new ArrayBuffer(4096);
fileio.readSync(fd,buf);
let report = String.fromCharCode.apply(null,new Uint8Array(buf));
let head = report.indexOf(":");
this.time = report.substring(head+1);
let time = parseFloat(this.time)
if( time < 1000 ) {
this.Vue = true;
}
})
}
}
Row(){
Text('\n' + '\n' + '\n' + '\n'+ '\n' + '\n' + '\n' + '\n' + `输入键盘弹出时延:` + this.time + 'ms' )
.fontColor(Color.White).fontSize('24fp')
}
}
}
}.width('100%').height('80%').backgroundColor(Color.Black)
.justifyContent(FlexAlign.SpaceEvenly)
}
build() {
Column() {
CustomContainer({
title: this.name,
Url:'pages/Experience/Experience_index',
StepTips:this.StepTips,
content: this.specificNoParam,
name:$name,
Vue: $Vue,
StartEnable: $StartEnable,
time: $time
})
}.width('100%').height('100%').backgroundColor(Color.Black)
}
}
\ No newline at end of file
validator/acts_validator/src/main/ets/pages/Experience/KeyboardInputTest.ets
0 → 100644
浏览文件 @
d8f2f44d
/*
* Copyright (c) 2022-2023 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import fileio from '@ohos.fileio';
import {CustomContainer} from '../common/TimeExperienceCustomContainer';
import FirstDialog from '../model/FirstDialog';
let path = globalThis.dir;
let Xpath = path + '/ResponseTimeKeyboard.log';
@Entry
@Component
struct CustomContainerUser {
@State name: string = 'KeyboardInput';
@State StepTips: string = '操作步骤:根据操作提示点击键盘按键'+'\n'+'预期结果:键盘输入响应时延低于150ms测试通过';
@State Vue: boolean = false;
@State StartEnable: boolean = true;
@State time: string = '0';
async aboutToAppear(){
await FirstDialog.ChooseDialog(this.StepTips,this.name);
this.Vue = false;
}
@Builder specificNoParam() {
Column() {
Flex({direction:FlexDirection.Column,alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceBetween }) {
Column(){
Row(){
Text(`根据以下操作步骤完成测试`+ '\n' + '\n' + '\n' + '\n'+ '\n' + '\n' + '\n' + '\n')
.fontColor(Color.White).fontSize('24fp')
}
Row(){
Text(`测试步骤:`+ '\n' + '\n' + `1.点击开始键进入信息` + '\n' + '\n' +'2.新建一条信息点击输入框打开键盘'+ '\n' + '\n'
+ `3.双击执行.bat选择响应时延>键盘按键输入`+ '\n' + '\n' +`4.随意点击按键等待响应` + '\n' + '\n'
+ '5.待脚本执行结束回到Validator点击停止键' + '\n' + '\n' + `6.若按键响应时延小于或等于150ms则通过测试`
+ '\n' + '\n' + '\n' + '\n' )
.fontColor(Color.White).fontSize('20fp')
}
Row(){
Column(){
Button(`开始`)
.borderRadius(8)
.backgroundColor(0x317aff)
.width('30%')
.enabled(this.StartEnable)
.opacity(this.StartEnable? 1 : 0.4)
.onClick(async () => {
this.StartEnable = !this.StartEnable;
let bundleName=new String("com.ohos.mms").toString();
let abilityName=new String("com.ohos.mms.MainAbility").toString();
let str = {
"bundleName": bundleName,
"abilityName": abilityName,
}
globalThis.abilityContext.startAbility(str, (err, data) => {
if(err) {
return;
}
})
})
}
Column(){
Button(`结束`)
.borderRadius(8)
.backgroundColor(0x317aff)
.width('30%')
.enabled(!this.StartEnable)
.opacity(!this.StartEnable? 1 : 0.4)
.onClick(() => {
this.StartEnable = !this.StartEnable
let fd = fileio.openSync(Xpath, 0o100 | 0o2002, 0o664);
let buf = new ArrayBuffer(4096);
fileio.readSync(fd,buf);
let report = String.fromCharCode.apply(null,new Uint8Array(buf));
let head = report.indexOf(":");
this.time = report.substring(head+1);
let time = parseFloat(this.time)
if( time < 150 ) {
this.Vue = true;
}
})
}
}
Row(){
Text('\n' + '\n' + '\n' + '\n'+ '\n' + '\n' + '\n' + '\n' + `按键响应时延:` + this.time + 'ms' )
.fontColor(Color.White).fontSize('24fp')
}
}
}
}.width('100%').height('80%').backgroundColor(Color.Black)
.justifyContent(FlexAlign.SpaceEvenly)
}
build() {
Column() {
CustomContainer({
title: this.name,
Url:'pages/Experience/Experience_index',
StepTips:this.StepTips,
content: this.specificNoParam,
name:$name,
Vue: $Vue,
StartEnable: $StartEnable,
time: $time
})
}.width('100%').height('100%').backgroundColor(Color.Black)
}
}
\ No newline at end of file
validator/acts_validator/src/main/ets/pages/Experience/PhotoFps.ets
浏览文件 @
d8f2f44d
...
...
@@ -12,7 +12,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import fileio from '@ohos.fileio';
import {CustomContainer} from '../common/ExperienceCustomContainer';
import FirstDialog from '../model/FirstDialog';
...
...
@@ -63,7 +62,6 @@ struct CustomContainerUser {
let str = {
"bundleName": bundleName,
"abilityName": abilityName,
"parameters": ""
}
globalThis.abilityContext.startAbility(str, (err, data) => {
...
...
validator/acts_validator/src/main/ets/pages/Experience/ScrollPhotosList.ets
0 → 100644
浏览文件 @
d8f2f44d
/*
* Copyright (c) 2022-2023 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import fileio from '@ohos.fileio';
import {CustomContainer} from '../common/TimeExperienceCustomContainer';
import FirstDialog from '../model/FirstDialog';
let path = globalThis.dir;
let Xpath = path + '/ResponseTimePhotos.log';
@Entry
@Component
struct CustomContainerUser {
@State name: string = 'ScrollPhotosList';
@State StepTips: string = '操作步骤:根据操作提示滑动图库缩略表'+'\n'+'预期结果:滑动响应时延低于150ms测试通过';
@State Vue: boolean = false;
@State StartEnable: boolean = true;
@State time: string = '0';
async aboutToAppear(){
await FirstDialog.ChooseDialog(this.StepTips,this.name);
this.Vue = false;
}
@Builder specificNoParam() {
Column() {
Flex({direction:FlexDirection.Column,alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceBetween }) {
Column(){
Row(){
Text(`根据以下操作步骤完成测试`+ '\n' + '\n' + '\n' + '\n'+ '\n' + '\n' + '\n' + '\n')
.fontColor(Color.White).fontSize('24fp')
}
Row(){
Text(`测试步骤:`+ '\n' + '\n' +`1.在图库中预置500张图片`+ '\n' + '\n' +`2.点击开始键进入图库`+ '\n' + '\n'
+ `3.双击执行.bat选择响应时延>图库缩略列表滑动`+ '\n' + '\n' +`4.滑动图库缩略列表等待响应` + '\n' + '\n'
+ '5.待脚本执行结束回到Validator点击停止键' + '\n' + '\n' + `6.若滑动响应时延小于或等于150ms则通过测试`
+ '\n' + '\n' + '\n' + '\n' )
.fontColor(Color.White).fontSize('20fp')
}
Row(){
Column(){
Button(`开始`)
.borderRadius(8)
.backgroundColor(0x317aff)
.width('30%')
.enabled(this.StartEnable)
.opacity(this.StartEnable? 1 : 0.4)
.onClick(async () => {
this.StartEnable = !this.StartEnable;
let bundleName=new String("com.ohos.photos").toString();
let abilityName=new String("com.ohos.photos.MainAbility").toString();
let str = {
"bundleName": bundleName,
"abilityName": abilityName,
}
globalThis.abilityContext.startAbility(str, (err, data) => {
if(err) {
return;
}
})
})
}
Column(){
Button(`结束`)
.borderRadius(8)
.backgroundColor(0x317aff)
.width('30%')
.enabled(!this.StartEnable)
.opacity(!this.StartEnable? 1 : 0.4)
.onClick(() => {
this.StartEnable = !this.StartEnable
let fd = fileio.openSync(Xpath, 0o100 | 0o2002, 0o664);
let buf = new ArrayBuffer(4096);
fileio.readSync(fd,buf);
let report = String.fromCharCode.apply(null,new Uint8Array(buf));
let head = report.indexOf(":");
this.time = report.substring(head+1);
let time = parseFloat(this.time)
if( time < 150 ) {
this.Vue = true;
}
})
}
}
Row(){
Text('\n' + '\n' + '\n' + '\n'+ '\n' + '\n' + '\n' + '\n' + `滑动响应时延:` + this.time + 'ms' )
.fontColor(Color.White).fontSize('24fp')
}
}
}
}.width('100%').height('80%').backgroundColor(Color.Black)
.justifyContent(FlexAlign.SpaceEvenly)
}
build() {
Column() {
CustomContainer({
title: this.name,
Url:'pages/Experience/Experience_index',
StepTips:this.StepTips,
content: this.specificNoParam,
name:$name,
Vue: $Vue,
StartEnable: $StartEnable,
time: $time
})
}.width('100%').height('100%').backgroundColor(Color.Black)
}
}
\ No newline at end of file
validator/acts_validator/src/main/ets/pages/Experience/StartBackgroundTask.ets
0 → 100644
浏览文件 @
d8f2f44d
/*
* Copyright (c) 2022-2023 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import fileio from '@ohos.fileio';
import {CustomContainer} from '../common/TimeExperienceCustomContainer';
import FirstDialog from '../model/FirstDialog';
import context from '@ohos.app.ability.common';
let abilityContext = getContext(this) as context.UIAbilityContext;
let path = globalThis.dir;
let Xpath = path + '/CompleteTimeLauncher.log';
@Entry
@Component
struct CustomContainerUser {
@State name: string = 'StartBackgroundTask';
@State StepTips: string = '操作步骤:根据操作提示打开后台任务'+'\n'+'预期结果:打开后台任务时延低于600ms测试通过';
@State Vue: boolean = false;
@State StartEnable: boolean = true;
@State time: string = '0';
async aboutToAppear(){
await FirstDialog.ChooseDialog(this.StepTips,this.name);
this.Vue = false;
}
@Builder specificNoParam() {
Column() {
Flex({direction:FlexDirection.Column,alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceBetween }) {
Column(){
Row(){
Text(`根据以下操作步骤完成测试`+ '\n' + '\n' + '\n' + '\n'+ '\n' + '\n' + '\n' + '\n')
.fontColor(Color.White).fontSize('24fp')
}
Row(){
Text(`测试步骤:`+ '\n' + '\n' +`1.点击开始键进入桌面开启任务管理器` + '\n' + '\n' + `2.双击执行.bat选择完成时延>后台任务切换`+
'\n' + '\n' +`3.随意点开一个后台任务` + '\n' + '\n' + '4.待脚本执行结束回到Validator点击停止键'
+ '\n' + '\n' + `5.若打开后台任务时延小于或等于600ms则通过测试` + '\n' + '\n' + '\n' + '\n' )
.fontColor(Color.White).fontSize('20fp')
}
Row(){
Column(){
Button(`开始`)
.borderRadius(8)
.backgroundColor(0x317aff)
.width('30%')
.enabled(this.StartEnable)
.opacity(this.StartEnable? 1 : 0.4)
.onClick(async () => {
this.StartEnable = !this.StartEnable;
let str = {
bundleName:"com.ohos.launcher",
abilityName: "com.ohos.launcher.MainAbility",
}
abilityContext.startAbility(str).then((data) => {
}).catch((error) => {
})
})
}
Column(){
Button(`结束`)
.borderRadius(8)
.backgroundColor(0x317aff)
.width('30%')
.enabled(!this.StartEnable)
.opacity(!this.StartEnable? 1 : 0.4)
.onClick(() => {
this.StartEnable = !this.StartEnable
let fd = fileio.openSync(Xpath, 0o100 | 0o2002, 0o664);
let buf = new ArrayBuffer(4096);
fileio.readSync(fd,buf);
let report = String.fromCharCode.apply(null,new Uint8Array(buf));
let head = report.indexOf(":");
this.time = report.substring(head+1);
let time = parseFloat(this.time)
if( time < 600 ) {
this.Vue = true;
}
})
}
}
Row(){
Text('\n' + '\n' + '\n' + '\n'+ '\n' + '\n' + '\n' + '\n' + `打开后台任务时延:` + this.time + 'ms' )
.fontColor(Color.White).fontSize('24fp')
}
}
}
}.width('100%').height('80%').backgroundColor(Color.Black)
.justifyContent(FlexAlign.SpaceEvenly)
}
build() {
Column() {
CustomContainer({
title: this.name,
Url:'pages/Experience/Experience_index',
StepTips:this.StepTips,
content: this.specificNoParam,
name:$name,
Vue: $Vue,
StartEnable: $StartEnable,
time: $time
})
}.width('100%').height('100%').backgroundColor(Color.Black)
}
}
\ No newline at end of file
validator/acts_validator/src/main/ets/pages/Experience/StartNotification.ets
0 → 100644
浏览文件 @
d8f2f44d
/*
* Copyright (c) 2022-2023 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import fileio from '@ohos.fileio';
import {CustomContainer} from '../common/TimeExperienceCustomContainer';
import FirstDialog from '../model/FirstDialog';
import context from '@ohos.app.ability.common';
let abilityContext = getContext(this) as context.UIAbilityContext;
let path = globalThis.dir;
let Xpath = path + '/CompleteTimeLauncher.log';
@Entry
@Component
struct CustomContainerUser {
@State name: string = 'StartNotification';
@State StepTips: string = '操作步骤:根据操作提示下拉通知栏'+'\n'+'预期结果:下拉通知栏时延低于150ms测试通过';
@State Vue: boolean = false;
@State StartEnable: boolean = true;
@State time: string = '0';
async aboutToAppear(){
await FirstDialog.ChooseDialog(this.StepTips,this.name);
this.Vue = false;
}
@Builder specificNoParam() {
Column() {
Flex({direction:FlexDirection.Column,alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceBetween }) {
Column(){
Row(){
Text(`根据以下操作步骤完成测试`+ '\n' + '\n' + '\n' + '\n'+ '\n' + '\n' + '\n' + '\n')
.fontColor(Color.White).fontSize('24fp')
}
Row(){
Text(`测试步骤:`+ '\n' + '\n' +`1.点击开始键进入桌面` + '\n' + '\n' + `2.双击执行.bat选择响应时延>下拉状态栏`+
'\n' + '\n' +`3.从屏幕顶部滑动下拉通知栏` + '\n' + '\n' + '4.待脚本执行结束回到Validator点击停止键'
+ '\n' + '\n' + `5.若下拉通知栏时延小于或等于150ms则通过测试` + '\n' + '\n' + '\n' + '\n' )
.fontColor(Color.White).fontSize('20fp')
}
Row(){
Column(){
Button(`开始`)
.borderRadius(8)
.backgroundColor(0x317aff)
.width('30%')
.enabled(this.StartEnable)
.opacity(this.StartEnable? 1 : 0.4)
.onClick(async () => {
this.StartEnable = !this.StartEnable;
let str = {
bundleName:"com.ohos.launcher",
abilityName: "com.ohos.launcher.MainAbility",
}
abilityContext.startAbility(str).then((data) => {
}).catch((error) => {
})
})
}
Column(){
Button(`结束`)
.borderRadius(8)
.backgroundColor(0x317aff)
.width('30%')
.enabled(!this.StartEnable)
.opacity(!this.StartEnable? 1 : 0.4)
.onClick(() => {
this.StartEnable = !this.StartEnable
let fd = fileio.openSync(Xpath, 0o100 | 0o2002, 0o664);
let buf = new ArrayBuffer(4096);
fileio.readSync(fd,buf);
let report = String.fromCharCode.apply(null,new Uint8Array(buf));
let head = report.indexOf(":");
this.time = report.substring(head+1);
let time = parseFloat(this.time)
if( time < 150 ) {
this.Vue = true;
}
})
}
}
Row(){
Text('\n' + '\n' + '\n' + '\n'+ '\n' + '\n' + '\n' + '\n' + `下拉通知栏时延:` + this.time + 'ms' )
.fontColor(Color.White).fontSize('24fp')
}
}
}
}.width('100%').height('80%').backgroundColor(Color.Black)
.justifyContent(FlexAlign.SpaceEvenly)
}
build() {
Column() {
CustomContainer({
title: this.name,
Url:'pages/Experience/Experience_index',
StepTips:this.StepTips,
content: this.specificNoParam,
name:$name,
Vue: $Vue,
StartEnable: $StartEnable,
time: $time
})
}.width('100%').height('100%').backgroundColor(Color.Black)
}
}
\ No newline at end of file
validator/acts_validator/src/main/ets/pages/Experience/StartTaskManager.ets
0 → 100644
浏览文件 @
d8f2f44d
/*
* Copyright (c) 2022-2023 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import fileio from '@ohos.fileio';
import {CustomContainer} from '../common/TimeExperienceCustomContainer';
import FirstDialog from '../model/FirstDialog';
import context from '@ohos.app.ability.common';
let abilityContext = getContext(this) as context.UIAbilityContext;
let path = globalThis.dir;
let Xpath = path + '/CompleteTimeLauncher.log';
@Entry
@Component
struct CustomContainerUser {
@State name: string = 'StartTaskManager';
@State StepTips: string = '操作步骤:根据操作提示打开任务管理器'+'\n'+'预期结果:打开任务管理器时延低于1000ms测试通过';
@State Vue: boolean = false;
@State StartEnable: boolean = true;
@State time: string = '0';
async aboutToAppear(){
await FirstDialog.ChooseDialog(this.StepTips,this.name);
this.Vue = false;
}
@Builder specificNoParam() {
Column() {
Flex({direction:FlexDirection.Column,alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceBetween }) {
Column(){
Row(){
Text(`根据以下操作步骤完成测试`+ '\n' + '\n' + '\n' + '\n'+ '\n' + '\n' + '\n' + '\n')
.fontColor(Color.White).fontSize('24fp')
}
Row(){
Text(`测试步骤:`+ '\n' + '\n' +`1.点击开始键进入桌面` + '\n' + '\n' + `2.双击执行.bat选择完成时延>启动任务管理器`+
'\n' + '\n' +`3.点击右下角方框开启任务管理器` + '\n' + '\n' + '4.待脚本执行结束回到Validator点击停止键'
+ '\n' + '\n' + `5.若启动任务管理器时延小于或等于1000ms则通过测试` + '\n' + '\n' + '\n' + '\n' )
.fontColor(Color.White).fontSize('20fp')
}
Row(){
Column(){
Button(`开始`)
.borderRadius(8)
.backgroundColor(0x317aff)
.width('30%')
.enabled(this.StartEnable)
.opacity(this.StartEnable? 1 : 0.4)
.onClick(async () => {
this.StartEnable = !this.StartEnable;
let str = {
bundleName:"com.ohos.launcher",
abilityName: "com.ohos.launcher.MainAbility",
}
abilityContext.startAbility(str).then((data) => {
}).catch((error) => {
})
})
}
Column(){
Button(`结束`)
.borderRadius(8)
.backgroundColor(0x317aff)
.width('30%')
.enabled(!this.StartEnable)
.opacity(!this.StartEnable? 1 : 0.4)
.onClick(() => {
this.StartEnable = !this.StartEnable
let fd = fileio.openSync(Xpath, 0o100 | 0o2002, 0o664);
let buf = new ArrayBuffer(4096);
fileio.readSync(fd,buf);
let report = String.fromCharCode.apply(null,new Uint8Array(buf));
let head = report.indexOf(":");
this.time = report.substring(head+1);
let time = parseFloat(this.time)
if( time < 1000 ) {
this.Vue = true;
}
})
}
}
Row(){
Text('\n' + '\n' + '\n' + '\n'+ '\n' + '\n' + '\n' + '\n' + `启动任务管理器时延:` + this.time + 'ms' )
.fontColor(Color.White).fontSize('24fp')
}
}
}
}.width('100%').height('80%').backgroundColor(Color.Black)
.justifyContent(FlexAlign.SpaceEvenly)
}
build() {
Column() {
CustomContainer({
title: this.name,
Url:'pages/Experience/Experience_index',
StepTips:this.StepTips,
content: this.specificNoParam,
name:$name,
Vue: $Vue,
StartEnable: $StartEnable,
time: $time
})
}.width('100%').height('100%').backgroundColor(Color.Black)
}
}
\ No newline at end of file
validator/acts_validator/src/main/ets/pages/Experience/ViewPhotoTest.ets
0 → 100644
浏览文件 @
d8f2f44d
/*
* Copyright (c) 2022-2023 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import fileio from '@ohos.fileio';
import {CustomContainer} from '../common/TimeExperienceCustomContainer';
import FirstDialog from '../model/FirstDialog';
let path = globalThis.dir;
let Xpath = path + '/ResponseTimePhotos.log';
@Entry
@Component
struct CustomContainerUser {
@State name: string = 'ViewPhoto';
@State StepTips: string = '操作步骤:根据操作提示点击图片等待加载'+'\n'+'预期结果:图片响应时延低于150ms测试通过';
@State Vue: boolean = false;
@State StartEnable: boolean = true;
@State time: string = '0';
async aboutToAppear(){
await FirstDialog.ChooseDialog(this.StepTips,this.name);
this.Vue = false;
}
@Builder specificNoParam() {
Column() {
Flex({direction:FlexDirection.Column,alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceBetween }) {
Column(){
Row(){
Text(`根据以下操作步骤完成测试`+ '\n' + '\n' + '\n' + '\n'+ '\n' + '\n' + '\n' + '\n')
.fontColor(Color.White).fontSize('24fp')
}
Row(){
Text(`测试步骤:`+ '\n' + '\n' +`1.在图库中预置500张图片`+ '\n' + '\n' +`2.点击开始键进入图库`+ '\n' + '\n'
+ `3.双击执行.bat选择响应时延>查看图片`+ '\n' + '\n' +`4.点击一张图库缩略图等待响应` + '\n' + '\n'
+ '5.待脚本执行结束回到Validator点击停止键' + '\n' + '\n' + `6.若图片响应时延小于或等于150ms则通过测试`
+ '\n' + '\n' + '\n' + '\n' )
.fontColor(Color.White).fontSize('20fp')
}
Row(){
Column(){
Button(`开始`)
.borderRadius(8)
.backgroundColor(0x317aff)
.width('30%')
.enabled(this.StartEnable)
.opacity(this.StartEnable? 1 : 0.4)
.onClick(async () => {
this.StartEnable = !this.StartEnable;
let bundleName=new String("com.ohos.photos").toString();
let abilityName=new String("com.ohos.photos.MainAbility").toString();
let str = {
"bundleName": bundleName,
"abilityName": abilityName,
}
globalThis.abilityContext.startAbility(str, (err, data) => {
if(err) {
return;
}
})
})
}
Column(){
Button(`结束`)
.borderRadius(8)
.backgroundColor(0x317aff)
.width('30%')
.enabled(!this.StartEnable)
.opacity(!this.StartEnable? 1 : 0.4)
.onClick(() => {
this.StartEnable = !this.StartEnable
let fd = fileio.openSync(Xpath, 0o100 | 0o2002, 0o664);
let buf = new ArrayBuffer(4096);
fileio.readSync(fd,buf);
let report = String.fromCharCode.apply(null,new Uint8Array(buf));
let head = report.indexOf(":");
this.time = report.substring(head+1);
let time = parseFloat(this.time)
if( time < 150 ) {
this.Vue = true;
}
})
}
}
Row(){
Text('\n' + '\n' + '\n' + '\n'+ '\n' + '\n' + '\n' + '\n' + `图片响应时延:` + this.time + 'ms' )
.fontColor(Color.White).fontSize('24fp')
}
}
}
}.width('100%').height('80%').backgroundColor(Color.Black)
.justifyContent(FlexAlign.SpaceEvenly)
}
build() {
Column() {
CustomContainer({
title: this.name,
Url:'pages/Experience/Experience_index',
StepTips:this.StepTips,
content: this.specificNoParam,
name:$name,
Vue: $Vue,
StartEnable: $StartEnable,
time: $time
})
}.width('100%').height('100%').backgroundColor(Color.Black)
}
}
\ No newline at end of file
validator/acts_validator/src/main/ets/pages/common/TimeExperienceCustomContainer.ets
0 → 100644
浏览文件 @
d8f2f44d
/*
* Copyright (c) 2022-2023 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import prompt from '@ohos.prompt';
import fileio from '@ohos.fileio';
import router from '@ohos.router';
import screenshot from '@ohos.screenshot';
import image from '@ohos.multimedia.image';
import Logger from '../model/Logger';
import mediaLibrary from '@ohos.multimedia.mediaLibrary';
let path = globalThis.dir;
const TAG = '[Screenshot]';
@Component
export struct CustomContainer {
@Link name : string;
title : string = '';
StepTips: string = '';
Url : string = '';
@Link StartEnable : boolean
@Link Vue : boolean;
@Link time : string;
@BuilderParam content: () => void;
@Builder
PassBtn(text: Resource, isFullScreen: boolean) {
if(this.Vue == false){
Button({stateEffect:this.Vue}) {
Image($r('app.media.ic_public_pass')).width('20vp').height('20vp')
}.width('30%').height('30vp').backgroundColor(Color.Grey).opacity(0.4)
.onClick(()=>{
})
}
else{
Button({stateEffect:this.Vue}) {
Image($r('app.media.ic_public_pass')).width('20vp').height('20vp')
}.width('30%').height('30vp').backgroundColor(Color.Grey)
.onClick(()=>{
router.back({
url:this.Url,
params: {result : 'Pass', title : this.name,
}
})
this.getScreen(isFullScreen);
prompt.showToast({
message: '通过', duration: 1000
});
})
}
}
@Builder
FailBtn(text: Resource, isFullScreen: boolean) {
Button(){
Image($r('app.media.ic_public_fail')).width('20vp').height('20vp')
}.width('30%').height('30vp').backgroundColor(Color.Grey)
.onClick(()=>{
router.back({
url:this.Url,
params: {result : 'Fail',title : this.name,
}
})
this.getScreen(isFullScreen);
prompt.showToast({
message: '失败', duration: 1000
});
})
}
build() {
Column() {
Row() {
Button(){
Image($r('app.media.ic_public_back')).width('20vp').height('18vp').margin({left:'20vp'})
}.backgroundColor(Color.Black)
.onClick(()=>{
router.back({
url:this.Url,
params: {result : 'None',}
})
})
Text(this.title).fontColor(Color.White).fontSize('18fp').margin({left:'-20vp'})
Text('hello').fontColor(Color.White).visibility(Visibility.Hidden)
}.backgroundColor(Color.Black).height('10%').width('100%').justifyContent(FlexAlign.SpaceBetween)
this.content();
Blank()
Row() {
this.PassBtn($r('app.string.btn_fullscreen'), true);
Button(){
Image($r('app.media.ic_public_help')).width('20vp').height('20vp')
}.width('30%').height('30vp').backgroundColor(Color.Grey)
.onClick(() =>{
AlertDialog.show({
title:'操作提示',
message: this.StepTips,
confirm:{
value:'OK',
action:()=>{
}
}
})
})
this.FailBtn($r('app.string.btn_fullscreen'), true);
}.width('100%').justifyContent(FlexAlign.SpaceEvenly).backgroundColor(Color.Black)
}.height('98%').width('100%')
}
async savePicture(data: image.PixelMap, context: any) {
Logger.info(TAG, `savePicture`);
let packOpts: image.PackingOption = {
format: "image/jpeg", quality: 100
};
let info = {
prefix: 'IMG_', suffix: '.jpg', directory: mediaLibrary.DirectoryType.DIR_IMAGE
};
let name = this.name;
let displayName = `${info.prefix}${name}${info.suffix}`;
let dirPath = path + '/screenshot' + '/' + displayName;
let imagePackerApi = image.createImagePacker();
let arrayBuffer = await imagePackerApi.packing(data, packOpts);
let fd = fileio.openSync(dirPath,0o102,0o666);
imagePackerApi.release();
try {
await fileio.write(fd, arrayBuffer);
} catch (err) {
Logger.error(`write failed, code is ${err.code}, message is ${err.message}`);
}
await fileio.close(fd);
Logger.info(TAG, `write done`);
}
getScreen = (isFullScreen: boolean) => {
let screenshotOptions: screenshot.ScreenshotOptions = {
screenRect: { left: 0, top: 0, width: 400, height: 400 },
imageSize: { width: 400, height: 400 },
rotation: 0,
displayId: 0
};
if (isFullScreen) {
screenshotOptions = {
rotation: 0
}
}
try {
screenshot.save(screenshotOptions, (err, data: image.PixelMap) => {
if (err) {
Logger.info(TAG, `Failed to save the screenshot. Error:${JSON.stringify(err)}`);
}
Logger.info(TAG, 'save callback');
this.savePicture(data, getContext(this) as any);
})
} catch (err) {
Logger.error(`save failed, code is ${err.code}, message is ${err.message}`);
}
}
}
validator/acts_validator/src/main/resources/base/profile/main_pages.json
浏览文件 @
d8f2f44d
...
...
@@ -15,7 +15,6 @@
"pages/ArkUI/CanvasStrokeStyle"
,
"pages/ArkUI/CanvasLineCap"
,
"pages/ArkUI/CanvasLineJoin"
,
"pages/ArkUI/CanvasMiterLimit"
,
"pages/ArkUI/CanvasFont"
,
"pages/ArkUI/CanvasTextAlign"
,
"pages/ArkUI/CanvasTextBaseline"
,
...
...
@@ -37,6 +36,13 @@
"pages/Experience/PhotoFps"
,
"pages/Experience/DeskFps"
,
"pages/Experience/ColdStartTest"
,
"pages/Experience/HotStartTest"
"pages/Experience/HotStartTest"
,
"pages/Experience/ViewPhotoTest"
,
"pages/Experience/KeyboardDisplayTest"
,
"pages/Experience/StartTaskManager"
,
"pages/Experience/StartBackgroundTask"
,
"pages/Experience/StartNotification"
,
"pages/Experience/ScrollPhotosList"
,
"pages/Experience/KeyboardInputTest"
]
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录