Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
35f83155
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看板
提交
35f83155
编写于
7月 06, 2022
作者:
F
fengzewu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix debug -> data=0
Signed-off-by:
N
fengzewu
<
fengzewu@huawei.com
>
上级
7f05ad41
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
149 addition
and
151 deletion
+149
-151
multimedia/image/image_js_standard/imageYUV/BUILD.gn
multimedia/image/image_js_standard/imageYUV/BUILD.gn
+5
-5
multimedia/image/image_js_standard/imageYUV/Test.json
multimedia/image/image_js_standard/imageYUV/Test.json
+1
-1
multimedia/image/image_js_standard/imageYUV/src/main/config.json
...dia/image/image_js_standard/imageYUV/src/main/config.json
+4
-4
multimedia/image/image_js_standard/imageYUV/src/main/js/test/yuv.test.js
...e/image_js_standard/imageYUV/src/main/js/test/yuv.test.js
+139
-141
未找到文件。
multimedia/image/image_js_standard/imageYUV/BUILD.gn
浏览文件 @
35f83155
...
...
@@ -16,16 +16,16 @@ import("//test/xts/tools/build/suite.gni")
ohos_js_hap_suite("image_yuv_js_hap") {
hap_profile = "./src/main/config.json"
deps = [
":image_js_assets",
":image_resources",
":image_
yuv_
js_assets",
":image_
yuv_
resources",
]
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsImageyuvJsTest"
}
ohos_js_assets("image_js_assets") {
ohos_js_assets("image_
yuv_
js_assets") {
source_dir = "./src/main/js/default"
}
ohos_resources("image_resources") {
ohos_resources("image_
yuv_
resources") {
sources = [ "./src/main/resources" ]
hap_profile = "./src/main/config.json"
}
multimedia/image/image_js_standard/imageYUV/Test.json
浏览文件 @
35f83155
...
...
@@ -3,7 +3,7 @@
"driver"
:
{
"type"
:
"JSUnitTest"
,
"test-timeout"
:
"1500000"
,
"package"
:
"ohos.acts.multimedia.image"
,
"package"
:
"ohos.acts.multimedia.image
.YUV
"
,
"shell-timeout"
:
"120000"
},
"kits"
:
[
...
...
multimedia/image/image_js_standard/imageYUV/src/main/config.json
浏览文件 @
35f83155
...
...
@@ -6,7 +6,7 @@
"target"
:
7
},
"vendor"
:
"acts"
,
"bundleName"
:
"ohos.acts.multimedia.image"
,
"bundleName"
:
"ohos.acts.multimedia.image
.YUV
"
,
"version"
:
{
"code"
:
1000000
,
"name"
:
"1.0.0"
...
...
@@ -35,7 +35,7 @@
"visible"
:
true
,
"labelId"
:
16777216
,
"icon"
:
"$media:icon"
,
"name"
:
"ohos.acts.multimedia.image.MainAbility"
,
"name"
:
"ohos.acts.multimedia.image.
YUV.
MainAbility"
,
"description"
:
"$string:mainability_description"
,
"label"
:
"$string:entry_MainAbility"
,
"type"
:
"page"
,
...
...
@@ -49,7 +49,7 @@
"tv"
,
"wearable"
],
"mainAbility"
:
"ohos.acts.multimedia.image.MainAbility"
,
"mainAbility"
:
"ohos.acts.multimedia.image.
YUV.
MainAbility"
,
"distro"
:
{
"moduleType"
:
"entry"
,
"installationFree"
:
false
,
...
...
@@ -86,7 +86,7 @@
"reason"
:
"use ohos.permission.WRITE_MEDIA"
}
],
"package"
:
"ohos.acts.multimedia.image"
,
"package"
:
"ohos.acts.multimedia.image
.YUV
"
,
"name"
:
".MyApplication"
,
"js"
:
[
{
...
...
multimedia/image/image_js_standard/imageYUV/src/main/js/test/yuv.test.js
浏览文件 @
35f83155
...
...
@@ -38,7 +38,7 @@ describe('Image', function () {
async
function
applyPermission
()
{
console
.
info
(
'
[permission]case applyPermission in
'
);
let
appInfo
=
await
bundle
.
getApplicationInfo
(
'
ohos.acts.multimedia.image
'
,
0
,
100
);
let
appInfo
=
await
bundle
.
getApplicationInfo
(
'
ohos.acts.multimedia.image
.YUV
'
,
0
,
100
);
let
atManager
=
abilityAccessCtrl
.
createAtManager
();
if
(
atManager
!=
null
)
{
let
tokenID
=
appInfo
.
accessTokenId
;
...
...
@@ -89,7 +89,7 @@ describe('Image', function () {
}
async
function
yuvToJpegByPixelMapPromise
(
done
,
testNum
,
sourceOptions
,
yuvData
)
{
try
{
try
{
let
imageSource
=
image
.
createImageSource
(
yuvData
,
sourceOptions
)
if
(
imageSource
==
undefined
)
{
console
.
info
(
`
${
testNum
}
create ImageSource failed`
);
...
...
@@ -97,19 +97,18 @@ describe('Image', function () {
done
();
}
else
{
imageSource
.
createPixelMap
()
.
then
((
data
)
=>
{
var
dataArr
=
new
Uint8Array
(
data
);
console
.
info
(
`
${
testNum
}
dataArr.length=`
+
dataArr
.
length
);
for
(
var
i
=
0
;
i
<
dataArr
.
length
;
i
++
)
{
var
str
=
`dataArr[`
+
i
+
`]=`
;
for
(
var
j
=
0
;
((
j
<
20
)
&&
(
i
<
dataArr
.
length
));
j
++
,
i
++
)
{
str
=
str
+
"
,
"
+
dataArr
[
i
];
}
console
.
info
(
`
${
testNum
}
`
+
str
);
i
--
;
}
expect
(
data
!=
undefined
).
assertTrue
();
.
then
((
pixelmap
)
=>
{
if
(
pixelmap
==
undefined
)
{
expect
(
false
).
assertTrue
();
done
();
}
else
{
pixelmap
.
getImageInfo
((
err
,
imageInfo
)
=>
{
expect
(
imageInfo
!=
undefined
).
assertTrue
();
expect
(
imageInfo
.
size
.
height
==
4
).
assertTrue
();
expect
(
imageInfo
.
size
.
width
==
6
).
assertTrue
();
done
();
})
}
}).
catch
(
error
=>
{
console
.
info
(
`
${
testNum
}
create Pixelmap failed`
);
console
.
log
(
`
${
testNum
}
error:`
+
error
);
...
...
@@ -124,8 +123,8 @@ describe('Image', function () {
}
}
async
function
yuvToJpegByPixelMapPromise
Fail
(
done
,
testNum
,
sourceOptions
,
yuvData
)
{
try
{
async
function
yuvToJpegByPixelMapPromise
_fail
(
done
,
testNum
,
sourceOptions
,
yuvData
)
{
try
{
let
imageSource
=
image
.
createImageSource
(
yuvData
,
sourceOptions
)
if
(
imageSource
==
undefined
)
{
console
.
info
(
`
${
testNum
}
create ImageSource failed`
);
...
...
@@ -133,7 +132,7 @@ describe('Image', function () {
done
();
}
else
{
imageSource
.
createPixelMap
()
.
then
((
data
)
=>
{
.
then
((
pixelmap
)
=>
{
console
.
info
(
`
${
testNum
}
create Pixelmap ok`
);
expect
(
false
).
assertTrue
();
done
();
...
...
@@ -153,28 +152,27 @@ describe('Image', function () {
async
function
yuvToJpegByPixelMapCallback
(
done
,
testNum
,
sourceOptions
,
yuvData
)
{
console
.
info
(
`
${
testNum
}
test`
);
try
{
try
{
let
imageSource
=
image
.
createImageSource
(
yuvData
,
sourceOptions
);
if
(
imageSource
==
undefined
)
{
console
.
info
(
`
${
testNum
}
create ImageSource failed`
);
expect
(
false
).
assertTrue
()
done
();
}
else
{
imageSource
.
createPixelMap
((
err
,
data
)
=>
{
var
dataArr
=
new
Uint8Array
(
data
);
console
.
info
(
`
${
testNum
}
dataArr.length=`
+
dataArr
.
length
);
for
(
var
i
=
0
;
i
<
dataArr
.
length
;
i
++
)
{
var
str
=
`dataArr[`
+
i
+
`]=`
;
for
(
var
j
=
0
;
((
j
<
20
)
&&
(
i
<
dataArr
.
length
));
j
++
,
i
++
)
{
str
=
str
+
"
,
"
+
dataArr
[
i
];
}
console
.
info
(
`
${
testNum
}
`
+
str
);
i
--
;
}
expect
(
data
!=
undefined
).
assertTrue
();
imageSource
.
createPixelMap
((
err
,
pixelmap
)
=>
{
if
(
pixelmap
==
undefined
)
{
expect
(
false
).
assertTrue
();
done
();
}
else
{
pixelmap
.
getImageInfo
((
err
,
imageInfo
)
=>
{
expect
(
imageInfo
!=
undefined
).
assertTrue
();
expect
(
imageInfo
.
size
.
height
==
4
).
assertTrue
();
expect
(
imageInfo
.
size
.
width
==
6
).
assertTrue
();
done
();
})
}
})
}
}
catch
(
error
)
{
logger
.
log
(
`
${
testNum
}
error:`
+
error
);
expect
(
false
).
assertTrue
();
...
...
@@ -182,19 +180,19 @@ describe('Image', function () {
}
}
async
function
yuvToJpegByPixelMapCallback
F
ail
(
done
,
testNum
,
sourceOptions
,
yuvData
)
{
try
{
async
function
yuvToJpegByPixelMapCallback
_f
ail
(
done
,
testNum
,
sourceOptions
,
yuvData
)
{
try
{
let
imageSource
=
image
.
createImageSource
(
yuvData
,
sourceOptions
);
if
(
imageSource
==
undefined
)
{
console
.
info
(
`
${
testNum
}
create ImageSource failed`
);
expect
(
false
).
assertTrue
()
done
();
}
else
{
imageSource
.
createPixelMap
((
err
,
data
)
=>
{
if
(
data
==
undefined
)
{
imageSource
.
createPixelMap
((
err
,
pixelmap
)
=>
{
if
(
pixelmap
==
undefined
)
{
expect
(
true
).
assertTrue
()
done
();
}
else
{
}
else
{
expect
(
false
).
assertTrue
()
done
();
}
...
...
@@ -244,7 +242,7 @@ describe('Image', function () {
}
}
async
function
yuvToJpegByImageSourcePromise
F
ail
(
done
,
testNum
,
sourceOptions
,
arg
,
yuvData
)
{
async
function
yuvToJpegByImageSourcePromise
_f
ail
(
done
,
testNum
,
sourceOptions
,
arg
,
yuvData
)
{
let
imageSource
=
image
.
createImageSource
(
yuvData
,
sourceOptions
);
if
(
imageSource
==
undefined
)
{
console
.
info
(
`
${
testNum
}
create ImageSource failed`
);
...
...
@@ -283,7 +281,7 @@ describe('Image', function () {
expect
(
false
).
assertTrue
();
done
();
}
else
{
imagePackerApi
.
packing
(
imageSource
,
arg
,
(
err
,
data
)
=>
{
imagePackerApi
.
packing
(
imageSource
,
arg
,
(
err
,
data
)
=>
{
var
dataArr
=
new
Uint8Array
(
data
);
console
.
info
(
`
${
testNum
}
dataArr.length=`
+
dataArr
.
length
);
for
(
var
i
=
0
;
i
<
dataArr
.
length
;
i
++
)
{
...
...
@@ -301,7 +299,7 @@ describe('Image', function () {
}
}
async
function
yuvToJpegByImageSourceCallback
F
ail
(
done
,
testNum
,
sourceOptions
,
arg
,
yuvData
)
{
async
function
yuvToJpegByImageSourceCallback
_f
ail
(
done
,
testNum
,
sourceOptions
,
arg
,
yuvData
)
{
let
imageSource
=
image
.
createImageSource
(
yuvData
,
sourceOptions
);
if
(
imageSource
==
undefined
)
{
console
.
info
(
`
${
testNum
}
create ImageSource failed`
);
...
...
@@ -314,7 +312,7 @@ describe('Image', function () {
expect
(
false
).
assertTrue
();
done
();
}
else
{
imagePackerApi
.
packing
(
imageSource
,
arg
,
(
err
,
data
)
=>
{
imagePackerApi
.
packing
(
imageSource
,
arg
,
(
err
,
data
)
=>
{
expect
(
err
!=
undefined
).
assertTrue
();
done
();
})
...
...
@@ -332,7 +330,7 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it
(
'
SUB_IMAGE_yuv_pixelmap_P_001
'
,
0
,
async
function
(
done
)
{
let
yuvData
=
createBuffer
(
4
,
6
);
let
yuvData
=
createBuffer
(
4
,
6
);
let
sourceOptions
=
{
sourceDensity
:
120
,
sourcePixelFormat
:
8
,
sourceSize
:
{
height
:
4
,
width
:
6
}
};
yuvToJpegByPixelMapPromise
(
done
,
'
SUB_IMAGE_yuv_pixelmap_P_001
'
,
sourceOptions
,
yuvData
)
})
...
...
@@ -347,7 +345,7 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it
(
'
SUB_IMAGE_yuv_pixelmap_P_002
'
,
0
,
async
function
(
done
)
{
let
yuvData
=
createBuffer
(
4
,
6
);
let
yuvData
=
createBuffer
(
4
,
6
);
let
sourceOptions
=
{
sourceDensity
:
120
,
sourcePixelFormat
:
9
,
sourceSize
:
{
height
:
4
,
width
:
6
}
};
yuvToJpegByPixelMapPromise
(
done
,
'
SUB_IMAGE_yuv_pixelmap_P_002
'
,
sourceOptions
,
yuvData
)
})
...
...
@@ -377,9 +375,9 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it
(
'
SUB_IMAGE_yuv_pixelmap_P_004
'
,
0
,
async
function
(
done
)
{
let
yuvData
=
createBuffer
(
4
,
6
);
let
yuvData
=
createBuffer
(
4
,
6
);
let
sourceOptions
=
{
sourceDensity
:
120
,
sourcePixelFormat
:
8
,
sourceSize
:
{
height
:
4
,
width
:
5
}
};
yuvToJpegByPixelMapPromise
F
ail
(
done
,
'
SUB_IMAGE_yuv_pixelmap_P_004
'
,
sourceOptions
,
yuvData
)
yuvToJpegByPixelMapPromise
_f
ail
(
done
,
'
SUB_IMAGE_yuv_pixelmap_P_004
'
,
sourceOptions
,
yuvData
)
})
/**
...
...
@@ -407,9 +405,9 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it
(
'
SUB_IMAGE_yuv_pixelmap_P_006
'
,
0
,
async
function
(
done
)
{
let
yuvData
=
createBuffer
(
4
,
6
);
let
yuvData
=
createBuffer
(
4
,
6
);
let
sourceOptions
=
{
sourceDensity
:
120
,
sourcePixelFormat
:
9
,
sourceSize
:
{
height
:
4
,
width
:
5
}
};
yuvToJpegByPixelMapPromise
F
ail
(
done
,
'
SUB_IMAGE_yuv_pixelmap_P_006
'
,
sourceOptions
,
yuvData
)
yuvToJpegByPixelMapPromise
_f
ail
(
done
,
'
SUB_IMAGE_yuv_pixelmap_P_006
'
,
sourceOptions
,
yuvData
)
})
/**
...
...
@@ -422,9 +420,9 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it
(
'
SUB_IMAGE_yuv_pixelmap_P_007
'
,
0
,
async
function
(
done
)
{
let
yuvData
=
createBuffer
(
4
,
6
);
let
yuvData
=
createBuffer
(
4
,
6
);
let
sourceOptions
=
{
sourceDensity
:
120
,
sourcePixelFormat
:
10
,
sourceSize
:
{
height
:
4
,
width
:
6
}
};
yuvToJpegByPixelMapPromise
F
ail
(
done
,
'
SUB_IMAGE_yuv_pixelmap_P_007
'
,
sourceOptions
,
yuvData
)
yuvToJpegByPixelMapPromise
_f
ail
(
done
,
'
SUB_IMAGE_yuv_pixelmap_P_007
'
,
sourceOptions
,
yuvData
)
})
/**
...
...
@@ -437,9 +435,9 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it
(
'
SUB_IMAGE_yuv_pixelmap_P_008
'
,
0
,
async
function
(
done
)
{
let
yuvData
=
createBuffer
(
4
,
6
);
let
yuvData
=
createBuffer
(
4
,
6
);
let
sourceOptions
=
{
sourceDensity
:
120
,
sourceSize
:
{
height
:
4
,
width
:
6
}
};
yuvToJpegByPixelMapPromise
F
ail
(
done
,
'
SUB_IMAGE_yuv_pixelmap_P_008
'
,
sourceOptions
,
yuvData
)
yuvToJpegByPixelMapPromise
_f
ail
(
done
,
'
SUB_IMAGE_yuv_pixelmap_P_008
'
,
sourceOptions
,
yuvData
)
})
/**
...
...
@@ -454,7 +452,7 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it
(
'
SUB_IMAGE_yuv_imagesource_P_001
'
,
0
,
async
function
(
done
)
{
let
yuvData
=
createBuffer
(
4
,
6
);
let
yuvData
=
createBuffer
(
4
,
6
);
let
sourceOptions
=
{
sourceDensity
:
120
,
sourcePixelFormat
:
8
,
sourceSize
:
{
height
:
4
,
width
:
6
}
};
let
packOpts
=
{
format
:
[
"
image/jpeg
"
],
quality
:
99
}
yuvToJpegByImageSourcePromise
(
done
,
'
SUB_IMAGE_yuv_imagesource_P_001
'
,
sourceOptions
,
packOpts
,
yuvData
)
...
...
@@ -472,7 +470,7 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it
(
'
SUB_IMAGE_yuv_imagesource_P_002
'
,
0
,
async
function
(
done
)
{
let
yuvData
=
createBuffer
(
4
,
6
);
let
yuvData
=
createBuffer
(
4
,
6
);
let
sourceOptions
=
{
sourceDensity
:
120
,
sourcePixelFormat
:
9
,
sourceSize
:
{
height
:
4
,
width
:
6
}
};
let
packOpts
=
{
format
:
[
"
image/jpeg
"
],
quality
:
99
}
yuvToJpegByImageSourcePromise
(
done
,
'
SUB_IMAGE_yuv_imagesource_P_002
'
,
sourceOptions
,
packOpts
,
yuvData
)
...
...
@@ -508,10 +506,10 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it
(
'
SUB_IMAGE_yuv_imagesource_P_004
'
,
0
,
async
function
(
done
)
{
let
yuvData
=
createBuffer
(
4
,
6
);
let
yuvData
=
createBuffer
(
4
,
6
);
let
sourceOptions
=
{
sourceDensity
:
120
,
sourcePixelFormat
:
8
,
sourceSize
:
{
height
:
4
,
width
:
5
}
};
let
packOpts
=
{
format
:
[
"
image/jpeg
"
],
quality
:
99
}
yuvToJpegByImageSourcePromise
F
ail
(
done
,
'
SUB_IMAGE_yuv_imagesource_P_004
'
,
sourceOptions
,
packOpts
,
yuvData
)
yuvToJpegByImageSourcePromise
_f
ail
(
done
,
'
SUB_IMAGE_yuv_imagesource_P_004
'
,
sourceOptions
,
packOpts
,
yuvData
)
})
/**
...
...
@@ -544,10 +542,10 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it
(
'
SUB_IMAGE_yuv_imagesource_P_006
'
,
0
,
async
function
(
done
)
{
let
yuvData
=
createBuffer
(
4
,
6
);
let
yuvData
=
createBuffer
(
4
,
6
);
let
sourceOptions
=
{
sourceDensity
:
120
,
sourcePixelFormat
:
9
,
sourceSize
:
{
height
:
4
,
width
:
5
}
};
let
packOpts
=
{
format
:
[
"
image/jpeg
"
],
quality
:
99
}
yuvToJpegByImageSourcePromise
F
ail
(
done
,
'
SUB_IMAGE_yuv_imagesource_P_006
'
,
sourceOptions
,
packOpts
,
yuvData
)
yuvToJpegByImageSourcePromise
_f
ail
(
done
,
'
SUB_IMAGE_yuv_imagesource_P_006
'
,
sourceOptions
,
packOpts
,
yuvData
)
})
/**
...
...
@@ -562,10 +560,10 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it
(
'
SUB_IMAGE_yuv_imagesource_P_007
'
,
0
,
async
function
(
done
)
{
let
yuvData
=
createBuffer
(
4
,
6
);
let
yuvData
=
createBuffer
(
4
,
6
);
let
sourceOptions
=
{
sourceDensity
:
120
,
sourcePixelFormat
:
10
,
sourceSize
:
{
height
:
4
,
width
:
6
}
};
let
packOpts
=
{
format
:
[
"
image/jpeg
"
],
quality
:
99
}
yuvToJpegByImageSourcePromise
F
ail
(
done
,
'
SUB_IMAGE_yuv_imagesource_P_007
'
,
sourceOptions
,
packOpts
,
yuvData
)
yuvToJpegByImageSourcePromise
_f
ail
(
done
,
'
SUB_IMAGE_yuv_imagesource_P_007
'
,
sourceOptions
,
packOpts
,
yuvData
)
})
/**
...
...
@@ -580,10 +578,10 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it
(
'
SUB_IMAGE_yuv_imagesource_P_008
'
,
0
,
async
function
(
done
)
{
let
yuvData
=
createBuffer
(
4
,
6
);
let
yuvData
=
createBuffer
(
4
,
6
);
let
sourceOptions
=
{
sourceDensity
:
120
,
sourceSize
:
{
height
:
4
,
width
:
6
}
};
let
packOpts
=
{
format
:
[
"
image/jpeg
"
],
quality
:
99
}
yuvToJpegByImageSourcePromise
F
ail
(
done
,
'
SUB_IMAGE_yuv_imagesource_P_008
'
,
sourceOptions
,
packOpts
,
yuvData
)
yuvToJpegByImageSourcePromise
_f
ail
(
done
,
'
SUB_IMAGE_yuv_imagesource_P_008
'
,
sourceOptions
,
packOpts
,
yuvData
)
})
/**
...
...
@@ -596,7 +594,7 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it
(
'
SUB_IMAGE_yuv_pixelmap_CB_001
'
,
0
,
async
function
(
done
)
{
let
yuvData
=
createBuffer
(
4
,
6
);
let
yuvData
=
createBuffer
(
4
,
6
);
let
sourceOptions
=
{
sourceDensity
:
120
,
sourcePixelFormat
:
8
,
sourceSize
:
{
height
:
4
,
width
:
6
}
};
yuvToJpegByPixelMapCallback
(
done
,
'
SUB_IMAGE_yuv_pixelmap_CB_001
'
,
sourceOptions
,
yuvData
)
})
...
...
@@ -611,7 +609,7 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it
(
'
SUB_IMAGE_yuv_pixelmap_CB_002
'
,
0
,
async
function
(
done
)
{
let
yuvData
=
createBuffer
(
4
,
6
);
let
yuvData
=
createBuffer
(
4
,
6
);
let
sourceOptions
=
{
sourceDensity
:
120
,
sourcePixelFormat
:
9
,
sourceSize
:
{
height
:
4
,
width
:
6
}
};
yuvToJpegByPixelMapCallback
(
done
,
'
SUB_IMAGE_yuv_pixelmap_CB_002
'
,
sourceOptions
,
yuvData
)
})
...
...
@@ -641,9 +639,9 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it
(
'
SUB_IMAGE_yuv_pixelmap_CB_004
'
,
0
,
async
function
(
done
)
{
let
yuvData
=
createBuffer
(
4
,
6
);
let
yuvData
=
createBuffer
(
4
,
6
);
let
sourceOptions
=
{
sourceDensity
:
120
,
sourcePixelFormat
:
8
,
sourceSize
:
{
height
:
4
,
width
:
5
}
};
yuvToJpegByPixelMapCallback
F
ail
(
done
,
'
SUB_IMAGE_yuv_pixelmap_CB_004
'
,
sourceOptions
,
yuvData
)
yuvToJpegByPixelMapCallback
_f
ail
(
done
,
'
SUB_IMAGE_yuv_pixelmap_CB_004
'
,
sourceOptions
,
yuvData
)
})
/**
...
...
@@ -671,9 +669,9 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it
(
'
SUB_IMAGE_yuv_pixelmap_CB_006
'
,
0
,
async
function
(
done
)
{
let
yuvData
=
createBuffer
(
4
,
6
);
let
yuvData
=
createBuffer
(
4
,
6
);
let
sourceOptions
=
{
sourceDensity
:
120
,
sourcePixelFormat
:
9
,
sourceSize
:
{
height
:
4
,
width
:
5
}
};
yuvToJpegByPixelMapCallback
F
ail
(
done
,
'
SUB_IMAGE_yuv_pixelmap_CB_006
'
,
sourceOptions
,
yuvData
)
yuvToJpegByPixelMapCallback
_f
ail
(
done
,
'
SUB_IMAGE_yuv_pixelmap_CB_006
'
,
sourceOptions
,
yuvData
)
})
/**
...
...
@@ -686,9 +684,9 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it
(
'
SUB_IMAGE_yuv_pixelmap_CB_007
'
,
0
,
async
function
(
done
)
{
let
yuvData
=
createBuffer
(
4
,
6
);
let
yuvData
=
createBuffer
(
4
,
6
);
let
sourceOptions
=
{
sourceDensity
:
120
,
sourcePixelFormat
:
10
,
sourceSize
:
{
height
:
4
,
width
:
6
}
};
yuvToJpegByPixelMapCallback
F
ail
(
done
,
'
SUB_IMAGE_yuv_pixelmap_CB_007
'
,
sourceOptions
,
yuvData
)
yuvToJpegByPixelMapCallback
_f
ail
(
done
,
'
SUB_IMAGE_yuv_pixelmap_CB_007
'
,
sourceOptions
,
yuvData
)
})
/**
...
...
@@ -701,9 +699,9 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it
(
'
SUB_IMAGE_yuv_pixelmap_CB_008
'
,
0
,
async
function
(
done
)
{
let
yuvData
=
createBuffer
(
4
,
6
);
let
yuvData
=
createBuffer
(
4
,
6
);
let
sourceOptions
=
{
sourceDensity
:
120
,
sourceSize
:
{
height
:
4
,
width
:
6
}
};
yuvToJpegByPixelMapCallback
F
ail
(
done
,
'
SUB_IMAGE_yuv_pixelmap_CB_008
'
,
sourceOptions
,
yuvData
)
yuvToJpegByPixelMapCallback
_f
ail
(
done
,
'
SUB_IMAGE_yuv_pixelmap_CB_008
'
,
sourceOptions
,
yuvData
)
})
/**
...
...
@@ -718,7 +716,7 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it
(
'
SUB_IMAGE_yuv_imagesource_CB_001
'
,
0
,
async
function
(
done
)
{
let
yuvData
=
createBuffer
(
4
,
6
);
let
yuvData
=
createBuffer
(
4
,
6
);
let
sourceOptions
=
{
sourceDensity
:
120
,
sourcePixelFormat
:
8
,
sourceSize
:
{
height
:
4
,
width
:
6
}
};
let
packOpts
=
{
format
:
[
"
image/jpeg
"
],
quality
:
99
}
yuvToJpegByImageSourceCallback
(
done
,
'
SUB_IMAGE_yuv_imagesource_CB_001
'
,
sourceOptions
,
packOpts
,
yuvData
)
...
...
@@ -736,7 +734,7 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it
(
'
SUB_IMAGE_yuv_imagesource_CB_002
'
,
0
,
async
function
(
done
)
{
let
yuvData
=
createBuffer
(
4
,
6
);
let
yuvData
=
createBuffer
(
4
,
6
);
let
sourceOptions
=
{
sourceDensity
:
120
,
sourcePixelFormat
:
9
,
sourceSize
:
{
height
:
4
,
width
:
6
}
};
let
packOpts
=
{
format
:
[
"
image/jpeg
"
],
quality
:
99
}
yuvToJpegByImageSourceCallback
(
done
,
'
SUB_IMAGE_yuv_imagesource_CB_002
'
,
sourceOptions
,
packOpts
,
yuvData
)
...
...
@@ -772,10 +770,10 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it
(
'
SUB_IMAGE_yuv_imagesource_CB_004
'
,
0
,
async
function
(
done
)
{
let
yuvData
=
createBuffer
(
4
,
6
);
let
yuvData
=
createBuffer
(
4
,
6
);
let
sourceOptions
=
{
sourceDensity
:
120
,
sourcePixelFormat
:
8
,
sourceSize
:
{
height
:
4
,
width
:
5
}
};
let
packOpts
=
{
format
:
[
"
image/jpeg
"
],
quality
:
99
}
yuvToJpegByImageSourceCallback
F
ail
(
done
,
'
SUB_IMAGE_yuv_imagesource_CB_004
'
,
sourceOptions
,
packOpts
,
yuvData
)
yuvToJpegByImageSourceCallback
_f
ail
(
done
,
'
SUB_IMAGE_yuv_imagesource_CB_004
'
,
sourceOptions
,
packOpts
,
yuvData
)
})
/**
...
...
@@ -808,10 +806,10 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it
(
'
SUB_IMAGE_yuv_imagesource_CB_006
'
,
0
,
async
function
(
done
)
{
let
yuvData
=
createBuffer
(
4
,
6
);
let
yuvData
=
createBuffer
(
4
,
6
);
let
sourceOptions
=
{
sourceDensity
:
120
,
sourcePixelFormat
:
9
,
sourceSize
:
{
height
:
4
,
width
:
5
}
};
let
packOpts
=
{
format
:
[
"
image/jpeg
"
],
quality
:
99
}
yuvToJpegByImageSourceCallback
F
ail
(
done
,
'
SUB_IMAGE_yuv_imagesource_CB_006
'
,
sourceOptions
,
packOpts
,
yuvData
)
yuvToJpegByImageSourceCallback
_f
ail
(
done
,
'
SUB_IMAGE_yuv_imagesource_CB_006
'
,
sourceOptions
,
packOpts
,
yuvData
)
})
/**
...
...
@@ -826,10 +824,10 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it
(
'
SUB_IMAGE_yuv_imagesource_CB_007
'
,
0
,
async
function
(
done
)
{
let
yuvData
=
createBuffer
(
4
,
6
);
let
yuvData
=
createBuffer
(
4
,
6
);
let
sourceOptions
=
{
sourceDensity
:
120
,
sourcePixelFormat
:
10
,
sourceSize
:
{
height
:
4
,
width
:
6
}
};
let
packOpts
=
{
format
:
[
"
image/jpeg
"
],
quality
:
99
}
yuvToJpegByImageSourceCallback
F
ail
(
done
,
'
SUB_IMAGE_yuv_imagesource_CB_007
'
,
sourceOptions
,
packOpts
,
yuvData
)
yuvToJpegByImageSourceCallback
_f
ail
(
done
,
'
SUB_IMAGE_yuv_imagesource_CB_007
'
,
sourceOptions
,
packOpts
,
yuvData
)
})
/**
...
...
@@ -844,9 +842,9 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it
(
'
SUB_IMAGE_yuv_imagesource_CB_008
'
,
0
,
async
function
(
done
)
{
let
yuvData
=
createBuffer
(
4
,
6
);
let
yuvData
=
createBuffer
(
4
,
6
);
let
sourceOptions
=
{
sourceDensity
:
120
,
sourceSize
:
{
height
:
4
,
width
:
6
}
};
let
packOpts
=
{
format
:
[
"
image/jpeg
"
],
quality
:
99
}
yuvToJpegByImageSourceCallback
F
ail
(
done
,
'
SUB_IMAGE_yuv_imagesource_CB_008
'
,
sourceOptions
,
packOpts
,
yuvData
)
yuvToJpegByImageSourceCallback
_f
ail
(
done
,
'
SUB_IMAGE_yuv_imagesource_CB_008
'
,
sourceOptions
,
packOpts
,
yuvData
)
})
})
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录