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

!8313 validator部分文字修改和bug修改合入3.2release

Merge pull request !8313 from 田文哲/OpenHarmony-3.2-Release
...@@ -23,7 +23,7 @@ struct SetCircle { ...@@ -23,7 +23,7 @@ struct SetCircle {
@State FillColor: string = '#FF000000'; @State FillColor: string = '#FF000000';
@State X: number = 0; @State X: number = 0;
@State name: string = 'CanvasShadowOffsetX'; @State name: string = 'CanvasShadowOffsetX';
@State StepTips: string = '操作步骤:拖动滑块向右移动'+'\n'+'预期结果:阴影会随着拖动距离增大而向偏移,并显示偏移数值'; @State StepTips: string = '操作步骤:拖动滑块向右移动'+'\n'+'预期结果:阴影会随着拖动距离增大而向偏移,并显示偏移数值';
@State Vue: boolean = false; @State Vue: boolean = false;
async aboutToAppear(){ async aboutToAppear(){
await FirstDialog.ChooseDialog(this.StepTips,this.name); await FirstDialog.ChooseDialog(this.StepTips,this.name);
......
...@@ -104,7 +104,7 @@ struct audioInputRouting { ...@@ -104,7 +104,7 @@ struct audioInputRouting {
} }
Row(){ Row(){
Column(){ Column(){
Button(`No`) Button(`不支持`)
.borderRadius(8) .borderRadius(8)
.backgroundColor(0x317aff) .backgroundColor(0x317aff)
.width('30%') .width('30%')
...@@ -115,7 +115,7 @@ struct audioInputRouting { ...@@ -115,7 +115,7 @@ struct audioInputRouting {
}) })
} }
Column(){ Column(){
Button(`Yes`) Button(`支持`)
.borderRadius(8) .borderRadius(8)
.backgroundColor(0x317aff) .backgroundColor(0x317aff)
.width('30%') .width('30%')
...@@ -126,14 +126,14 @@ struct audioInputRouting { ...@@ -126,14 +126,14 @@ struct audioInputRouting {
} }
} }
Row(){ Row(){
Text('测试目的:\n当设备连接TypeC耳机时,是否音频输入路由正确切换\n测试准备\n断连任何外设,保持设备常亮\n测试步骤:\n1. 验证设备是否支持TypeC耳机\n2. 按下RECORD按钮\n3. 连接TypeC耳机\n4. 对着耳机mic讲话\n5. 按下STOP按钮\n6. 按下PLAY按钮听录制音频正常播放\n测试标准:\n如果设备不支持TypeC耳机输入或者接收到输入路由通知、路由显示为TypeC耳机,通过TypeC可正常录制和播放,则用例pass').fontColor(Color.White).fontSize('18fp') Text('测试目的:\n当设备连接TypeC耳机时,是否音频输入路由正确切换\n测试准备\n断连任何外设,保持设备常亮\n测试步骤:\n1. 验证设备是否支持TypeC耳机\n2. 连接TypeC耳机\n3. 按下录制按钮\n4. 对着耳机mic讲话\n5. 按下停止按钮\n6. 按下播放按钮\n测试标准:\n如果设备不支持TypeC耳机输入或者接收到输入路由通知、路由显示为TypeC耳机,通过TypeC可正常录制和播放,则用例pass').fontColor(Color.White).fontSize('18fp')
} }
Row(){ Row(){
Text(`Audio输入路由:${this.inputDevice}`).fontColor(Color.White).fontSize('18fp') Text(`Audio输入路由:${this.inputDevice}`).fontColor(Color.White).fontSize('18fp')
} }
Row(){ Row(){
Column(){ Column(){
Button(`RECORD`) Button(`录制`)
.borderRadius(8) .borderRadius(8)
.backgroundColor(0x317aff) .backgroundColor(0x317aff)
.width('30%') .width('30%')
...@@ -147,7 +147,7 @@ struct audioInputRouting { ...@@ -147,7 +147,7 @@ struct audioInputRouting {
}) })
} }
Column(){ Column(){
Button(`STOP`) Button(`停止`)
.borderRadius(8) .borderRadius(8)
.backgroundColor(0x317aff) .backgroundColor(0x317aff)
.width('30%') .width('30%')
...@@ -162,7 +162,7 @@ struct audioInputRouting { ...@@ -162,7 +162,7 @@ struct audioInputRouting {
}) })
} }
Column(){ Column(){
Button(`PLAY`) Button(`播放`)
.borderRadius(8) .borderRadius(8)
.backgroundColor(0x317aff) .backgroundColor(0x317aff)
.width('30%') .width('30%')
......
...@@ -104,7 +104,7 @@ struct audioInputRouting { ...@@ -104,7 +104,7 @@ struct audioInputRouting {
} }
Row(){ Row(){
Column(){ Column(){
Button(`No`) Button(`不支持`)
.borderRadius(8) .borderRadius(8)
.backgroundColor(0x317aff) .backgroundColor(0x317aff)
.width('30%') .width('30%')
...@@ -115,7 +115,7 @@ struct audioInputRouting { ...@@ -115,7 +115,7 @@ struct audioInputRouting {
}) })
} }
Column(){ Column(){
Button(`Yes`) Button(`支持`)
.borderRadius(8) .borderRadius(8)
.backgroundColor(0x317aff) .backgroundColor(0x317aff)
.width('30%') .width('30%')
...@@ -126,14 +126,14 @@ struct audioInputRouting { ...@@ -126,14 +126,14 @@ struct audioInputRouting {
} }
} }
Row(){ Row(){
Text('测试目的:\n当设备连接3.5mm有线耳机时,是否音频输入路由正确切换\n测试准备\n断连任何外设,保持设备常亮\n测试步骤:\n1. 验证设备是否支持3.5mm有线耳机\n2. 按下RECORD按钮\n3. 连接3.5mm有线耳机\n4. 对着耳机mic讲话\n5. 按下STOP按钮\n6. 按下PLAY按钮听录制音频正常播放\n测试标准:\n如果设备不支持3.5mm有线耳机输入或者接收到路由通知、路由显示为3.5mm耳机,通过3.5mm耳机可正常录制和播放,则用例pass').fontColor(Color.White).fontSize('18fp') Text('测试目的:\n当设备连接3.5mm有线耳机时,是否音频输入路由正确切换\n测试准备\n断连任何外设,保持设备常亮\n测试步骤:\n1. 验证设备是否支持3.5mm有线耳机\n2. 连接3.5mm有线耳机\n3. 按下录制按钮\n4. 对着耳机mic讲话\n5. 按下停止按钮\n6. 按下播放按钮\n测试标准:\n如果设备不支持3.5mm有线耳机输入或者接收到路由通知、路由显示为3.5mm耳机,通过3.5mm耳机可正常录制和播放,则用例pass').fontColor(Color.White).fontSize('18fp')
} }
Row(){ Row(){
Text(`Audio输入路由:${this.inputDevice}`).fontColor(Color.White).fontSize('18fp') Text(`Audio输入路由:${this.inputDevice}`).fontColor(Color.White).fontSize('18fp')
} }
Row(){ Row(){
Column(){ Column(){
Button(`RECORD`) Button(`录制`)
.borderRadius(8) .borderRadius(8)
.backgroundColor(0x317aff) .backgroundColor(0x317aff)
.width('30%') .width('30%')
...@@ -147,7 +147,7 @@ struct audioInputRouting { ...@@ -147,7 +147,7 @@ struct audioInputRouting {
}) })
} }
Column(){ Column(){
Button(`STOP`) Button(`停止`)
.borderRadius(8) .borderRadius(8)
.backgroundColor(0x317aff) .backgroundColor(0x317aff)
.width('30%') .width('30%')
...@@ -162,7 +162,7 @@ struct audioInputRouting { ...@@ -162,7 +162,7 @@ struct audioInputRouting {
}) })
} }
Column(){ Column(){
Button(`PLAY`) Button(`播放`)
.borderRadius(8) .borderRadius(8)
.backgroundColor(0x317aff) .backgroundColor(0x317aff)
.width('30%') .width('30%')
......
...@@ -94,7 +94,7 @@ struct audioOutputRouting { ...@@ -94,7 +94,7 @@ struct audioOutputRouting {
} }
Row(){ Row(){
Column(){ Column(){
Button(`No`) Button(`不支持`)
.borderRadius(8) .borderRadius(8)
.backgroundColor(0x317aff) .backgroundColor(0x317aff)
.width('30%') .width('30%')
...@@ -105,7 +105,7 @@ struct audioOutputRouting { ...@@ -105,7 +105,7 @@ struct audioOutputRouting {
}) })
} }
Column(){ Column(){
Button(`Yes`) Button(`支持`)
.borderRadius(8) .borderRadius(8)
.backgroundColor(0x317aff) .backgroundColor(0x317aff)
.width('30%') .width('30%')
...@@ -117,7 +117,7 @@ struct audioOutputRouting { ...@@ -117,7 +117,7 @@ struct audioOutputRouting {
} }
} }
Row(){ Row(){
Text('测试目的:\n当设备连接蓝牙耳机时,音频路由是否正确切换\n测试准备:\n断连任何外设,保持设备常亮\n测试步骤:\n1. 验证设备是否支持蓝牙外设\n2. 按下PLAY按钮\n3. 连接蓝牙耳机\n4. 拔出蓝牙耳机\n5. 按下STOP按钮\n测试标准:\n如果设备不支持蓝牙耳机连接或者插拔蓝牙耳机后接收到路由通知、路由显示正确,且连接蓝牙后音频通过蓝牙耳机播放,则用例pass').fontColor(Color.White).fontSize('18fp') Text('测试目的:\n当设备连接蓝牙耳机时,音频路由是否正确切换\n测试准备:\n断连任何外设,保持设备常亮\n测试步骤:\n1. 验证设备是否支持蓝牙外设\n2. 按下播放按钮\n3. 连接华为蓝牙耳机\n4. 拔出蓝牙耳机\n5. 按下停止按钮\n测试标准:\n如果设备不支持蓝牙耳机连接或者插拔蓝牙耳机后接收到路由通知、路由显示正确,且连接蓝牙后音频通过蓝牙耳机播放,则用例pass').fontColor(Color.White).fontSize('18fp')
} }
Row(){ Row(){
...@@ -125,7 +125,7 @@ struct audioOutputRouting { ...@@ -125,7 +125,7 @@ struct audioOutputRouting {
} }
Row(){ Row(){
Column(){ Column(){
Button(`PLAY`) Button(`播放`)
.borderRadius(8) .borderRadius(8)
.backgroundColor(0x317aff) .backgroundColor(0x317aff)
.width('30%') .width('30%')
...@@ -141,7 +141,7 @@ struct audioOutputRouting { ...@@ -141,7 +141,7 @@ struct audioOutputRouting {
}) })
} }
Column(){ Column(){
Button(`STOP`) Button(`停止`)
.borderRadius(8) .borderRadius(8)
.backgroundColor(0x317aff) .backgroundColor(0x317aff)
.width('30%') .width('30%')
......
...@@ -94,7 +94,7 @@ struct audioOutputRouting { ...@@ -94,7 +94,7 @@ struct audioOutputRouting {
} }
Row(){ Row(){
Column(){ Column(){
Button(`No`) Button(`不支持`)
.borderRadius(8) .borderRadius(8)
.backgroundColor(0x317aff) .backgroundColor(0x317aff)
.width('30%') .width('30%')
...@@ -105,7 +105,7 @@ struct audioOutputRouting { ...@@ -105,7 +105,7 @@ struct audioOutputRouting {
}) })
} }
Column(){ Column(){
Button(`Yes`) Button(`支持`)
.borderRadius(8) .borderRadius(8)
.backgroundColor(0x317aff) .backgroundColor(0x317aff)
.width('30%') .width('30%')
...@@ -117,7 +117,7 @@ struct audioOutputRouting { ...@@ -117,7 +117,7 @@ struct audioOutputRouting {
} }
} }
Row(){ Row(){
Text('测试目的:\n当设备连接TypeC耳机时,音频路由是否正确切换\n测试准备:\n断连任何外设,保持设备常亮\n测试步骤:\n1. 验证设备是否支持TypeC外设\n2. 按下PLAY按钮\n3. 连接TypeC耳机\n4. 拔出TypeC耳机\n5. 按下STOP按钮\n测试标准:\n如果设备不支持TypeC耳机连接或者插拔TypeC耳机后接收到路由通知、路由显示正确,且连接TypeC后音频通过TypeC耳机播放,则用例pass').fontColor(Color.White).fontSize('18fp') Text('测试目的:\n当设备连接TypeC耳机时,音频路由是否正确切换\n测试准备:\n断连任何外设,保持设备常亮\n测试步骤:\n1. 验证设备是否支持TypeC外设\n2. 按下播放按钮\n3. 连接华为TypeC耳机\n4. 拔出TypeC耳机\n5. 按下停止按钮\n测试标准:\n如果设备不支持TypeC耳机连接或者插拔TypeC耳机后接收到路由通知、路由显示正确,且连接TypeC后音频通过TypeC耳机播放,则用例pass').fontColor(Color.White).fontSize('18fp')
} }
Row(){ Row(){
...@@ -125,7 +125,7 @@ struct audioOutputRouting { ...@@ -125,7 +125,7 @@ struct audioOutputRouting {
} }
Row(){ Row(){
Column(){ Column(){
Button(`PLAY`) Button(`播放`)
.borderRadius(8) .borderRadius(8)
.backgroundColor(0x317aff) .backgroundColor(0x317aff)
.width('30%') .width('30%')
...@@ -141,7 +141,7 @@ struct audioOutputRouting { ...@@ -141,7 +141,7 @@ struct audioOutputRouting {
}) })
} }
Column(){ Column(){
Button(`STOP`) Button(`停止`)
.borderRadius(8) .borderRadius(8)
.backgroundColor(0x317aff) .backgroundColor(0x317aff)
.width('30%') .width('30%')
......
...@@ -94,7 +94,7 @@ struct audioOutputRouting { ...@@ -94,7 +94,7 @@ struct audioOutputRouting {
} }
Row(){ Row(){
Column(){ Column(){
Button(`No`) Button(`不支持`)
.borderRadius(8) .borderRadius(8)
.backgroundColor(0x317aff) .backgroundColor(0x317aff)
.width('30%') .width('30%')
...@@ -105,7 +105,7 @@ struct audioOutputRouting { ...@@ -105,7 +105,7 @@ struct audioOutputRouting {
}) })
} }
Column(){ Column(){
Button(`Yes`) Button(`支持`)
.borderRadius(8) .borderRadius(8)
.backgroundColor(0x317aff) .backgroundColor(0x317aff)
.width('30%') .width('30%')
...@@ -117,7 +117,7 @@ struct audioOutputRouting { ...@@ -117,7 +117,7 @@ struct audioOutputRouting {
} }
} }
Row(){ Row(){
Text('测试目的:\n当设备连接3.5mm有线耳机时,音频路由是否正确切换\n测试准备:\n断连任何外设,保持设备常亮\n测试步骤:\n1. 验证设备是否支持外设\n2. 按下PLAY按钮\n3. 连接3.5mm有线耳机\n4. 拔出3.5mm有线耳机\n5. 按下STOP按钮\n测试标准:\n如果设备不支持有线耳机输入或者插入和拔出有线耳机后接收到路由通知,路由显示正确,且连接外设后音频通过外设播放,则用例pass').fontColor(Color.White).fontSize('18fp') Text('测试目的:\n当设备连接3.5mm有线耳机时,音频路由是否正确切换\n测试准备:\n断连任何外设,保持设备常亮\n测试步骤:\n1. 验证设备是否支持3.5mm耳机外设\n2. 按下播放按钮\n3. 连接华为3.5mm有线耳机\n4. 拔出3.5mm有线耳机\n5. 按下停止按钮\n测试标准:\n如果设备不支持有线耳机输入或者插入和拔出有线耳机后接收到路由通知,路由显示正确,且连接外设后音频通过外设播放,则用例pass').fontColor(Color.White).fontSize('18fp')
} }
Row(){ Row(){
...@@ -125,7 +125,7 @@ struct audioOutputRouting { ...@@ -125,7 +125,7 @@ struct audioOutputRouting {
} }
Row(){ Row(){
Column(){ Column(){
Button(`PLAY`) Button(`播放`)
.borderRadius(8) .borderRadius(8)
.backgroundColor(0x317aff) .backgroundColor(0x317aff)
.width('30%') .width('30%')
...@@ -141,7 +141,7 @@ struct audioOutputRouting { ...@@ -141,7 +141,7 @@ struct audioOutputRouting {
}) })
} }
Column(){ Column(){
Button(`STOP`) Button(`停止`)
.borderRadius(8) .borderRadius(8)
.backgroundColor(0x317aff) .backgroundColor(0x317aff)
.width('30%') .width('30%')
......
...@@ -26,7 +26,7 @@ import router from '@ohos.router'; ...@@ -26,7 +26,7 @@ import router from '@ohos.router';
struct cameraOrientation { struct cameraOrientation {
@State FillColor: string = '#FF000000'; @State FillColor: string = '#FF000000';
@State name: string = 'CameraOrientation'; @State name: string = 'CameraOrientation';
@State StepTips: string = '测试目的:用于测试相机预览和拍照旋转能力\n-左侧显示给定旋转角度后的预览窗口\n-右侧显示拍照后的图片\n-对于前置摄像头会有镜像效果' + '\n' + '预期结果:拍照图片与预览窗口的画面一致'; @State StepTips: string = '测试目的:用于测试相机预览和拍照旋转能力\n-左侧显示预览窗口\n-右侧显示指定旋转角度的拍照图片\n-对于前置摄像头会有镜像效果' + '\n' + '预期结果:拍照图片与预览窗口的画面一致';
private tag: string = 'qlw CameraOrientation' private tag: string = 'qlw CameraOrientation'
private mXComponentController: XComponentController = new XComponentController() private mXComponentController: XComponentController = new XComponentController()
@State surfaceId: number = 0; @State surfaceId: number = 0;
...@@ -130,12 +130,12 @@ struct cameraOrientation { ...@@ -130,12 +130,12 @@ struct cameraOrientation {
}) })
}) })
.size({ width: '100%', height: '100%' }) .size({ width: '100%', height: '100%' })
Text('Camera Preview').fontSize('20fp').fontColor(Color.White) Text('预览').fontSize('20fp').fontColor(Color.White)
}.size({ width: '40%', height: '60%' }) }.size({ width: '40%', height: '60%' })
Column() { Column() {
Image(this.assetUri || '').size({ width: '100%', height: '100%' }).border({ width: 1 }) Image(this.assetUri || '').size({ width: '100%', height: '100%' }).border({ width: 1 })
Text('Oriented Photo').fontSize('20fp').fontColor(Color.White) Text('带旋转角度的图片').fontSize('20fp').fontColor(Color.White)
}.size({ width: '40%', height: '60%' }) }.size({ width: '40%', height: '60%' })
}.width('100%').height('50%') }.width('100%').height('50%')
...@@ -144,7 +144,7 @@ struct cameraOrientation { ...@@ -144,7 +144,7 @@ struct cameraOrientation {
Text(`Orientation: ${this.imageRotation}°`).fontSize('16fp').fontColor(Color.White) Text(`Orientation: ${this.imageRotation}°`).fontSize('16fp').fontColor(Color.White)
Text(`顺时针`).fontSize('16fp').fontColor(Color.White) Text(`顺时针`).fontSize('16fp').fontColor(Color.White)
Text(`提示:`).fontSize('16fp').fontColor(Color.White) Text(`提示:`).fontSize('16fp').fontColor(Color.White)
Text(`如果左边窗口旋转后与右边窗口相同,选择pass,否则选择fail`) Text(`如果左边预览窗口顺时针旋转后与右边窗口相同,选择pass,否则选择fail`)
.fontSize('16fp').fontColor(Color.White) .fontSize('16fp').fontColor(Color.White)
}.size({ width: '80%', height: '25%' }) }.size({ width: '80%', height: '25%' })
......
...@@ -26,7 +26,7 @@ import router from '@ohos.router'; ...@@ -26,7 +26,7 @@ import router from '@ohos.router';
struct cameraOrientation { struct cameraOrientation {
@State FillColor: string = '#FF000000'; @State FillColor: string = '#FF000000';
@State name: string = 'CameraPhotoFormat'; @State name: string = 'CameraPhotoFormat';
@State StepTips: string = '测试目的:用于测试相机拍照分辨率能力\n预期结果:所有分辨率均可以拍照,图片与预览一致'; @State StepTips: string = '测试目的:用于测试相机拍照分辨率能力\n测试步骤:\n1. 点击拍照\n2. 点击下一个\n3. 重复步骤1和2直至所有拍照分辨率均遍历完成\n预期结果:所有分辨率均可以拍照,图片与预览一致';
private tag: string = 'qlw' private tag: string = 'qlw'
private mXComponentController: XComponentController = new XComponentController() private mXComponentController: XComponentController = new XComponentController()
@State surfaceId: number = 0; @State surfaceId: number = 0;
...@@ -58,7 +58,7 @@ struct cameraOrientation { ...@@ -58,7 +58,7 @@ struct cameraOrientation {
for (let index = 0; index < this.cameraListLength; index++) { for (let index = 0; index < this.cameraListLength; index++) {
this.cameraList.push({ value: `Camera ${index}` }) this.cameraList.push({ value: `Camera ${index}` })
} }
// 测试总次数 = 摄像头0的分辨率 + 摄像头1的分辨率 优先以RK为主
this.testingFrequency = this.resolution.length this.testingFrequency = this.resolution.length
Logger.info(this.tag, `testingFrequency ${this.testingFrequency}`) Logger.info(this.tag, `testingFrequency ${this.testingFrequency}`)
} }
...@@ -140,12 +140,12 @@ struct cameraOrientation { ...@@ -140,12 +140,12 @@ struct cameraOrientation {
this.cameraInit() this.cameraInit()
}) })
.size({ width: '100%', height: '100%' }) .size({ width: '100%', height: '100%' })
Text('Camera Preview').fontSize('20fp').fontColor(Color.White) Text('预览').fontSize('20fp').fontColor(Color.White)
}.size({ width: '40%', height: '60%' }) }.size({ width: '40%', height: '60%' })
Column() { Column() {
Image(this.assetUri || '').size({ width: '100%', height: '100%' }).border({ width: 1 }) Image(this.assetUri || '').size({ width: '100%', height: '100%' }).border({ width: 1 })
Text('Oriented Photo').fontSize('20fp').fontColor(Color.White) Text('图片').fontSize('20fp').fontColor(Color.White)
}.size({ width: '40%', height: '60%' }) }.size({ width: '40%', height: '60%' })
}.width('100%').height('50%') }.width('100%').height('50%')
...@@ -191,7 +191,7 @@ struct cameraOrientation { ...@@ -191,7 +191,7 @@ struct cameraOrientation {
}) })
}.justifyContent(FlexAlign.SpaceEvenly) }.justifyContent(FlexAlign.SpaceEvenly)
Text(`提示:对不同分辨率的图片进行拍摄,根据拍摄结果选择pass或选择fail`) Text(`提示:不同拍照分辨率下进行拍摄,图片拍摄成功且与预览画面一致则选择pass,否则选择fail`)
.fontSize('16fp').fontColor(Color.White).margin({ top: 20 }) .fontSize('16fp').fontColor(Color.White).margin({ top: 20 })
}.size({ width: '80%', height: '20%' }) }.size({ width: '80%', height: '20%' })
...@@ -206,7 +206,7 @@ struct cameraOrientation { ...@@ -206,7 +206,7 @@ struct cameraOrientation {
this.isNextEnabled = false this.isNextEnabled = false
CameraService.takePicture() CameraService.takePicture()
}) })
Button('NEXT') Button('下一个')
.enabled(!this.isNextEnabled) .enabled(!this.isNextEnabled)
.opacity(!this.isNextEnabled ? 1 : 0.4) .opacity(!this.isNextEnabled ? 1 : 0.4)
.width('40%') .width('40%')
...@@ -222,11 +222,18 @@ struct cameraOrientation { ...@@ -222,11 +222,18 @@ struct cameraOrientation {
this.isNextEnabled = true this.isNextEnabled = true
return return
} }
this.cameraDeviceIndex = Number(!this.cameraDeviceIndex)
this.clickFrequency = 0 this.clickFrequency = 0
await this.cameraInit().then(() => { if (this.cameraListLength > 1) {
this.isCameraChange = true this.cameraDeviceIndex = Number(!this.cameraDeviceIndex)
}) await this.cameraInit().then(() => {
this.isCameraChange = true
})
} else {
this.Vue = true
this.isEnabled = false
this.isNextEnabled = true
return
}
} }
this.isEnabled = true this.isEnabled = true
this.isNextEnabled = true this.isNextEnabled = true
...@@ -256,4 +263,4 @@ struct cameraOrientation { ...@@ -256,4 +263,4 @@ struct cameraOrientation {
url:'pages/Camera/Camera_index', url:'pages/Camera/Camera_index',
}) })
} }
} }
\ No newline at end of file
...@@ -26,7 +26,7 @@ import router from '@ohos.router'; ...@@ -26,7 +26,7 @@ import router from '@ohos.router';
struct cameraFormat { struct cameraFormat {
@State FillColor: string = '#FF000000'; @State FillColor: string = '#FF000000';
@State name: string = 'CameraPreviewFormat'; @State name: string = 'CameraPreviewFormat';
@State StepTips: string = '测试目的:用于测试相机预览分辨率能力\n预期结果:所有分辨率均可以预览成功,预览画面正常'; @State StepTips: string = '测试目的:用于测试相机预览分辨率能力\n测试步骤:点击下一个遍历所有预览分辨率,观察预览窗口\n预期结果:所有分辨率均可以预览成功,预览画面正常';
private tag: string = 'qlw CameraFormat' private tag: string = 'qlw CameraFormat'
private mXComponentController: XComponentController = new XComponentController() private mXComponentController: XComponentController = new XComponentController()
@State surfaceId: number = 0; @State surfaceId: number = 0;
...@@ -145,7 +145,7 @@ struct cameraFormat { ...@@ -145,7 +145,7 @@ struct cameraFormat {
this.cameraInit() this.cameraInit()
}) })
.size({ width: '100%', height: '100%' }) .size({ width: '100%', height: '100%' })
Text('Camera Preview').fontSize('20fp').fontColor(Color.White) Text('预览').fontSize('20fp').fontColor(Color.White)
}.size({ width: '80%', height: '70%' }) }.size({ width: '80%', height: '70%' })
Column() { Column() {
...@@ -201,7 +201,7 @@ struct cameraFormat { ...@@ -201,7 +201,7 @@ struct cameraFormat {
.onSelect((index: number, value) => { .onSelect((index: number, value) => {
Logger.info(this.tag, `onSelect format index: ${index}, value: ${value}`) Logger.info(this.tag, `onSelect format index: ${index}, value: ${value}`)
}) })
Button('NEXT') Button('下一个')
.borderRadius(8) .borderRadius(8)
.backgroundColor(0x317aff) .backgroundColor(0x317aff)
.enabled(this.nextEnabled) .enabled(this.nextEnabled)
...@@ -229,4 +229,4 @@ struct cameraFormat { ...@@ -229,4 +229,4 @@ struct cameraFormat {
url:'pages/Camera/Camera_index', url:'pages/Camera/Camera_index',
}) })
} }
} }
\ No newline at end of file
...@@ -26,7 +26,7 @@ import router from '@ohos.router'; ...@@ -26,7 +26,7 @@ import router from '@ohos.router';
struct cameraOrientation { struct cameraOrientation {
@State FillColor: string = '#FF000000'; @State FillColor: string = '#FF000000';
@State name: string = 'CameraSerialPhoto'; @State name: string = 'CameraSerialPhoto';
@State StepTips: string = '测试目的:用于测试相机连拍\n-左侧显示相机预览窗口\n-右侧显示拍照后的每个图片\n-对于前置摄像头会有镜像效果\n测试步骤:\n1.点击拍照按钮\n预期结果:点击拍照按钮后每个摄像头连拍生成10张图片'; @State StepTips: string = '测试目的:用于测试相机连拍\n-左侧显示相机预览窗口\n-右侧显示拍照后的每个图片\n-对于前置摄像头会有镜像效果\n测试步骤:\n1.点击拍照按钮\n预期结果:点击拍照按钮后每个摄像头连拍生成10张图片,图片显示正常';
private tag: string = 'qlw CameraSerialPhoto' private tag: string = 'qlw CameraSerialPhoto'
private mXComponentController: XComponentController = new XComponentController() private mXComponentController: XComponentController = new XComponentController()
@State surfaceId: number = 0; @State surfaceId: number = 0;
...@@ -133,12 +133,12 @@ struct cameraOrientation { ...@@ -133,12 +133,12 @@ struct cameraOrientation {
}) })
}) })
.size({ width: '100%', height: '100%' }) .size({ width: '100%', height: '100%' })
Text('Camera Preview').fontSize('20fp').fontColor(Color.White) Text('预览').fontSize('20fp').fontColor(Color.White)
}.size({ width: '40%', height: '60%' }) }.size({ width: '40%', height: '60%' })
Column() { Column() {
Image(this.assetUri || '').size({ width: '100%', height: '100%' }).border({ width: 1 }) Image(this.assetUri || '').size({ width: '100%', height: '100%' }).border({ width: 1 })
Text('Oriented Photo').fontSize('20fp').fontColor(Color.White) Text('图片').fontSize('20fp').fontColor(Color.White)
}.size({ width: '40%', height: '60%' }) }.size({ width: '40%', height: '60%' })
}.width('100%').height('50%') }.width('100%').height('50%')
...@@ -191,4 +191,4 @@ struct cameraOrientation { ...@@ -191,4 +191,4 @@ struct cameraOrientation {
url:'pages/Camera/Camera_index', url:'pages/Camera/Camera_index',
}) })
} }
} }
\ No newline at end of file
...@@ -45,11 +45,18 @@ struct cameraOrientation { ...@@ -45,11 +45,18 @@ struct cameraOrientation {
@State testingFrequency: number = undefined // 测试总数 @State testingFrequency: number = undefined // 测试总数
@State testEnabled: boolean = true @State testEnabled: boolean = true
@State nextEnabled: boolean = false @State nextEnabled: boolean = false
@State isVideoPlayback: boolean = false
async aboutToAppear() { async aboutToAppear() {
await FirstDialog.ChooseDialog(this.StepTips, this.name); await FirstDialog.ChooseDialog(this.StepTips, this.name);
mediaPlay.setVideoPlaybackCallback(this.handleVideoPlayback.bind(this))
} }
handleVideoPlayback = (isVideoPlayback: boolean) => {
this.isVideoPlayback = isVideoPlayback
Logger.info(this.tag, `VideoPlayBack end, isVideoPlayback: ${this.isVideoPlayback}`)
}
cameraListFn() { cameraListFn() {
this.cameraList = [] this.cameraList = []
this.cameraListLength = CameraService.cameras.length this.cameraListLength = CameraService.cameras.length
...@@ -150,19 +157,21 @@ struct cameraOrientation { ...@@ -150,19 +157,21 @@ struct cameraOrientation {
this.cameraInit() this.cameraInit()
}) })
.size({ width: '100%', height: '100%' }) .size({ width: '100%', height: '100%' })
Text('Video capture').fontSize('20fp').fontColor(Color.White) Text('视频录制').fontSize('20fp').fontColor(Color.White)
}.size({ width: '45%', height: '100%' }) }.size({ width: '45%', height: '100%' })
Column() { Column() {
XComponent({ if(!this.isVideoPlayback){
id: '', XComponent({
type: 'surface', id: '',
controller: this.mXComponentController1 type: 'surface',
}) controller: this.mXComponentController1
.onLoad(() => { })
}) .onLoad(() => {
.size({ width: '100%', height: '100%' }) })
Text('Video callback').fontSize('20fp').fontColor(Color.White) .size({ width: '100%', height: '100%' })
Text('视频回放').fontSize('20fp').fontColor(Color.White)
}
}.size({ width: '45%', height: '100%' }) }.size({ width: '45%', height: '100%' })
}.size({ width: '100%', height: '50%' }) }.size({ width: '100%', height: '50%' })
...@@ -223,7 +232,7 @@ struct cameraOrientation { ...@@ -223,7 +232,7 @@ struct cameraOrientation {
}.size({ width: '100%', height: '50%' }) }.size({ width: '100%', height: '50%' })
Row() { Row() {
Button('TEST') Button('录制')
.borderRadius(8) .borderRadius(8)
.backgroundColor(0x317aff) .backgroundColor(0x317aff)
.margin(15) .margin(15)
...@@ -245,7 +254,7 @@ struct cameraOrientation { ...@@ -245,7 +254,7 @@ struct cameraOrientation {
}, 4000) }, 4000)
}) })
}) })
Button('NEXT') Button('下一个')
.borderRadius(8) .borderRadius(8)
.backgroundColor(0x317aff) .backgroundColor(0x317aff)
.margin(15) .margin(15)
...@@ -274,4 +283,4 @@ struct cameraOrientation { ...@@ -274,4 +283,4 @@ struct cameraOrientation {
url:'pages/Camera/Camera_index', url:'pages/Camera/Camera_index',
}) })
} }
} }
\ No newline at end of file
...@@ -48,10 +48,9 @@ struct CustomContainerUser { ...@@ -48,10 +48,9 @@ struct CustomContainerUser {
.fontColor(Color.White).fontSize('24fp') .fontColor(Color.White).fontSize('24fp')
} }
Row(){ Row(){
Text(`测试步骤:`+ '\n' + '\n' + `1.点击开始键进入系统桌面`+ '\n' + '\n' + `2.清空后台应用`+ '\n' + '\n' Text(`测试步骤:`+ '\n' + '\n' + `1.点击开始键进入系统桌面`+ '\n' + '\n' + `2.清空后台应用,将底层任务栏中应用拖至桌面`
+ `3.双击执行.bat选择冷启动测试输入待测应用编号`+ '\n' + '\n' +`4.测试应用冷启动返回validator界面` + '\n' + '\n' + `3.双击执行.bat选择冷启动>相机测试,回车执行`+ '\n' + '\n' +`4.测试应用自动执行冷启动后手动返回validator界面`
+ '\n' + '\n' + '5.点击停止键观察测试结果' + '\n' + '\n' + `6.若冷启动测试在规定时延内完成则通过测试` + '\n' + '\n' + '5.点击停止键观察测试结果' + '\n' + '\n' + `6.若冷启动测试在规定时延内完成则通过测试` + '\n' + '\n' )
+ '\n' + '\n' )
.fontColor(Color.White).fontSize('20fp') .fontColor(Color.White).fontSize('20fp')
} }
Row(){ Row(){
...@@ -92,10 +91,10 @@ struct CustomContainerUser { ...@@ -92,10 +91,10 @@ struct CustomContainerUser {
let CameraBuf = new ArrayBuffer(4096); let CameraBuf = new ArrayBuffer(4096);
fileio.readSync(CameraFd,CameraBuf); fileio.readSync(CameraFd,CameraBuf);
let CameraReport = String.fromCharCode.apply(null,new Uint8Array(CameraBuf)); let CameraReport = String.fromCharCode.apply(null,new Uint8Array(CameraBuf));
let CameraHead = CameraReport.indexOf(':'); let CameraHead = CameraReport.indexOf('time:');
let CameraTime = CameraReport.substring(CameraHead+1); let CameraTime = CameraReport.substring(CameraHead+5);
this.cameraNum = parseFloat(CameraTime); this.cameraNum = parseFloat(CameraTime);
if( this.cameraNum < 2000 ) { if( 0 < this.cameraNum && this.cameraNum < 2000 ) {
this.num++ this.num++
} }
if( this.num === 1 ) { if( this.num === 1 ) {
......
...@@ -48,10 +48,9 @@ struct CustomContainerUser { ...@@ -48,10 +48,9 @@ struct CustomContainerUser {
.fontColor(Color.White).fontSize('24fp') .fontColor(Color.White).fontSize('24fp')
} }
Row(){ Row(){
Text(`测试步骤:`+ '\n' + '\n' + `1.点击开始键进入系统桌面`+ '\n' + '\n' + `2.清空后台应用`+ '\n' + '\n' Text(`测试步骤:`+ '\n' + '\n' + `1.点击开始键进入系统桌面`+ '\n' + '\n' + `2.清空后台应用,将底层任务栏中应用拖至桌面`
+ `3.双击执行.bat选择冷启动测试输入待测应用编号`+ '\n' + '\n' +`4.测试应用冷启动返回validator界面` + '\n' + '\n' + `3.双击执行.bat选择冷启动>联系人测试,回车执行`+ '\n' + '\n' +`4.测试应用自动执行冷启动后手动返回validator界面`
+ '\n' + '\n' + '5.点击停止键观察测试结果' + '\n' + '\n' + `6.若冷启动测试在规定时延内完成则通过测试` + '\n' + '\n' + '5.点击停止键观察测试结果' + '\n' + '\n' + `6.若冷启动测试在规定时延内完成则通过测试` + '\n' + '\n' )
+ '\n' + '\n' )
.fontColor(Color.White).fontSize('20fp') .fontColor(Color.White).fontSize('20fp')
} }
Row(){ Row(){
...@@ -92,10 +91,10 @@ struct CustomContainerUser { ...@@ -92,10 +91,10 @@ struct CustomContainerUser {
let ContactsBuf = new ArrayBuffer(4096); let ContactsBuf = new ArrayBuffer(4096);
fileio.readSync(ContactsFd,ContactsBuf); fileio.readSync(ContactsFd,ContactsBuf);
let ContactsReport = String.fromCharCode.apply(null,new Uint8Array(ContactsBuf)); let ContactsReport = String.fromCharCode.apply(null,new Uint8Array(ContactsBuf));
let ContactsHead = ContactsReport.indexOf(':'); let ContactsHead = ContactsReport.indexOf('time:');
let ContactsTime = ContactsReport.substring(ContactsHead+1); let ContactsTime = ContactsReport.substring(ContactsHead+5);
this.contactsNum = parseFloat(ContactsTime); this.contactsNum = parseFloat(ContactsTime);
if( this.contactsNum < 2000 ) { if( 0 < this.contactsNum && this.contactsNum < 2000 ) {
this.num++ this.num++
} }
if( this.num === 1 ) { if( this.num === 1 ) {
......
...@@ -48,9 +48,9 @@ struct CustomContainerUser { ...@@ -48,9 +48,9 @@ struct CustomContainerUser {
.fontColor(Color.White).fontSize('24fp') .fontColor(Color.White).fontSize('24fp')
} }
Row(){ Row(){
Text(`测试步骤:`+ '\n' + '\n' + `1.点击开始键进入系统桌面`+ '\n' + '\n' + `2.开启应用回退到桌面,保证此时后台应用存在`+ '\n' + '\n' Text(`测试步骤:`+ '\n' + '\n' + `1.点击开始键进入系统桌面`+ '\n' + '\n' + `2.开启应用回退到桌面,保证此时后台应用存在`
+ `3.双击执行.bat选择热启动测试输入待测应用编号`+ '\n' + '\n' +`4.依次测试完所有应用热启动返回validator界面` + '\n' + '\n' + `3.双击执行.bat选择热启动>联系人测试`+ '\n' + '\n' +`4.测试应用手动执行热启动返回validator界面`
+ '\n' + '\n' + '5.点击停止键观察测试结果' + '\n' + '\n' + `5.若所有热启动测试均在规定时延内完成则通过测试` + '\n' + '\n' + '5.点击停止键观察测试结果' + '\n' + '\n' + `6.若所有热启动测试均在规定时延内完成则通过测试`
+ '\n' + '\n' + '\n' + '\n' ) + '\n' + '\n' + '\n' + '\n' )
.fontColor(Color.White).fontSize('20fp') .fontColor(Color.White).fontSize('20fp')
} }
...@@ -95,7 +95,7 @@ struct CustomContainerUser { ...@@ -95,7 +95,7 @@ struct CustomContainerUser {
let ContactsHead = ContactsReport.indexOf(':'); let ContactsHead = ContactsReport.indexOf(':');
let ContactsTime = ContactsReport.substring(ContactsHead+1); let ContactsTime = ContactsReport.substring(ContactsHead+1);
this.contactsNum = parseFloat(ContactsTime); this.contactsNum = parseFloat(ContactsTime);
if( this.contactsNum < 1000 ) { if( 0 < this.contactsNum && this.contactsNum < 1000 ) {
this.num++ this.num++
} }
if( this.num === 1 ) { if( this.num === 1 ) {
......
...@@ -88,7 +88,7 @@ struct CustomContainerUser { ...@@ -88,7 +88,7 @@ struct CustomContainerUser {
let head = report.indexOf(":"); let head = report.indexOf(":");
this.time = report.substring(head+1); this.time = report.substring(head+1);
let time = parseFloat(this.time) let time = parseFloat(this.time)
if( time < 1000 ) { if( 0 < time && time < 1000 ) {
this.Vue = true; this.Vue = true;
} }
}) })
......
...@@ -88,7 +88,7 @@ struct CustomContainerUser { ...@@ -88,7 +88,7 @@ struct CustomContainerUser {
let head = report.indexOf(":"); let head = report.indexOf(":");
this.time = report.substring(head+1); this.time = report.substring(head+1);
let time = parseFloat(this.time) let time = parseFloat(this.time)
if( time < 150 ) { if( 0 < time && time < 150 ) {
this.Vue = true; this.Vue = true;
} }
}) })
......
...@@ -48,10 +48,9 @@ struct CustomContainerUser { ...@@ -48,10 +48,9 @@ struct CustomContainerUser {
.fontColor(Color.White).fontSize('24fp') .fontColor(Color.White).fontSize('24fp')
} }
Row(){ Row(){
Text(`测试步骤:`+ '\n' + '\n' + `1.点击开始键进入系统桌面`+ '\n' + '\n' + `2.清空后台应用`+ '\n' + '\n' Text(`测试步骤:`+ '\n' + '\n' + `1.点击开始键进入系统桌面`+ '\n' + '\n' + `2.清空后台应用,将底层任务栏中应用拖至桌面`
+ `3.双击执行.bat选择冷启动测试输入待测应用编号`+ '\n' + '\n' +`4.依次测试完所有应用冷启动返回validator界面` + '\n' + '\n' + `3.双击执行.bat选择冷启动>信息测试,回车执行`+ '\n' + '\n' +`4.测试应用自动执行冷启动后手动返回validator界面`
+ '\n' + '\n' + '5.点击停止键观察测试结果' + '\n' + '\n' + `6.若所有冷启动测试均在规定时延内完成则通过测试` + '\n' + '\n' + '5.点击停止键观察测试结果' + '\n' + '\n' + `6.若冷启动测试在规定时延内完成则通过测试` + '\n' + '\n' )
+ '\n' + '\n' )
.fontColor(Color.White).fontSize('20fp') .fontColor(Color.White).fontSize('20fp')
} }
Row(){ Row(){
...@@ -92,10 +91,10 @@ struct CustomContainerUser { ...@@ -92,10 +91,10 @@ struct CustomContainerUser {
let MmsBuf = new ArrayBuffer(4096); let MmsBuf = new ArrayBuffer(4096);
fileio.readSync(MmsFd,MmsBuf); fileio.readSync(MmsFd,MmsBuf);
let MmsReport = String.fromCharCode.apply(null,new Uint8Array(MmsBuf)); let MmsReport = String.fromCharCode.apply(null,new Uint8Array(MmsBuf));
let MmsHead = MmsReport.indexOf(':'); let MmsHead = MmsReport.indexOf('time:');
let MmsTime = MmsReport.substring(MmsHead+1); let MmsTime = MmsReport.substring(MmsHead+5);
this.mmsNum = parseFloat(MmsTime); this.mmsNum = parseFloat(MmsTime);
if( this.mmsNum < 2000 ) { if( 0 < this.mmsNum && this.mmsNum < 2000 ) {
this.num++ this.num++
} }
if( this.num === 1 ) { if( this.num === 1 ) {
...@@ -105,7 +104,7 @@ struct CustomContainerUser { ...@@ -105,7 +104,7 @@ struct CustomContainerUser {
} }
} }
Row(){ Row(){
Text('\n' + '\n' + `测试结果:` + '\n' + '\n' + '信息冷启动时延' + this.mmsNum + 'ms' + '\n' + '通过冷启动测试项' + this.num + '个') Text('\n' + '\n' + `测试结果:` + '\n' + '\n' + '信息冷启动时延' + this.mmsNum + 'ms')
.fontColor(Color.White).fontSize('24fp') .fontColor(Color.White).fontSize('24fp')
} }
} }
......
...@@ -48,9 +48,9 @@ struct CustomContainerUser { ...@@ -48,9 +48,9 @@ struct CustomContainerUser {
.fontColor(Color.White).fontSize('24fp') .fontColor(Color.White).fontSize('24fp')
} }
Row(){ Row(){
Text(`测试步骤:`+ '\n' + '\n' + `1.点击开始键进入系统桌面`+ '\n' + '\n' + `2.开启应用回退到桌面,保证此时后台应用存在`+ '\n' + '\n' Text(`测试步骤:`+ '\n' + '\n' + `1.点击开始键进入系统桌面`+ '\n' + '\n' + `2.开启应用回退到桌面,保证此时后台应用存在`
+ `3.双击执行.bat选择热启动测试输入待测应用编号`+ '\n' + '\n' +`4.依次测试完所有应用热启动返回validator界面` + '\n' + '\n' + `3.双击执行.bat选择热启动>信息测试`+ '\n' + '\n' +`4.测试应用手动执行热启动后返回validator界面`
+ '\n' + '\n' + '5.点击停止键观察测试结果' + '\n' + '\n' + `5.若所有热启动测试均在规定时延内完成则通过测试` + '\n' + '\n' + '5.点击停止键观察测试结果' + '\n' + '\n' + `5.若热启动测试在规定时延内完成则通过测试`
+ '\n' + '\n' + '\n' + '\n' ) + '\n' + '\n' + '\n' + '\n' )
.fontColor(Color.White).fontSize('20fp') .fontColor(Color.White).fontSize('20fp')
} }
...@@ -95,7 +95,7 @@ struct CustomContainerUser { ...@@ -95,7 +95,7 @@ struct CustomContainerUser {
let MmsHead = MmsReport.indexOf(':'); let MmsHead = MmsReport.indexOf(':');
let MmsTime = MmsReport.substring(MmsHead+1); let MmsTime = MmsReport.substring(MmsHead+1);
this.mmsNum = parseFloat(MmsTime); this.mmsNum = parseFloat(MmsTime);
if( this.mmsNum < 1000 ) { if( 0 < this.mmsNum && this.mmsNum < 1000 ) {
this.num++ this.num++
} }
if( this.num === 1 ) { if( this.num === 1 ) {
...@@ -105,8 +105,7 @@ struct CustomContainerUser { ...@@ -105,8 +105,7 @@ struct CustomContainerUser {
} }
} }
Row(){ Row(){
Text('\n' + '\n' + '\n' + '\n' + `测试结果:` + '\n' + '\n'+ '信息热启动时延' + this.mmsNum + 'ms' Text('\n' + '\n' + '\n' + '\n' + `测试结果:` + '\n' + '\n'+ '信息热启动时延' + this.mmsNum + 'ms')
+ '\n' + '通过热启动测试项' + this.num + '个' )
.fontColor(Color.White).fontSize('24fp') .fontColor(Color.White).fontSize('24fp')
} }
} }
......
...@@ -48,10 +48,9 @@ struct CustomContainerUser { ...@@ -48,10 +48,9 @@ struct CustomContainerUser {
.fontColor(Color.White).fontSize('24fp') .fontColor(Color.White).fontSize('24fp')
} }
Row(){ Row(){
Text(`测试步骤:`+ '\n' + '\n' + `1.点击开始键进入系统桌面`+ '\n' + '\n' + `2.清空后台应用`+ '\n' + '\n' Text(`测试步骤:`+ '\n' + '\n' + `1.点击开始键进入系统桌面`+ '\n' + '\n' + `2.清空后台应用,将底层任务栏中应用拖至桌面`
+ `3.双击执行.bat选择冷启动测试输入待测应用编号`+ '\n' + '\n' +`4.依次测试完所有应用冷启动返回validator界面` + '\n' + '\n' + `3.双击执行.bat选择冷启动>图库测试,回车执行`+ '\n' + '\n' +`4.测试应用自动执行冷启动后手动返回validator界面`
+ '\n' + '\n' + '5.点击停止键观察测试结果' + '\n' + '\n' + `6.若所有冷启动测试均在规定时延内完成则通过测试` + '\n' + '\n' + '5.点击停止键观察测试结果' + '\n' + '\n' + `6.若冷启动测试在规定时延内完成则通过测试` + '\n' + '\n' )
+ '\n' + '\n' )
.fontColor(Color.White).fontSize('20fp') .fontColor(Color.White).fontSize('20fp')
} }
Row(){ Row(){
...@@ -92,10 +91,10 @@ struct CustomContainerUser { ...@@ -92,10 +91,10 @@ struct CustomContainerUser {
let photosBuf = new ArrayBuffer(4096); let photosBuf = new ArrayBuffer(4096);
fileio.readSync(photosFd,photosBuf); fileio.readSync(photosFd,photosBuf);
let photosReport = String.fromCharCode.apply(null,new Uint8Array(photosBuf)); let photosReport = String.fromCharCode.apply(null,new Uint8Array(photosBuf));
let photosHead = photosReport.indexOf(':'); let photosHead = photosReport.indexOf('time:');
let photosTime = photosReport.substring(photosHead+1); let photosTime = photosReport.substring(photosHead+5);
this.photosNum = parseFloat(photosTime); this.photosNum = parseFloat(photosTime);
if( this.photosNum < 2000 ) { if( 0 < this.photosNum && this.photosNum < 2000 ) {
this.num++ this.num++
} }
if( this.num === 1 ) { if( this.num === 1 ) {
...@@ -105,8 +104,7 @@ struct CustomContainerUser { ...@@ -105,8 +104,7 @@ struct CustomContainerUser {
} }
} }
Row(){ Row(){
Text('\n' + '\n' + `测试结果:` + '\n' + '\n' + '图库冷启动时延' + this.photosNum + 'ms' Text('\n' + '\n' + `测试结果:` + '\n' + '\n' + '图库冷启动时延' + this.photosNum + 'ms')
+ '\n' + '通过冷启动测试项' + this.num + '个')
.fontColor(Color.White).fontSize('24fp') .fontColor(Color.White).fontSize('24fp')
} }
} }
......
...@@ -48,9 +48,9 @@ struct CustomContainerUser { ...@@ -48,9 +48,9 @@ struct CustomContainerUser {
.fontColor(Color.White).fontSize('24fp') .fontColor(Color.White).fontSize('24fp')
} }
Row(){ Row(){
Text(`测试步骤:`+ '\n' + '\n' + `1.点击开始键进入系统桌面`+ '\n' + '\n' + `2.开启应用回退到桌面,保证此时后台应用存在`+ '\n' + '\n' Text(`测试步骤:`+ '\n' + '\n' + `1.点击开始键进入系统桌面`+ '\n' + '\n' + `2.开启应用回退到桌面,保证此时后台应用存在`
+ `3.双击执行.bat选择热启动测试输入待测应用编号`+ '\n' + '\n' +`4.依次测试完所有应用热启动返回validator界面` + '\n' + '\n' + `3.双击执行.bat选择热启动>图库测试`+ '\n' + '\n' +`4.测试应用手动执行热启动后返回validator界面`
+ '\n' + '\n' + '5.点击停止键观察测试结果' + '\n' + '\n' + `5.若所有热启动测试均在规定时延内完成则通过测试` + '\n' + '\n' + '5.点击停止键观察测试结果' + '\n' + '\n' + `5.若热启动测试在规定时延内完成则通过测试`
+ '\n' + '\n' + '\n' + '\n' ) + '\n' + '\n' + '\n' + '\n' )
.fontColor(Color.White).fontSize('20fp') .fontColor(Color.White).fontSize('20fp')
} }
...@@ -95,7 +95,7 @@ struct CustomContainerUser { ...@@ -95,7 +95,7 @@ struct CustomContainerUser {
let photosHead = photosReport.indexOf(':'); let photosHead = photosReport.indexOf(':');
let photosTime = photosReport.substring(photosHead+1); let photosTime = photosReport.substring(photosHead+1);
this.photosNum = parseFloat(photosTime); this.photosNum = parseFloat(photosTime);
if( this.photosNum < 1000 ) { if( 0 < this.photosNum && this.photosNum < 1000 ) {
this.num++ this.num++
} }
if( this.num === 1 ) { if( this.num === 1 ) {
...@@ -105,8 +105,7 @@ struct CustomContainerUser { ...@@ -105,8 +105,7 @@ struct CustomContainerUser {
} }
} }
Row(){ Row(){
Text('\n' + '\n' + '\n' + '\n' + `测试结果:` + '\n' + '\n' + '图库热启动时延' + this.photosNum + 'ms' Text('\n' + '\n' + '\n' + '\n' + `测试结果:` + '\n' + '\n' + '图库热启动时延' + this.photosNum + 'ms')
+ '\n' + '通过热启动测试项' + this.num + '个' )
.fontColor(Color.White).fontSize('24fp') .fontColor(Color.White).fontSize('24fp')
} }
} }
......
...@@ -88,7 +88,7 @@ struct CustomContainerUser { ...@@ -88,7 +88,7 @@ struct CustomContainerUser {
let head = report.indexOf(":"); let head = report.indexOf(":");
this.time = report.substring(head+1); this.time = report.substring(head+1);
let time = parseFloat(this.time) let time = parseFloat(this.time)
if( time < 150 ) { if( 0 < time && time < 150 ) {
this.Vue = true; this.Vue = true;
} }
}) })
......
...@@ -48,10 +48,9 @@ struct CustomContainerUser { ...@@ -48,10 +48,9 @@ struct CustomContainerUser {
.fontColor(Color.White).fontSize('24fp') .fontColor(Color.White).fontSize('24fp')
} }
Row(){ Row(){
Text(`测试步骤:`+ '\n' + '\n' + `1.点击开始键进入系统桌面`+ '\n' + '\n' + `2.清空后台应用`+ '\n' + '\n' Text(`测试步骤:`+ '\n' + '\n' + `1.点击开始键进入系统桌面`+ '\n' + '\n' + `2.清空后台应用,将底层任务栏中应用拖至桌面`
+ `3.双击执行.bat选择冷启动测试输入待测应用编号`+ '\n' + '\n' +`4.依次测试完所有应用冷启动返回validator界面` + '\n' + '\n' + `3.双击执行.bat选择冷启动>设置测试,回车执行`+ '\n' + '\n' +`4.测试应用自动执行冷启动后手动返回validator界面`
+ '\n' + '\n' + '5.点击停止键观察测试结果' + '\n' + '\n' + `6.若所有冷启动测试均在规定时延内完成则通过测试` + '\n' + '\n' + '5.点击停止键观察测试结果' + '\n' + '\n' + `6.若冷启动测试在规定时延内完成则通过测试` + '\n' + '\n' )
+ '\n' + '\n' )
.fontColor(Color.White).fontSize('20fp') .fontColor(Color.White).fontSize('20fp')
} }
Row(){ Row(){
...@@ -92,10 +91,10 @@ struct CustomContainerUser { ...@@ -92,10 +91,10 @@ struct CustomContainerUser {
let setBuf = new ArrayBuffer(4096); let setBuf = new ArrayBuffer(4096);
fileio.readSync(setFd,setBuf); fileio.readSync(setFd,setBuf);
let setReport = String.fromCharCode.apply(null,new Uint8Array(setBuf)); let setReport = String.fromCharCode.apply(null,new Uint8Array(setBuf));
let setHead = setReport.indexOf(':'); let setHead = setReport.indexOf('time:');
let setTime = setReport.substring(setHead+1); let setTime = setReport.substring(setHead+5);
this.setNum = parseFloat(setTime); this.setNum = parseFloat(setTime);
if( this.setNum < 2000 ) { if( 0 < this.setNum && this.setNum < 2000 ) {
this.num++ this.num++
} }
if( this.num === 1 ) { if( this.num === 1 ) {
...@@ -105,8 +104,7 @@ struct CustomContainerUser { ...@@ -105,8 +104,7 @@ struct CustomContainerUser {
} }
} }
Row(){ Row(){
Text('\n' + '\n' + `测试结果:` + '\n' + '\n' + '设置冷启动时延' + this.setNum + 'ms' Text('\n' + '\n' + `测试结果:` + '\n' + '\n' + '设置冷启动时延' + this.setNum + 'ms')
+ '\n' + '通过冷启动测试项' + this.num + '个')
.fontColor(Color.White).fontSize('24fp') .fontColor(Color.White).fontSize('24fp')
} }
} }
......
...@@ -48,9 +48,9 @@ struct CustomContainerUser { ...@@ -48,9 +48,9 @@ struct CustomContainerUser {
.fontColor(Color.White).fontSize('24fp') .fontColor(Color.White).fontSize('24fp')
} }
Row(){ Row(){
Text(`测试步骤:`+ '\n' + '\n' + `1.点击开始键进入系统桌面`+ '\n' + '\n' + `2.开启应用回退到桌面,保证此时后台应用存在`+ '\n' + '\n' Text(`测试步骤:`+ '\n' + '\n' + `1.点击开始键进入系统桌面`+ '\n' + '\n' + `2.开启应用回退到桌面,保证此时后台应用存在`
+ `3.双击执行.bat选择热启动测试输入待测应用编号`+ '\n' + '\n' +`4.依次测试完所有应用热启动返回validator界面` + '\n' + '\n' + `3.双击执行.bat选择热启动>设置测试`+ '\n' + '\n' +`4.测试应用手动执行热启动后返回validator界面`
+ '\n' + '\n' + '5.点击停止键观察测试结果' + '\n' + '\n' + `5.若所有热启动测试均在规定时延内完成则通过测试` + '\n' + '\n' + '5.点击停止键观察测试结果' + '\n' + '\n' + `5.若热启动测试在规定时延内完成则通过测试`
+ '\n' + '\n' + '\n' + '\n' ) + '\n' + '\n' + '\n' + '\n' )
.fontColor(Color.White).fontSize('20fp') .fontColor(Color.White).fontSize('20fp')
} }
...@@ -95,7 +95,7 @@ struct CustomContainerUser { ...@@ -95,7 +95,7 @@ struct CustomContainerUser {
let setHead = setReport.indexOf(':'); let setHead = setReport.indexOf(':');
let setTime = setReport.substring(setHead+1); let setTime = setReport.substring(setHead+1);
this.setNum = parseFloat(setTime); this.setNum = parseFloat(setTime);
if( this.setNum < 1000 ) { if( 0 < this.setNum && this.setNum < 1000 ) {
this.num++ this.num++
} }
if( this.num === 1 ) { if( this.num === 1 ) {
...@@ -105,8 +105,7 @@ struct CustomContainerUser { ...@@ -105,8 +105,7 @@ struct CustomContainerUser {
} }
} }
Row(){ Row(){
Text('\n' + '\n' + '\n' + '\n' + `测试结果:` + '\n' + '\n' + '设置热启动时延' + this.setNum + 'ms' Text('\n' + '\n' + '\n' + '\n' + `测试结果:` + '\n' + '\n' + '设置热启动时延' + this.setNum + 'ms')
+ '\n' + '通过热启动测试项' + this.num + '个' )
.fontColor(Color.White).fontSize('24fp') .fontColor(Color.White).fontSize('24fp')
} }
} }
......
...@@ -86,7 +86,7 @@ struct CustomContainerUser { ...@@ -86,7 +86,7 @@ struct CustomContainerUser {
let head = report.indexOf(":"); let head = report.indexOf(":");
this.time = report.substring(head+1); this.time = report.substring(head+1);
let time = parseFloat(this.time) let time = parseFloat(this.time)
if( time < 600 ) { if( 0 < time && time < 600 ) {
this.Vue = true; this.Vue = true;
} }
}) })
......
...@@ -86,7 +86,7 @@ struct CustomContainerUser { ...@@ -86,7 +86,7 @@ struct CustomContainerUser {
let head = report.indexOf(":"); let head = report.indexOf(":");
this.time = report.substring(head+1); this.time = report.substring(head+1);
let time = parseFloat(this.time) let time = parseFloat(this.time)
if( time < 150 ) { if( 0 < time && time < 150 ) {
this.Vue = true; this.Vue = true;
} }
}) })
......
...@@ -86,7 +86,7 @@ struct CustomContainerUser { ...@@ -86,7 +86,7 @@ struct CustomContainerUser {
let head = report.indexOf(":"); let head = report.indexOf(":");
this.time = report.substring(head+1); this.time = report.substring(head+1);
let time = parseFloat(this.time) let time = parseFloat(this.time)
if( time < 1000 ) { if( 0 < time && time < 1000 ) {
this.Vue = true; this.Vue = true;
} }
}) })
......
...@@ -88,7 +88,7 @@ struct CustomContainerUser { ...@@ -88,7 +88,7 @@ struct CustomContainerUser {
let head = report.indexOf(":"); let head = report.indexOf(":");
this.time = report.substring(head+1); this.time = report.substring(head+1);
let time = parseFloat(this.time) let time = parseFloat(this.time)
if( time < 150 ) { if( 0 < time && time < 150 ) {
this.Vue = true; this.Vue = true;
} }
}) })
......
...@@ -429,7 +429,7 @@ struct IndexPage { ...@@ -429,7 +429,7 @@ struct IndexPage {
let serializer = new xml.XmlSerializer(bufView); let serializer = new xml.XmlSerializer(bufView);
serializer.setDeclaration(); serializer.setDeclaration();
serializer.startElement("testsuites"); serializer.startElement("testsuites");
serializer.setAttributes("name", "ActValidator"); serializer.setAttributes("name", "ActsValidator");
serializer.setAttributes("starttime", starttime); serializer.setAttributes("starttime", starttime);
serializer.setAttributes("endtime", endtime); serializer.setAttributes("endtime", endtime);
serializer.setAttributes("errors", "0"); serializer.setAttributes("errors", "0");
...@@ -439,8 +439,8 @@ struct IndexPage { ...@@ -439,8 +439,8 @@ struct IndexPage {
serializer.setAttributes("ignored", "0"); serializer.setAttributes("ignored", "0");
serializer.setAttributes("unavailable", "0"); serializer.setAttributes("unavailable", "0");
serializer.setAttributes("productinfo", "{ }"); serializer.setAttributes("productinfo", "{ }");
serializer.setAttributes("modules", "*"); serializer.setAttributes("modules", "ActsValidator");
serializer.setAttributes("runmodules", "*"); serializer.setAttributes("runmodules", "ActsValidator");
/* /*
* ArkUI * ArkUI
*/ */
...@@ -453,7 +453,7 @@ struct IndexPage { ...@@ -453,7 +453,7 @@ struct IndexPage {
serializer.setAttributes("ignored", "0"); serializer.setAttributes("ignored", "0");
serializer.setAttributes("tests", ArkuiTestNum); serializer.setAttributes("tests", ArkuiTestNum);
serializer.setAttributes("message", "*"); serializer.setAttributes("message", "*");
serializer.setAttributes("modulename", "ActsArkUITest"); serializer.setAttributes("modulename", "ActsValidator");
for (let i = 0; i < title1.length; i++) { for (let i = 0; i < title1.length; i++) {
serializer.startElement("testcase"); serializer.startElement("testcase");
serializer.setAttributes("name", String(title1[i])); serializer.setAttributes("name", String(title1[i]));
...@@ -478,7 +478,7 @@ struct IndexPage { ...@@ -478,7 +478,7 @@ struct IndexPage {
serializer.setAttributes("ignored", "0"); serializer.setAttributes("ignored", "0");
serializer.setAttributes("tests", audioTestNum); serializer.setAttributes("tests", audioTestNum);
serializer.setAttributes("message", "*"); serializer.setAttributes("message", "*");
serializer.setAttributes("modulename", "ActsAudioTest"); serializer.setAttributes("modulename", "ActsValidator");
for (let i = 0; i < title2.length; i++) { for (let i = 0; i < title2.length; i++) {
serializer.startElement("testcase"); serializer.startElement("testcase");
serializer.setAttributes("name", String(title2[i])); serializer.setAttributes("name", String(title2[i]));
...@@ -503,7 +503,7 @@ struct IndexPage { ...@@ -503,7 +503,7 @@ struct IndexPage {
serializer.setAttributes("ignored", "0"); serializer.setAttributes("ignored", "0");
serializer.setAttributes("tests", cameraTestNum); serializer.setAttributes("tests", cameraTestNum);
serializer.setAttributes("message", "*"); serializer.setAttributes("message", "*");
serializer.setAttributes("modulename", "ActsCameraTest"); serializer.setAttributes("modulename", "ActsValidator");
for (let i = 0; i < title3.length; i++) { for (let i = 0; i < title3.length; i++) {
serializer.startElement("testcase"); serializer.startElement("testcase");
serializer.setAttributes("name", String(title3[i])); serializer.setAttributes("name", String(title3[i]));
...@@ -528,7 +528,7 @@ struct IndexPage { ...@@ -528,7 +528,7 @@ struct IndexPage {
serializer.setAttributes("ignored", "0"); serializer.setAttributes("ignored", "0");
serializer.setAttributes("tests", playerTestNum); serializer.setAttributes("tests", playerTestNum);
serializer.setAttributes("message", "*"); serializer.setAttributes("message", "*");
serializer.setAttributes("modulename", "ActsPlayerTest"); serializer.setAttributes("modulename", "ActsValidator");
for (let i = 0; i < title4.length; i++) { for (let i = 0; i < title4.length; i++) {
serializer.startElement("testcase"); serializer.startElement("testcase");
serializer.setAttributes("name", String(title4[i])); serializer.setAttributes("name", String(title4[i]));
...@@ -553,7 +553,7 @@ struct IndexPage { ...@@ -553,7 +553,7 @@ struct IndexPage {
serializer.setAttributes("ignored", "0"); serializer.setAttributes("ignored", "0");
serializer.setAttributes("tests", experienceTestNum); serializer.setAttributes("tests", experienceTestNum);
serializer.setAttributes("message", "*"); serializer.setAttributes("message", "*");
serializer.setAttributes("modulename", "ActsExperienceTest"); serializer.setAttributes("modulename", "ActsValidator");
for (let i = 0; i < title5.length; i++) { for (let i = 0; i < title5.length; i++) {
serializer.startElement("testcase"); serializer.startElement("testcase");
serializer.setAttributes("name", String(title5[i])); serializer.setAttributes("name", String(title5[i]));
......
...@@ -9,6 +9,7 @@ export class mediaPlay { ...@@ -9,6 +9,7 @@ export class mediaPlay {
private avPlay: media.AVPlayer = undefined private avPlay: media.AVPlayer = undefined
private surfaceId: number = -1 private surfaceId: number = -1
public totalDuration: number public totalDuration: number
private handleVideoPlayback: (isVideoPlayback: boolean) => void = false
async getFileFd(name) { async getFileFd(name) {
let filesDir = globalThis.abilityContext.filesDir let filesDir = globalThis.abilityContext.filesDir
...@@ -65,8 +66,8 @@ export class mediaPlay { ...@@ -65,8 +66,8 @@ export class mediaPlay {
break; break;
case 'initialized': case 'initialized':
Logger.info(TAG + 'state initialized start ') Logger.info(TAG + 'state initialized start ')
if (this.surfaceId) { if (this.surfaceId != -1) {
AVPlayer.surfaceId = this.surfaceId AVPlayer.surfaceId = String(this.surfaceId)
} }
await AVPlayer.prepare() await AVPlayer.prepare()
Logger.info(TAG, 'state initialized end') Logger.info(TAG, 'state initialized end')
...@@ -85,6 +86,9 @@ export class mediaPlay { ...@@ -85,6 +86,9 @@ export class mediaPlay {
case 'completed': case 'completed':
await AVPlayer.stop() await AVPlayer.stop()
await AVPlayer.release() await AVPlayer.release()
if (this.handleVideoPlayback) {
this.handleVideoPlayback(true)
}
case 'error': case 'error':
Logger.info(TAG, 'state error callback') Logger.info(TAG, 'state error callback')
break; break;
...@@ -94,6 +98,10 @@ export class mediaPlay { ...@@ -94,6 +98,10 @@ export class mediaPlay {
Logger.info(TAG, `state error callback err:${err},code:${err.code},message:${err.message}}`) Logger.info(TAG, `state error callback err:${err},code:${err.code},message:${err.message}}`)
}) })
} }
setVideoPlaybackCallback(callback) {
this.handleVideoPlayback = callback
}
async release(){ async release(){
if (this.avPlay){ if (this.avPlay){
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册