提交 9725aee3 编写于 作者: T tianwenzhe

change experenice show not enough

Signed-off-by: Ntian-wenzhe411 <tianwenzhe2@huawei.com>
上级 d79473d9
......@@ -35,6 +35,7 @@ struct CustomContainerUser {
@State mmsNum: number = 0;
@State cameraNum: number = 0;
@State contactsNum: number = 0;
scroller: Scroller = new Scroller();
async aboutToAppear(){
await FirstDialog.ChooseDialog(this.StepTips,this.name);
this.Vue = false;
......@@ -43,74 +44,75 @@ struct CustomContainerUser {
@Builder specificNoParam() {
Column() {
Flex({direction:FlexDirection.Column,alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceBetween }) {
Column(){
Row(){
Text(`根据以下操作步骤完成测试`+ '\n' + '\n' )
.fontColor(Color.White).fontSize('24fp')
}
Row(){
Text(`测试步骤:`+ '\n' + '\n' + '1.测试设备通过USB连接工作台' + '\n' + '\n' + `2.点击开始键进入系统桌面` + '\n' + '\n'
+ `3.清空后台应用,将底层任务栏中应用拖至桌面` + '\n' + '\n' + `4.工作台运行‘点击启动测试.bat’选择冷启动>相机测试,回车执行`
+ '\n' + '\n' +`5.测试应用自动执行冷启动后手动返回validator界面` + '\n' + '\n' + '6.点击结束键观察测试结果'
+ '\n' + '\n' + `7.若冷启动测试在规定时延内完成则通过测试` + '\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.num = 0;
this.StartEnable = !this.StartEnable;
let str = {
bundleName:"com.ohos.launcher",
abilityName: "com.ohos.launcher.MainAbility",
}
abilityContext.startAbility(str).then((data) => {
Scroll(this.scroller) {
Column(){
Row(){
Text(`根据以下操作步骤完成测试`+ '\n' + '\n' )
.fontColor(Color.White).fontSize('24fp')
}
Row(){
Text(`测试步骤:`+ '\n' + '\n' + '1.测试设备通过USB连接工作台' + '\n' + '\n' + `2.点击开始键进入系统桌面` + '\n' + '\n'
+ `3.清空后台应用,将底层任务栏中应用拖至桌面` + '\n' + '\n' + `4.工作台运行‘点击启动测试.bat’选择冷启动>相机测试,回车执行`
+ '\n' + '\n' +`5.测试应用自动执行冷启动后手动返回validator界面` + '\n' + '\n' + '6.点击结束键观察测试结果'
+ '\n' + '\n' + `7.若冷启动测试在规定时延内完成则通过测试` + '\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.num = 0;
this.StartEnable = !this.StartEnable;
let str = {
bundleName:"com.ohos.launcher",
abilityName: "com.ohos.launcher.MainAbility",
}
abilityContext.startAbility(str).then((data) => {
}).catch((error) => {
}).catch((error) => {
})
})
})
}
Column(){
Button(`结束`)
.borderRadius(8)
.backgroundColor(0x317aff)
.width('30%')
.enabled(!this.StartEnable)
.opacity(!this.StartEnable? 1 : 0.4)
.onClick(() => {
this.StartEnable = !this.StartEnable
/*
camera
*/
let CameraFd = fileio.openSync(CameraColdPath, 0o100 | 0o2002, 0o664);
let CameraBuf = new ArrayBuffer(4096);
fileio.readSync(CameraFd,CameraBuf);
let CameraReport = String.fromCharCode.apply(null,new Uint8Array(CameraBuf));
let CameraHead = CameraReport.indexOf('time:');
let CameraTime = CameraReport.substring(CameraHead+5);
this.cameraNum = parseFloat(CameraTime);
if( 0 < this.cameraNum && this.cameraNum < 2300 ) {
this.num++
}
if( this.num === 1 ) {
this.Vue = true;
}
})
}
}
Column(){
Button(`结束`)
.borderRadius(8)
.backgroundColor(0x317aff)
.width('30%')
.enabled(!this.StartEnable)
.opacity(!this.StartEnable? 1 : 0.4)
.onClick(() => {
this.StartEnable = !this.StartEnable
/*
camera
*/
let CameraFd = fileio.openSync(CameraColdPath, 0o100 | 0o2002, 0o664);
let CameraBuf = new ArrayBuffer(4096);
fileio.readSync(CameraFd,CameraBuf);
let CameraReport = String.fromCharCode.apply(null,new Uint8Array(CameraBuf));
let CameraHead = CameraReport.indexOf('time:');
let CameraTime = CameraReport.substring(CameraHead+5);
this.cameraNum = parseFloat(CameraTime);
if( 0 < this.cameraNum && this.cameraNum < 2300 ) {
this.num++
}
if( this.num === 1 ) {
this.Vue = true;
}
})
Row(){
Text('\n' + '\n' + `测试结果:` + '\n' + '\n' + '相机冷启动时延' + this.cameraNum + 'ms' )
.fontColor(Color.White).fontSize('24fp')
}
}
Row(){
Text('\n' + '\n' + `测试结果:` + '\n' + '\n' + '相机冷启动时延' + this.cameraNum + 'ms' )
.fontColor(Color.White).fontSize('24fp')
}
}
}
}.width('100%').height('80%').backgroundColor(Color.Black)
.justifyContent(FlexAlign.SpaceEvenly)
......
......@@ -35,6 +35,7 @@ struct CustomContainerUser {
@State mmsNum: number = 0;
@State cameraNum: number = 0;
@State contactsNum: number = 0;
scroller: Scroller = new Scroller();
async aboutToAppear(){
await FirstDialog.ChooseDialog(this.StepTips,this.name);
this.Vue = false;
......@@ -43,74 +44,75 @@ struct CustomContainerUser {
@Builder specificNoParam() {
Column() {
Flex({direction:FlexDirection.Column,alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceBetween }) {
Column(){
Row(){
Text(`根据以下操作步骤完成测试`+ '\n' + '\n' )
.fontColor(Color.White).fontSize('24fp')
}
Row(){
Text(`测试步骤:`+ '\n' + '\n' + '1.测试设备通过USB连接工作台' + '\n' + '\n' + `2.点击开始键进入系统桌面` + '\n' + '\n'
+ `3.清空后台应用,将底层任务栏中应用拖至桌面` + '\n' + '\n' + `4.工作台运行‘点击启动测试.bat’选择冷启动>联系人测试,回车执行`
+ '\n' + '\n' +`5.测试应用自动执行冷启动后手动返回validator界面` + '\n' + '\n' + '6.点击结束键观察测试结果'
+ '\n' + '\n' + `7.若冷启动测试在规定时延内完成则通过测试` + '\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.num = 0;
this.StartEnable = !this.StartEnable;
let str = {
bundleName:"com.ohos.launcher",
abilityName: "com.ohos.launcher.MainAbility",
}
abilityContext.startAbility(str).then((data) => {
Scroll(this.scroller) {
Column(){
Row(){
Text(`根据以下操作步骤完成测试`+ '\n' + '\n' )
.fontColor(Color.White).fontSize('24fp')
}
Row(){
Text(`测试步骤:`+ '\n' + '\n' + '1.测试设备通过USB连接工作台' + '\n' + '\n' + `2.点击开始键进入系统桌面` + '\n' + '\n'
+ `3.清空后台应用,将底层任务栏中应用拖至桌面` + '\n' + '\n' + `4.工作台运行‘点击启动测试.bat’选择冷启动>联系人测试,回车执行`
+ '\n' + '\n' +`5.测试应用自动执行冷启动后手动返回validator界面` + '\n' + '\n' + '6.点击结束键观察测试结果'
+ '\n' + '\n' + `7.若冷启动测试在规定时延内完成则通过测试` + '\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.num = 0;
this.StartEnable = !this.StartEnable;
let str = {
bundleName:"com.ohos.launcher",
abilityName: "com.ohos.launcher.MainAbility",
}
abilityContext.startAbility(str).then((data) => {
}).catch((error) => {
}).catch((error) => {
})
})
})
}
Column(){
Button(`结束`)
.borderRadius(8)
.backgroundColor(0x317aff)
.width('30%')
.enabled(!this.StartEnable)
.opacity(!this.StartEnable? 1 : 0.4)
.onClick(() => {
this.StartEnable = !this.StartEnable
/*
Contacts
*/
let ContactsFd = fileio.openSync(ContactsColdPath, 0o100 | 0o2002, 0o664);
let ContactsBuf = new ArrayBuffer(4096);
fileio.readSync(ContactsFd,ContactsBuf);
let ContactsReport = String.fromCharCode.apply(null,new Uint8Array(ContactsBuf));
let ContactsHead = ContactsReport.indexOf('time:');
let ContactsTime = ContactsReport.substring(ContactsHead+5);
this.contactsNum = parseFloat(ContactsTime);
if( 0 < this.contactsNum && this.contactsNum < 2300 ) {
this.num++
}
if( this.num === 1 ) {
this.Vue = true;
}
})
}
}
Column(){
Button(`结束`)
.borderRadius(8)
.backgroundColor(0x317aff)
.width('30%')
.enabled(!this.StartEnable)
.opacity(!this.StartEnable? 1 : 0.4)
.onClick(() => {
this.StartEnable = !this.StartEnable
/*
Contacts
*/
let ContactsFd = fileio.openSync(ContactsColdPath, 0o100 | 0o2002, 0o664);
let ContactsBuf = new ArrayBuffer(4096);
fileio.readSync(ContactsFd,ContactsBuf);
let ContactsReport = String.fromCharCode.apply(null,new Uint8Array(ContactsBuf));
let ContactsHead = ContactsReport.indexOf('time:');
let ContactsTime = ContactsReport.substring(ContactsHead+5);
this.contactsNum = parseFloat(ContactsTime);
if( 0 < this.contactsNum && this.contactsNum < 2300 ) {
this.num++
}
if( this.num === 1 ) {
this.Vue = true;
}
})
Row(){
Text('\n' + '\n' + `测试结果:` + '\n' + '\n' + '联系人冷启动时延' + this.contactsNum + 'ms' )
.fontColor(Color.White).fontSize('24fp')
}
}
Row(){
Text('\n' + '\n' + `测试结果:` + '\n' + '\n' + '联系人冷启动时延' + this.contactsNum + 'ms' )
.fontColor(Color.White).fontSize('24fp')
}
}
}
}.width('100%').height('80%').backgroundColor(Color.Black)
.justifyContent(FlexAlign.SpaceEvenly)
......
......@@ -35,6 +35,7 @@ struct CustomContainerUser {
@State mmsNum: number = 0;
@State cameraNum: number = 0;
@State contactsNum: number = 0;
scroller: Scroller = new Scroller();
async aboutToAppear(){
await FirstDialog.ChooseDialog(this.StepTips,this.name);
this.Vue = false;
......@@ -43,74 +44,75 @@ struct CustomContainerUser {
@Builder specificNoParam() {
Column() {
Flex({direction:FlexDirection.Column,alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceBetween }) {
Column(){
Row(){
Text(`根据以下操作步骤完成测试`+ '\n' + '\n' )
.fontColor(Color.White).fontSize('24fp')
}
Row(){
Text(`测试步骤:`+ '\n' + '\n' + '1.测试设备通过USB连接工作台' + '\n' + '\n' + `2.点击开始键进入系统桌面`+ '\n' + '\n'
+ `3.开启联系人应用回退到桌面,保证此时后台应用存在` + '\n' + '\n' + `4.工作台运行’点击启动测试.bat‘选择热启动>联系人测试`+ '\n' + '\n' +
`5.测试应用手动执行热启动返回validator界面` + '\n' + '\n' + '6.点击结束键观察测试结果' + '\n' + '\n'
+ `7.若所有热启动测试均在规定时延内完成则通过测试` + '\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.num = 0;
this.StartEnable = !this.StartEnable;
let str = {
bundleName:"com.ohos.launcher",
abilityName: "com.ohos.launcher.MainAbility",
}
abilityContext.startAbility(str).then((data) => {
Scroll(this.scroller) {
Column(){
Row(){
Text(`根据以下操作步骤完成测试`+ '\n' + '\n' )
.fontColor(Color.White).fontSize('24fp')
}
Row(){
Text(`测试步骤:`+ '\n' + '\n' + '1.测试设备通过USB连接工作台' + '\n' + '\n' + `2.点击开始键进入系统桌面`+ '\n' + '\n'
+ `3.开启联系人应用回退到桌面,保证此时后台应用存在` + '\n' + '\n' + `4.工作台运行’点击启动测试.bat‘选择热启动>联系人测试`+ '\n' + '\n' +
`5.测试应用手动执行热启动返回validator界面` + '\n' + '\n' + '6.点击结束键观察测试结果' + '\n' + '\n'
+ `7.若所有热启动测试均在规定时延内完成则通过测试` + '\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.num = 0;
this.StartEnable = !this.StartEnable;
let str = {
bundleName:"com.ohos.launcher",
abilityName: "com.ohos.launcher.MainAbility",
}
abilityContext.startAbility(str).then((data) => {
}).catch((error) => {
}).catch((error) => {
})
})
})
}
Column(){
Button(`结束`)
.borderRadius(8)
.backgroundColor(0x317aff)
.width('30%')
.enabled(!this.StartEnable)
.opacity(!this.StartEnable? 1 : 0.4)
.onClick(() => {
this.StartEnable = !this.StartEnable
/*
Contacts
*/
let ContactsFd = fileio.openSync(ContactsColdPath, 0o100 | 0o2002, 0o664);
let ContactsBuf = new ArrayBuffer(4096);
fileio.readSync(ContactsFd,ContactsBuf);
let ContactsReport = String.fromCharCode.apply(null,new Uint8Array(ContactsBuf));
let ContactsHead = ContactsReport.indexOf(':');
let ContactsTime = ContactsReport.substring(ContactsHead+1);
this.contactsNum = parseFloat(ContactsTime);
if( 0 < this.contactsNum && this.contactsNum < 600 ) {
this.num++
}
if( this.num === 1 ) {
this.Vue = true;
}
})
}
}
Column(){
Button(`结束`)
.borderRadius(8)
.backgroundColor(0x317aff)
.width('30%')
.enabled(!this.StartEnable)
.opacity(!this.StartEnable? 1 : 0.4)
.onClick(() => {
this.StartEnable = !this.StartEnable
/*
Contacts
*/
let ContactsFd = fileio.openSync(ContactsColdPath, 0o100 | 0o2002, 0o664);
let ContactsBuf = new ArrayBuffer(4096);
fileio.readSync(ContactsFd,ContactsBuf);
let ContactsReport = String.fromCharCode.apply(null,new Uint8Array(ContactsBuf));
let ContactsHead = ContactsReport.indexOf(':');
let ContactsTime = ContactsReport.substring(ContactsHead+1);
this.contactsNum = parseFloat(ContactsTime);
if( 0 < this.contactsNum && this.contactsNum < 600 ) {
this.num++
}
if( this.num === 1 ) {
this.Vue = true;
}
})
Row(){
Text('\n' + '\n' + '\n' + '\n' + `测试结果:` + '\n' + '\n' + '联系人热启动时延' + this.contactsNum + 'ms')
.fontColor(Color.White).fontSize('24fp')
}
}
Row(){
Text('\n' + '\n' + '\n' + '\n' + `测试结果:` + '\n' + '\n' + '联系人热启动时延' + this.contactsNum + 'ms')
.fontColor(Color.White).fontSize('24fp')
}
}
}
}.width('100%').height('80%').backgroundColor(Color.Black)
.justifyContent(FlexAlign.SpaceEvenly)
......
......@@ -31,6 +31,7 @@ struct CustomContainerUser {
@State Vue: boolean = false;
@State StartEnable: boolean = true;
@State Fps: string = '0';
scroller: Scroller = new Scroller();
async aboutToAppear(){
await FirstDialog.ChooseDialog(this.StepTips,this.name);
this.Vue = false;
......@@ -39,83 +40,84 @@ struct CustomContainerUser {
@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.测试设备通过USB连接工作台' + '\n' + '\n' + `2.点击开始键进入系统桌面`+ '\n' + '\n'
+ `3.工作台运行’点击启动测试.bat‘选择帧率>桌面`+ '\n' + '\n' +`4.左右滑动系统桌面连续10s以上` + '\n' + '\n'
+ '5.回到DeskFps测试项点击结束键' + '\n' + '\n' + `6.若测试最高帧率大于55帧则通过测试`
+ '\n' + '\n' + '\n' + '\n' + '\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) => {
Scroll(this.scroller) {
Column(){
Row(){
Text(`根据以下操作步骤完成测试`+ '\n' + '\n' + '\n' + '\n'+ '\n' + '\n' + '\n' + '\n')
.fontColor(Color.White).fontSize('24fp')
}
Row(){
Text(`测试步骤:`+ '\n' + '\n' + '1.测试设备通过USB连接工作台' + '\n' + '\n' + `2.点击开始键进入系统桌面`+ '\n' + '\n'
+ `3.工作台运行’点击启动测试.bat‘选择帧率>桌面`+ '\n' + '\n' +`4.左右滑动系统桌面连续10s以上` + '\n' + '\n'
+ '5.回到DeskFps测试项点击结束键' + '\n' + '\n' + `6.若测试最高帧率大于55帧则通过测试`
+ '\n' + '\n' + '\n' + '\n' + '\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) => {
}).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 headList = new Array();
let endList = new Array();
let head = report.indexOf(":");
let end = report.indexOf('|');
let Fps = new Array();
}
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 headList = new Array();
let endList = new Array();
let head = report.indexOf(":");
let end = report.indexOf('|');
let Fps = new Array();
while(head > -1){
headList.push(head);
head = report.indexOf(":",head + 1);
}
while(end > -1){
endList.push(end);
end = report.indexOf("|",end + 1);
}
for(let i = 0; i < headList.length; i++) {
Fps[i] = Number(report.substring(headList[i]+1,endList[i]));
}
let maxFps = Math.max(...Fps);
this.Fps = maxFps.toString();
if(maxFps >= 55) {
this.Vue = true;
}
})
while(head > -1){
headList.push(head);
head = report.indexOf(":",head + 1);
}
while(end > -1){
endList.push(end);
end = report.indexOf("|",end + 1);
}
for(let i = 0; i < headList.length; i++) {
Fps[i] = Number(report.substring(headList[i]+1,endList[i]));
}
let maxFps = Math.max(...Fps);
this.Fps = maxFps.toString();
if(maxFps >= 55) {
this.Vue = true;
}
})
}
}
Row(){
Text('\n' + '\n' + '\n' + '\n'+ '\n' + '\n' + '\n' + '\n' + `测试结果:` + this.Fps + '帧' )
.fontColor(Color.White).fontSize('24fp')
}
}
Row(){
Text('\n' + '\n' + '\n' + '\n'+ '\n' + '\n' + '\n' + '\n' + `测试结果:` + this.Fps + '帧' )
.fontColor(Color.White).fontSize('24fp')
}
}
}
}.width('100%').height('80%').backgroundColor(Color.Black)
.justifyContent(FlexAlign.SpaceEvenly)
......
......@@ -29,6 +29,7 @@ struct CustomContainerUser {
@State Vue: boolean = false;
@State StartEnable: boolean = true;
@State time: string = '0';
scroller: Scroller = new Scroller();
async aboutToAppear(){
await FirstDialog.ChooseDialog(this.StepTips,this.name);
this.Vue = false;
......@@ -37,70 +38,71 @@ struct CustomContainerUser {
@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.测试设备通过USB连接工作台' + '\n' + '\n' + `2.点击开始键进入信息` + '\n' + '\n' +
'3.新建一条信息显示输入框'+ '\n' + '\n' + `4.工作台运行’点击启动测试.bat‘选择完成时延>键盘按键弹出`+ '\n' + '\n' +
`5.点击输入框等待键盘弹出` + '\n' + '\n' + '6.待脚本执行结束回到Validator点击结束键' + '\n' + '\n'
+ `7.若弹出键盘时延小于或等于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,
}
Scroll(this.scroller) {
Column(){
Row(){
Text(`根据以下操作步骤完成测试`+ '\n' + '\n' + '\n' + '\n'+ '\n' + '\n' + '\n' + '\n')
.fontColor(Color.White).fontSize('24fp')
}
Row(){
Text(`测试步骤:`+ '\n' + '\n' + '1.测试设备通过USB连接工作台' + '\n' + '\n' + `2.点击开始键进入信息` + '\n' + '\n' +
'3.新建一条信息显示输入框'+ '\n' + '\n' + `4.工作台运行’点击启动测试.bat‘选择完成时延>键盘按键弹出`+ '\n' + '\n' +
`5.点击输入框等待键盘弹出` + '\n' + '\n' + '6.待脚本执行结束回到Validator点击结束键' + '\n' + '\n'
+ `7.若弹出键盘时延小于或等于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;
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( 0 < time && time < 1000 ) {
this.Vue = true;
}
})
})
}
}
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( 0 < time && time < 1000 ) {
this.Vue = true;
}
})
Row(){
Text('\n' + '\n' + '\n' + '\n'+ '\n' + '\n' + '\n' + '\n' + `输入键盘弹出时延:` + this.time + 'ms' )
.fontColor(Color.White).fontSize('24fp')
}
}
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)
......
......@@ -29,6 +29,7 @@ struct CustomContainerUser {
@State Vue: boolean = false;
@State StartEnable: boolean = true;
@State time: string = '0';
scroller: Scroller = new Scroller();
async aboutToAppear(){
await FirstDialog.ChooseDialog(this.StepTips,this.name);
this.Vue = false;
......@@ -37,70 +38,71 @@ struct CustomContainerUser {
@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.测试设备通过USB连接工作台' + '\n' + '\n' + `2.点击开始键进入信息` + '\n' + '\n' +
'3.新建一条信息点击输入框打开键盘'+ '\n' + '\n' + `4.工作台运行’点击启动测试.bat‘选择响应时延>键盘按键输入`+ '\n' + '\n'
+`5.随意点击按键等待响应` + '\n' + '\n' + '6.待脚本执行结束回到Validator点击结束键' + '\n' + '\n' +
`7.若按键响应时延小于或等于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,
}
Scroll(this.scroller) {
Column(){
Row(){
Text(`根据以下操作步骤完成测试`+ '\n' + '\n' + '\n' + '\n'+ '\n' + '\n' + '\n' + '\n')
.fontColor(Color.White).fontSize('24fp')
}
Row(){
Text(`测试步骤:`+ '\n' + '\n' + '1.测试设备通过USB连接工作台' + '\n' + '\n' + `2.点击开始键进入信息` + '\n' + '\n' +
'3.新建一条信息点击输入框打开键盘'+ '\n' + '\n' + `4.工作台运行’点击启动测试.bat‘选择响应时延>键盘按键输入`+ '\n' + '\n'
+`5.随意点击按键等待响应` + '\n' + '\n' + '6.待脚本执行结束回到Validator点击结束键' + '\n' + '\n' +
`7.若按键响应时延小于或等于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;
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( 0 < time && time < 150 ) {
this.Vue = true;
}
})
})
}
}
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( 0 < time && time < 150 ) {
this.Vue = true;
}
})
Row(){
Text('\n' + '\n' + '\n' + '\n'+ '\n' + '\n' + '\n' + '\n' + `按键响应时延:` + this.time + 'ms' )
.fontColor(Color.White).fontSize('24fp')
}
}
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)
......
......@@ -35,6 +35,7 @@ struct CustomContainerUser {
@State mmsNum: number = 0;
@State cameraNum: number = 0;
@State contactsNum: number = 0;
scroller: Scroller = new Scroller();
async aboutToAppear(){
await FirstDialog.ChooseDialog(this.StepTips,this.name);
this.Vue = false;
......@@ -43,74 +44,75 @@ struct CustomContainerUser {
@Builder specificNoParam() {
Column() {
Flex({direction:FlexDirection.Column,alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceBetween }) {
Column(){
Row(){
Text(`根据以下操作步骤完成测试`+ '\n' + '\n' )
.fontColor(Color.White).fontSize('24fp')
}
Row(){
Text(`测试步骤:`+ '\n' + '\n' + '1.测试设备通过USB连接工作台' + '\n' + '\n' + `2.点击开始键进入系统桌面` + '\n' + '\n'
+ `3.清空后台应用,将底层任务栏中应用拖至桌面` + '\n' + '\n' + `4.工作台运行‘点击启动测试.bat’选择冷启动>信息测试,回车执行`
+ '\n' + '\n' +`5.测试应用自动执行冷启动后手动返回validator界面` + '\n' + '\n' + '6.点击结束键观察测试结果'
+ '\n' + '\n' + `7.若冷启动测试在规定时延内完成则通过测试` + '\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.num = 0;
this.StartEnable = !this.StartEnable;
let str = {
bundleName:"com.ohos.launcher",
abilityName: "com.ohos.launcher.MainAbility",
}
abilityContext.startAbility(str).then((data) => {
Scroll(this.scroller) {
Column(){
Row(){
Text(`根据以下操作步骤完成测试`+ '\n' + '\n' )
.fontColor(Color.White).fontSize('24fp')
}
Row(){
Text(`测试步骤:`+ '\n' + '\n' + '1.测试设备通过USB连接工作台' + '\n' + '\n' + `2.点击开始键进入系统桌面` + '\n' + '\n'
+ `3.清空后台应用,将底层任务栏中应用拖至桌面` + '\n' + '\n' + `4.工作台运行‘点击启动测试.bat’选择冷启动>信息测试,回车执行`
+ '\n' + '\n' +`5.测试应用自动执行冷启动后手动返回validator界面` + '\n' + '\n' + '6.点击结束键观察测试结果'
+ '\n' + '\n' + `7.若冷启动测试在规定时延内完成则通过测试` + '\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.num = 0;
this.StartEnable = !this.StartEnable;
let str = {
bundleName:"com.ohos.launcher",
abilityName: "com.ohos.launcher.MainAbility",
}
abilityContext.startAbility(str).then((data) => {
}).catch((error) => {
}).catch((error) => {
})
})
})
}
Column(){
Button(`结束`)
.borderRadius(8)
.backgroundColor(0x317aff)
.width('30%')
.enabled(!this.StartEnable)
.opacity(!this.StartEnable? 1 : 0.4)
.onClick(() => {
this.StartEnable = !this.StartEnable
/*
mms
*/
let MmsFd = fileio.openSync(MmsColdPath, 0o100 | 0o2002, 0o664);
let MmsBuf = new ArrayBuffer(4096);
fileio.readSync(MmsFd,MmsBuf);
let MmsReport = String.fromCharCode.apply(null,new Uint8Array(MmsBuf));
let MmsHead = MmsReport.indexOf('time:');
let MmsTime = MmsReport.substring(MmsHead+5);
this.mmsNum = parseFloat(MmsTime);
if( 0 < this.mmsNum && this.mmsNum < 2300 ) {
this.num++
}
if( this.num === 1 ) {
this.Vue = true;
}
})
}
}
Column(){
Button(`结束`)
.borderRadius(8)
.backgroundColor(0x317aff)
.width('30%')
.enabled(!this.StartEnable)
.opacity(!this.StartEnable? 1 : 0.4)
.onClick(() => {
this.StartEnable = !this.StartEnable
/*
mms
*/
let MmsFd = fileio.openSync(MmsColdPath, 0o100 | 0o2002, 0o664);
let MmsBuf = new ArrayBuffer(4096);
fileio.readSync(MmsFd,MmsBuf);
let MmsReport = String.fromCharCode.apply(null,new Uint8Array(MmsBuf));
let MmsHead = MmsReport.indexOf('time:');
let MmsTime = MmsReport.substring(MmsHead+5);
this.mmsNum = parseFloat(MmsTime);
if( 0 < this.mmsNum && this.mmsNum < 2300 ) {
this.num++
}
if( this.num === 1 ) {
this.Vue = true;
}
})
Row(){
Text('\n' + '\n' + `测试结果:` + '\n' + '\n' + '信息冷启动时延' + this.mmsNum + 'ms')
.fontColor(Color.White).fontSize('24fp')
}
}
Row(){
Text('\n' + '\n' + `测试结果:` + '\n' + '\n' + '信息冷启动时延' + this.mmsNum + 'ms')
.fontColor(Color.White).fontSize('24fp')
}
}
}
}.width('100%').height('80%').backgroundColor(Color.Black)
.justifyContent(FlexAlign.SpaceEvenly)
......
......@@ -35,6 +35,7 @@ struct CustomContainerUser {
@State mmsNum: number = 0;
@State cameraNum: number = 0;
@State contactsNum: number = 0;
scroller: Scroller = new Scroller();
async aboutToAppear(){
await FirstDialog.ChooseDialog(this.StepTips,this.name);
this.Vue = false;
......@@ -43,74 +44,75 @@ struct CustomContainerUser {
@Builder specificNoParam() {
Column() {
Flex({direction:FlexDirection.Column,alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceBetween }) {
Column(){
Row(){
Text(`根据以下操作步骤完成测试`+ '\n' + '\n' )
.fontColor(Color.White).fontSize('24fp')
}
Row(){
Text(`测试步骤:`+ '\n' + '\n' + '1.测试设备通过USB连接工作台' + '\n' + '\n' + `2.点击开始键进入系统桌面`+ '\n' + '\n'
+ `3.开启信息应用回退到桌面,保证此时后台应用存在` + '\n' + '\n' + `4.工作台运行’点击启动测试.bat‘选择热启动>信息测试`+ '\n' + '\n' +
`5.测试应用手动执行热启动返回validator界面` + '\n' + '\n' + '6.点击结束键观察测试结果' + '\n' + '\n'
+ `7.若所有热启动测试均在规定时延内完成则通过测试` + '\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.num = 0;
this.StartEnable = !this.StartEnable;
let str = {
bundleName:"com.ohos.launcher",
abilityName: "com.ohos.launcher.MainAbility",
}
abilityContext.startAbility(str).then((data) => {
Scroll(this.scroller) {
Column(){
Row(){
Text(`根据以下操作步骤完成测试`+ '\n' + '\n' )
.fontColor(Color.White).fontSize('24fp')
}
Row(){
Text(`测试步骤:`+ '\n' + '\n' + '1.测试设备通过USB连接工作台' + '\n' + '\n' + `2.点击开始键进入系统桌面`+ '\n' + '\n'
+ `3.开启信息应用回退到桌面,保证此时后台应用存在` + '\n' + '\n' + `4.工作台运行’点击启动测试.bat‘选择热启动>信息测试`+ '\n' + '\n' +
`5.测试应用手动执行热启动返回validator界面` + '\n' + '\n' + '6.点击结束键观察测试结果' + '\n' + '\n'
+ `7.若所有热启动测试均在规定时延内完成则通过测试` + '\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.num = 0;
this.StartEnable = !this.StartEnable;
let str = {
bundleName:"com.ohos.launcher",
abilityName: "com.ohos.launcher.MainAbility",
}
abilityContext.startAbility(str).then((data) => {
}).catch((error) => {
}).catch((error) => {
})
})
})
}
Column(){
Button(`结束`)
.borderRadius(8)
.backgroundColor(0x317aff)
.width('30%')
.enabled(!this.StartEnable)
.opacity(!this.StartEnable? 1 : 0.4)
.onClick(() => {
this.StartEnable = !this.StartEnable
/*
mms
*/
let MmsFd = fileio.openSync(MmsColdPath, 0o100 | 0o2002, 0o664);
let MmsBuf = new ArrayBuffer(4096);
fileio.readSync(MmsFd,MmsBuf);
let MmsReport = String.fromCharCode.apply(null,new Uint8Array(MmsBuf));
let MmsHead = MmsReport.indexOf(':');
let MmsTime = MmsReport.substring(MmsHead+1);
this.mmsNum = parseFloat(MmsTime);
if( 0 < this.mmsNum && this.mmsNum < 600 ) {
this.num++
}
if( this.num === 1 ) {
this.Vue = true;
}
})
}
}
Column(){
Button(`结束`)
.borderRadius(8)
.backgroundColor(0x317aff)
.width('30%')
.enabled(!this.StartEnable)
.opacity(!this.StartEnable? 1 : 0.4)
.onClick(() => {
this.StartEnable = !this.StartEnable
/*
mms
*/
let MmsFd = fileio.openSync(MmsColdPath, 0o100 | 0o2002, 0o664);
let MmsBuf = new ArrayBuffer(4096);
fileio.readSync(MmsFd,MmsBuf);
let MmsReport = String.fromCharCode.apply(null,new Uint8Array(MmsBuf));
let MmsHead = MmsReport.indexOf(':');
let MmsTime = MmsReport.substring(MmsHead+1);
this.mmsNum = parseFloat(MmsTime);
if( 0 < this.mmsNum && this.mmsNum < 600 ) {
this.num++
}
if( this.num === 1 ) {
this.Vue = true;
}
})
Row(){
Text('\n' + '\n' + '\n' + '\n' + `测试结果:` + '\n' + '\n'+ '信息热启动时延' + this.mmsNum + 'ms')
.fontColor(Color.White).fontSize('24fp')
}
}
Row(){
Text('\n' + '\n' + '\n' + '\n' + `测试结果:` + '\n' + '\n'+ '信息热启动时延' + this.mmsNum + 'ms')
.fontColor(Color.White).fontSize('24fp')
}
}
}
}.width('100%').height('80%').backgroundColor(Color.Black)
.justifyContent(FlexAlign.SpaceEvenly)
......
......@@ -29,6 +29,7 @@ struct CustomContainerUser {
@State Vue: boolean = false;
@State StartEnable: boolean = true;
@State Fps: string = '0';
scroller: Scroller = new Scroller();
async aboutToAppear(){
await FirstDialog.ChooseDialog(this.StepTips,this.name);
this.Vue = false;
......@@ -37,86 +38,87 @@ struct CustomContainerUser {
@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.测试设备通过USB连接工作台' + '\n' + '\n' + `2.在图库中预置500张图片`+ '\n' + '\n'
+ `3.点击开始键进入图库`+ '\n' + '\n' + `4.工作台运行’点击启动测试.bat‘选择帧率>图库`+ '\n' + '\n' +
`5.滑动图库缩略图界面连续10s以上` + '\n' + '\n' + '6.回到PhotoFps测试项点击结束键' + '\n' + '\n' +
`7.若测试最高帧率大于或等于55帧则通过测试` + '\n' + '\n' + '\n' + '\n' + '\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,
}
Scroll(this.scroller) {
Column(){
Row(){
Text(`根据以下操作步骤完成测试`+ '\n' + '\n' + '\n' + '\n'+ '\n' + '\n' + '\n' + '\n')
.fontColor(Color.White).fontSize('24fp')
}
Row(){
Text(`测试步骤:`+ '\n' + '\n' + '1.测试设备通过USB连接工作台' + '\n' + '\n' + `2.在图库中预置500张图片`+ '\n' + '\n'
+ `3.点击开始键进入图库`+ '\n' + '\n' + `4.工作台运行’点击启动测试.bat‘选择帧率>图库`+ '\n' + '\n' +
`5.滑动图库缩略图界面连续10s以上` + '\n' + '\n' + '6.回到PhotoFps测试项点击结束键' + '\n' + '\n' +
`7.若测试最高帧率大于或等于55帧则通过测试` + '\n' + '\n' + '\n' + '\n' + '\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 headList = new Array();
let endList = new Array();
let head = report.indexOf(":");
let end = report.indexOf('|');
let Fps = new Array();
globalThis.abilityContext.startAbility(str, (err, data) => {
if(err) {
return;
while(head > -1){
headList.push(head);
head = report.indexOf(":",head + 1);
}
while(end > -1){
endList.push(end);
end = report.indexOf("|",end + 1);
}
for(let i = 0; i < headList.length; i++) {
Fps[i] = Number(report.substring(headList[i]+1,endList[i]));
}
let maxFps = Math.max(...Fps);
this.Fps = maxFps.toString();
if(maxFps >= 55) {
this.Vue = true;
}
})
})
}
}
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 headList = new Array();
let endList = new Array();
let head = report.indexOf(":");
let end = report.indexOf('|');
let Fps = new Array();
while(head > -1){
headList.push(head);
head = report.indexOf(":",head + 1);
}
while(end > -1){
endList.push(end);
end = report.indexOf("|",end + 1);
}
for(let i = 0; i < headList.length; i++) {
Fps[i] = Number(report.substring(headList[i]+1,endList[i]));
}
let maxFps = Math.max(...Fps);
this.Fps = maxFps.toString();
if(maxFps >= 55) {
this.Vue = true;
}
})
Row(){
Text('\n' + '\n' + '\n' + '\n'+ '\n' + '\n' + '\n' + '\n' + `测试结果:` + this.Fps + '帧' )
.fontColor(Color.White).fontSize('24fp')
}
}
Row(){
Text('\n' + '\n' + '\n' + '\n'+ '\n' + '\n' + '\n' + '\n' + `测试结果:` + this.Fps + '帧' )
.fontColor(Color.White).fontSize('24fp')
}
}
}
}.width('100%').height('80%').backgroundColor(Color.Black)
.justifyContent(FlexAlign.SpaceEvenly)
......
......@@ -35,6 +35,7 @@ struct CustomContainerUser {
@State mmsNum: number = 0;
@State cameraNum: number = 0;
@State contactsNum: number = 0;
scroller: Scroller = new Scroller();
async aboutToAppear(){
await FirstDialog.ChooseDialog(this.StepTips,this.name);
this.Vue = false;
......@@ -43,74 +44,75 @@ struct CustomContainerUser {
@Builder specificNoParam() {
Column() {
Flex({direction:FlexDirection.Column,alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceBetween }) {
Column(){
Row(){
Text(`根据以下操作步骤完成测试`+ '\n' + '\n' )
.fontColor(Color.White).fontSize('24fp')
}
Row(){
Text(`测试步骤:`+ '\n' + '\n' + '1.测试设备通过USB连接工作台' + '\n' + '\n' + `2.点击开始键进入系统桌面` + '\n' + '\n'
+ `3.清空后台应用,将底层任务栏中应用拖至桌面` + '\n' + '\n' + `4.工作台运行‘点击启动测试.bat’选择冷启动>图库测试,回车执行`
+ '\n' + '\n' +`5.测试应用自动执行冷启动后手动返回validator界面` + '\n' + '\n' + '6.点击结束键观察测试结果'
+ '\n' + '\n' + `7.若冷启动测试在规定时延内完成则通过测试` + '\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.num = 0;
this.StartEnable = !this.StartEnable;
let str = {
bundleName:"com.ohos.launcher",
abilityName: "com.ohos.launcher.MainAbility",
}
abilityContext.startAbility(str).then((data) => {
Scroll(this.scroller) {
Column(){
Row(){
Text(`根据以下操作步骤完成测试`+ '\n' + '\n' )
.fontColor(Color.White).fontSize('24fp')
}
Row(){
Text(`测试步骤:`+ '\n' + '\n' + '1.测试设备通过USB连接工作台' + '\n' + '\n' + `2.点击开始键进入系统桌面` + '\n' + '\n'
+ `3.清空后台应用,将底层任务栏中应用拖至桌面` + '\n' + '\n' + `4.工作台运行‘点击启动测试.bat’选择冷启动>图库测试,回车执行`
+ '\n' + '\n' +`5.测试应用自动执行冷启动后手动返回validator界面` + '\n' + '\n' + '6.点击结束键观察测试结果'
+ '\n' + '\n' + `7.若冷启动测试在规定时延内完成则通过测试` + '\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.num = 0;
this.StartEnable = !this.StartEnable;
let str = {
bundleName:"com.ohos.launcher",
abilityName: "com.ohos.launcher.MainAbility",
}
abilityContext.startAbility(str).then((data) => {
}).catch((error) => {
}).catch((error) => {
})
})
})
}
Column(){
Button(`结束`)
.borderRadius(8)
.backgroundColor(0x317aff)
.width('30%')
.enabled(!this.StartEnable)
.opacity(!this.StartEnable? 1 : 0.4)
.onClick(() => {
this.StartEnable = !this.StartEnable
/*
photos
*/
let photosFd = fileio.openSync(PhotosColdPath, 0o100 | 0o2002, 0o664);
let photosBuf = new ArrayBuffer(4096);
fileio.readSync(photosFd,photosBuf);
let photosReport = String.fromCharCode.apply(null,new Uint8Array(photosBuf));
let photosHead = photosReport.indexOf('time:');
let photosTime = photosReport.substring(photosHead+5);
this.photosNum = parseFloat(photosTime);
if( 0 < this.photosNum && this.photosNum < 2300 ) {
this.num++
}
if( this.num === 1 ) {
this.Vue = true;
}
})
}
}
Column(){
Button(`结束`)
.borderRadius(8)
.backgroundColor(0x317aff)
.width('30%')
.enabled(!this.StartEnable)
.opacity(!this.StartEnable? 1 : 0.4)
.onClick(() => {
this.StartEnable = !this.StartEnable
/*
photos
*/
let photosFd = fileio.openSync(PhotosColdPath, 0o100 | 0o2002, 0o664);
let photosBuf = new ArrayBuffer(4096);
fileio.readSync(photosFd,photosBuf);
let photosReport = String.fromCharCode.apply(null,new Uint8Array(photosBuf));
let photosHead = photosReport.indexOf('time:');
let photosTime = photosReport.substring(photosHead+5);
this.photosNum = parseFloat(photosTime);
if( 0 < this.photosNum && this.photosNum < 2300 ) {
this.num++
}
if( this.num === 1 ) {
this.Vue = true;
}
})
Row(){
Text('\n' + '\n' + `测试结果:` + '\n' + '\n' + '图库冷启动时延' + this.photosNum + 'ms')
.fontColor(Color.White).fontSize('24fp')
}
}
Row(){
Text('\n' + '\n' + `测试结果:` + '\n' + '\n' + '图库冷启动时延' + this.photosNum + 'ms')
.fontColor(Color.White).fontSize('24fp')
}
}
}
}.width('100%').height('80%').backgroundColor(Color.Black)
.justifyContent(FlexAlign.SpaceEvenly)
......
......@@ -35,6 +35,7 @@ struct CustomContainerUser {
@State mmsNum: number = 0;
@State cameraNum: number = 0;
@State contactsNum: number = 0;
scroller: Scroller = new Scroller();
async aboutToAppear(){
await FirstDialog.ChooseDialog(this.StepTips,this.name);
this.Vue = false;
......@@ -43,74 +44,75 @@ struct CustomContainerUser {
@Builder specificNoParam() {
Column() {
Flex({direction:FlexDirection.Column,alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceBetween }) {
Column(){
Row(){
Text(`根据以下操作步骤完成测试`+ '\n' + '\n' )
.fontColor(Color.White).fontSize('24fp')
}
Row(){
Text(`测试步骤:`+ '\n' + '\n' + '1.测试设备通过USB连接工作台' + '\n' + '\n' + `2.点击开始键进入系统桌面`+ '\n' + '\n'
+ `3.开启图库应用回退到桌面,保证此时后台应用存在` + '\n' + '\n' + `4.工作台运行’点击启动测试.bat‘选择热启动>图库测试`+ '\n' + '\n' +
`5.测试应用手动执行热启动返回validator界面` + '\n' + '\n' + '6.点击结束键观察测试结果' + '\n' + '\n'
+ `7.若所有热启动测试均在规定时延内完成则通过测试` + '\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.num = 0;
this.StartEnable = !this.StartEnable;
let str = {
bundleName:"com.ohos.launcher",
abilityName: "com.ohos.launcher.MainAbility",
}
abilityContext.startAbility(str).then((data) => {
Scroll(this.scroller) {
Column(){
Row(){
Text(`根据以下操作步骤完成测试`+ '\n' + '\n' )
.fontColor(Color.White).fontSize('24fp')
}
Row(){
Text(`测试步骤:`+ '\n' + '\n' + '1.测试设备通过USB连接工作台' + '\n' + '\n' + `2.点击开始键进入系统桌面`+ '\n' + '\n'
+ `3.开启图库应用回退到桌面,保证此时后台应用存在` + '\n' + '\n' + `4.工作台运行’点击启动测试.bat‘选择热启动>图库测试`+ '\n' + '\n' +
`5.测试应用手动执行热启动返回validator界面` + '\n' + '\n' + '6.点击结束键观察测试结果' + '\n' + '\n'
+ `7.若所有热启动测试均在规定时延内完成则通过测试` + '\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.num = 0;
this.StartEnable = !this.StartEnable;
let str = {
bundleName:"com.ohos.launcher",
abilityName: "com.ohos.launcher.MainAbility",
}
abilityContext.startAbility(str).then((data) => {
}).catch((error) => {
}).catch((error) => {
})
})
})
}
Column(){
Button(`结束`)
.borderRadius(8)
.backgroundColor(0x317aff)
.width('30%')
.enabled(!this.StartEnable)
.opacity(!this.StartEnable? 1 : 0.4)
.onClick(() => {
this.StartEnable = !this.StartEnable
/*
photos
*/
let photosFd = fileio.openSync(PhotosColdPath, 0o100 | 0o2002, 0o664);
let photosBuf = new ArrayBuffer(4096);
fileio.readSync(photosFd,photosBuf);
let photosReport = String.fromCharCode.apply(null,new Uint8Array(photosBuf));
let photosHead = photosReport.indexOf(':');
let photosTime = photosReport.substring(photosHead+1);
this.photosNum = parseFloat(photosTime);
if( 0 < this.photosNum && this.photosNum < 600 ) {
this.num++
}
if( this.num === 1 ) {
this.Vue = true;
}
})
}
}
Column(){
Button(`结束`)
.borderRadius(8)
.backgroundColor(0x317aff)
.width('30%')
.enabled(!this.StartEnable)
.opacity(!this.StartEnable? 1 : 0.4)
.onClick(() => {
this.StartEnable = !this.StartEnable
/*
photos
*/
let photosFd = fileio.openSync(PhotosColdPath, 0o100 | 0o2002, 0o664);
let photosBuf = new ArrayBuffer(4096);
fileio.readSync(photosFd,photosBuf);
let photosReport = String.fromCharCode.apply(null,new Uint8Array(photosBuf));
let photosHead = photosReport.indexOf(':');
let photosTime = photosReport.substring(photosHead+1);
this.photosNum = parseFloat(photosTime);
if( 0 < this.photosNum && this.photosNum < 600 ) {
this.num++
}
if( this.num === 1 ) {
this.Vue = true;
}
})
Row(){
Text('\n' + '\n' + '\n' + '\n' + `测试结果:` + '\n' + '\n' + '图库热启动时延' + this.photosNum + 'ms')
.fontColor(Color.White).fontSize('24fp')
}
}
Row(){
Text('\n' + '\n' + '\n' + '\n' + `测试结果:` + '\n' + '\n' + '图库热启动时延' + this.photosNum + 'ms')
.fontColor(Color.White).fontSize('24fp')
}
}
}
}.width('100%').height('80%').backgroundColor(Color.Black)
.justifyContent(FlexAlign.SpaceEvenly)
......
......@@ -29,6 +29,7 @@ struct CustomContainerUser {
@State Vue: boolean = false;
@State StartEnable: boolean = true;
@State time: string = '0';
scroller: Scroller = new Scroller();
async aboutToAppear(){
await FirstDialog.ChooseDialog(this.StepTips,this.name);
this.Vue = false;
......@@ -37,70 +38,71 @@ struct CustomContainerUser {
@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.测试设备通过USB连接工作台' + '\n' + '\n' + `2.在图库中预置500张图片`+ '\n' + '\n'
+`3.点击开始键进入图库`+ '\n' + '\n' + `4.工作台运行’点击启动测试.bat‘选择响应时延>图库缩略列表滑动`+ '\n' + '\n' +
`5.滑动图库缩略列表等待响应` + '\n' + '\n' + '6.待脚本执行结束回到Validator点击结束键' + '\n' + '\n' +
`7.若滑动响应时延小于或等于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,
}
Scroll(this.scroller) {
Column(){
Row(){
Text(`根据以下操作步骤完成测试`+ '\n' + '\n' + '\n' + '\n'+ '\n' + '\n' + '\n' + '\n')
.fontColor(Color.White).fontSize('24fp')
}
Row(){
Text(`测试步骤:`+ '\n' + '\n' + '1.测试设备通过USB连接工作台' + '\n' + '\n' + `2.在图库中预置500张图片`+ '\n' + '\n'
+`3.点击开始键进入图库`+ '\n' + '\n' + `4.工作台运行’点击启动测试.bat‘选择响应时延>图库缩略列表滑动`+ '\n' + '\n' +
`5.滑动图库缩略列表等待响应` + '\n' + '\n' + '6.待脚本执行结束回到Validator点击结束键' + '\n' + '\n' +
`7.若滑动响应时延小于或等于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;
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( 0 < time && time < 150 ) {
this.Vue = true;
}
})
})
}
}
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( 0 < time && time < 150 ) {
this.Vue = true;
}
})
Row(){
Text('\n' + '\n' + '\n' + '\n'+ '\n' + '\n' + '\n' + '\n' + `滑动响应时延:` + this.time + 'ms' )
.fontColor(Color.White).fontSize('24fp')
}
}
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)
......
......@@ -35,6 +35,7 @@ struct CustomContainerUser {
@State mmsNum: number = 0;
@State cameraNum: number = 0;
@State contactsNum: number = 0;
scroller: Scroller = new Scroller();
async aboutToAppear(){
await FirstDialog.ChooseDialog(this.StepTips,this.name);
this.Vue = false;
......@@ -43,74 +44,75 @@ struct CustomContainerUser {
@Builder specificNoParam() {
Column() {
Flex({direction:FlexDirection.Column,alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceBetween }) {
Column(){
Row(){
Text(`根据以下操作步骤完成测试`+ '\n' + '\n' )
.fontColor(Color.White).fontSize('24fp')
}
Row(){
Text(`测试步骤:`+ '\n' + '\n' + '1.测试设备通过USB连接工作台' + '\n' + '\n' + `2.点击开始键进入系统桌面` + '\n' + '\n'
+ `3.清空后台应用,将底层任务栏中应用拖至桌面` + '\n' + '\n' + `4.工作台运行‘点击启动测试.bat’选择冷启动>设置测试,回车执行`
+ '\n' + '\n' +`5.测试应用自动执行冷启动后手动返回validator界面` + '\n' + '\n' + '6.点击结束键观察测试结果'
+ '\n' + '\n' + `7.若冷启动测试在规定时延内完成则通过测试` + '\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.num = 0;
this.StartEnable = !this.StartEnable;
let str = {
bundleName:"com.ohos.launcher",
abilityName: "com.ohos.launcher.MainAbility",
}
abilityContext.startAbility(str).then((data) => {
Scroll(this.scroller) {
Column(){
Row(){
Text(`根据以下操作步骤完成测试`+ '\n' + '\n' )
.fontColor(Color.White).fontSize('24fp')
}
Row(){
Text(`测试步骤:`+ '\n' + '\n' + '1.测试设备通过USB连接工作台' + '\n' + '\n' + `2.点击开始键进入系统桌面` + '\n' + '\n'
+ `3.清空后台应用,将底层任务栏中应用拖至桌面` + '\n' + '\n' + `4.工作台运行‘点击启动测试.bat’选择冷启动>设置测试,回车执行`
+ '\n' + '\n' +`5.测试应用自动执行冷启动后手动返回validator界面` + '\n' + '\n' + '6.点击结束键观察测试结果'
+ '\n' + '\n' + `7.若冷启动测试在规定时延内完成则通过测试` + '\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.num = 0;
this.StartEnable = !this.StartEnable;
let str = {
bundleName:"com.ohos.launcher",
abilityName: "com.ohos.launcher.MainAbility",
}
abilityContext.startAbility(str).then((data) => {
}).catch((error) => {
}).catch((error) => {
})
})
})
}
Column(){
Button(`结束`)
.borderRadius(8)
.backgroundColor(0x317aff)
.width('30%')
.enabled(!this.StartEnable)
.opacity(!this.StartEnable? 1 : 0.4)
.onClick(() => {
this.StartEnable = !this.StartEnable
/*
settings
*/
let setFd = fileio.openSync(SettingsColdPath, 0o100 | 0o2002, 0o664);
let setBuf = new ArrayBuffer(4096);
fileio.readSync(setFd,setBuf);
let setReport = String.fromCharCode.apply(null,new Uint8Array(setBuf));
let setHead = setReport.indexOf('time:');
let setTime = setReport.substring(setHead+5);
this.setNum = parseFloat(setTime);
if( 0 < this.setNum && this.setNum < 2300 ) {
this.num++
}
if( this.num === 1 ) {
this.Vue = true;
}
})
}
}
Column(){
Button(`结束`)
.borderRadius(8)
.backgroundColor(0x317aff)
.width('30%')
.enabled(!this.StartEnable)
.opacity(!this.StartEnable? 1 : 0.4)
.onClick(() => {
this.StartEnable = !this.StartEnable
/*
settings
*/
let setFd = fileio.openSync(SettingsColdPath, 0o100 | 0o2002, 0o664);
let setBuf = new ArrayBuffer(4096);
fileio.readSync(setFd,setBuf);
let setReport = String.fromCharCode.apply(null,new Uint8Array(setBuf));
let setHead = setReport.indexOf('time:');
let setTime = setReport.substring(setHead+5);
this.setNum = parseFloat(setTime);
if( 0 < this.setNum && this.setNum < 2300 ) {
this.num++
}
if( this.num === 1 ) {
this.Vue = true;
}
})
Row(){
Text('\n' + '\n' + `测试结果:` + '\n' + '\n' + '设置冷启动时延' + this.setNum + 'ms')
.fontColor(Color.White).fontSize('24fp')
}
}
Row(){
Text('\n' + '\n' + `测试结果:` + '\n' + '\n' + '设置冷启动时延' + this.setNum + 'ms')
.fontColor(Color.White).fontSize('24fp')
}
}
}
}.width('100%').height('80%').backgroundColor(Color.Black)
.justifyContent(FlexAlign.SpaceEvenly)
......
......@@ -35,6 +35,7 @@ struct CustomContainerUser {
@State mmsNum: number = 0;
@State cameraNum: number = 0;
@State contactsNum: number = 0;
scroller: Scroller = new Scroller();
async aboutToAppear(){
await FirstDialog.ChooseDialog(this.StepTips,this.name);
this.Vue = false;
......@@ -43,74 +44,75 @@ struct CustomContainerUser {
@Builder specificNoParam() {
Column() {
Flex({direction:FlexDirection.Column,alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceBetween }) {
Column(){
Row(){
Text(`根据以下操作步骤完成测试`+ '\n' + '\n' )
.fontColor(Color.White).fontSize('24fp')
}
Row(){
Text(`测试步骤:`+ '\n' + '\n' + '1.测试设备通过USB连接工作台' + '\n' + '\n' + `2.点击开始键进入系统桌面`+ '\n' + '\n'
+ `3.开启设置应用回退到桌面,保证此时后台应用存在` + '\n' + '\n' + `4.工作台运行’点击启动测试.bat‘选择热启动>设置测试`+ '\n' + '\n' +
`5.测试应用手动执行热启动返回validator界面` + '\n' + '\n' + '6.点击结束键观察测试结果' + '\n' + '\n'
+ `7.若所有热启动测试均在规定时延内完成则通过测试` + '\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.num = 0;
this.StartEnable = !this.StartEnable;
let str = {
bundleName:"com.ohos.launcher",
abilityName: "com.ohos.launcher.MainAbility",
}
abilityContext.startAbility(str).then((data) => {
Scroll(this.scroller) {
Column(){
Row(){
Text(`根据以下操作步骤完成测试`+ '\n' + '\n' )
.fontColor(Color.White).fontSize('24fp')
}
Row(){
Text(`测试步骤:`+ '\n' + '\n' + '1.测试设备通过USB连接工作台' + '\n' + '\n' + `2.点击开始键进入系统桌面`+ '\n' + '\n'
+ `3.开启设置应用回退到桌面,保证此时后台应用存在` + '\n' + '\n' + `4.工作台运行’点击启动测试.bat‘选择热启动>设置测试`+ '\n' + '\n' +
`5.测试应用手动执行热启动返回validator界面` + '\n' + '\n' + '6.点击结束键观察测试结果' + '\n' + '\n'
+ `7.若所有热启动测试均在规定时延内完成则通过测试` + '\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.num = 0;
this.StartEnable = !this.StartEnable;
let str = {
bundleName:"com.ohos.launcher",
abilityName: "com.ohos.launcher.MainAbility",
}
abilityContext.startAbility(str).then((data) => {
}).catch((error) => {
}).catch((error) => {
})
})
})
}
Column(){
Button(`结束`)
.borderRadius(8)
.backgroundColor(0x317aff)
.width('30%')
.enabled(!this.StartEnable)
.opacity(!this.StartEnable? 1 : 0.4)
.onClick(() => {
this.StartEnable = !this.StartEnable
/*
settings
*/
let setFd = fileio.openSync(SettingsColdPath, 0o100 | 0o2002, 0o664);
let setBuf = new ArrayBuffer(4096);
fileio.readSync(setFd,setBuf);
let setReport = String.fromCharCode.apply(null,new Uint8Array(setBuf));
let setHead = setReport.indexOf(':');
let setTime = setReport.substring(setHead+1);
this.setNum = parseFloat(setTime);
if( 0 < this.setNum && this.setNum < 600 ) {
this.num++
}
if( this.num === 1 ) {
this.Vue = true;
}
})
}
}
Column(){
Button(`结束`)
.borderRadius(8)
.backgroundColor(0x317aff)
.width('30%')
.enabled(!this.StartEnable)
.opacity(!this.StartEnable? 1 : 0.4)
.onClick(() => {
this.StartEnable = !this.StartEnable
/*
settings
*/
let setFd = fileio.openSync(SettingsColdPath, 0o100 | 0o2002, 0o664);
let setBuf = new ArrayBuffer(4096);
fileio.readSync(setFd,setBuf);
let setReport = String.fromCharCode.apply(null,new Uint8Array(setBuf));
let setHead = setReport.indexOf(':');
let setTime = setReport.substring(setHead+1);
this.setNum = parseFloat(setTime);
if( 0 < this.setNum && this.setNum < 600 ) {
this.num++
}
if( this.num === 1 ) {
this.Vue = true;
}
})
Row(){
Text('\n' + '\n' + '\n' + '\n' + `测试结果:` + '\n' + '\n' + '设置热启动时延' + this.setNum + 'ms')
.fontColor(Color.White).fontSize('24fp')
}
}
Row(){
Text('\n' + '\n' + '\n' + '\n' + `测试结果:` + '\n' + '\n' + '设置热启动时延' + this.setNum + 'ms')
.fontColor(Color.White).fontSize('24fp')
}
}
}
}.width('100%').height('80%').backgroundColor(Color.Black)
.justifyContent(FlexAlign.SpaceEvenly)
......
......@@ -31,6 +31,7 @@ struct CustomContainerUser {
@State Vue: boolean = false;
@State StartEnable: boolean = true;
@State time: string = '0';
scroller: Scroller = new Scroller();
async aboutToAppear(){
await FirstDialog.ChooseDialog(this.StepTips,this.name);
this.Vue = false;
......@@ -39,67 +40,68 @@ struct CustomContainerUser {
@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.测试设备通过USB连接工作台' + '\n' + '\n' + `2.点击开始键进入桌面开启任务管理器`
+ '\n' + '\n' + `3.工作台运行’点击启动测试.bat‘选择完成时延>后台任务切换`+ '\n' + '\n' +`4.随意点开一个后台任务`
+ '\n' + '\n' + '5.待脚本执行结束回到Validator点击结束键' + '\n' + '\n' +
`6.若打开后台任务时延小于或等于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) => {
Scroll(this.scroller) {
Column(){
Row(){
Text(`根据以下操作步骤完成测试`+ '\n' + '\n' + '\n' + '\n'+ '\n' + '\n' + '\n' + '\n')
.fontColor(Color.White).fontSize('24fp')
}
Row(){
Text(`测试步骤:`+ '\n' + '\n' + '1.测试设备通过USB连接工作台' + '\n' + '\n' + `2.点击开始键进入桌面开启任务管理器`
+ '\n' + '\n' + `3.工作台运行’点击启动测试.bat‘选择完成时延>后台任务切换`+ '\n' + '\n' +`4.随意点开一个后台任务`
+ '\n' + '\n' + '5.待脚本执行结束回到Validator点击结束键' + '\n' + '\n' +
`6.若打开后台任务时延小于或等于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) => {
}).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( 0 < time && time < 600 ) {
this.Vue = true;
}
})
}
}
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( 0 < time && time < 600 ) {
this.Vue = true;
}
})
Row(){
Text('\n' + '\n' + '\n' + '\n'+ '\n' + '\n' + '\n' + '\n' + `打开后台任务时延:` + this.time + 'ms' )
.fontColor(Color.White).fontSize('24fp')
}
}
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)
......
......@@ -31,6 +31,7 @@ struct CustomContainerUser {
@State Vue: boolean = false;
@State StartEnable: boolean = true;
@State time: string = '0';
scroller: Scroller = new Scroller();
async aboutToAppear(){
await FirstDialog.ChooseDialog(this.StepTips,this.name);
this.Vue = false;
......@@ -39,67 +40,68 @@ struct CustomContainerUser {
@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.测试设备通过USB连接工作台' + '\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 str = {
bundleName:"com.ohos.launcher",
abilityName: "com.ohos.launcher.MainAbility",
}
abilityContext.startAbility(str).then((data) => {
Scroll(this.scroller) {
Column(){
Row(){
Text(`根据以下操作步骤完成测试`+ '\n' + '\n' + '\n' + '\n'+ '\n' + '\n' + '\n' + '\n')
.fontColor(Color.White).fontSize('24fp')
}
Row(){
Text(`测试步骤:`+ '\n' + '\n' + '1.测试设备通过USB连接工作台' + '\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 str = {
bundleName:"com.ohos.launcher",
abilityName: "com.ohos.launcher.MainAbility",
}
abilityContext.startAbility(str).then((data) => {
}).catch((error) => {
}).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( 0 < time && time < 150 ) {
this.Vue = true;
}
})
}
}
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( 0 < time && time < 150 ) {
this.Vue = true;
}
})
Row(){
Text('\n' + '\n' + '\n' + '\n'+ '\n' + '\n' + '\n' + '\n' + `下拉通知栏时延:` + this.time + 'ms' )
.fontColor(Color.White).fontSize('24fp')
}
}
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)
......
......@@ -31,6 +31,7 @@ struct CustomContainerUser {
@State Vue: boolean = false;
@State StartEnable: boolean = true;
@State time: string = '0';
scroller: Scroller = new Scroller();
async aboutToAppear(){
await FirstDialog.ChooseDialog(this.StepTips,this.name);
this.Vue = false;
......@@ -39,67 +40,68 @@ struct CustomContainerUser {
@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.测试设备通过USB连接工作台' + '\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 str = {
bundleName:"com.ohos.launcher",
abilityName: "com.ohos.launcher.MainAbility",
}
abilityContext.startAbility(str).then((data) => {
Scroll(this.scroller) {
Column(){
Row(){
Text(`根据以下操作步骤完成测试`+ '\n' + '\n' + '\n' + '\n'+ '\n' + '\n' + '\n' + '\n')
.fontColor(Color.White).fontSize('24fp')
}
Row(){
Text(`测试步骤:`+ '\n' + '\n' + '1.测试设备通过USB连接工作台' + '\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 str = {
bundleName:"com.ohos.launcher",
abilityName: "com.ohos.launcher.MainAbility",
}
abilityContext.startAbility(str).then((data) => {
}).catch((error) => {
}).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( 0 < time && time < 1000 ) {
this.Vue = true;
}
})
}
}
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( 0 < time && time < 1000 ) {
this.Vue = true;
}
})
Row(){
Text('\n' + '\n' + '\n' + '\n'+ '\n' + '\n' + '\n' + '\n' + `启动任务管理器时延:` + this.time + 'ms' )
.fontColor(Color.White).fontSize('24fp')
}
}
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)
......
......@@ -29,6 +29,7 @@ struct CustomContainerUser {
@State Vue: boolean = false;
@State StartEnable: boolean = true;
@State time: string = '0';
scroller: Scroller = new Scroller();
async aboutToAppear(){
await FirstDialog.ChooseDialog(this.StepTips,this.name);
this.Vue = false;
......@@ -37,70 +38,71 @@ struct CustomContainerUser {
@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.测试设备通过USB连接工作台' + '\n' + '\n' + `2.在图库中预置500张图片`+ '\n' + '\n'
+ `3.点击开始键进入图库`+ '\n' + '\n' + `4.工作台运行’点击启动测试.bat‘选择响应时延>查看图片` + '\n' + '\n' +
`5.点击一张图库缩略图等待响应` + '\n' + '\n' + '6.待脚本执行结束回到Validator点击结束键' + '\n' + '\n' +
`7.若图片响应时延小于或等于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,
}
Scroll(this.scroller) {
Column(){
Row(){
Text(`根据以下操作步骤完成测试`+ '\n' + '\n' + '\n' + '\n'+ '\n' + '\n' + '\n' + '\n')
.fontColor(Color.White).fontSize('24fp')
}
Row(){
Text(`测试步骤:`+ '\n' + '\n' + '1.测试设备通过USB连接工作台' + '\n' + '\n' + `2.在图库中预置500张图片`+ '\n' + '\n'
+ `3.点击开始键进入图库`+ '\n' + '\n' + `4.工作台运行’点击启动测试.bat‘选择响应时延>查看图片` + '\n' + '\n' +
`5.点击一张图库缩略图等待响应` + '\n' + '\n' + '6.待脚本执行结束回到Validator点击结束键' + '\n' + '\n' +
`7.若图片响应时延小于或等于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;
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( 0 < time && time < 150 ) {
this.Vue = true;
}
})
})
}
}
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( 0 < time && time < 150 ) {
this.Vue = true;
}
})
Row(){
Text('\n' + '\n' + '\n' + '\n'+ '\n' + '\n' + '\n' + '\n' + `图片响应时延:` + this.time + 'ms' )
.fontColor(Color.White).fontSize('24fp')
}
}
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)
......
......@@ -39,8 +39,6 @@
"pages/Audio/AudioOutputRoutingTypeC",
"pages/Audio/AudioOutputRoutingBT",
"pages/Player/Player_index",
"pages/Player/PlayAudio",
"pages/Player/PlayVideo",
"pages/Experience/Experience_index",
"pages/Experience/PhotoFps",
"pages/Experience/DeskFps",
......@@ -59,6 +57,10 @@
"pages/Experience/StartBackgroundTask",
"pages/Experience/StartNotification",
"pages/Experience/ScrollPhotosList",
"pages/Experience/KeyboardInputTest"
"pages/Experience/KeyboardInputTest",
"pages/Player/PlayAudio",
"pages/Player/PlayVideo",
"pages/Player/PlayAudioList",
"pages/Player/PlayVideoList"
]
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册