Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
0e805406
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看板
未验证
提交
0e805406
编写于
7月 03, 2023
作者:
O
openharmony_ci
提交者:
Gitee
7月 03, 2023
浏览文件
操作
浏览文件
下载
差异文件
!8510 add exif testcase
Merge pull request !8510 from caochuan/exif
上级
5bfae602
9dc8abc9
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
77 addition
and
1 deletion
+77
-1
multimedia/image/image_js_standard/imageGetImageProperty/src/main/js/test/getPropertySecond.test.js
...tImageProperty/src/main/js/test/getPropertySecond.test.js
+77
-1
未找到文件。
multimedia/image/image_js_standard/imageGetImageProperty/src/main/js/test/getPropertySecond.test.js
浏览文件 @
0e805406
...
...
@@ -22,7 +22,7 @@ export default function imageGetImagePropertySecond() {
const
{
DATE_TIME
,
GPS_TIME_STAMP
,
GPS_DATE_STAMP
,
IMAGE_DESCRIPTION
,
MAKE
,
MODEL
,
SENSITIVITY_TYPE
,
RECOMMENDED_EXPOSURE_INDEX
,
ISO_SPEED
,
APERTURE_VALUE
,
EXPOSURE_BIAS_VALUE
,
METERING_MODE
,
LIGHT_SOURCE
,
FLASH
,
FOCAL_LENGTH
,
USER_COMMENT
,
PIXEL_X_DIMENSION
,
PIXEL_Y_DIMENSION
,
WHITE_BALANCE
,
FOCAL_LENGTH_IN_35_MM_FILM
}
=
image
.
PropertyKey
;
FOCAL_LENGTH_IN_35_MM_FILM
,
TAG_PHOTO_MODE
,
TAG_STANDARD_OUTPUT_SENSITIVITY
,
HW_MNOTE_TAG_CAPTURE_MODE
,
HW_MNOTE_TAG_PHYSICAL_APERTURE
}
=
image
.
PropertyKey
;
const
props
=
{
DateTime
:
"
2019:11:15 20:48:30
"
,
GPSTimeStamp
:
"
13:31:27.00
"
,
...
...
@@ -150,6 +150,26 @@ export default function imageGetImagePropertySecond() {
}
}
async
function
getImagePropertyErr
(
done
,
testNum
,
tag
)
{
await
getFd
(
"
test_hw.jpg
"
);
let
imageSourceApi
=
image
.
createImageSource
(
fdNumber
);
if
(
imageSourceApi
==
undefined
)
{
console
.
info
(
`
${
testNum
}
create image source failed`
);
expect
(
false
).
assertTrue
();
done
();
}
else
{
try
{
await
imageSourceApi
.
getImageProperty
(
tag
);
expect
(
false
).
assertTrue
();
done
();
}
catch
(
error
)
{
expect
(
error
.
code
==
1
).
assertTrue
();
console
.
log
(
`
${
testNum
}
error msg: `
+
error
);
done
();
}
}
}
/**
* @tc.number : SUB_GRAPHIC_IMAGE_GETIMAGEPROPERTY_PROMISE_0100
* @tc.name : getImageProperty(DATE_TIME)
...
...
@@ -971,5 +991,61 @@ export default function imageGetImagePropertySecond() {
it
(
"
SUB_GRAPHIC_IMAGE_GETIMAGEPROPERTY_CALLBACK2_2000
"
,
0
,
async
function
(
done
)
{
getImagePropertyCb2
(
done
,
"
SUB_GRAPHIC_IMAGE_GETIMAGEPROPERTY_CALLBACK2_2000
"
,
FOCAL_LENGTH_IN_35_MM_FILM
);
});
/**
* @tc.number : SUB_GRAPHIC_IMAGE_GETIMAGEPROPERTY_ERR_0100
* @tc.name : getImageProperty(TAG_PHOTO_MODE)
* @tc.desc : 1.create imagesource
* 2.set property
* 3.call getImageProperty(TAG_PHOTO_MODE)
* @tc.size : MEDIUM
* @tc.type : Functional
* @tc.level : Level 0
*/
it
(
"
SUB_GRAPHIC_IMAGE_GETIMAGEPROPERTY_ERR_0100
"
,
0
,
async
function
(
done
)
{
getImagePropertyErr
(
done
,
"
SUB_GRAPHIC_IMAGE_GETIMAGEPROPERTY_ERR_0100
"
,
TAG_PHOTO_MODE
);
});
/**
* @tc.number : SUB_GRAPHIC_IMAGE_GETIMAGEPROPERTY_ERR_0200
* @tc.name : getImageProperty(TAG_STANDARD_OUTPUT_SENSITIVITY)
* @tc.desc : 1.create imagesource
* 2.set property
* 3.call getImageProperty(TAG_STANDARD_OUTPUT_SENSITIVITY)
* @tc.size : MEDIUM
* @tc.type : Functional
* @tc.level : Level 0
*/
it
(
"
SUB_GRAPHIC_IMAGE_GETIMAGEPROPERTY_ERR_0200
"
,
0
,
async
function
(
done
)
{
getImagePropertyErr
(
done
,
"
SUB_GRAPHIC_IMAGE_GETIMAGEPROPERTY_ERR_0200
"
,
TAG_STANDARD_OUTPUT_SENSITIVITY
);
});
/**
* @tc.number : SUB_GRAPHIC_IMAGE_GETIMAGEPROPERTY_ERR_0300
* @tc.name : getImageProperty(HW_MNOTE_TAG_CAPTURE_MODE)
* @tc.desc : 1.create imagesource
* 2.set property
* 3.call getImageProperty(HW_MNOTE_TAG_CAPTURE_MODE)
* @tc.size : MEDIUM
* @tc.type : Functional
* @tc.level : Level 0
*/
it
(
"
SUB_GRAPHIC_IMAGE_GETIMAGEPROPERTY_ERR_0300
"
,
0
,
async
function
(
done
)
{
getImagePropertyErr
(
done
,
"
SUB_GRAPHIC_IMAGE_GETIMAGEPROPERTY_ERR_0300
"
,
HW_MNOTE_TAG_CAPTURE_MODE
);
});
/**
* @tc.number : SUB_GRAPHIC_IMAGE_GETIMAGEPROPERTY_ERR_0400
* @tc.name : getImageProperty(HW_MNOTE_TAG_PHYSICAL_APERTURE)
* @tc.desc : 1.create imagesource
* 2.set property
* 3.call getImageProperty(HW_MNOTE_TAG_PHYSICAL_APERTURE)
* @tc.size : MEDIUM
* @tc.type : Functional
* @tc.level : Level 0
*/
it
(
"
SUB_GRAPHIC_IMAGE_GETIMAGEPROPERTY_ERR_0400
"
,
0
,
async
function
(
done
)
{
getImagePropertyErr
(
done
,
"
SUB_GRAPHIC_IMAGE_GETIMAGEPROPERTY_ERR_0400
"
,
HW_MNOTE_TAG_PHYSICAL_APERTURE
);
});
});
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录