提交 0c68ec0c 编写于 作者: T tianwenzhe

back bug and screenshotpath to 3.2release

Signed-off-by: Ntian-wenzhe411 <tianwenzhe2@huawei.com>
上级 4015fba6
...@@ -128,7 +128,7 @@ struct IndexPage { ...@@ -128,7 +128,7 @@ struct IndexPage {
fileio.closeSync(FD); fileio.closeSync(FD);
let Fd = fileio.openSync(ColorBackPath, 0o102, 0o666); let Fd = fileio.openSync(ColorBackPath, 0o102, 0o666);
fileio.writeSync(Fd,Report); fileio.writeSync(Fd,Report);
filewrite(name1,results,titles) filewrite(name1,results,titles);
} }
else if (this.result === 'Fail'){ else if (this.result === 'Fail'){
this.ColorObject[this.current] = '#ffff0000'; this.ColorObject[this.current] = '#ffff0000';
...@@ -144,7 +144,7 @@ struct IndexPage { ...@@ -144,7 +144,7 @@ struct IndexPage {
fileio.writeSync(Fd,Report); fileio.writeSync(Fd,Report);
filewrite(name1,results,titles); filewrite(name1,results,titles);
} }
else if (this.result === 'None'){ else {
this.ColorObject[this.current] = this.ColorObject[this.current]; this.ColorObject[this.current] = this.ColorObject[this.current];
} }
} }
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
*/ */
import {CustomContainer} from '../common/CanvasCustomContainer1'; import {CustomContainer} from '../common/CanvasCustomContainer1';
import FirstDialog from '../model/FirstDialog'; import FirstDialog from '../model/FirstDialog';
import router from '@ohos.router';
@Entry @Entry
@Component @Component
struct SetCircle { struct SetCircle {
...@@ -92,5 +93,10 @@ struct SetCircle { ...@@ -92,5 +93,10 @@ struct SetCircle {
}) })
}.width('100%').height('100%').backgroundColor(Color.Black) }.width('100%').height('100%').backgroundColor(Color.Black)
} }
onBackPress(){
router.replaceUrl({
url:'pages/ArkUI/ArkUI_index',
})
}
} }
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
*/ */
import {CustomContainer} from '../common/CanvasCustomContainer1'; import {CustomContainer} from '../common/CanvasCustomContainer1';
import FirstDialog from '../model/FirstDialog'; import FirstDialog from '../model/FirstDialog';
import router from '@ohos.router';
@Entry @Entry
@Component @Component
struct SetCircle { struct SetCircle {
...@@ -402,4 +403,9 @@ struct SetCircle { ...@@ -402,4 +403,9 @@ struct SetCircle {
}) })
}.width('100%').height('100%').backgroundColor(Color.Black) }.width('100%').height('100%').backgroundColor(Color.Black)
} }
onBackPress(){
router.replaceUrl({
url:'pages/ArkUI/ArkUI_index',
})
}
} }
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
*/ */
import {CustomContainer} from '../common/CanvasCustomContainer2'; import {CustomContainer} from '../common/CanvasCustomContainer2';
import FirstDialog from '../model/FirstDialog'; import FirstDialog from '../model/FirstDialog';
import router from '@ohos.router';
@Entry @Entry
@Component @Component
struct SetCircle { struct SetCircle {
...@@ -81,4 +82,9 @@ struct SetCircle { ...@@ -81,4 +82,9 @@ struct SetCircle {
}) })
}.width('100%').height('100%').backgroundColor(Color.Black) }.width('100%').height('100%').backgroundColor(Color.Black)
} }
onBackPress(){
router.replaceUrl({
url:'pages/ArkUI/ArkUI_index',
})
}
} }
\ No newline at end of file
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
*/ */
import {CustomContainer} from '../common/CanvasCustomContainer1'; import {CustomContainer} from '../common/CanvasCustomContainer1';
import FirstDialog from '../model/FirstDialog'; import FirstDialog from '../model/FirstDialog';
import router from '@ohos.router';
@Entry @Entry
@Component @Component
struct SetCircle { struct SetCircle {
...@@ -244,4 +245,9 @@ struct SetCircle { ...@@ -244,4 +245,9 @@ struct SetCircle {
}) })
}.width('100%').height('100%').backgroundColor(Color.Black) }.width('100%').height('100%').backgroundColor(Color.Black)
} }
onBackPress(){
router.replaceUrl({
url:'pages/ArkUI/ArkUI_index',
})
}
} }
\ No newline at end of file
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
*/ */
import {CustomContainer} from '../common/CanvasCustomContainer1'; import {CustomContainer} from '../common/CanvasCustomContainer1';
import FirstDialog from '../model/FirstDialog'; import FirstDialog from '../model/FirstDialog';
import router from '@ohos.router';
@Entry @Entry
@Component @Component
struct SetCircle { struct SetCircle {
...@@ -104,4 +105,9 @@ struct SetCircle { ...@@ -104,4 +105,9 @@ struct SetCircle {
}) })
}.width('100%').height('100%').backgroundColor(Color.Black) }.width('100%').height('100%').backgroundColor(Color.Black)
} }
onBackPress(){
router.replaceUrl({
url:'pages/ArkUI/ArkUI_index',
})
}
} }
\ No newline at end of file
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
*/ */
import {CustomContainer} from '../common/CanvasCustomContainer2'; import {CustomContainer} from '../common/CanvasCustomContainer2';
import FirstDialog from '../model/FirstDialog'; import FirstDialog from '../model/FirstDialog';
import router from '@ohos.router';
@Entry @Entry
@Component @Component
struct SetCircle { struct SetCircle {
...@@ -78,4 +79,9 @@ struct SetCircle { ...@@ -78,4 +79,9 @@ struct SetCircle {
}) })
}.width('100%').height('100%').backgroundColor(Color.Black) }.width('100%').height('100%').backgroundColor(Color.Black)
} }
onBackPress(){
router.replaceUrl({
url:'pages/ArkUI/ArkUI_index',
})
}
} }
\ No newline at end of file
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
*/ */
import {CustomContainer} from '../common/CanvasCustomContainer1'; import {CustomContainer} from '../common/CanvasCustomContainer1';
import FirstDialog from '../model/FirstDialog'; import FirstDialog from '../model/FirstDialog';
import router from '@ohos.router';
@Entry @Entry
@Component @Component
struct SetCircle { struct SetCircle {
...@@ -108,4 +109,9 @@ struct SetCircle { ...@@ -108,4 +109,9 @@ struct SetCircle {
}) })
}.width('100%').height('100%').backgroundColor(Color.Black) }.width('100%').height('100%').backgroundColor(Color.Black)
} }
onBackPress(){
router.replaceUrl({
url:'pages/ArkUI/ArkUI_index',
})
}
} }
\ No newline at end of file
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
*/ */
import {CustomContainer} from '../common/CanvasCustomContainer2'; import {CustomContainer} from '../common/CanvasCustomContainer2';
import FirstDialog from '../model/FirstDialog'; import FirstDialog from '../model/FirstDialog';
import router from '@ohos.router';
@Entry @Entry
@Component @Component
struct SetCircle { struct SetCircle {
...@@ -77,4 +78,9 @@ struct SetCircle { ...@@ -77,4 +78,9 @@ struct SetCircle {
}) })
}.width('100%').height('100%').backgroundColor(Color.Black) }.width('100%').height('100%').backgroundColor(Color.Black)
} }
onBackPress(){
router.replaceUrl({
url:'pages/ArkUI/ArkUI_index',
})
}
} }
\ No newline at end of file
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
*/ */
import {CustomContainer} from '../common/CanvasCustomContainer2'; import {CustomContainer} from '../common/CanvasCustomContainer2';
import FirstDialog from '../model/FirstDialog'; import FirstDialog from '../model/FirstDialog';
import router from '@ohos.router';
@Entry @Entry
@Component @Component
struct SetCircle { struct SetCircle {
...@@ -80,4 +81,9 @@ struct SetCircle { ...@@ -80,4 +81,9 @@ struct SetCircle {
}) })
}.width('100%').height('100%').backgroundColor(Color.Black) }.width('100%').height('100%').backgroundColor(Color.Black)
} }
onBackPress(){
router.replaceUrl({
url:'pages/ArkUI/ArkUI_index',
})
}
} }
\ No newline at end of file
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
*/ */
import {CustomContainer} from '../common/CanvasCustomContainer2'; import {CustomContainer} from '../common/CanvasCustomContainer2';
import FirstDialog from '../model/FirstDialog'; import FirstDialog from '../model/FirstDialog';
import router from '@ohos.router';
@Entry @Entry
@Component @Component
struct SetCircle { struct SetCircle {
...@@ -98,4 +99,9 @@ struct SetCircle { ...@@ -98,4 +99,9 @@ struct SetCircle {
}) })
}.width('100%').height('100%').backgroundColor(Color.Black) }.width('100%').height('100%').backgroundColor(Color.Black)
} }
onBackPress(){
router.replaceUrl({
url:'pages/ArkUI/ArkUI_index',
})
}
} }
\ No newline at end of file
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
*/ */
import {CustomContainer} from '../common/CanvasCustomContainer2'; import {CustomContainer} from '../common/CanvasCustomContainer2';
import FirstDialog from '../model/FirstDialog'; import FirstDialog from '../model/FirstDialog';
import router from '@ohos.router';
@Entry @Entry
@Component @Component
struct SetCircle { struct SetCircle {
...@@ -83,4 +84,9 @@ struct SetCircle { ...@@ -83,4 +84,9 @@ struct SetCircle {
}) })
}.width('100%').height('100%').backgroundColor(Color.Black) }.width('100%').height('100%').backgroundColor(Color.Black)
} }
onBackPress(){
router.replaceUrl({
url:'pages/ArkUI/ArkUI_index',
})
}
} }
\ No newline at end of file
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
*/ */
import {CustomContainer} from '../common/CanvasCustomContainer2'; import {CustomContainer} from '../common/CanvasCustomContainer2';
import FirstDialog from '../model/FirstDialog'; import FirstDialog from '../model/FirstDialog';
import router from '@ohos.router';
@Entry @Entry
@Component @Component
struct SetCircle { struct SetCircle {
...@@ -82,4 +83,9 @@ struct SetCircle { ...@@ -82,4 +83,9 @@ struct SetCircle {
}) })
}.width('100%').height('100%').backgroundColor(Color.Black) }.width('100%').height('100%').backgroundColor(Color.Black)
} }
onBackPress(){
router.replaceUrl({
url:'pages/ArkUI/ArkUI_index',
})
}
} }
\ No newline at end of file
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
*/ */
import {CustomContainer} from '../common/CanvasCustomContainer1'; import {CustomContainer} from '../common/CanvasCustomContainer1';
import FirstDialog from '../model/FirstDialog'; import FirstDialog from '../model/FirstDialog';
import router from '@ohos.router';
@Entry @Entry
@Component @Component
struct SetCircle { struct SetCircle {
...@@ -95,4 +96,9 @@ struct SetCircle { ...@@ -95,4 +96,9 @@ struct SetCircle {
}) })
}.width('100%').height('100%').backgroundColor(Color.Black) }.width('100%').height('100%').backgroundColor(Color.Black)
} }
onBackPress(){
router.replaceUrl({
url:'pages/ArkUI/ArkUI_index',
})
}
} }
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
*/ */
import {CustomContainer} from '../common/CanvasCustomContainer1'; import {CustomContainer} from '../common/CanvasCustomContainer1';
import FirstDialog from '../model/FirstDialog'; import FirstDialog from '../model/FirstDialog';
import router from '@ohos.router';
@Entry @Entry
@Component @Component
struct SetCircle { struct SetCircle {
...@@ -135,4 +136,9 @@ struct SetCircle { ...@@ -135,4 +136,9 @@ struct SetCircle {
}) })
}.width('100%').height('100%').backgroundColor(Color.Black) }.width('100%').height('100%').backgroundColor(Color.Black)
} }
onBackPress(){
router.replaceUrl({
url:'pages/ArkUI/ArkUI_index',
})
}
} }
\ No newline at end of file
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
*/ */
import {CustomContainer} from '../common/CanvasCustomContainer1'; import {CustomContainer} from '../common/CanvasCustomContainer1';
import FirstDialog from '../model/FirstDialog'; import FirstDialog from '../model/FirstDialog';
import router from '@ohos.router';
@Entry @Entry
@Component @Component
struct SetCircle { struct SetCircle {
...@@ -141,4 +142,9 @@ struct SetCircle { ...@@ -141,4 +142,9 @@ struct SetCircle {
}) })
}.width('100%').height('100%').backgroundColor(Color.Black) }.width('100%').height('100%').backgroundColor(Color.Black)
} }
onBackPress(){
router.replaceUrl({
url:'pages/ArkUI/ArkUI_index',
})
}
} }
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
*/ */
import {CustomContainer} from '../common/CustomContainer2'; import {CustomContainer} from '../common/CustomContainer2';
import FirstDialog from '../model/FirstDialog'; import FirstDialog from '../model/FirstDialog';
import router from '@ohos.router';
@Entry @Entry
@Component @Component
struct LongPressGestureExample { struct LongPressGestureExample {
...@@ -59,4 +60,9 @@ struct LongPressGestureExample { ...@@ -59,4 +60,9 @@ struct LongPressGestureExample {
}) })
}.width('100%').height('100%').backgroundColor(Color.Black) }.width('100%').height('100%').backgroundColor(Color.Black)
} }
onBackPress(){
router.replaceUrl({
url:'pages/ArkUI/ArkUI_index',
})
}
} }
\ No newline at end of file
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
*/ */
import {CustomContainer} from '../common/CustomContainer3'; import {CustomContainer} from '../common/CustomContainer3';
import FirstDialog from '../model/FirstDialog'; import FirstDialog from '../model/FirstDialog';
import router from '@ohos.router';
@Entry @Entry
@Component @Component
struct PanGestureExample { struct PanGestureExample {
...@@ -63,4 +64,9 @@ struct PanGestureExample { ...@@ -63,4 +64,9 @@ struct PanGestureExample {
}) })
}.width('100%').height('100%').backgroundColor(Color.Black) }.width('100%').height('100%').backgroundColor(Color.Black)
} }
onBackPress(){
router.replaceUrl({
url:'pages/ArkUI/ArkUI_index',
})
}
} }
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
*/ */
import {CustomContainer} from '../common/CustomContainer2'; import {CustomContainer} from '../common/CustomContainer2';
import FirstDialog from '../model/FirstDialog'; import FirstDialog from '../model/FirstDialog';
import router from '@ohos.router';
@Entry @Entry
@Component @Component
struct PinchGuestureTest { struct PinchGuestureTest {
...@@ -56,4 +57,9 @@ struct PinchGuestureTest { ...@@ -56,4 +57,9 @@ struct PinchGuestureTest {
}) })
}.width('100%').height('100%').backgroundColor(Color.Black) }.width('100%').height('100%').backgroundColor(Color.Black)
} }
onBackPress(){
router.replaceUrl({
url:'pages/ArkUI/ArkUI_index',
})
}
} }
\ No newline at end of file
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
*/ */
import {CustomContainer} from '../common/CustomContainer2'; import {CustomContainer} from '../common/CustomContainer2';
import FirstDialog from '../model/FirstDialog'; import FirstDialog from '../model/FirstDialog';
import router from '@ohos.router';
@Entry @Entry
@Component @Component
struct RotationGuestureTest { struct RotationGuestureTest {
...@@ -55,4 +56,9 @@ struct RotationGuestureTest { ...@@ -55,4 +56,9 @@ struct RotationGuestureTest {
}) })
}.width('100%').height('100%').backgroundColor(Color.Black) }.width('100%').height('100%').backgroundColor(Color.Black)
} }
onBackPress(){
router.replaceUrl({
url:'pages/ArkUI/ArkUI_index',
})
}
} }
\ No newline at end of file
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
*/ */
import {CustomContainer} from '../common/CustomContainer'; import {CustomContainer} from '../common/CustomContainer';
import FirstDialog from '../model/FirstDialog'; import FirstDialog from '../model/FirstDialog';
import router from '@ohos.router';
@Entry @Entry
@Component @Component
struct CustomContainerUser { struct CustomContainerUser {
...@@ -48,4 +49,9 @@ struct CustomContainerUser { ...@@ -48,4 +49,9 @@ struct CustomContainerUser {
}) })
}.width('100%').height('100%').backgroundColor(Color.Black) }.width('100%').height('100%').backgroundColor(Color.Black)
} }
onBackPress(){
router.replaceUrl({
url:'pages/ArkUI/ArkUI_index',
})
}
} }
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
*/ */
import {CustomContainer} from '../common/CustomContainer3'; import {CustomContainer} from '../common/CustomContainer3';
import FirstDialog from '../model/FirstDialog'; import FirstDialog from '../model/FirstDialog';
import router from '@ohos.router';
@Entry @Entry
@Component @Component
struct SwipeGestureTest { struct SwipeGestureTest {
...@@ -62,5 +63,10 @@ struct SwipeGestureTest { ...@@ -62,5 +63,10 @@ struct SwipeGestureTest {
}) })
}.width('100%').height('100%').backgroundColor(Color.Black) }.width('100%').height('100%').backgroundColor(Color.Black)
} }
onBackPress(){
router.replaceUrl({
url:'pages/ArkUI/ArkUI_index',
})
}
} }
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
*/ */
import {CustomContainer} from '../common/CustomContainer4'; import {CustomContainer} from '../common/CustomContainer4';
import FirstDialog from '../model/FirstDialog'; import FirstDialog from '../model/FirstDialog';
import router from '@ohos.router';
@Entry @Entry
@Component @Component
struct TapGestureExample { struct TapGestureExample {
...@@ -54,4 +55,9 @@ struct TapGestureExample { ...@@ -54,4 +55,9 @@ struct TapGestureExample {
}) })
}.width('100%').height('100%').backgroundColor(Color.Black) }.width('100%').height('100%').backgroundColor(Color.Black)
} }
onBackPress(){
router.replaceUrl({
url:'pages/ArkUI/ArkUI_index',
})
}
} }
\ No newline at end of file
...@@ -219,4 +219,9 @@ struct SetCircle { ...@@ -219,4 +219,9 @@ struct SetCircle {
}) })
}.width('100%').height('100%').backgroundColor(Color.Black) }.width('100%').height('100%').backgroundColor(Color.Black)
} }
onBackPress(){
router.replaceUrl({
url:'pages/ArkUI/ArkUI_index',
})
}
} }
...@@ -189,4 +189,9 @@ struct audioInputRouting { ...@@ -189,4 +189,9 @@ struct audioInputRouting {
}).height('10%').width('100%') }).height('10%').width('100%')
}.width('100%').height('100%').backgroundColor(Color.Black) }.width('100%').height('100%').backgroundColor(Color.Black)
} }
onBackPress(){
router.replaceUrl({
url:'pages/Audio/Audio_index',
})
}
} }
...@@ -189,4 +189,9 @@ struct audioInputRouting { ...@@ -189,4 +189,9 @@ struct audioInputRouting {
}).height('10%').width('100%') }).height('10%').width('100%')
}.width('100%').height('100%').backgroundColor(Color.Black) }.width('100%').height('100%').backgroundColor(Color.Black)
} }
onBackPress(){
router.replaceUrl({
url:'pages/Audio/Audio_index',
})
}
} }
...@@ -169,4 +169,9 @@ struct audioOutputRouting { ...@@ -169,4 +169,9 @@ struct audioOutputRouting {
}).height('10%').width('100%') }).height('10%').width('100%')
}.width('100%').height('100%').backgroundColor(Color.Black) }.width('100%').height('100%').backgroundColor(Color.Black)
} }
onBackPress(){
router.replaceUrl({
url:'pages/Audio/Audio_index',
})
}
} }
...@@ -169,4 +169,9 @@ struct audioOutputRouting { ...@@ -169,4 +169,9 @@ struct audioOutputRouting {
}).height('10%').width('100%') }).height('10%').width('100%')
}.width('100%').height('100%').backgroundColor(Color.Black) }.width('100%').height('100%').backgroundColor(Color.Black)
} }
onBackPress(){
router.replaceUrl({
url:'pages/Audio/Audio_index',
})
}
} }
...@@ -168,4 +168,9 @@ struct audioOutputRouting { ...@@ -168,4 +168,9 @@ struct audioOutputRouting {
}).height('10%').width('100%') }).height('10%').width('100%')
}.width('100%').height('100%').backgroundColor(Color.Black) }.width('100%').height('100%').backgroundColor(Color.Black)
} }
onBackPress(){
router.replaceUrl({
url:'pages/Audio/Audio_index',
})
}
} }
...@@ -129,4 +129,9 @@ struct cameraOrientation { ...@@ -129,4 +129,9 @@ struct cameraOrientation {
}).height('10%').width('100%') }).height('10%').width('100%')
}.width('100%').height('100%').backgroundColor(Color.Black) }.width('100%').height('100%').backgroundColor(Color.Black)
} }
onBackPress(){
router.replaceUrl({
url:'pages/Camera/Camera_index',
})
}
} }
\ No newline at end of file
...@@ -171,4 +171,9 @@ struct cameraOrientation { ...@@ -171,4 +171,9 @@ struct cameraOrientation {
}).height('10%').width('100%') }).height('10%').width('100%')
}.width('100%').height('100%').backgroundColor(Color.Black) }.width('100%').height('100%').backgroundColor(Color.Black)
} }
onBackPress(){
router.replaceUrl({
url:'pages/Camera/Camera_index',
})
}
} }
\ No newline at end of file
...@@ -251,4 +251,9 @@ struct cameraOrientation { ...@@ -251,4 +251,9 @@ struct cameraOrientation {
}).height('10%').width('100%') }).height('10%').width('100%')
}.width('100%').height('100%').backgroundColor(Color.Black) }.width('100%').height('100%').backgroundColor(Color.Black)
} }
onBackPress(){
router.replaceUrl({
url:'pages/Camera/Camera_index',
})
}
} }
\ No newline at end of file
...@@ -224,4 +224,9 @@ struct cameraFormat { ...@@ -224,4 +224,9 @@ struct cameraFormat {
}).height('10%').width('100%') }).height('10%').width('100%')
}.width('100%').height('100%').backgroundColor(Color.Black) }.width('100%').height('100%').backgroundColor(Color.Black)
} }
onBackPress(){
router.replaceUrl({
url:'pages/Camera/Camera_index',
})
}
} }
\ No newline at end of file
...@@ -186,4 +186,9 @@ struct cameraOrientation { ...@@ -186,4 +186,9 @@ struct cameraOrientation {
}).height('10%').width('100%') }).height('10%').width('100%')
}.width('100%').height('100%').backgroundColor(Color.Black) }.width('100%').height('100%').backgroundColor(Color.Black)
} }
onBackPress(){
router.replaceUrl({
url:'pages/Camera/Camera_index',
})
}
} }
\ No newline at end of file
...@@ -269,4 +269,9 @@ struct cameraOrientation { ...@@ -269,4 +269,9 @@ struct cameraOrientation {
}).height('10%').width('100%') }).height('10%').width('100%')
}.width('100%').height('100%').backgroundColor(Color.Black) }.width('100%').height('100%').backgroundColor(Color.Black)
} }
onBackPress(){
router.replaceUrl({
url:'pages/Camera/Camera_index',
})
}
} }
\ No newline at end of file
/*
* Copyright (c) 2022-2023 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import router from '@ohos.router';
import fileio from '@ohos.fileio';
import {CustomContainer} from '../common/StartExperienceCustomContainer';
import FirstDialog from '../model/FirstDialog';
import context from '@ohos.app.ability.common';
let abilityContext = getContext(this) as context.UIAbilityContext;
let path = globalThis.dir;
let CameraColdPath = path + '/ColdStartCamera.log';
@Entry
@Component
struct CustomContainerUser {
@State name: string = 'CameraColdStart';
@State StepTips: string = '操作步骤:根据操作提示运行脚本文件,启动应用'+'\n'+'预期结果:所有应用冷启动时延低于2000ms则测试通过';
@State Vue: boolean = false;
@State StartEnable: boolean = true;
@State num: number = 0;
@State setNum: number = 0;
@State photosNum: number = 0;
@State mmsNum: number = 0;
@State cameraNum: number = 0;
@State contactsNum: number = 0;
async aboutToAppear(){
await FirstDialog.ChooseDialog(this.StepTips,this.name);
this.Vue = false;
}
@Builder specificNoParam() {
Column() {
Flex({direction:FlexDirection.Column,alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceBetween }) {
Column(){
Row(){
Text(`根据以下操作步骤完成测试`+ '\n' + '\n' )
.fontColor(Color.White).fontSize('24fp')
}
Row(){
Text(`测试步骤:`+ '\n' + '\n' + `1.点击开始键进入系统桌面`+ '\n' + '\n' + `2.清空后台应用`+ '\n' + '\n'
+ `3.双击执行.bat选择冷启动测试输入待测应用编号`+ '\n' + '\n' +`4.测试应用冷启动返回validator界面`
+ '\n' + '\n' + '5.点击停止键观察测试结果' + '\n' + '\n' + `6.若冷启动测试在规定时延内完成则通过测试`
+ '\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) => {
})
})
}
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(':');
let CameraTime = CameraReport.substring(CameraHead+1);
this.cameraNum = parseFloat(CameraTime);
if( this.cameraNum < 2000 ) {
this.num++
}
if( this.num === 1 ) {
this.Vue = true;
}
})
}
}
Row(){
Text('\n' + '\n' + `测试结果:` + '\n' + '\n' + '相机冷启动时延' + this.cameraNum + 'ms' )
.fontColor(Color.White).fontSize('24fp')
}
}
}
}.width('100%').height('80%').backgroundColor(Color.Black)
.justifyContent(FlexAlign.SpaceEvenly)
}
build() {
Column() {
CustomContainer({
title: this.name,
Url:'pages/Experience/Experience_index',
StepTips:this.StepTips,
content: this.specificNoParam,
name:$name,
Vue: $Vue,
StartEnable: $StartEnable,
num: $num,
setNum: $setNum,
photosNum: $photosNum,
mmsNum: $mmsNum,
cameraNum: $cameraNum,
contactsNum: $contactsNum,
})
}.width('100%').height('100%').backgroundColor(Color.Black)
}
onBackPress(){
router.replaceUrl({
url:'pages/Experience/Experience_index',
})
}
}
/*
* Copyright (c) 2022-2023 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import router from '@ohos.router';
import fileio from '@ohos.fileio';
import {CustomContainer} from '../common/StartExperienceCustomContainer';
import FirstDialog from '../model/FirstDialog';
import context from '@ohos.app.ability.common';
let abilityContext = getContext(this) as context.UIAbilityContext;
let path = globalThis.dir;
let ContactsColdPath = path + '/ColdStartContacts.log';
@Entry
@Component
struct CustomContainerUser {
@State name: string = 'ContactsColdStart';
@State StepTips: string = '操作步骤:根据操作提示运行脚本文件,启动应用'+'\n'+'预期结果:所有应用冷启动时延低于2000ms则测试通过';
@State Vue: boolean = false;
@State StartEnable: boolean = true;
@State num: number = 0;
@State setNum: number = 0;
@State photosNum: number = 0;
@State mmsNum: number = 0;
@State cameraNum: number = 0;
@State contactsNum: number = 0;
async aboutToAppear(){
await FirstDialog.ChooseDialog(this.StepTips,this.name);
this.Vue = false;
}
@Builder specificNoParam() {
Column() {
Flex({direction:FlexDirection.Column,alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceBetween }) {
Column(){
Row(){
Text(`根据以下操作步骤完成测试`+ '\n' + '\n' )
.fontColor(Color.White).fontSize('24fp')
}
Row(){
Text(`测试步骤:`+ '\n' + '\n' + `1.点击开始键进入系统桌面`+ '\n' + '\n' + `2.清空后台应用`+ '\n' + '\n'
+ `3.双击执行.bat选择冷启动测试输入待测应用编号`+ '\n' + '\n' +`4.测试应用冷启动返回validator界面`
+ '\n' + '\n' + '5.点击停止键观察测试结果' + '\n' + '\n' + `6.若冷启动测试在规定时延内完成则通过测试`
+ '\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) => {
})
})
}
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( this.contactsNum < 2000 ) {
this.num++
}
if( this.num === 1 ) {
this.Vue = true;
}
})
}
}
Row(){
Text('\n' + '\n' + `测试结果:` + '\n' + '\n' + '联系人冷启动时延' + this.contactsNum + 'ms' )
.fontColor(Color.White).fontSize('24fp')
}
}
}
}.width('100%').height('80%').backgroundColor(Color.Black)
.justifyContent(FlexAlign.SpaceEvenly)
}
build() {
Column() {
CustomContainer({
title: this.name,
Url:'pages/Experience/Experience_index',
StepTips:this.StepTips,
content: this.specificNoParam,
name:$name,
Vue: $Vue,
StartEnable: $StartEnable,
num: $num,
setNum: $setNum,
photosNum: $photosNum,
mmsNum: $mmsNum,
cameraNum: $cameraNum,
contactsNum: $contactsNum,
})
}.width('100%').height('100%').backgroundColor(Color.Black)
}
onBackPress(){
router.replaceUrl({
url:'pages/Experience/Experience_index',
})
}
}
/*
* Copyright (c) 2022-2023 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import router from '@ohos.router';
import fileio from '@ohos.fileio';
import {CustomContainer} from '../common/StartExperienceCustomContainer';
import FirstDialog from '../model/FirstDialog';
import context from '@ohos.app.ability.common';
let abilityContext = getContext(this) as context.UIAbilityContext;
let path = globalThis.dir;
let ContactsColdPath = path + '/HotStartContacts.log';
@Entry
@Component
struct CustomContainerUser {
@State name: string = 'ContactsHotStart';
@State StepTips: string = '操作步骤:根据操作提示运行脚本文件,启动应用'+'\n'+'预期结果:所有应用热启动时延低于1000ms则测试通过';
@State Vue: boolean = false;
@State StartEnable: boolean = true;
@State num: number = 0;
@State setNum: number = 0;
@State photosNum: number = 0;
@State mmsNum: number = 0;
@State cameraNum: number = 0;
@State contactsNum: number = 0;
async aboutToAppear(){
await FirstDialog.ChooseDialog(this.StepTips,this.name);
this.Vue = false;
}
@Builder specificNoParam() {
Column() {
Flex({direction:FlexDirection.Column,alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceBetween }) {
Column(){
Row(){
Text(`根据以下操作步骤完成测试`+ '\n' + '\n' )
.fontColor(Color.White).fontSize('24fp')
}
Row(){
Text(`测试步骤:`+ '\n' + '\n' + `1.点击开始键进入系统桌面`+ '\n' + '\n' + `2.开启应用回退到桌面,保证此时后台应用存在`+ '\n' + '\n'
+ `3.双击执行.bat选择热启动测试输入待测应用编号`+ '\n' + '\n' +`4.依次测试完所有应用热启动返回validator界面`
+ '\n' + '\n' + '5.点击停止键观察测试结果' + '\n' + '\n' + `5.若所有热启动测试均在规定时延内完成则通过测试`
+ '\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) => {
})
})
}
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( this.contactsNum < 1000 ) {
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')
}
}
}
}.width('100%').height('80%').backgroundColor(Color.Black)
.justifyContent(FlexAlign.SpaceEvenly)
}
build() {
Column() {
CustomContainer({
title: this.name,
Url:'pages/Experience/Experience_index',
StepTips:this.StepTips,
content: this.specificNoParam,
name:$name,
Vue: $Vue,
StartEnable: $StartEnable,
num: $num,
setNum: $setNum,
photosNum: $photosNum,
mmsNum: $mmsNum,
cameraNum: $cameraNum,
contactsNum: $contactsNum,
})
}.width('100%').height('100%').backgroundColor(Color.Black)
}
onBackPress(){
router.replaceUrl({
url:'pages/Experience/Experience_index',
})
}
}
...@@ -17,6 +17,7 @@ import fileio from '@ohos.fileio'; ...@@ -17,6 +17,7 @@ import fileio from '@ohos.fileio';
import {CustomContainer} from '../common/ExperienceCustomContainer'; import {CustomContainer} from '../common/ExperienceCustomContainer';
import FirstDialog from '../model/FirstDialog'; import FirstDialog from '../model/FirstDialog';
import context from '@ohos.app.ability.common'; import context from '@ohos.app.ability.common';
import router from '@ohos.router';
let abilityContext = getContext(this) as context.UIAbilityContext; let abilityContext = getContext(this) as context.UIAbilityContext;
let path = globalThis.dir; let path = globalThis.dir;
...@@ -132,4 +133,9 @@ struct CustomContainerUser { ...@@ -132,4 +133,9 @@ struct CustomContainerUser {
}) })
}.width('100%').height('100%').backgroundColor(Color.Black) }.width('100%').height('100%').backgroundColor(Color.Black)
} }
onBackPress(){
router.replaceUrl({
url:'pages/Experience/Experience_index',
})
}
} }
...@@ -41,8 +41,15 @@ struct IndexPage { ...@@ -41,8 +41,15 @@ struct IndexPage {
private TestCaseList = [ private TestCaseList = [
{title:'DeskFps',uri:'pages/Experience/DeskFps'}, {title:'DeskFps',uri:'pages/Experience/DeskFps'},
{title:'PhotoFps',uri:'pages/Experience/PhotoFps'}, {title:'PhotoFps',uri:'pages/Experience/PhotoFps'},
{title:'ColdStart',uri:'pages/Experience/ColdStartTest'}, {title:'CameraColdStart',uri:'pages/Experience/CameraColdStartTest'},
{title:'HotStart',uri:'pages/Experience/HotStartTest'}, {title:'SettingsColdStart',uri:'pages/Experience/SettingsColdStartTest'},
{title:'PhotosColdStart',uri:'pages/Experience/PhotosColdStartTest'},
{title:'MmsColdStart',uri:'pages/Experience/MmsColdStartTest'},
{title:'ContactsColdStart',uri:'pages/Experience/ContactsColdStartTest'},
{title:'SettingsHotStart',uri:'pages/Experience/SettingsHotStartTest'},
{title:'PhotosHotStart',uri:'pages/Experience/PhotosHotStartTest'},
{title:'MmsHotStart',uri:'pages/Experience/MmsHotStartTest'},
{title:'ContactsHotStart',uri:'pages/Experience/ContactsHotStartTest'},
{title:'ViewPhoto',uri:'pages/Experience/ViewPhotoTest'}, {title:'ViewPhoto',uri:'pages/Experience/ViewPhotoTest'},
{title:'KeyboardDisplay',uri:'pages/Experience/KeyboardDisplayTest'}, {title:'KeyboardDisplay',uri:'pages/Experience/KeyboardDisplayTest'},
{title:'StartTaskManager',uri:'pages/Experience/StartTaskManager'}, {title:'StartTaskManager',uri:'pages/Experience/StartTaskManager'},
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
import fileio from '@ohos.fileio'; import fileio from '@ohos.fileio';
import {CustomContainer} from '../common/TimeExperienceCustomContainer'; import {CustomContainer} from '../common/TimeExperienceCustomContainer';
import FirstDialog from '../model/FirstDialog'; import FirstDialog from '../model/FirstDialog';
import router from '@ohos.router';
let path = globalThis.dir; let path = globalThis.dir;
let Xpath = path + '/CompleteTimeKeyboard.log'; let Xpath = path + '/CompleteTimeKeyboard.log';
...@@ -117,4 +118,9 @@ struct CustomContainerUser { ...@@ -117,4 +118,9 @@ struct CustomContainerUser {
}) })
}.width('100%').height('100%').backgroundColor(Color.Black) }.width('100%').height('100%').backgroundColor(Color.Black)
} }
onBackPress(){
router.replaceUrl({
url:'pages/Experience/Experience_index',
})
}
} }
\ No newline at end of file
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
import fileio from '@ohos.fileio'; import fileio from '@ohos.fileio';
import {CustomContainer} from '../common/TimeExperienceCustomContainer'; import {CustomContainer} from '../common/TimeExperienceCustomContainer';
import FirstDialog from '../model/FirstDialog'; import FirstDialog from '../model/FirstDialog';
import router from '@ohos.router';
let path = globalThis.dir; let path = globalThis.dir;
let Xpath = path + '/ResponseTimeKeyboard.log'; let Xpath = path + '/ResponseTimeKeyboard.log';
...@@ -117,4 +118,9 @@ struct CustomContainerUser { ...@@ -117,4 +118,9 @@ struct CustomContainerUser {
}) })
}.width('100%').height('100%').backgroundColor(Color.Black) }.width('100%').height('100%').backgroundColor(Color.Black)
} }
onBackPress(){
router.replaceUrl({
url:'pages/Experience/Experience_index',
})
}
} }
\ No newline at end of file
/*
* Copyright (c) 2022-2023 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import router from '@ohos.router';
import fileio from '@ohos.fileio';
import {CustomContainer} from '../common/StartExperienceCustomContainer';
import FirstDialog from '../model/FirstDialog';
import context from '@ohos.app.ability.common';
let abilityContext = getContext(this) as context.UIAbilityContext;
let path = globalThis.dir;
let MmsColdPath = path + '/ColdStartMms.log';
@Entry
@Component
struct CustomContainerUser {
@State name: string = 'MmsColdStart';
@State StepTips: string = '操作步骤:根据操作提示运行脚本文件,启动应用'+'\n'+'预期结果:所有应用冷启动时延低于2000ms则测试通过';
@State Vue: boolean = false;
@State StartEnable: boolean = true;
@State num: number = 0;
@State setNum: number = 0;
@State photosNum: number = 0;
@State mmsNum: number = 0;
@State cameraNum: number = 0;
@State contactsNum: number = 0;
async aboutToAppear(){
await FirstDialog.ChooseDialog(this.StepTips,this.name);
this.Vue = false;
}
@Builder specificNoParam() {
Column() {
Flex({direction:FlexDirection.Column,alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceBetween }) {
Column(){
Row(){
Text(`根据以下操作步骤完成测试`+ '\n' + '\n' )
.fontColor(Color.White).fontSize('24fp')
}
Row(){
Text(`测试步骤:`+ '\n' + '\n' + `1.点击开始键进入系统桌面`+ '\n' + '\n' + `2.清空后台应用`+ '\n' + '\n'
+ `3.双击执行.bat选择冷启动测试输入待测应用编号`+ '\n' + '\n' +`4.依次测试完所有应用冷启动返回validator界面`
+ '\n' + '\n' + '5.点击停止键观察测试结果' + '\n' + '\n' + `6.若所有冷启动测试均在规定时延内完成则通过测试`
+ '\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) => {
})
})
}
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( this.mmsNum < 2000 ) {
this.num++
}
if( this.num === 1 ) {
this.Vue = true;
}
})
}
}
Row(){
Text('\n' + '\n' + `测试结果:` + '\n' + '\n' + '信息冷启动时延' + this.mmsNum + 'ms' + '\n' + '通过冷启动测试项' + this.num + '个')
.fontColor(Color.White).fontSize('24fp')
}
}
}
}.width('100%').height('80%').backgroundColor(Color.Black)
.justifyContent(FlexAlign.SpaceEvenly)
}
build() {
Column() {
CustomContainer({
title: this.name,
Url:'pages/Experience/Experience_index',
StepTips:this.StepTips,
content: this.specificNoParam,
name:$name,
Vue: $Vue,
StartEnable: $StartEnable,
num: $num,
setNum: $setNum,
photosNum: $photosNum,
mmsNum: $mmsNum,
cameraNum: $cameraNum,
contactsNum: $contactsNum,
})
}.width('100%').height('100%').backgroundColor(Color.Black)
}
onBackPress(){
router.replaceUrl({
url:'pages/Experience/Experience_index',
})
}
}
/*
* Copyright (c) 2022-2023 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import router from '@ohos.router';
import fileio from '@ohos.fileio';
import {CustomContainer} from '../common/StartExperienceCustomContainer';
import FirstDialog from '../model/FirstDialog';
import context from '@ohos.app.ability.common';
let abilityContext = getContext(this) as context.UIAbilityContext;
let path = globalThis.dir;
let MmsColdPath = path + '/HotStartMms.log';
@Entry
@Component
struct CustomContainerUser {
@State name: string = 'MmsHotStart';
@State StepTips: string = '操作步骤:根据操作提示运行脚本文件,启动应用'+'\n'+'预期结果:所有应用热启动时延低于1000ms则测试通过';
@State Vue: boolean = false;
@State StartEnable: boolean = true;
@State num: number = 0;
@State setNum: number = 0;
@State photosNum: number = 0;
@State mmsNum: number = 0;
@State cameraNum: number = 0;
@State contactsNum: number = 0;
async aboutToAppear(){
await FirstDialog.ChooseDialog(this.StepTips,this.name);
this.Vue = false;
}
@Builder specificNoParam() {
Column() {
Flex({direction:FlexDirection.Column,alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceBetween }) {
Column(){
Row(){
Text(`根据以下操作步骤完成测试`+ '\n' + '\n' )
.fontColor(Color.White).fontSize('24fp')
}
Row(){
Text(`测试步骤:`+ '\n' + '\n' + `1.点击开始键进入系统桌面`+ '\n' + '\n' + `2.开启应用回退到桌面,保证此时后台应用存在`+ '\n' + '\n'
+ `3.双击执行.bat选择热启动测试输入待测应用编号`+ '\n' + '\n' +`4.依次测试完所有应用热启动返回validator界面`
+ '\n' + '\n' + '5.点击停止键观察测试结果' + '\n' + '\n' + `5.若所有热启动测试均在规定时延内完成则通过测试`
+ '\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) => {
})
})
}
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( this.mmsNum < 1000 ) {
this.num++
}
if( this.num === 1 ) {
this.Vue = true;
}
})
}
}
Row(){
Text('\n' + '\n' + '\n' + '\n' + `测试结果:` + '\n' + '\n'+ '信息热启动时延' + this.mmsNum + 'ms'
+ '\n' + '通过热启动测试项' + this.num + '个' )
.fontColor(Color.White).fontSize('24fp')
}
}
}
}.width('100%').height('80%').backgroundColor(Color.Black)
.justifyContent(FlexAlign.SpaceEvenly)
}
build() {
Column() {
CustomContainer({
title: this.name,
Url:'pages/Experience/Experience_index',
StepTips:this.StepTips,
content: this.specificNoParam,
name:$name,
Vue: $Vue,
StartEnable: $StartEnable,
num: $num,
setNum: $setNum,
photosNum: $photosNum,
mmsNum: $mmsNum,
cameraNum: $cameraNum,
contactsNum: $contactsNum,
})
}.width('100%').height('100%').backgroundColor(Color.Black)
}
onBackPress(){
router.replaceUrl({
url:'pages/Experience/Experience_index',
})
}
}
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import router from '@ohos.router';
import fileio from '@ohos.fileio'; import fileio from '@ohos.fileio';
import {CustomContainer} from '../common/ExperienceCustomContainer'; import {CustomContainer} from '../common/ExperienceCustomContainer';
import FirstDialog from '../model/FirstDialog'; import FirstDialog from '../model/FirstDialog';
...@@ -133,4 +134,9 @@ struct CustomContainerUser { ...@@ -133,4 +134,9 @@ struct CustomContainerUser {
}) })
}.width('100%').height('100%').backgroundColor(Color.Black) }.width('100%').height('100%').backgroundColor(Color.Black)
} }
onBackPress(){
router.replaceUrl({
url:'pages/Experience/Experience_index',
})
}
} }
\ No newline at end of file
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import router from '@ohos.router';
import fileio from '@ohos.fileio'; import fileio from '@ohos.fileio';
import {CustomContainer} from '../common/StartExperienceCustomContainer'; import {CustomContainer} from '../common/StartExperienceCustomContainer';
import FirstDialog from '../model/FirstDialog'; import FirstDialog from '../model/FirstDialog';
...@@ -19,15 +20,11 @@ import context from '@ohos.app.ability.common'; ...@@ -19,15 +20,11 @@ import context from '@ohos.app.ability.common';
let abilityContext = getContext(this) as context.UIAbilityContext; let abilityContext = getContext(this) as context.UIAbilityContext;
let path = globalThis.dir; let path = globalThis.dir;
let SettingsColdPath = path + '/ColdStartSetting.log';
let PhotosColdPath = path + '/ColdStartPhotos.log'; let PhotosColdPath = path + '/ColdStartPhotos.log';
let MmsColdPath = path + '/ColdStartMms.log';
let CameraColdPath = path + '/ColdStartCamera.log';
let ContactsColdPath = path + '/ColdStartContacts.log';
@Entry @Entry
@Component @Component
struct CustomContainerUser { struct CustomContainerUser {
@State name: string = 'ColdStart'; @State name: string = 'PhotosColdStart';
@State StepTips: string = '操作步骤:根据操作提示运行脚本文件,启动应用'+'\n'+'预期结果:所有应用冷启动时延低于2000ms则测试通过'; @State StepTips: string = '操作步骤:根据操作提示运行脚本文件,启动应用'+'\n'+'预期结果:所有应用冷启动时延低于2000ms则测试通过';
@State Vue: boolean = false; @State Vue: boolean = false;
@State StartEnable: boolean = true; @State StartEnable: boolean = true;
...@@ -88,19 +85,6 @@ struct CustomContainerUser { ...@@ -88,19 +85,6 @@ struct CustomContainerUser {
.opacity(!this.StartEnable? 1 : 0.4) .opacity(!this.StartEnable? 1 : 0.4)
.onClick(() => { .onClick(() => {
this.StartEnable = !this.StartEnable 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( this.setNum < 2000 ) {
this.num++
}
/* /*
photos photos
*/ */
...@@ -114,55 +98,15 @@ struct CustomContainerUser { ...@@ -114,55 +98,15 @@ struct CustomContainerUser {
if( this.photosNum < 2000 ) { if( this.photosNum < 2000 ) {
this.num++ this.num++
} }
/* if( this.num === 1 ) {
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( this.mmsNum < 2000 ) {
this.num++
}
/*
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(':');
let CameraTime = CameraReport.substring(CameraHead+1);
this.cameraNum = parseFloat(CameraTime);
if( this.cameraNum < 2000 ) {
this.num++
}
/*
mms
*/
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( this.contactsNum < 2000 ) {
this.num++
}
if( this.num === 5 ) {
this.Vue = true; this.Vue = true;
} }
}) })
} }
} }
Row(){ Row(){
Text('\n' + '\n' + `测试结果:` + '\n' + '设置冷启动时延' + this.setNum + 'ms' + '\n' + '图库冷启动时延' + this.photosNum Text('\n' + '\n' + `测试结果:` + '\n' + '\n' + '图库冷启动时延' + this.photosNum + 'ms'
+ 'ms' + '\n'+ '信息冷启动时延' + this.mmsNum + 'ms' + '\n' + '相机冷启动时延' + this.cameraNum + 'ms' + '\n' + '\n' + '通过冷启动测试项' + this.num + '个')
+ '联系人冷启动时延' + this.contactsNum + 'ms' + '\n' + '通过冷启动测试项' + this.num + '个')
.fontColor(Color.White).fontSize('24fp') .fontColor(Color.White).fontSize('24fp')
} }
} }
...@@ -190,4 +134,9 @@ struct CustomContainerUser { ...@@ -190,4 +134,9 @@ struct CustomContainerUser {
}) })
}.width('100%').height('100%').backgroundColor(Color.Black) }.width('100%').height('100%').backgroundColor(Color.Black)
} }
onBackPress(){
router.replaceUrl({
url:'pages/Experience/Experience_index',
})
}
} }
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import router from '@ohos.router';
import fileio from '@ohos.fileio'; import fileio from '@ohos.fileio';
import {CustomContainer} from '../common/StartExperienceCustomContainer'; import {CustomContainer} from '../common/StartExperienceCustomContainer';
import FirstDialog from '../model/FirstDialog'; import FirstDialog from '../model/FirstDialog';
...@@ -19,14 +20,11 @@ import context from '@ohos.app.ability.common'; ...@@ -19,14 +20,11 @@ import context from '@ohos.app.ability.common';
let abilityContext = getContext(this) as context.UIAbilityContext; let abilityContext = getContext(this) as context.UIAbilityContext;
let path = globalThis.dir; let path = globalThis.dir;
let SettingsColdPath = path + '/HotStartSetting.log';
let PhotosColdPath = path + '/HotStartPhotos.log'; let PhotosColdPath = path + '/HotStartPhotos.log';
let MmsColdPath = path + '/HotStartMms.log';
let ContactsColdPath = path + '/HotStartContacts.log';
@Entry @Entry
@Component @Component
struct CustomContainerUser { struct CustomContainerUser {
@State name: string = 'HotStart'; @State name: string = 'PhotosHotStart';
@State StepTips: string = '操作步骤:根据操作提示运行脚本文件,启动应用'+'\n'+'预期结果:所有应用热启动时延低于1000ms则测试通过'; @State StepTips: string = '操作步骤:根据操作提示运行脚本文件,启动应用'+'\n'+'预期结果:所有应用热启动时延低于1000ms则测试通过';
@State Vue: boolean = false; @State Vue: boolean = false;
@State StartEnable: boolean = true; @State StartEnable: boolean = true;
...@@ -87,19 +85,6 @@ struct CustomContainerUser { ...@@ -87,19 +85,6 @@ struct CustomContainerUser {
.opacity(!this.StartEnable? 1 : 0.4) .opacity(!this.StartEnable? 1 : 0.4)
.onClick(() => { .onClick(() => {
this.StartEnable = !this.StartEnable 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( this.setNum < 1000 ) {
this.num++
}
/* /*
photos photos
*/ */
...@@ -113,42 +98,15 @@ struct CustomContainerUser { ...@@ -113,42 +98,15 @@ struct CustomContainerUser {
if( this.photosNum < 1000 ) { if( this.photosNum < 1000 ) {
this.num++ this.num++
} }
/* if( this.num === 1 ) {
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( this.mmsNum < 1000 ) {
this.num++
}
/*
mms
*/
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( this.contactsNum < 1000 ) {
this.num++
}
if( this.num === 4 ) {
this.Vue = true; this.Vue = true;
} }
}) })
} }
} }
Row(){ Row(){
Text('\n' + '\n' + '\n' + '\n' + `测试结果:` + '\n' + '设置热启动时延' + this.setNum + 'ms' Text('\n' + '\n' + '\n' + '\n' + `测试结果:` + '\n' + '\n' + '图库热启动时延' + this.photosNum + 'ms'
+ '\n' + '图库热启动时延' + this.photosNum + 'ms' + '\n'+ '信息热启动时延' + this.mmsNum + 'ms' + '\n' + '\n' + '通过热启动测试项' + this.num + '个' )
+ '联系人热启动时延' + this.contactsNum + 'ms' + '\n' + '通过热启动测试项' + this.num + '个' )
.fontColor(Color.White).fontSize('24fp') .fontColor(Color.White).fontSize('24fp')
} }
} }
...@@ -176,4 +134,9 @@ struct CustomContainerUser { ...@@ -176,4 +134,9 @@ struct CustomContainerUser {
}) })
}.width('100%').height('100%').backgroundColor(Color.Black) }.width('100%').height('100%').backgroundColor(Color.Black)
} }
onBackPress(){
router.replaceUrl({
url:'pages/Experience/Experience_index',
})
}
} }
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import router from '@ohos.router';
import fileio from '@ohos.fileio'; import fileio from '@ohos.fileio';
import {CustomContainer} from '../common/TimeExperienceCustomContainer'; import {CustomContainer} from '../common/TimeExperienceCustomContainer';
import FirstDialog from '../model/FirstDialog'; import FirstDialog from '../model/FirstDialog';
...@@ -117,4 +118,9 @@ struct CustomContainerUser { ...@@ -117,4 +118,9 @@ struct CustomContainerUser {
}) })
}.width('100%').height('100%').backgroundColor(Color.Black) }.width('100%').height('100%').backgroundColor(Color.Black)
} }
onBackPress(){
router.replaceUrl({
url:'pages/Experience/Experience_index',
})
}
} }
\ No newline at end of file
/*
* Copyright (c) 2022-2023 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import router from '@ohos.router';
import fileio from '@ohos.fileio';
import {CustomContainer} from '../common/StartExperienceCustomContainer';
import FirstDialog from '../model/FirstDialog';
import context from '@ohos.app.ability.common';
let abilityContext = getContext(this) as context.UIAbilityContext;
let path = globalThis.dir;
let SettingsColdPath = path + '/ColdStartSetting.log';
@Entry
@Component
struct CustomContainerUser {
@State name: string = 'SettingsColdStart';
@State StepTips: string = '操作步骤:根据操作提示运行脚本文件,启动应用'+'\n'+'预期结果:所有应用冷启动时延低于2000ms则测试通过';
@State Vue: boolean = false;
@State StartEnable: boolean = true;
@State num: number = 0;
@State setNum: number = 0;
@State photosNum: number = 0;
@State mmsNum: number = 0;
@State cameraNum: number = 0;
@State contactsNum: number = 0;
async aboutToAppear(){
await FirstDialog.ChooseDialog(this.StepTips,this.name);
this.Vue = false;
}
@Builder specificNoParam() {
Column() {
Flex({direction:FlexDirection.Column,alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceBetween }) {
Column(){
Row(){
Text(`根据以下操作步骤完成测试`+ '\n' + '\n' )
.fontColor(Color.White).fontSize('24fp')
}
Row(){
Text(`测试步骤:`+ '\n' + '\n' + `1.点击开始键进入系统桌面`+ '\n' + '\n' + `2.清空后台应用`+ '\n' + '\n'
+ `3.双击执行.bat选择冷启动测试输入待测应用编号`+ '\n' + '\n' +`4.依次测试完所有应用冷启动返回validator界面`
+ '\n' + '\n' + '5.点击停止键观察测试结果' + '\n' + '\n' + `6.若所有冷启动测试均在规定时延内完成则通过测试`
+ '\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) => {
})
})
}
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( this.setNum < 2000 ) {
this.num++
}
if( this.num === 1 ) {
this.Vue = true;
}
})
}
}
Row(){
Text('\n' + '\n' + `测试结果:` + '\n' + '\n' + '设置冷启动时延' + this.setNum + 'ms'
+ '\n' + '通过冷启动测试项' + this.num + '个')
.fontColor(Color.White).fontSize('24fp')
}
}
}
}.width('100%').height('80%').backgroundColor(Color.Black)
.justifyContent(FlexAlign.SpaceEvenly)
}
build() {
Column() {
CustomContainer({
title: this.name,
Url:'pages/Experience/Experience_index',
StepTips:this.StepTips,
content: this.specificNoParam,
name:$name,
Vue: $Vue,
StartEnable: $StartEnable,
num: $num,
setNum: $setNum,
photosNum: $photosNum,
mmsNum: $mmsNum,
cameraNum: $cameraNum,
contactsNum: $contactsNum,
})
}.width('100%').height('100%').backgroundColor(Color.Black)
}
onBackPress(){
router.replaceUrl({
url:'pages/Experience/Experience_index',
})
}
}
/*
* Copyright (c) 2022-2023 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import router from '@ohos.router';
import fileio from '@ohos.fileio';
import {CustomContainer} from '../common/StartExperienceCustomContainer';
import FirstDialog from '../model/FirstDialog';
import context from '@ohos.app.ability.common';
let abilityContext = getContext(this) as context.UIAbilityContext;
let path = globalThis.dir;
let SettingsColdPath = path + '/HotStartSetting.log';
@Entry
@Component
struct CustomContainerUser {
@State name: string = 'SettingsHotStart';
@State StepTips: string = '操作步骤:根据操作提示运行脚本文件,启动应用'+'\n'+'预期结果:所有应用热启动时延低于1000ms则测试通过';
@State Vue: boolean = false;
@State StartEnable: boolean = true;
@State num: number = 0;
@State setNum: number = 0;
@State photosNum: number = 0;
@State mmsNum: number = 0;
@State cameraNum: number = 0;
@State contactsNum: number = 0;
async aboutToAppear(){
await FirstDialog.ChooseDialog(this.StepTips,this.name);
this.Vue = false;
}
@Builder specificNoParam() {
Column() {
Flex({direction:FlexDirection.Column,alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceBetween }) {
Column(){
Row(){
Text(`根据以下操作步骤完成测试`+ '\n' + '\n' )
.fontColor(Color.White).fontSize('24fp')
}
Row(){
Text(`测试步骤:`+ '\n' + '\n' + `1.点击开始键进入系统桌面`+ '\n' + '\n' + `2.开启应用回退到桌面,保证此时后台应用存在`+ '\n' + '\n'
+ `3.双击执行.bat选择热启动测试输入待测应用编号`+ '\n' + '\n' +`4.依次测试完所有应用热启动返回validator界面`
+ '\n' + '\n' + '5.点击停止键观察测试结果' + '\n' + '\n' + `5.若所有热启动测试均在规定时延内完成则通过测试`
+ '\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) => {
})
})
}
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( this.setNum < 1000 ) {
this.num++
}
if( this.num === 1 ) {
this.Vue = true;
}
})
}
}
Row(){
Text('\n' + '\n' + '\n' + '\n' + `测试结果:` + '\n' + '\n' + '设置热启动时延' + this.setNum + 'ms'
+ '\n' + '通过热启动测试项' + this.num + '个' )
.fontColor(Color.White).fontSize('24fp')
}
}
}
}.width('100%').height('80%').backgroundColor(Color.Black)
.justifyContent(FlexAlign.SpaceEvenly)
}
build() {
Column() {
CustomContainer({
title: this.name,
Url:'pages/Experience/Experience_index',
StepTips:this.StepTips,
content: this.specificNoParam,
name:$name,
Vue: $Vue,
StartEnable: $StartEnable,
num: $num,
setNum: $setNum,
photosNum: $photosNum,
mmsNum: $mmsNum,
cameraNum: $cameraNum,
contactsNum: $contactsNum,
})
}.width('100%').height('100%').backgroundColor(Color.Black)
}
onBackPress(){
router.replaceUrl({
url:'pages/Experience/Experience_index',
})
}
}
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import router from '@ohos.router';
import fileio from '@ohos.fileio'; import fileio from '@ohos.fileio';
import {CustomContainer} from '../common/TimeExperienceCustomContainer'; import {CustomContainer} from '../common/TimeExperienceCustomContainer';
import FirstDialog from '../model/FirstDialog'; import FirstDialog from '../model/FirstDialog';
...@@ -115,4 +116,9 @@ struct CustomContainerUser { ...@@ -115,4 +116,9 @@ struct CustomContainerUser {
}) })
}.width('100%').height('100%').backgroundColor(Color.Black) }.width('100%').height('100%').backgroundColor(Color.Black)
} }
onBackPress(){
router.replaceUrl({
url:'pages/Experience/Experience_index',
})
}
} }
\ No newline at end of file
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import router from '@ohos.router';
import fileio from '@ohos.fileio'; import fileio from '@ohos.fileio';
import {CustomContainer} from '../common/TimeExperienceCustomContainer'; import {CustomContainer} from '../common/TimeExperienceCustomContainer';
import FirstDialog from '../model/FirstDialog'; import FirstDialog from '../model/FirstDialog';
...@@ -115,4 +116,9 @@ struct CustomContainerUser { ...@@ -115,4 +116,9 @@ struct CustomContainerUser {
}) })
}.width('100%').height('100%').backgroundColor(Color.Black) }.width('100%').height('100%').backgroundColor(Color.Black)
} }
onBackPress(){
router.replaceUrl({
url:'pages/Experience/Experience_index',
})
}
} }
\ No newline at end of file
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import router from '@ohos.router';
import fileio from '@ohos.fileio'; import fileio from '@ohos.fileio';
import {CustomContainer} from '../common/TimeExperienceCustomContainer'; import {CustomContainer} from '../common/TimeExperienceCustomContainer';
import FirstDialog from '../model/FirstDialog'; import FirstDialog from '../model/FirstDialog';
...@@ -115,4 +116,9 @@ struct CustomContainerUser { ...@@ -115,4 +116,9 @@ struct CustomContainerUser {
}) })
}.width('100%').height('100%').backgroundColor(Color.Black) }.width('100%').height('100%').backgroundColor(Color.Black)
} }
onBackPress(){
router.replaceUrl({
url:'pages/Experience/Experience_index',
})
}
} }
\ No newline at end of file
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import router from '@ohos.router';
import fileio from '@ohos.fileio'; import fileio from '@ohos.fileio';
import {CustomContainer} from '../common/TimeExperienceCustomContainer'; import {CustomContainer} from '../common/TimeExperienceCustomContainer';
import FirstDialog from '../model/FirstDialog'; import FirstDialog from '../model/FirstDialog';
...@@ -117,4 +118,9 @@ struct CustomContainerUser { ...@@ -117,4 +118,9 @@ struct CustomContainerUser {
}) })
}.width('100%').height('100%').backgroundColor(Color.Black) }.width('100%').height('100%').backgroundColor(Color.Black)
} }
onBackPress(){
router.replaceUrl({
url:'pages/Experience/Experience_index',
})
}
} }
\ No newline at end of file
...@@ -76,4 +76,9 @@ struct playAudio { ...@@ -76,4 +76,9 @@ struct playAudio {
}).height('10%').width('100%') }).height('10%').width('100%')
}.width('100%').height('100%').backgroundColor(Color.Black) }.width('100%').height('100%').backgroundColor(Color.Black)
} }
onBackPress(){
router.replaceUrl({
url:'pages/Player/Player_index',
})
}
} }
\ No newline at end of file
...@@ -77,4 +77,9 @@ struct playVideo { ...@@ -77,4 +77,9 @@ struct playVideo {
}).height('10%').width('100%') }).height('10%').width('100%')
}.width('100%').height('100%').backgroundColor(Color.Black) }.width('100%').height('100%').backgroundColor(Color.Black)
} }
onBackPress(){
router.replaceUrl({
url:'pages/Player/Player_index',
})
}
} }
\ No newline at end of file
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
import prompt from '@ohos.prompt'; import prompt from '@ohos.prompt';
import fileio from '@ohos.fileio'; import fileio from '@ohos.fileio';
import router from '@ohos.router'; import router from '@ohos.router';
// @ts-ignore
import screenshot from '@ohos.screenshot'; import screenshot from '@ohos.screenshot';
import image from '@ohos.multimedia.image'; import image from '@ohos.multimedia.image';
import Logger from '../model/Logger'; import Logger from '../model/Logger';
...@@ -107,7 +106,7 @@ export struct CustomContainer { ...@@ -107,7 +106,7 @@ export struct CustomContainer {
}; };
let name = this.name; let name = this.name;
let displayName = `${info.prefix}${name}${info.suffix}`; let displayName = `${info.prefix}${name}${info.suffix}`;
let dirPath = path + '/' + displayName; let dirPath = path + '/screenshot' + '/' + displayName;
let imagePackerApi = image.createImagePacker(); let imagePackerApi = image.createImagePacker();
let arrayBuffer = await imagePackerApi.packing(data, packOpts); let arrayBuffer = await imagePackerApi.packing(data, packOpts);
let fd = fileio.openSync(dirPath,0o102,0o666); let fd = fileio.openSync(dirPath,0o102,0o666);
......
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
import fileio from '@ohos.fileio'; import fileio from '@ohos.fileio';
import prompt from '@ohos.prompt'; import prompt from '@ohos.prompt';
import router from '@ohos.router'; import router from '@ohos.router';
// @ts-ignore
import screenshot from '@ohos.screenshot'; import screenshot from '@ohos.screenshot';
import image from '@ohos.multimedia.image'; import image from '@ohos.multimedia.image';
import Logger from '../model/Logger'; import Logger from '../model/Logger';
...@@ -123,7 +122,7 @@ export struct CustomContainer { ...@@ -123,7 +122,7 @@ export struct CustomContainer {
}; };
let name = this.name; let name = this.name;
let displayName = `${info.prefix}${name}${info.suffix}`; let displayName = `${info.prefix}${name}${info.suffix}`;
let dirPath = path + '/' + displayName; let dirPath = path + '/screenshot' +'/' + displayName;
let imagePackerApi = image.createImagePacker(); let imagePackerApi = image.createImagePacker();
let arrayBuffer = await imagePackerApi.packing(data, packOpts); let arrayBuffer = await imagePackerApi.packing(data, packOpts);
let fd = fileio.openSync(dirPath, 0o102, 0o666); let fd = fileio.openSync(dirPath, 0o102, 0o666);
......
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
import fileio from '@ohos.fileio'; import fileio from '@ohos.fileio';
import prompt from '@ohos.prompt'; import prompt from '@ohos.prompt';
import router from '@ohos.router'; import router from '@ohos.router';
// @ts-ignore
import screenshot from '@ohos.screenshot'; import screenshot from '@ohos.screenshot';
import image from '@ohos.multimedia.image'; import image from '@ohos.multimedia.image';
import Logger from '../model/Logger'; import Logger from '../model/Logger';
...@@ -121,7 +120,7 @@ export struct CustomContainer { ...@@ -121,7 +120,7 @@ export struct CustomContainer {
}; };
let name = this.name; let name = this.name;
let displayName = `${info.prefix}${name}${info.suffix}`; let displayName = `${info.prefix}${name}${info.suffix}`;
let dirPath = path + '/' + displayName; let dirPath = path + '/screenshot' + '/' + displayName;
let imagePackerApi = image.createImagePacker(); let imagePackerApi = image.createImagePacker();
let arrayBuffer = await imagePackerApi.packing(data, packOpts); let arrayBuffer = await imagePackerApi.packing(data, packOpts);
let fd = fileio.openSync(dirPath,0o102,0o666); let fd = fileio.openSync(dirPath,0o102,0o666);
......
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
import fileio from '@ohos.fileio'; import fileio from '@ohos.fileio';
import prompt from '@ohos.prompt'; import prompt from '@ohos.prompt';
import router from '@ohos.router'; import router from '@ohos.router';
// @ts-ignore
import screenshot from '@ohos.screenshot'; import screenshot from '@ohos.screenshot';
import image from '@ohos.multimedia.image'; import image from '@ohos.multimedia.image';
import Logger from '../model/Logger'; import Logger from '../model/Logger';
...@@ -113,7 +112,7 @@ export struct CustomContainer { ...@@ -113,7 +112,7 @@ export struct CustomContainer {
}; };
let name = this.name; let name = this.name;
let displayName = `${info.prefix}${name}${info.suffix}`; let displayName = `${info.prefix}${name}${info.suffix}`;
let dirPath = path + '/' + displayName; let dirPath = path + '/screenshot' + '/' + displayName;
let imagePackerApi = image.createImagePacker(); let imagePackerApi = image.createImagePacker();
let arrayBuffer = await imagePackerApi.packing(data, packOpts); let arrayBuffer = await imagePackerApi.packing(data, packOpts);
let fd = fileio.openSync(dirPath,0o102,0o666); let fd = fileio.openSync(dirPath,0o102,0o666);
......
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
import fileio from '@ohos.fileio'; import fileio from '@ohos.fileio';
import prompt from '@ohos.prompt'; import prompt from '@ohos.prompt';
import router from '@ohos.router'; import router from '@ohos.router';
// @ts-ignore
import screenshot from '@ohos.screenshot'; import screenshot from '@ohos.screenshot';
import image from '@ohos.multimedia.image'; import image from '@ohos.multimedia.image';
import Logger from '../model/Logger'; import Logger from '../model/Logger';
...@@ -113,7 +112,7 @@ export struct CustomContainer { ...@@ -113,7 +112,7 @@ export struct CustomContainer {
}; };
let name = this.name; let name = this.name;
let displayName = `${info.prefix}${name}${info.suffix}`; let displayName = `${info.prefix}${name}${info.suffix}`;
let dirPath = path + '/' + displayName; let dirPath = path + '/screenshot' + '/' + displayName;
let imagePackerApi = image.createImagePacker(); let imagePackerApi = image.createImagePacker();
let arrayBuffer = await imagePackerApi.packing(data, packOpts); let arrayBuffer = await imagePackerApi.packing(data, packOpts);
let fd = fileio.openSync(dirPath,0o102,0o666); let fd = fileio.openSync(dirPath,0o102,0o666);
......
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
import fileio from '@ohos.fileio'; import fileio from '@ohos.fileio';
import prompt from '@ohos.prompt'; import prompt from '@ohos.prompt';
import router from '@ohos.router'; import router from '@ohos.router';
// @ts-ignore
import screenshot from '@ohos.screenshot'; import screenshot from '@ohos.screenshot';
import image from '@ohos.multimedia.image'; import image from '@ohos.multimedia.image';
import Logger from '../model/Logger'; import Logger from '../model/Logger';
...@@ -113,7 +112,7 @@ export struct CustomContainer { ...@@ -113,7 +112,7 @@ export struct CustomContainer {
}; };
let name = this.name; let name = this.name;
let displayName = `${info.prefix}${name}${info.suffix}`; let displayName = `${info.prefix}${name}${info.suffix}`;
let dirPath = path + '/' + displayName; let dirPath = path + '/screenshot' + '/' + displayName;
let imagePackerApi = image.createImagePacker(); let imagePackerApi = image.createImagePacker();
let arrayBuffer = await imagePackerApi.packing(data, packOpts); let arrayBuffer = await imagePackerApi.packing(data, packOpts);
let fd = fileio.openSync(dirPath,0o102,0o666); let fd = fileio.openSync(dirPath,0o102,0o666);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册