Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
79fff3a5
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看板
提交
79fff3a5
编写于
6月 27, 2022
作者:
F
fengzewu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
code check
Signed-off-by:
N
fengzewu
<
fengzewu@huawei.com
>
上级
81ebcbee
变更
2
展开全部
显示空白变更内容
内联
并排
Showing
2 changed file
with
1185 addition
and
1184 deletion
+1185
-1184
multimedia/image/image_js_standard/imageModifyProperty/src/main/js/test/modify.test.js
...ndard/imageModifyProperty/src/main/js/test/modify.test.js
+1181
-1181
multimedia/image/image_js_standard/imageModifyProperty/src/main/js/test/modifyBuffer.js
...dard/imageModifyProperty/src/main/js/test/modifyBuffer.js
+4
-3
未找到文件。
multimedia/image/image_js_standard/imageModifyProperty/src/main/js/test/modify.test.js
浏览文件 @
79fff3a5
/*
* Copyright (C) 202
1 Huawei Device Co., Ltd.
* Copyright (C) 202
2 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
...
...
@@ -16,7 +16,7 @@
import
image
from
'
@ohos.multimedia.image
'
import
fileio
from
'
@ohos.fileio
'
import
{
describe
,
beforeAll
,
beforeEach
,
afterEach
,
afterAll
,
it
,
expect
}
from
'
deccjsunit/index
'
import
{
tc_184_buf2
}
from
'
./modifyBuffer
'
import
{
modifyBuf
}
from
'
./modifyBuffer
'
import
abilityAccessCtrl
from
'
@ohos.abilityAccessCtrl
'
import
bundle
from
'
@ohos.bundle
'
...
...
@@ -72,7 +72,7 @@ describe('Image', function () {
async
function
modifyPromise
(
done
,
testNum
,
type
,
key
,
value
,
checkProps
){
let
imageSourceApi
;
if
(
type
==
'
buffer
'
)
{
const
data
=
tc_184_buf2
.
buffer
;
const
data
=
modifyBuf
.
buffer
;
imageSourceApi
=
image
.
createImageSource
(
data
);
}
else
{
let
fdExifJpg
=
fileio
.
openSync
(
pathExifJpg
,
0o2
|
0o100
,
0o777
);
...
...
@@ -104,7 +104,7 @@ describe('Image', function () {
async
function
modifyCb
(
done
,
testNum
,
type
,
key
,
value
,
checkProps
){
let
imageSourceApi
;
if
(
type
==
'
buffer
'
)
{
const
data
=
tc_184_buf2
.
buffer
;
const
data
=
modifyBuf
.
buffer
;
imageSourceApi
=
image
.
createImageSource
(
data
);
}
else
{
let
fdExifJpg
=
fileio
.
openSync
(
pathExifJpg
,
0o2
|
0o100
,
0o777
);
...
...
@@ -139,7 +139,7 @@ describe('Image', function () {
async
function
modifyCb1
(
done
,
testNum
,
type
,
key
,
value
,
checkProps
){
let
imageSourceApi
;
if
(
type
==
'
buffer
'
)
{
const
data
=
tc_184_buf2
.
buffer
;
const
data
=
modifyBuf
.
buffer
;
imageSourceApi
=
image
.
createImageSource
(
data
);
}
else
{
let
fdExifJpg
=
fileio
.
openSync
(
pathExifJpg
,
0o2
|
0o100
,
0o777
);
...
...
@@ -172,10 +172,10 @@ describe('Image', function () {
}
}
async
function
modify
ImageProperty_err_cb
(
done
,
testNum
,
type
,
key
,
value
)
{
async
function
modify
ErrCb
(
done
,
testNum
,
type
,
key
,
value
)
{
let
imageSourceApi
;
if
(
type
==
'
buffer
'
)
{
const
data
=
tc_184_buf2
.
buffer
;
const
data
=
modifyBuf
.
buffer
;
imageSourceApi
=
image
.
createImageSource
(
data
);
}
else
{
let
fdExifJpg
=
fileio
.
openSync
(
pathExifJpg
,
0o2
|
0o100
,
0o777
);
...
...
@@ -195,10 +195,10 @@ describe('Image', function () {
}
}
async
function
modify
ImageProperty_err_cb1
(
done
,
testNum
,
type
,
key
,
value
)
{
async
function
modify
ErrCb1
(
done
,
testNum
,
type
,
key
,
value
)
{
let
imageSourceApi
;
if
(
type
==
'
buffer
'
)
{
const
data
=
tc_184_buf2
.
buffer
;
const
data
=
modifyBuf
.
buffer
;
imageSourceApi
=
image
.
createImageSource
(
data
);
}
else
{
let
fdExifJpg
=
fileio
.
openSync
(
pathExifJpg
,
0o2
|
0o100
,
0o777
);
...
...
@@ -218,11 +218,11 @@ describe('Image', function () {
}
}
async
function
modifyImage
Property_err_promise
(
done
,
testNum
,
type
,
key
,
value
)
{
async
function
modifyImage
ErrPromise
(
done
,
testNum
,
type
,
key
,
value
)
{
let
imageSourceApi
;
try
{
if
(
type
==
'
buffer
'
)
{
const
data
=
tc_184_buf2
.
buffer
;
const
data
=
modifyBuf
.
buffer
;
imageSourceApi
=
image
.
createImageSource
(
data
);
}
else
{
let
fdExifJpg
=
fileio
.
openSync
(
pathExifJpg
,
0o2
|
0o100
,
0o777
);
...
...
@@ -771,7 +771,7 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it
(
'
modify_01_011
'
,
0
,
async
function
(
done
)
{
modifyImage
Property_err_promise
(
done
,
'
modify_01_011
'
,
'
fd
'
,
"
Orientation
"
,
"
abcdef
"
)
modifyImage
ErrPromise
(
done
,
'
modify_01_011
'
,
'
fd
'
,
"
Orientation
"
,
"
abcdef
"
)
})
/**
...
...
@@ -785,7 +785,7 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it
(
'
modify_01_012
'
,
0
,
async
function
(
done
)
{
modifyImage
Property_err_promise
(
done
,
'
modify_01_012
'
,
'
fd
'
,
"
GPSLatitude
"
,
"
abc,3
"
)
modifyImage
ErrPromise
(
done
,
'
modify_01_012
'
,
'
fd
'
,
"
GPSLatitude
"
,
"
abc,3
"
)
})
/**
...
...
@@ -799,7 +799,7 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it
(
'
modify_01_013
'
,
0
,
async
function
(
done
)
{
modifyImage
Property_err_promise
(
done
,
'
modify_01_013
'
,
'
fd
'
,
"
GPSLongitude
"
,
"
abc,2
"
)
modifyImage
ErrPromise
(
done
,
'
modify_01_013
'
,
'
fd
'
,
"
GPSLongitude
"
,
"
abc,2
"
)
})
/**
...
...
@@ -813,7 +813,7 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it
(
'
modify_01_014
'
,
0
,
async
function
(
done
)
{
modifyImage
Property_err_promise
(
done
,
'
modify_01_014
'
,
'
fd
'
,
"
GPSLatitudeRef
"
,
"
456
"
)
modifyImage
ErrPromise
(
done
,
'
modify_01_014
'
,
'
fd
'
,
"
GPSLatitudeRef
"
,
"
456
"
)
})
/**
...
...
@@ -827,7 +827,7 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it
(
'
modify_01_015
'
,
0
,
async
function
(
done
)
{
modifyImage
Property_err_promise
(
done
,
'
modify_01_015
'
,
'
fd
'
,
"
GPSLongitudeRef
"
,
"
1234
"
)
modifyImage
ErrPromise
(
done
,
'
modify_01_015
'
,
'
fd
'
,
"
GPSLongitudeRef
"
,
"
1234
"
)
})
/**
...
...
@@ -841,7 +841,7 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it
(
'
modify_01_016
'
,
0
,
async
function
(
done
)
{
modifyImage
Property_err_promise
(
done
,
"
modify_01_016
"
,
"
buffer
"
,
"
Orientation
"
,
"
abcdef
"
)
modifyImage
ErrPromise
(
done
,
"
modify_01_016
"
,
"
buffer
"
,
"
Orientation
"
,
"
abcdef
"
)
})
/**
...
...
@@ -855,7 +855,7 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it
(
'
modify_01_017
'
,
0
,
async
function
(
done
)
{
modifyImage
Property_err_promise
(
done
,
"
modify_01_017
"
,
"
buffer
"
,
"
GPSLatitude
"
,
"
abc,3
"
)
modifyImage
ErrPromise
(
done
,
"
modify_01_017
"
,
"
buffer
"
,
"
GPSLatitude
"
,
"
abc,3
"
)
})
/**
...
...
@@ -869,7 +869,7 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it
(
'
modify_01_018
'
,
0
,
async
function
(
done
)
{
modifyImage
Property_err_promise
(
done
,
"
modify_01_018
"
,
"
buffer
"
,
"
GPSLongitude
"
,
"
abc,2
"
)
modifyImage
ErrPromise
(
done
,
"
modify_01_018
"
,
"
buffer
"
,
"
GPSLongitude
"
,
"
abc,2
"
)
})
/**
...
...
@@ -883,7 +883,7 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it
(
'
modify_01_019
'
,
0
,
async
function
(
done
)
{
modifyImage
Property_err_promise
(
done
,
"
modify_01_019
"
,
"
buffer
"
,
"
GPSLatitudeRef
"
,
"
456
"
)
modifyImage
ErrPromise
(
done
,
"
modify_01_019
"
,
"
buffer
"
,
"
GPSLatitudeRef
"
,
"
456
"
)
})
/**
...
...
@@ -897,7 +897,7 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it
(
'
modify_01_020
'
,
0
,
async
function
(
done
)
{
modifyImage
Property_err_promise
(
done
,
"
modify_01_020
"
,
"
buffer
"
,
"
GPSLongitudeRef
"
,
"
1234
"
)
modifyImage
ErrPromise
(
done
,
"
modify_01_020
"
,
"
buffer
"
,
"
GPSLongitudeRef
"
,
"
1234
"
)
})
/**
...
...
@@ -911,7 +911,7 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it
(
'
modify_02_011
'
,
0
,
async
function
(
done
)
{
modify
ImageProperty_err_cb
(
done
,
"
modify_02_011
"
,
"
fd
"
,
"
Orientation
"
,
"
abcdef
"
)
modify
ErrCb
(
done
,
"
modify_02_011
"
,
"
fd
"
,
"
Orientation
"
,
"
abcdef
"
)
})
/**
...
...
@@ -925,7 +925,7 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it
(
'
modify_02_012
'
,
0
,
async
function
(
done
)
{
modify
ImageProperty_err_cb
(
done
,
"
modify_02_012
"
,
"
fd
"
,
"
GPSLatitude
"
,
"
abc,3
"
)
modify
ErrCb
(
done
,
"
modify_02_012
"
,
"
fd
"
,
"
GPSLatitude
"
,
"
abc,3
"
)
})
/**
...
...
@@ -939,7 +939,7 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it
(
'
modify_02_013
'
,
0
,
async
function
(
done
)
{
modify
ImageProperty_err_cb
(
done
,
"
modify_02_013
"
,
"
fd
"
,
"
GPSLongitude
"
,
"
abc,2
"
)
modify
ErrCb
(
done
,
"
modify_02_013
"
,
"
fd
"
,
"
GPSLongitude
"
,
"
abc,2
"
)
})
/**
...
...
@@ -953,7 +953,7 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it
(
'
modify_02_014
'
,
0
,
async
function
(
done
)
{
modify
ImageProperty_err_cb
(
done
,
"
modify_02_014
"
,
"
fd
"
,
"
GPSLongitudeRef
"
,
"
1234
"
)
modify
ErrCb
(
done
,
"
modify_02_014
"
,
"
fd
"
,
"
GPSLongitudeRef
"
,
"
1234
"
)
})
/**
...
...
@@ -967,7 +967,7 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it
(
'
modify_02_015
'
,
0
,
async
function
(
done
)
{
modify
ImageProperty_err_cb
(
done
,
"
modify_02_015
"
,
"
fd
"
,
"
GPSLatitudeRef
"
,
"
456
"
)
modify
ErrCb
(
done
,
"
modify_02_015
"
,
"
fd
"
,
"
GPSLatitudeRef
"
,
"
456
"
)
})
/**
...
...
@@ -981,7 +981,7 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it
(
'
modify_02_016
'
,
0
,
async
function
(
done
)
{
modify
ImageProperty_err_cb
(
done
,
"
modify_02_016
"
,
"
buffer
"
,
"
Orientation
"
,
"
abcdef
"
)
modify
ErrCb
(
done
,
"
modify_02_016
"
,
"
buffer
"
,
"
Orientation
"
,
"
abcdef
"
)
})
/**
...
...
@@ -995,7 +995,7 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it
(
'
modify_02_017
'
,
0
,
async
function
(
done
)
{
modify
ImageProperty_err_cb
(
done
,
"
modify_02_017
"
,
"
buffer
"
,
"
GPSLatitude
"
,
"
abc,3
"
)
modify
ErrCb
(
done
,
"
modify_02_017
"
,
"
buffer
"
,
"
GPSLatitude
"
,
"
abc,3
"
)
})
/**
...
...
@@ -1009,7 +1009,7 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it
(
'
modify_02_018
'
,
0
,
async
function
(
done
)
{
modify
ImageProperty_err_cb
(
done
,
"
modify_02_018
"
,
"
buffer
"
,
"
GPSLongitude
"
,
"
abc,2
"
)
modify
ErrCb
(
done
,
"
modify_02_018
"
,
"
buffer
"
,
"
GPSLongitude
"
,
"
abc,2
"
)
})
/**
...
...
@@ -1023,7 +1023,7 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it
(
'
modify_02_019
'
,
0
,
async
function
(
done
)
{
modify
ImageProperty_err_cb
(
done
,
"
modify_02_019
"
,
"
buffer
"
,
"
GPSLongitudeRef
"
,
"
1234
"
)
modify
ErrCb
(
done
,
"
modify_02_019
"
,
"
buffer
"
,
"
GPSLongitudeRef
"
,
"
1234
"
)
})
/**
...
...
@@ -1037,7 +1037,7 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it
(
'
modify_02_020
'
,
0
,
async
function
(
done
)
{
modify
ImageProperty_err_cb
(
done
,
"
modify_02_020
"
,
"
buffer
"
,
"
GPSLatitudeRef
"
,
"
456
"
)
modify
ErrCb
(
done
,
"
modify_02_020
"
,
"
buffer
"
,
"
GPSLatitudeRef
"
,
"
456
"
)
})
/**
...
...
@@ -1051,7 +1051,7 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it
(
'
modify_03_011
'
,
0
,
async
function
(
done
)
{
modify
ImageProperty_err_cb1
(
done
,
"
modify_03_011
"
,
"
fd
"
,
"
Orientation
"
,
"
abcdef
"
)
modify
ErrCb1
(
done
,
"
modify_03_011
"
,
"
fd
"
,
"
Orientation
"
,
"
abcdef
"
)
})
/**
...
...
@@ -1065,7 +1065,7 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it
(
'
modify_03_012
'
,
0
,
async
function
(
done
)
{
modify
ImageProperty_err_cb1
(
done
,
"
modify_03_012
"
,
"
fd
"
,
"
GPSLatitude
"
,
"
abc,3
"
)
modify
ErrCb1
(
done
,
"
modify_03_012
"
,
"
fd
"
,
"
GPSLatitude
"
,
"
abc,3
"
)
})
/**
...
...
@@ -1079,7 +1079,7 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it
(
'
modify_03_013
'
,
0
,
async
function
(
done
)
{
modify
ImageProperty_err_cb1
(
done
,
"
modify_03_013
"
,
"
fd
"
,
"
GPSLongitude
"
,
"
abc,2
"
)
modify
ErrCb1
(
done
,
"
modify_03_013
"
,
"
fd
"
,
"
GPSLongitude
"
,
"
abc,2
"
)
})
/**
...
...
@@ -1093,7 +1093,7 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it
(
'
modify_03_014
'
,
0
,
async
function
(
done
)
{
modify
ImageProperty_err_cb1
(
done
,
"
modify_03_014
"
,
"
fd
"
,
"
GPSLatitudeRef
"
,
"
1234
"
)
modify
ErrCb1
(
done
,
"
modify_03_014
"
,
"
fd
"
,
"
GPSLatitudeRef
"
,
"
1234
"
)
})
/**
...
...
@@ -1107,7 +1107,7 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it
(
'
modify_03_015
'
,
0
,
async
function
(
done
)
{
modify
ImageProperty_err_cb1
(
done
,
"
modify_03_015
"
,
"
fd
"
,
"
GPSLongitudeRef
"
,
"
567
"
)
modify
ErrCb1
(
done
,
"
modify_03_015
"
,
"
fd
"
,
"
GPSLongitudeRef
"
,
"
567
"
)
})
/**
...
...
@@ -1121,7 +1121,7 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it
(
'
modify_03_016
'
,
0
,
async
function
(
done
)
{
modify
ImageProperty_err_cb1
(
done
,
"
modify_03_016
"
,
"
buffer
"
,
"
Orientation
"
,
"
abcef
"
)
modify
ErrCb1
(
done
,
"
modify_03_016
"
,
"
buffer
"
,
"
Orientation
"
,
"
abcef
"
)
})
/**
...
...
@@ -1135,7 +1135,7 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it
(
'
modify_03_017
'
,
0
,
async
function
(
done
)
{
modify
ImageProperty_err_cb1
(
done
,
"
modify_03_017
"
,
"
buffer
"
,
"
GPSLatitude
"
,
"
abc,3
"
)
modify
ErrCb1
(
done
,
"
modify_03_017
"
,
"
buffer
"
,
"
GPSLatitude
"
,
"
abc,3
"
)
})
/**
...
...
@@ -1149,7 +1149,7 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it
(
'
modify_03_018
'
,
0
,
async
function
(
done
)
{
modify
ImageProperty_err_cb1
(
done
,
"
modify_03_018
"
,
"
buffer
"
,
"
GPSLongitude
"
,
"
abc,2
"
)
modify
ErrCb1
(
done
,
"
modify_03_018
"
,
"
buffer
"
,
"
GPSLongitude
"
,
"
abc,2
"
)
})
/**
...
...
@@ -1163,7 +1163,7 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it
(
'
modify_03_019
'
,
0
,
async
function
(
done
)
{
modify
ImageProperty_err_cb1
(
done
,
"
modify_03_019
"
,
"
buffer
"
,
"
GPSLatitudeRef
"
,
"
456
"
)
modify
ErrCb1
(
done
,
"
modify_03_019
"
,
"
buffer
"
,
"
GPSLatitudeRef
"
,
"
456
"
)
})
/**
...
...
@@ -1177,6 +1177,6 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it
(
'
modify_03_020
'
,
0
,
async
function
(
done
)
{
modify
ImageProperty_err_cb1
(
done
,
"
modify_03_020
"
,
"
buffer
"
,
"
GPSLongitudeRef
"
,
"
1234
"
)
modify
ErrCb1
(
done
,
"
modify_03_020
"
,
"
buffer
"
,
"
GPSLongitudeRef
"
,
"
1234
"
)
})
})
\ No newline at end of file
multimedia/image/image_js_standard/imageModifyProperty/src/main/js/test/modifyBuffer.js
浏览文件 @
79fff3a5
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录