Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
26ae5f5a
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看板
未验证
提交
26ae5f5a
编写于
7月 24, 2023
作者:
O
openharmony_ci
提交者:
Gitee
7月 24, 2023
浏览文件
操作
浏览文件
下载
差异文件
!9448 testcase add release imagesource
Merge pull request !9448 from caochuan/newMemory
上级
e1c16374
e3fc73c6
变更
4
展开全部
隐藏空白更改
内联
并排
Showing
4 changed file
with
443 addition
and
333 deletion
+443
-333
multimedia/image/image_js_standard/imageColorspace/src/main/js/test/P3.test.js
...e_js_standard/imageColorspace/src/main/js/test/P3.test.js
+22
-0
multimedia/image/image_js_standard/imageColorspace/src/main/js/test/colorspace.test.js
...ndard/imageColorspace/src/main/js/test/colorspace.test.js
+369
-330
multimedia/image/image_js_standard/imageCreator/src/main/js/test/creator.test.js
...js_standard/imageCreator/src/main/js/test/creator.test.js
+37
-3
multimedia/image/image_js_standard/imageModifyProperty/src/main/js/test/modify.test.js
...ndard/imageModifyProperty/src/main/js/test/modify.test.js
+15
-0
未找到文件。
multimedia/image/image_js_standard/imageColorspace/src/main/js/test/P3.test.js
浏览文件 @
26ae5f5a
...
@@ -25,6 +25,8 @@ export default function ImageP3() {
...
@@ -25,6 +25,8 @@ export default function ImageP3() {
const
COLORSPACENAME
=
5
;
const
COLORSPACENAME
=
5
;
let
filePath
;
let
filePath
;
let
fdNumber
;
let
fdNumber
;
let
globalpixelmap
;
let
globalImagesource
;
async
function
getFd
(
fileName
)
{
async
function
getFd
(
fileName
)
{
let
context
=
await
featureAbility
.
getContext
();
let
context
=
await
featureAbility
.
getContext
();
await
context
.
getFilesDir
().
then
((
data
)
=>
{
await
context
.
getFilesDir
().
then
((
data
)
=>
{
...
@@ -51,6 +53,22 @@ export default function ImageP3() {
...
@@ -51,6 +53,22 @@ export default function ImageP3() {
});
});
afterEach
(
async
function
()
{
afterEach
(
async
function
()
{
if
(
globalpixelmap
!=
undefined
)
{
console
.
info
(
"
globalpixelmap release start
"
);
try
{
await
globalpixelmap
.
release
();
}
catch
(
error
)
{
console
.
info
(
"
globalpixelmap release fail
"
);
}
}
if
(
globalImagesource
!=
undefined
)
{
console
.
info
(
"
globalImagesource release start
"
);
try
{
await
globalImagesource
.
release
();
}
catch
(
error
)
{
console
.
info
(
"
globalImagesource release fail
"
);
}
}
console
.
info
(
"
afterEach case
"
);
console
.
info
(
"
afterEach case
"
);
});
});
...
@@ -77,7 +95,9 @@ export default function ImageP3() {
...
@@ -77,7 +95,9 @@ export default function ImageP3() {
try
{
try
{
logger
.
log
(
"
ImageSource
"
+
(
imageSource
!=
undefined
));
logger
.
log
(
"
ImageSource
"
+
(
imageSource
!=
undefined
));
if
(
imageSource
!=
undefined
)
{
if
(
imageSource
!=
undefined
)
{
globalImagesource
=
imageSource
;
let
pixelMap
=
await
imageSource
.
createPixelMap
();
let
pixelMap
=
await
imageSource
.
createPixelMap
();
globalpixelmap
=
pixelMap
;
logger
.
log
(
"
PixelMap
"
+
pixelMap
);
logger
.
log
(
"
PixelMap
"
+
pixelMap
);
var
csm
=
colorSpaceManager
.
create
(
colorSpaceName
);
var
csm
=
colorSpaceManager
.
create
(
colorSpaceName
);
logger
.
log
(
"
colorSpaceManager.ColorSpace:
"
+
colorSpaceName
);
logger
.
log
(
"
colorSpaceManager.ColorSpace:
"
+
colorSpaceName
);
...
@@ -115,7 +135,9 @@ export default function ImageP3() {
...
@@ -115,7 +135,9 @@ export default function ImageP3() {
try
{
try
{
let
imageSource
=
GenPicSource
(
testImg
);
let
imageSource
=
GenPicSource
(
testImg
);
if
(
imageSource
!=
undefined
)
{
if
(
imageSource
!=
undefined
)
{
globalImagesource
=
imageSource
;
let
pixelMap
=
await
imageSource
.
createPixelMap
();
let
pixelMap
=
await
imageSource
.
createPixelMap
();
globalpixelmap
=
pixelMap
;
var
csm
=
pixelMap
.
getColorSpace
();
var
csm
=
pixelMap
.
getColorSpace
();
logger
.
log
(
"
getColorSpace csm
"
+
csm
);
logger
.
log
(
"
getColorSpace csm
"
+
csm
);
var
csmn
=
csm
.
getColorSpaceName
();
var
csmn
=
csm
.
getColorSpaceName
();
...
...
multimedia/image/image_js_standard/imageColorspace/src/main/js/test/colorspace.test.js
浏览文件 @
26ae5f5a
此差异已折叠。
点击以展开。
multimedia/image/image_js_standard/imageCreator/src/main/js/test/creator.test.js
浏览文件 @
26ae5f5a
...
@@ -17,7 +17,8 @@ import image from '@ohos.multimedia.image'
...
@@ -17,7 +17,8 @@ import image from '@ohos.multimedia.image'
import
{
describe
,
beforeAll
,
beforeEach
,
afterEach
,
afterAll
,
it
,
expect
}
from
'
deccjsunit/index
'
import
{
describe
,
beforeAll
,
beforeEach
,
afterEach
,
afterAll
,
it
,
expect
}
from
'
deccjsunit/index
'
describe
(
'
ImageCreator
'
,
function
()
{
describe
(
'
ImageCreator
'
,
function
()
{
let
globalCreator
;
let
globalImg
;
const
JPEG
=
4
;
const
JPEG
=
4
;
const
WIDTH
=
8192
;
const
WIDTH
=
8192
;
const
HEIGHT
=
8
;
const
HEIGHT
=
8
;
...
@@ -32,7 +33,23 @@ describe('ImageCreator', function () {
...
@@ -32,7 +33,23 @@ describe('ImageCreator', function () {
console
.
info
(
'
beforeEach case
'
);
console
.
info
(
'
beforeEach case
'
);
})
})
afterEach
(
function
()
{
afterEach
(
async
function
()
{
if
(
globalCreator
!=
undefined
)
{
console
.
info
(
"
globalCreator release start
"
);
try
{
await
globalCreator
.
release
();
}
catch
(
error
)
{
console
.
info
(
"
globalCreator release fail
"
);
}
}
if
(
globalImg
!=
undefined
)
{
console
.
info
(
"
globalImg release start
"
);
try
{
await
globalImg
.
release
();
}
catch
(
error
)
{
console
.
info
(
"
globalImg release fail
"
);
}
}
console
.
info
(
'
afterEach case
'
);
console
.
info
(
'
afterEach case
'
);
})
})
...
@@ -58,6 +75,7 @@ describe('ImageCreator', function () {
...
@@ -58,6 +75,7 @@ describe('ImageCreator', function () {
expect
(
false
).
assertTrue
();
expect
(
false
).
assertTrue
();
done
();
done
();
}
else
{
}
else
{
globalCreator
=
creator
;
try
{
try
{
creator
.
on
(
param
,
(
err
)
=>
{
creator
.
on
(
param
,
(
err
)
=>
{
expect
(
false
).
assertTrue
();
expect
(
false
).
assertTrue
();
...
@@ -74,12 +92,14 @@ describe('ImageCreator', function () {
...
@@ -74,12 +92,14 @@ describe('ImageCreator', function () {
async
function
queueImageError
(
done
,
testNum
,
param
)
{
async
function
queueImageError
(
done
,
testNum
,
param
)
{
var
creator
=
image
.
createImageCreator
(
WIDTH
,
HEIGHT
,
FORMAT
,
CAPACITY
);
var
creator
=
image
.
createImageCreator
(
WIDTH
,
HEIGHT
,
FORMAT
,
CAPACITY
);
if
(
creator
!=
undefined
)
{
if
(
creator
!=
undefined
)
{
globalCreator
=
creator
;
creator
.
dequeueImage
().
then
(
img
=>
{
creator
.
dequeueImage
().
then
(
img
=>
{
if
(
img
==
undefined
)
{
if
(
img
==
undefined
)
{
expect
(
false
).
assertTrue
();
expect
(
false
).
assertTrue
();
done
();
done
();
return
return
}
}
globalImg
=
img
;
img
.
getComponent
(
JPEG
,
async
(
err
,
component
)
=>
{
img
.
getComponent
(
JPEG
,
async
(
err
,
component
)
=>
{
if
(
err
)
{
if
(
err
)
{
expect
(
false
).
assertTrue
();
expect
(
false
).
assertTrue
();
...
@@ -123,11 +143,13 @@ describe('ImageCreator', function () {
...
@@ -123,11 +143,13 @@ describe('ImageCreator', function () {
async
function
queueImageCbError
(
done
,
testNum
,
param
)
{
async
function
queueImageCbError
(
done
,
testNum
,
param
)
{
var
creator
=
image
.
createImageCreator
(
WIDTH
,
HEIGHT
,
FORMAT
,
CAPACITY
);
var
creator
=
image
.
createImageCreator
(
WIDTH
,
HEIGHT
,
FORMAT
,
CAPACITY
);
if
(
creator
!=
undefined
)
{
if
(
creator
!=
undefined
)
{
globalCreator
=
creator
;
creator
.
dequeueImage
().
then
(
img
=>
{
creator
.
dequeueImage
().
then
(
img
=>
{
if
(
img
==
undefined
)
{
if
(
img
==
undefined
)
{
expect
(
false
).
assertTrue
();
expect
(
false
).
assertTrue
();
done
()
done
()
}
else
{
}
else
{
globalImg
=
img
;
img
.
getComponent
(
JPEG
,
(
err
,
component
)
=>
{
img
.
getComponent
(
JPEG
,
(
err
,
component
)
=>
{
if
(
err
)
{
if
(
err
)
{
expect
(
false
).
assertTrue
();
expect
(
false
).
assertTrue
();
...
@@ -187,6 +209,7 @@ describe('ImageCreator', function () {
...
@@ -187,6 +209,7 @@ describe('ImageCreator', function () {
console
.
info
(
'
SUB_GRAPHIC_IMAGE_CREATOR_CREATEIMAGECREATOR_0100 undefined
'
)
console
.
info
(
'
SUB_GRAPHIC_IMAGE_CREATOR_CREATEIMAGECREATOR_0100 undefined
'
)
done
();
done
();
}
else
{
}
else
{
globalCreator
=
creator
;
expect
(
creator
.
size
.
width
==
WIDTH
).
assertTrue
();
expect
(
creator
.
size
.
width
==
WIDTH
).
assertTrue
();
expect
(
creator
.
size
.
height
==
HEIGHT
).
assertTrue
();
expect
(
creator
.
size
.
height
==
HEIGHT
).
assertTrue
();
expect
(
creator
.
capacity
==
CAPACITY
).
assertTrue
();
expect
(
creator
.
capacity
==
CAPACITY
).
assertTrue
();
...
@@ -335,6 +358,7 @@ describe('ImageCreator', function () {
...
@@ -335,6 +358,7 @@ describe('ImageCreator', function () {
it
(
'
SUB_GRAPHIC_IMAGE_CREATOR_RELEASE_PROMISE_0100
'
,
0
,
async
function
(
done
)
{
it
(
'
SUB_GRAPHIC_IMAGE_CREATOR_RELEASE_PROMISE_0100
'
,
0
,
async
function
(
done
)
{
var
creator
=
image
.
createImageCreator
(
WIDTH
,
HEIGHT
,
FORMAT
,
CAPACITY
);
var
creator
=
image
.
createImageCreator
(
WIDTH
,
HEIGHT
,
FORMAT
,
CAPACITY
);
if
(
creator
!=
undefined
)
{
if
(
creator
!=
undefined
)
{
globalCreator
=
creator
;
creator
.
release
().
then
(()
=>
{
creator
.
release
().
then
(()
=>
{
console
.
info
(
'
SUB_GRAPHIC_IMAGE_CREATOR_RELEASE_PROMISE_0100 release
'
);
console
.
info
(
'
SUB_GRAPHIC_IMAGE_CREATOR_RELEASE_PROMISE_0100 release
'
);
expect
(
true
).
assertTrue
();
expect
(
true
).
assertTrue
();
...
@@ -363,6 +387,7 @@ describe('ImageCreator', function () {
...
@@ -363,6 +387,7 @@ describe('ImageCreator', function () {
it
(
'
SUB_GRAPHIC_IMAGE_CREATOR_RELEASE_CALLBACK_0100
'
,
0
,
async
function
(
done
)
{
it
(
'
SUB_GRAPHIC_IMAGE_CREATOR_RELEASE_CALLBACK_0100
'
,
0
,
async
function
(
done
)
{
var
creator
=
image
.
createImageCreator
(
WIDTH
,
HEIGHT
,
FORMAT
,
CAPACITY
);
var
creator
=
image
.
createImageCreator
(
WIDTH
,
HEIGHT
,
FORMAT
,
CAPACITY
);
if
(
creator
!=
undefined
)
{
if
(
creator
!=
undefined
)
{
globalCreator
=
creator
;
creator
.
release
((
err
)
=>
{
creator
.
release
((
err
)
=>
{
if
(
err
)
{
if
(
err
)
{
console
.
info
(
'
SUB_GRAPHIC_IMAGE_CREATOR_RELEASE_CALLBACK_0100 release call back
'
+
err
);
console
.
info
(
'
SUB_GRAPHIC_IMAGE_CREATOR_RELEASE_CALLBACK_0100 release call back
'
+
err
);
...
@@ -394,9 +419,11 @@ describe('ImageCreator', function () {
...
@@ -394,9 +419,11 @@ describe('ImageCreator', function () {
it
(
'
SUB_GRAPHIC_IMAGE_CREATOR_DEQUEUEIMAGE_PROMISE_0100
'
,
0
,
async
function
(
done
)
{
it
(
'
SUB_GRAPHIC_IMAGE_CREATOR_DEQUEUEIMAGE_PROMISE_0100
'
,
0
,
async
function
(
done
)
{
var
creator
=
image
.
createImageCreator
(
WIDTH
,
HEIGHT
,
FORMAT
,
CAPACITY
);
var
creator
=
image
.
createImageCreator
(
WIDTH
,
HEIGHT
,
FORMAT
,
CAPACITY
);
if
(
creator
!=
undefined
)
{
if
(
creator
!=
undefined
)
{
globalCreator
=
creator
;
creator
.
dequeueImage
().
then
(
img
=>
{
creator
.
dequeueImage
().
then
(
img
=>
{
console
.
info
(
'
SUB_GRAPHIC_IMAGE_CREATOR_DEQUEUEIMAGE_PROMISE_0100 dequeueImage Success
'
);
console
.
info
(
'
SUB_GRAPHIC_IMAGE_CREATOR_DEQUEUEIMAGE_PROMISE_0100 dequeueImage Success
'
);
expect
(
img
!=
undefined
).
assertTrue
();
expect
(
img
!=
undefined
).
assertTrue
();
globalImg
=
img
;
done
();
done
();
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
console
.
log
(
'
SUB_GRAPHIC_IMAGE_CREATOR_DEQUEUEIMAGE_PROMISE_0100 error:
'
+
error
);
console
.
log
(
'
SUB_GRAPHIC_IMAGE_CREATOR_DEQUEUEIMAGE_PROMISE_0100 error:
'
+
error
);
...
@@ -423,6 +450,7 @@ describe('ImageCreator', function () {
...
@@ -423,6 +450,7 @@ describe('ImageCreator', function () {
it
(
'
SUB_GRAPHIC_IMAGE_CREATOR_DEQUEUEIMAGE_CALLBACK_0100
'
,
0
,
async
function
(
done
)
{
it
(
'
SUB_GRAPHIC_IMAGE_CREATOR_DEQUEUEIMAGE_CALLBACK_0100
'
,
0
,
async
function
(
done
)
{
var
creator
=
image
.
createImageCreator
(
WIDTH
,
HEIGHT
,
FORMAT
,
CAPACITY
);
var
creator
=
image
.
createImageCreator
(
WIDTH
,
HEIGHT
,
FORMAT
,
CAPACITY
);
if
(
creator
!=
undefined
)
{
if
(
creator
!=
undefined
)
{
globalCreator
=
creator
;
creator
.
dequeueImage
((
err
,
img
)
=>
{
creator
.
dequeueImage
((
err
,
img
)
=>
{
if
(
err
)
{
if
(
err
)
{
console
.
info
(
'
SUB_GRAPHIC_IMAGE_CREATOR_DEQUEUEIMAGE_CALLBACK_0100 err:
'
+
err
);
console
.
info
(
'
SUB_GRAPHIC_IMAGE_CREATOR_DEQUEUEIMAGE_CALLBACK_0100 err:
'
+
err
);
...
@@ -430,6 +458,7 @@ describe('ImageCreator', function () {
...
@@ -430,6 +458,7 @@ describe('ImageCreator', function () {
done
();
done
();
return
;
return
;
}
}
globalImg
=
img
;
console
.
info
(
'
SUB_GRAPHIC_IMAGE_CREATOR_DEQUEUEIMAGE_CALLBACK_0100 dequeueImage call back Success
'
);
console
.
info
(
'
SUB_GRAPHIC_IMAGE_CREATOR_DEQUEUEIMAGE_CALLBACK_0100 dequeueImage call back Success
'
);
expect
(
img
!=
undefined
).
assertTrue
();
expect
(
img
!=
undefined
).
assertTrue
();
done
();
done
();
...
@@ -455,12 +484,14 @@ describe('ImageCreator', function () {
...
@@ -455,12 +484,14 @@ describe('ImageCreator', function () {
it
(
'
SUB_GRAPHIC_IMAGE_CREATOR_QUEUEIMAGE_PROMISE_0200
'
,
0
,
async
function
(
done
)
{
it
(
'
SUB_GRAPHIC_IMAGE_CREATOR_QUEUEIMAGE_PROMISE_0200
'
,
0
,
async
function
(
done
)
{
var
creator
=
image
.
createImageCreator
(
WIDTH
,
HEIGHT
,
FORMAT
,
CAPACITY
);
var
creator
=
image
.
createImageCreator
(
WIDTH
,
HEIGHT
,
FORMAT
,
CAPACITY
);
if
(
creator
!=
undefined
)
{
if
(
creator
!=
undefined
)
{
globalCreator
=
creator
;
creator
.
dequeueImage
().
then
(
img
=>
{
creator
.
dequeueImage
().
then
(
img
=>
{
if
(
img
==
undefined
)
{
if
(
img
==
undefined
)
{
expect
(
false
).
assertTrue
();
expect
(
false
).
assertTrue
();
done
();
done
();
return
;
return
;
}
}
globalImg
=
img
;
img
.
getComponent
(
JPEG
,
(
err
,
component
)
=>
{
img
.
getComponent
(
JPEG
,
(
err
,
component
)
=>
{
if
(
err
)
{
if
(
err
)
{
expect
(
false
).
assertTrue
();
expect
(
false
).
assertTrue
();
...
@@ -564,6 +595,7 @@ describe('ImageCreator', function () {
...
@@ -564,6 +595,7 @@ describe('ImageCreator', function () {
it
(
'
SUB_GRAPHIC_IMAGE_CREATOR_QUEUEIMAGE_CALLBACK_0200
'
,
0
,
async
function
(
done
)
{
it
(
'
SUB_GRAPHIC_IMAGE_CREATOR_QUEUEIMAGE_CALLBACK_0200
'
,
0
,
async
function
(
done
)
{
var
creator
=
image
.
createImageCreator
(
WIDTH
,
HEIGHT
,
FORMAT
,
CAPACITY
);
var
creator
=
image
.
createImageCreator
(
WIDTH
,
HEIGHT
,
FORMAT
,
CAPACITY
);
if
(
creator
!=
undefined
)
{
if
(
creator
!=
undefined
)
{
globalCreator
=
creator
;
creator
.
dequeueImage
((
err
,
img
)
=>
{
creator
.
dequeueImage
((
err
,
img
)
=>
{
if
(
err
||
img
==
undefined
)
{
if
(
err
||
img
==
undefined
)
{
console
.
log
(
'
SUB_GRAPHIC_IMAGE_CREATOR_QUEUEIMAGE_CALLBACK_0200 dequeueImage error:
'
+
err
);
console
.
log
(
'
SUB_GRAPHIC_IMAGE_CREATOR_QUEUEIMAGE_CALLBACK_0200 dequeueImage error:
'
+
err
);
...
@@ -571,7 +603,7 @@ describe('ImageCreator', function () {
...
@@ -571,7 +603,7 @@ describe('ImageCreator', function () {
done
();
done
();
return
;
return
;
}
}
globalImg
=
img
;
img
.
getComponent
(
JPEG
,
(
err
,
component
)
=>
{
img
.
getComponent
(
JPEG
,
(
err
,
component
)
=>
{
if
(
err
)
{
if
(
err
)
{
expect
(
false
).
assertTrue
();
expect
(
false
).
assertTrue
();
...
@@ -687,6 +719,7 @@ describe('ImageCreator', function () {
...
@@ -687,6 +719,7 @@ describe('ImageCreator', function () {
done
()
done
()
return
;
return
;
}
}
globalCreator
=
creator
;
creator
.
on
(
'
imageRelease
'
,
(
err
)
=>
{
creator
.
on
(
'
imageRelease
'
,
(
err
)
=>
{
if
(
err
)
{
if
(
err
)
{
console
.
info
(
'
SUB_GRAPHIC_IMAGE_CREATOR_ON_0100 on release faild
'
+
err
);
console
.
info
(
'
SUB_GRAPHIC_IMAGE_CREATOR_ON_0100 on release faild
'
+
err
);
...
@@ -705,6 +738,7 @@ describe('ImageCreator', function () {
...
@@ -705,6 +738,7 @@ describe('ImageCreator', function () {
done
();
done
();
return
;
return
;
}
}
globalImg
=
img
;
img
.
getComponent
(
JPEG
,
(
err
,
component
)
=>
{
img
.
getComponent
(
JPEG
,
(
err
,
component
)
=>
{
if
(
err
||
component
==
undefined
)
{
if
(
err
||
component
==
undefined
)
{
console
.
info
(
'
SUB_GRAPHIC_IMAGE_CREATOR_ON_0100 getComponent err:
'
+
err
);
console
.
info
(
'
SUB_GRAPHIC_IMAGE_CREATOR_ON_0100 getComponent err:
'
+
err
);
...
...
multimedia/image/image_js_standard/imageModifyProperty/src/main/js/test/modify.test.js
浏览文件 @
26ae5f5a
...
@@ -21,6 +21,7 @@ import featureAbility from "@ohos.ability.featureAbility";
...
@@ -21,6 +21,7 @@ import featureAbility from "@ohos.ability.featureAbility";
export
default
function
imageModifyProperty
()
{
export
default
function
imageModifyProperty
()
{
describe
(
"
imageModifyProperty
"
,
function
()
{
describe
(
"
imageModifyProperty
"
,
function
()
{
let
globalImagesource
;
let
filePath
;
let
filePath
;
async
function
getFd
(
fileName
)
{
async
function
getFd
(
fileName
)
{
let
context
=
await
featureAbility
.
getContext
();
let
context
=
await
featureAbility
.
getContext
();
...
@@ -38,6 +39,14 @@ export default function imageModifyProperty() {
...
@@ -38,6 +39,14 @@ export default function imageModifyProperty() {
});
});
afterEach
(
async
function
()
{
afterEach
(
async
function
()
{
if
(
globalImagesource
!=
undefined
)
{
console
.
info
(
"
globalImagesource release start
"
);
try
{
await
globalImagesource
.
release
();
}
catch
(
error
)
{
console
.
info
(
"
globalImagesource release fail
"
);
}
}
console
.
info
(
"
afterEach case
"
);
console
.
info
(
"
afterEach case
"
);
});
});
...
@@ -59,6 +68,7 @@ export default function imageModifyProperty() {
...
@@ -59,6 +68,7 @@ export default function imageModifyProperty() {
expect
(
false
).
assertTrue
();
expect
(
false
).
assertTrue
();
done
();
done
();
}
else
{
}
else
{
globalImagesource
=
imageSourceApi
;
imageSourceApi
imageSourceApi
.
modifyImageProperty
(
key
,
value
)
.
modifyImageProperty
(
key
,
value
)
.
then
(()
=>
{
.
then
(()
=>
{
...
@@ -97,6 +107,7 @@ export default function imageModifyProperty() {
...
@@ -97,6 +107,7 @@ export default function imageModifyProperty() {
expect
(
false
).
assertTrue
();
expect
(
false
).
assertTrue
();
done
();
done
();
}
else
{
}
else
{
globalImagesource
=
imageSourceApi
;
imageSourceApi
.
modifyImageProperty
(
key
,
value
,
(
error
)
=>
{
imageSourceApi
.
modifyImageProperty
(
key
,
value
,
(
error
)
=>
{
if
(
error
)
{
if
(
error
)
{
expect
(
false
).
assertTrue
();
expect
(
false
).
assertTrue
();
...
@@ -131,6 +142,7 @@ export default function imageModifyProperty() {
...
@@ -131,6 +142,7 @@ export default function imageModifyProperty() {
expect
(
false
).
assertTrue
();
expect
(
false
).
assertTrue
();
done
();
done
();
}
else
{
}
else
{
globalImagesource
=
imageSourceApi
;
let
property
=
{
index
:
0
,
defaultValue
:
"
1
"
};
let
property
=
{
index
:
0
,
defaultValue
:
"
1
"
};
imageSourceApi
.
modifyImageProperty
(
key
,
value
,
property
,
(
error
)
=>
{
imageSourceApi
.
modifyImageProperty
(
key
,
value
,
property
,
(
error
)
=>
{
if
(
error
)
{
if
(
error
)
{
...
@@ -166,6 +178,7 @@ export default function imageModifyProperty() {
...
@@ -166,6 +178,7 @@ export default function imageModifyProperty() {
expect
(
false
).
assertTrue
();
expect
(
false
).
assertTrue
();
done
();
done
();
}
else
{
}
else
{
globalImagesource
=
imageSourceApi
;
imageSourceApi
.
modifyImageProperty
(
key
,
value
,
(
error
)
=>
{
imageSourceApi
.
modifyImageProperty
(
key
,
value
,
(
error
)
=>
{
expect
(
error
.
code
!=
0
).
assertTrue
();
expect
(
error
.
code
!=
0
).
assertTrue
();
console
.
info
(
`
${
testNum
}
errormsg: `
+
error
);
console
.
info
(
`
${
testNum
}
errormsg: `
+
error
);
...
@@ -188,6 +201,7 @@ export default function imageModifyProperty() {
...
@@ -188,6 +201,7 @@ export default function imageModifyProperty() {
expect
(
false
).
assertTrue
();
expect
(
false
).
assertTrue
();
done
();
done
();
}
else
{
}
else
{
globalImagesource
=
imageSourceApi
;
let
property
=
{
index
:
0
,
defaultValue
:
"
1
"
};
let
property
=
{
index
:
0
,
defaultValue
:
"
1
"
};
imageSourceApi
.
modifyImageProperty
(
key
,
value
,
property
,
(
error
)
=>
{
imageSourceApi
.
modifyImageProperty
(
key
,
value
,
property
,
(
error
)
=>
{
expect
(
error
.
code
!=
0
).
assertTrue
();
expect
(
error
.
code
!=
0
).
assertTrue
();
...
@@ -217,6 +231,7 @@ export default function imageModifyProperty() {
...
@@ -217,6 +231,7 @@ export default function imageModifyProperty() {
expect
(
false
).
assertTrue
();
expect
(
false
).
assertTrue
();
done
();
done
();
}
else
{
}
else
{
globalImagesource
=
imageSourceApi
;
imageSourceApi
imageSourceApi
.
modifyImageProperty
(
key
,
value
)
.
modifyImageProperty
(
key
,
value
)
.
then
(()
=>
{
.
then
(()
=>
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录