Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
8c01a970
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看板
未验证
提交
8c01a970
编写于
11月 21, 2022
作者:
O
openharmony_ci
提交者:
Gitee
11月 21, 2022
浏览文件
操作
浏览文件
下载
差异文件
!6580 delete yuv testcase -monthly
Merge pull request !6580 from caochuan/cherry-pick-1668761707
上级
a9638a3b
2a1dbd1d
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
11 addition
and
273 deletion
+11
-273
multimedia/image/image_js_standard/imageReceiver/src/main/js/test/receiver.test.js
..._standard/imageReceiver/src/main/js/test/receiver.test.js
+11
-273
未找到文件。
multimedia/image/image_js_standard/imageReceiver/src/main/js/test/receiver.test.js
浏览文件 @
8c01a970
...
...
@@ -21,11 +21,9 @@ export default function ImageReceiver() {
const
HEIGHT
=
8
;
const
CAPACITY
=
8
;
const
RGBA
=
12
;
const
YCBCR
=
22
;
const
Jpg_YStride
=
1
;
const
UVStride
=
2
;
const
{
JPEG
:
FORMATJPEG
,
YCBCR_422_SP
}
=
image
.
ImageFormat
;
const
{
YUV_Y
,
YUV_U
,
YUV_V
,
JPEG
}
=
image
.
ComponentType
;
const
Jpg_Stride
=
1
;
const
{
JPEG
:
FORMATJPEG
}
=
image
.
ImageFormat
;
const
{
JPEG
}
=
image
.
ComponentType
;
beforeAll
(
async
function
()
{
console
.
info
(
"
beforeAll case
"
);
});
...
...
@@ -99,11 +97,7 @@ export default function ImageReceiver() {
});
expect
(
true
).
assertTrue
();
});
if
(
format
==
FORMATJPEG
)
{
var
dummy
=
receiver
.
test
;
}
else
{
var
dummy
=
receiver
.
testYUV
;
}
var
dummy
=
receiver
.
test
;
}
}
...
...
@@ -145,11 +139,7 @@ export default function ImageReceiver() {
});
expect
(
true
).
assertTrue
();
});
if
(
format
==
FORMATJPEG
)
{
var
dummy
=
receiver
.
test
;
}
else
{
var
dummy
=
receiver
.
testYUV
;
}
var
dummy
=
receiver
.
test
;
}
}
...
...
@@ -198,11 +188,7 @@ export default function ImageReceiver() {
});
expect
(
true
).
assertTrue
();
});
if
(
format
==
FORMATJPEG
)
{
var
dummy
=
receiver
.
test
;
}
else
{
var
dummy
=
receiver
.
testYUV
;
}
var
dummy
=
receiver
.
test
;
}
async
function
getComponentCb
(
done
,
testNum
,
format
,
param
,
checkFormat
,
checkStride
)
{
...
...
@@ -247,11 +233,7 @@ export default function ImageReceiver() {
});
expect
(
true
).
assertTrue
();
});
if
(
format
==
FORMATJPEG
)
{
var
dummy
=
receiver
.
test
;
}
else
{
var
dummy
=
receiver
.
testYUV
;
}
var
dummy
=
receiver
.
test
;
}
async
function
onErr
(
done
,
testNum
,
param
)
{
...
...
@@ -517,31 +499,6 @@ export default function ImageReceiver() {
}
});
/**
* @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_0500
* @tc.name : createImageReceiver
* @tc.desc : 1.set width,height,format,capacity
* 2.create ImageReceiver
* 3.return ImageReceiver not empty
* @tc.size : MEDIUM
* @tc.type : Functional
* @tc.level : Level 0
*/
it
(
"
SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_0500
"
,
0
,
async
function
(
done
)
{
var
receiver
=
image
.
createImageReceiver
(
WIDTH
,
HEIGHT
,
YCBCR_422_SP
,
CAPACITY
);
if
(
receiver
==
undefined
)
{
expect
(
false
).
assertTrue
();
console
.
info
(
"
SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_0500 undefined
"
);
done
();
}
else
{
expect
(
receiver
.
size
.
width
==
WIDTH
).
assertTrue
();
expect
(
receiver
.
size
.
height
==
HEIGHT
).
assertTrue
();
expect
(
receiver
.
capacity
==
CAPACITY
).
assertTrue
();
expect
(
receiver
.
format
==
YCBCR_422_SP
).
assertTrue
();
done
();
}
});
/**
* @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_GETRECEIVINGSURFACEID_PROMISE_0100
* @tc.name : getReceivingSurfaceId-promise
...
...
@@ -810,8 +767,8 @@ export default function ImageReceiver() {
expect
(
imgformat
==
RGBA
);
}
function
checkStride
(
rowStride
,
pixelStride
)
{
expect
(
rowStride
==
WIDTH
/
Jpg_
Y
Stride
);
expect
(
pixelStride
==
Jpg_
Y
Stride
);
expect
(
rowStride
==
WIDTH
/
Jpg_Stride
);
expect
(
pixelStride
==
Jpg_Stride
);
}
getComponentPromise
(
done
,
...
...
@@ -823,93 +780,6 @@ export default function ImageReceiver() {
);
});
/**
* @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_PROMISE_YUV_U_0100
* @tc.name : getComponent-YUV_U
* @tc.desc : 1.create ImageReceiver
* 2.call on
* 3.readLatestImage
* 4.call getComponent
* @tc.size : MEDIUM
* @tc.type : Functional
* @tc.level : Level 0
*/
it
(
"
SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_PROMISE_YUV_U_0100
"
,
0
,
async
function
(
done
)
{
function
checkFormat
(
imgformat
)
{
expect
(
imgformat
==
YCBCR
);
}
function
checkStride
(
rowStride
,
pixelStride
)
{
expect
(
rowStride
==
WIDTH
/
UVStride
);
expect
(
pixelStride
==
UVStride
);
}
getComponentPromise
(
done
,
"
SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_PROMISE_YUV_U_0100
"
,
YCBCR_422_SP
,
YUV_U
,
checkFormat
,
checkStride
);
});
/**
* @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_PROMISE_YUV_V_0100
* @tc.name : getComponent-YUV_V
* @tc.desc : 1.create ImageReceiver
* 2.call on
* 3.readLatestImage
* 4.call getComponent
* @tc.size : MEDIUM
* @tc.type : Functional
* @tc.level : Level 0
*/
it
(
"
SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_PROMISE_YUV_V_0100
"
,
0
,
async
function
(
done
)
{
function
checkFormat
(
imgformat
)
{
expect
(
imgformat
==
YCBCR
);
}
function
checkStride
(
rowStride
,
pixelStride
)
{
expect
(
rowStride
==
WIDTH
/
UVStride
);
expect
(
pixelStride
==
UVStride
);
}
getComponentPromise
(
done
,
"
SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_PROMISE_YUV_V_0100
"
,
YCBCR_422_SP
,
YUV_V
,
checkFormat
,
checkStride
);
});
/**
* @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_PROMISE_YUV_Y_0100
* @tc.name : getComponent-YUV_Y
* @tc.desc : 1.create ImageReceiver
* 2.call on
* 3.readLatestImage
* 4.call getComponent
* @tc.size : MEDIUM
* @tc.type : Functional
* @tc.level : Level 0
*/
it
(
"
SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_PROMISE_YUV_Y_0100
"
,
0
,
async
function
(
done
)
{
function
checkFormat
(
imgformat
)
{
expect
(
imgformat
==
YCBCR
);
}
function
checkStride
(
rowStride
,
pixelStride
)
{
expect
(
rowStride
==
WIDTH
/
Jpg_YStride
);
expect
(
pixelStride
==
Jpg_YStride
);
}
getComponentPromise
(
done
,
"
SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_PROMISE_YUV_Y_0100
"
,
YCBCR_422_SP
,
YUV_Y
,
checkFormat
,
checkStride
);
});
/**
* @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_CALLBACK_JPEG_0100
* @tc.name : getComponent-jpeg
...
...
@@ -926,8 +796,8 @@ export default function ImageReceiver() {
expect
(
imgformat
==
RGBA
);
}
function
checkStride
(
rowStride
,
pixelStride
)
{
expect
(
rowStride
==
WIDTH
/
Jpg_
Y
Stride
);
expect
(
pixelStride
==
Jpg_
Y
Stride
);
expect
(
rowStride
==
WIDTH
/
Jpg_Stride
);
expect
(
pixelStride
==
Jpg_Stride
);
}
getComponentCb
(
done
,
...
...
@@ -939,93 +809,6 @@ export default function ImageReceiver() {
);
});
/**
* @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_CALLBACK_YUV_Y_0100
* @tc.name : getComponent-YUV_Y
* @tc.desc : 1.create ImageReceiver
* 2.call on
* 3.readLatestImage
* 4.call getComponent
* @tc.size : MEDIUM
* @tc.type : Functional
* @tc.level : Level 0
*/
it
(
"
SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_CALLBACK_YUV_Y_0100
"
,
0
,
async
function
(
done
)
{
function
checkFormat
(
imgformat
)
{
expect
(
imgformat
==
YCBCR
);
}
function
checkStride
(
rowStride
,
pixelStride
)
{
expect
(
rowStride
==
WIDTH
/
Jpg_YStride
);
expect
(
pixelStride
==
Jpg_YStride
);
}
getComponentCb
(
done
,
"
SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_CALLBACK_YUV_Y_0100
"
,
YCBCR_422_SP
,
YUV_Y
,
checkFormat
,
checkStride
);
});
/**
* @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_CALLBACK_YUV_V_0100
* @tc.name : getComponent-YUV_V
* @tc.desc : 1.create ImageReceiver
* 2.call on
* 3.readLatestImage
* 4.call getComponent
* @tc.size : MEDIUM
* @tc.type : Functional
* @tc.level : Level 0
*/
it
(
"
SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_CALLBACK_YUV_V_0100
"
,
0
,
async
function
(
done
)
{
function
checkFormat
(
imgformat
)
{
expect
(
imgformat
==
YCBCR
);
}
function
checkStride
(
rowStride
,
pixelStride
)
{
expect
(
rowStride
==
WIDTH
/
UVStride
);
expect
(
pixelStride
==
UVStride
);
}
getComponentCb
(
done
,
"
SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_CALLBACK_YUV_V_0100
"
,
YCBCR_422_SP
,
YUV_V
,
checkFormat
,
checkStride
);
});
/**
* @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_CALLBACK_YUV_U_0100
* @tc.name : getComponent-YUV_U
* @tc.desc : 1.create ImageReceiver
* 2.call on
* 3.readLatestImage
* 4.call getComponent
* @tc.size : MEDIUM
* @tc.type : Functional
* @tc.level : Level 0
*/
it
(
"
SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_CALLBACK_YUV_U_0100
"
,
0
,
async
function
(
done
)
{
function
checkFormat
(
imgformat
)
{
expect
(
imgformat
==
YCBCR
);
}
function
checkStride
(
rowStride
,
pixelStride
)
{
expect
(
rowStride
==
WIDTH
/
UVStride
);
expect
(
pixelStride
==
UVStride
);
}
getComponentCb
(
done
,
"
SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_CALLBACK_YUV_U_0100
"
,
YCBCR_422_SP
,
YUV_U
,
checkFormat
,
checkStride
);
});
/**
* @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_RECEIVERON_0100
* @tc.name : on
...
...
@@ -1293,51 +1076,6 @@ export default function ImageReceiver() {
getComponentProErr
(
done
,
"
SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_ERROR_0800
"
,
FORMATJPEG
,
{
a
:
1
});
});
/**
* @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_ERROR_0900
* @tc.name : getComponent-wrong format
* @tc.desc : 1.create ImageReceiver
* 2.call on
* 3.readLatestImage
* 4.call getComponent
* @tc.size : MEDIUM
* @tc.type : Functional
* @tc.level : Level 0
*/
it
(
"
SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_ERROR_0900
"
,
0
,
async
function
(
done
)
{
getComponentCbErr
(
done
,
"
SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_ERROR_0900
"
,
FORMATJPEG
,
YUV_U
);
});
/**
* @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_ERROR_1000
* @tc.name : getComponent-wrong format
* @tc.desc : 1.create ImageReceiver
* 2.call on
* 3.readLatestImage
* 4.call getComponent
* @tc.size : MEDIUM
* @tc.type : Functional
* @tc.level : Level 0
*/
it
(
"
SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_ERROR_1000
"
,
0
,
async
function
(
done
)
{
getComponentProErr
(
done
,
"
SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_ERROR_1000
"
,
YCBCR_422_SP
,
JPEG
);
});
/**
* @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_ERROR_1100
* @tc.name : getComponent-wrong format
* @tc.desc : 1.create ImageReceiver
* 2.call on
* 3.readLatestImage
* 4.call getComponent
* @tc.size : MEDIUM
* @tc.type : Functional
* @tc.level : Level 0
*/
it
(
"
SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_ERROR_1100
"
,
0
,
async
function
(
done
)
{
getComponentProErr
(
done
,
"
SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_ERROR_1100
"
,
FORMATJPEG
,
YUV_V
);
});
/**
* @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_IMAGERECEIVER_ON_ERROR_0100
* @tc.name : on-1
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录