Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
357fdc6f
X
Xts Acts
项目概览
OpenHarmony
/
Xts Acts
大约 1 年 前同步成功
通知
9
Star
22
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
X
Xts Acts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
357fdc6f
编写于
3月 03, 2022
作者:
O
openharmony_ci
提交者:
Gitee
3月 03, 2022
浏览文件
操作
浏览文件
下载
差异文件
!2173 Add camera xts_acts testcode
Merge pull request !2173 from veereshkadasani/camera_acts
上级
11080a63
0877af34
变更
12
展开全部
隐藏空白更改
内联
并排
Showing
12 changed file
with
12038 addition
and
0 deletion
+12038
-0
multimedia/camera/camera_js_standard/BUILD.gn
multimedia/camera/camera_js_standard/BUILD.gn
+35
-0
multimedia/camera/camera_js_standard/Test.json
multimedia/camera/camera_js_standard/Test.json
+29
-0
multimedia/camera/camera_js_standard/signature/openharmony_sx.p7b
...ia/camera/camera_js_standard/signature/openharmony_sx.p7b
+0
-0
multimedia/camera/camera_js_standard/src/main/config.json
multimedia/camera/camera_js_standard/src/main/config.json
+92
-0
multimedia/camera/camera_js_standard/src/main/ets/default/app.ets
...ia/camera/camera_js_standard/src/main/ets/default/app.ets
+23
-0
multimedia/camera/camera_js_standard/src/main/ets/default/pages/index.ets
...a/camera_js_standard/src/main/ets/default/pages/index.ets
+119
-0
multimedia/camera/camera_js_standard/src/main/ets/default/test/Camera.test.ets
...era_js_standard/src/main/ets/default/test/Camera.test.ets
+29
-0
multimedia/camera/camera_js_standard/src/main/ets/default/test/CameraJSUnitCameraFormat.test.ets
...c/main/ets/default/test/CameraJSUnitCameraFormat.test.ets
+4845
-0
multimedia/camera/camera_js_standard/src/main/ets/default/test/CameraJSUnitPhotoAsync.test.ets
...src/main/ets/default/test/CameraJSUnitPhotoAsync.test.ets
+1859
-0
multimedia/camera/camera_js_standard/src/main/ets/default/test/CameraJSUnitPhotoPromise.test.ets
...c/main/ets/default/test/CameraJSUnitPhotoPromise.test.ets
+1653
-0
multimedia/camera/camera_js_standard/src/main/ets/default/test/CameraJSUnitVideoAsync.test.ets
...src/main/ets/default/test/CameraJSUnitVideoAsync.test.ets
+1796
-0
multimedia/camera/camera_js_standard/src/main/ets/default/test/CameraJSUnitVideoPromise.test.ets
...c/main/ets/default/test/CameraJSUnitVideoPromise.test.ets
+1558
-0
未找到文件。
multimedia/camera/camera_js_standard/BUILD.gn
0 → 100644
浏览文件 @
357fdc6f
# Copyright (C) 2021 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("//test/xts/tools/build/suite.gni")
ohos_js_hap_suite("camera_standard_ets_hap") {
hap_profile = "./src/main/config.json"
deps = []
# shared_libraries = [
# "//third_party/giflib:libgif",
# "//third_party/libpng:libpng",
# ]
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "CameraStandardETSTest"
# part_name = "prebuilt_hap"
# subsystem_name = "xts"
}
ohos_js_assets("camera_standard_ets_assets") {
source_dir = "./src/main/ets/default"
}
ohos_resources("camera_standard_ets_resources") {
sources = [ "./src/main/resources" ]
hap_profile = "./src/main/config.json"
}
multimedia/camera/camera_js_standard/Test.json
0 → 100644
浏览文件 @
357fdc6f
{
"description"
:
"Configuration for camerastandard Tests"
,
"driver"
:
{
"type"
:
"JSUnitTest"
,
"test-timeout"
:
"1000000"
,
"package"
:
"com.example.cameramoduletestetsv2"
,
"shell-timeout"
:
"60000"
},
"kits"
:
[
{
"type"
:
"ShellKit"
,
"run-command"
:
[
"touch /data/media/01.mp4"
,
"chmod -R 777 /data/media"
,
"setenforce 0"
],
"teardown-command"
:[
"setenforce 1"
]
},
{
"test-file-name"
:
[
"CameraStandardETSTest.hap"
],
"type"
:
"AppInstallKit"
,
"cleanup-apps"
:
true
}
]
}
\ No newline at end of file
multimedia/camera/camera_js_standard/signature/openharmony_sx.p7b
0 → 100644
浏览文件 @
357fdc6f
文件已添加
multimedia/camera/camera_js_standard/src/main/config.json
0 → 100644
浏览文件 @
357fdc6f
{
"app"
:
{
"bundleName"
:
"com.example.cameramoduletestetsv2"
,
"vendor"
:
"example"
,
"version"
:
{
"code"
:
1000000
,
"name"
:
"1.0.0"
}
},
"deviceConfig"
:
{},
"module"
:
{
"package"
:
"com.example.cameramoduletestetsv2"
,
"name"
:
".MyApplication"
,
"mainAbility"
:
"com.example.cameramoduletestetsv2.MainAbility"
,
"deviceType"
:
[
"phone"
],
"distro"
:
{
"deliveryWithInstall"
:
true
,
"moduleName"
:
"entry"
,
"moduleType"
:
"entry"
,
"installationFree"
:
false
},
"abilities"
:
[
{
"skills"
:
[
{
"entities"
:
[
"entity.system.home"
],
"actions"
:
[
"action.system.home"
]
}
],
"visible"
:
true
,
"name"
:
"com.example.cameramoduletestetsv2.MainAbility"
,
"icon"
:
"$media:icon"
,
"description"
:
"$string:mainability_description"
,
"label"
:
"$string:entry_MainAbility"
,
"type"
:
"page"
,
"launchType"
:
"standard"
}
],
"js"
:
[
{
"mode"
:
{
"syntax"
:
"ets"
,
"type"
:
"pageAbility"
},
"pages"
:
[
"pages/index"
],
"name"
:
"default"
,
"window"
:
{
"designWidth"
:
720
,
"autoDesignWidth"
:
false
}
}
],
"reqPermissions"
:
[
{
"name"
:
"ohos.permission.GRANT_SENSITIVE_PERMISSIONS"
,
"reason"
:
"use ohos.permission.GRANT_SENSITIVE_PERMISSIONS"
},
{
"name"
:
"ohos.permission.REVOKE_SENSITIVE_PERMISSIONS"
,
"reason"
:
"use ohos.permission.REVOKE_SENSITIVE_PERMISSIONS"
},
{
"name"
:
"ohos.permission.CAMERA"
,
"reason"
:
"use ohos.permission.CAMERA"
},
{
"name"
:
"ohos.permission.MICROPHONE"
,
"reason"
:
"use ohos.permission.MICROPHONE"
},
{
"name"
:
"ohos.permission.MEDIA_LOCATION"
,
"reason"
:
"use ohos.permission.MEDIA_LOCATION"
},
{
"name"
:
"ohos.permission.READ_MEDIA"
,
"reason"
:
"use ohos.permission.READ_MEDIA"
},
{
"name"
:
"ohos.permission.WRITE_MEDIA"
,
"reason"
:
"use ohos.permission.WRITE_MEDIA"
}
]
}
}
\ No newline at end of file
multimedia/camera/camera_js_standard/src/main/ets/default/app.ets
0 → 100644
浏览文件 @
357fdc6f
/*
* Copyright (C) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export default {
onCreate() {
console.info('Application onCreate')
},
onDestroy() {
console.info('Application onDestroy')
},
}
multimedia/camera/camera_js_standard/src/main/ets/default/pages/index.ets
0 → 100644
浏览文件 @
357fdc6f
/*
* Copyright (C) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import {Core, ExpectExtend} from "deccjsunit/index"
//import {Core, ExpectExtend, InstrumentLog, ReportExtend} from "deccjsunit/index"
import cameraKit from "../test/Camera.test"
import featureAbility from "@ohos.ability.featureAbility"
//import {PreviewArea} from '../view/PreviewArea.ets'
let TAG = 'CameraModuleTest: '
var mXComponentController: XComponentController = new XComponentController()
var surfaceId: any
@Entry
@Component
struct CameraIndex {
@State isShowSettings: boolean = false
@State previewSize: string = '75%'
aboutToAppear() {
console.info('--------------aboutToAppear--------------')
// featureAbility.getWant()
// .then((Want) => {
// const core = Core.getInstance()
//// const instrumentLog = new InstrumentLog({
//// 'id': 'report', 'unity': 'true'
//// })
//// console.info(TAG + 'Entering instrumentLog')
// const expectExtend = new ExpectExtend({
// 'id': 'extend'
// })
// console.info(TAG + 'Entering expectExtend')
// core.addService('expect', expectExtend)
//// core.addService('report', instrumentLog)
// console.info(TAG + 'Entering addService')
// core.init()
// console.info(TAG + 'Entering core.init()')
//// core.subscribeEvent('spec', instrumentLog)
//// core.subscribeEvent('suite', instrumentLog)
//// core.subscribeEvent('task', instrumentLog)
// console.info(TAG + 'Entering subscribeEvent')
// const configService = core.getDefaultService('config')
// configService.setConfig(Want.parameters)
// console.info(TAG + 'Entering configService')
// cameraKit(surfaceId)
//// console.info(TAG + 'Entering PreviewArea')
//// PreviewArea({
//// previewSize: $previewSize
//// })
// core.execute()
// console.info(TAG + 'Operation successful. Data: ' + JSON.stringify(Want));
// })
// .catch((error) => {
// console.error(TAG + 'Operation failed. Cause: ' + JSON.stringify(error));
// })
}
/*build() {
Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) {
Text('Hello World')
.fontSize(50)
.fontWeight(FontWeight.Bold)
}
.width('100%')
.height('100%')
}*/
build() {
Flex() {
XComponent({
id: '',
type: 'surface',
libraryname: '',
source: '',
controller: mXComponentController
})
.onLoad(() => {
console.info('CameraModuleTest: OnLoad() is called!')
surfaceId = mXComponentController.getXComponentSurfaceId()
console.info('CameraModuleTest: XComponent onLoad surfaceId: ' + surfaceId)
featureAbility.getWant()
.then((Want) => {
const core = Core.getInstance()
const expectExtend = new ExpectExtend({
'id': 'extend'
})
console.info(TAG + 'Entering expectExtend')
core.addService('expect', expectExtend)
console.info(TAG + 'Entering addService')
core.init()
console.info(TAG + 'Entering core.init()')
console.info(TAG + 'Entering subscribeEvent')
const configService = core.getDefaultService('config')
configService.setConfig(Want.parameters)
console.info(TAG + 'Entering configService')
cameraKit(surfaceId)
core.execute()
console.info(TAG + 'Operation successful. Data: ' + JSON.stringify(Want));
})
.catch((error) => {
console.error(TAG + 'Operation failed. Cause: ' + JSON.stringify(error));
})
})
.width('640px')
.height('480px')
}
}
}
\ No newline at end of file
multimedia/camera/camera_js_standard/src/main/ets/default/test/Camera.test.ets
0 → 100644
浏览文件 @
357fdc6f
/*
* Copyright (C) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import cameraTestCase from '../test/CameraJSUnitPhotoPromise.test'
import cameraTestCase from '../test/CameraJSUnitVideoPromise.test'
import cameraTestCase from '../test/CameraJSUnitCameraFormat.test'
import cameraTestCase from '../test/CameraJSUnitPhotoAsync.test'
import cameraTestCase from '../test/CameraJSUnitVideoAsync.test'
let TAG = 'CameraModuleTest: '
export default function cameraKit(surfaceId:any) {
console.info(TAG + 'Entering cameraKit')
console.info(TAG + 'surfaceId: ' +surfaceId)
cameraTestCase(surfaceId)
// cameraService()
}
\ No newline at end of file
multimedia/camera/camera_js_standard/src/main/ets/default/test/CameraJSUnitCameraFormat.test.ets
0 → 100644
浏览文件 @
357fdc6f
此差异已折叠。
点击以展开。
multimedia/camera/camera_js_standard/src/main/ets/default/test/CameraJSUnitPhotoAsync.test.ets
0 → 100644
浏览文件 @
357fdc6f
此差异已折叠。
点击以展开。
multimedia/camera/camera_js_standard/src/main/ets/default/test/CameraJSUnitPhotoPromise.test.ets
0 → 100644
浏览文件 @
357fdc6f
此差异已折叠。
点击以展开。
multimedia/camera/camera_js_standard/src/main/ets/default/test/CameraJSUnitVideoAsync.test.ets
0 → 100644
浏览文件 @
357fdc6f
此差异已折叠。
点击以展开。
multimedia/camera/camera_js_standard/src/main/ets/default/test/CameraJSUnitVideoPromise.test.ets
0 → 100644
浏览文件 @
357fdc6f
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录