Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
348d3087
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看板
提交
348d3087
编写于
6月 27, 2022
作者:
L
lwx1121892
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
<liuxueqi3@huawei.com>
Signed-off-by:
N
lwx1121892
<
liuxueqi3@huawei.com
>
上级
dcbec281
变更
9
展开全部
显示空白变更内容
内联
并排
Showing
9 changed file
with
5575 addition
and
5507 deletion
+5575
-5507
multimedia/audio/audio_js_standard/audioManager/Test.json
multimedia/audio/audio_js_standard/audioManager/Test.json
+20
-20
multimedia/audio/audio_js_standard/audioManager/src/main/js/test/AudioCall.test.js
..._standard/audioManager/src/main/js/test/AudioCall.test.js
+184
-164
multimedia/audio/audio_js_standard/audioManager/src/main/js/test/AudioCapturer.test.js
...ndard/audioManager/src/main/js/test/AudioCapturer.test.js
+1290
-1226
multimedia/audio/audio_js_standard/audioManager/src/main/js/test/AudioRenderer.test.js
...ndard/audioManager/src/main/js/test/AudioRenderer.test.js
+4021
-3997
multimedia/audio/audio_js_standard/audioManager/src/main/js/test/AudioVOIP.test.js
..._standard/audioManager/src/main/js/test/AudioVOIP.test.js
+54
-32
multimedia/image/image_js_standard/Test.json
multimedia/image/image_js_standard/Test.json
+1
-1
multimedia/image/image_js_standard/src/main/java/ohos/acts/multimedia/image/MainAbility.java
...src/main/java/ohos/acts/multimedia/image/MainAbility.java
+0
-34
multimedia/image/image_js_standard/src/main/java/ohos/acts/multimedia/image/MyApplication.java
...c/main/java/ohos/acts/multimedia/image/MyApplication.java
+0
-28
multimedia/image/image_js_standard/src/main/js/test/image.test.js
...ia/image/image_js_standard/src/main/js/test/image.test.js
+5
-5
未找到文件。
multimedia/audio/audio_js_standard/audioManager/Test.json
浏览文件 @
348d3087
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
],
],
"type"
:
"AppInstallKit"
,
"type"
:
"AppInstallKit"
,
"run-command"
:
[
"run-command"
:
[
"mkdir /data/a
ccounts/account_0/appdata/ohos.acts.multimedia.audio.audiomanager
/files/media"
"mkdir /data/a
pp/el2/100/base/ohos.acts.multimedia.audio.audiomanager/haps/entry
/files/media"
],
],
"cleanup-apps"
:
true
"cleanup-apps"
:
true
},
},
...
@@ -22,25 +22,25 @@
...
@@ -22,25 +22,25 @@
"pre-push"
:
[
"pre-push"
:
[
],
],
"push"
:
[
"push"
:
[
"./resource/audio/audioManager/Believer.wav ->/data/a
ccounts/account_0/appdata/ohos.acts.multimedia.audio.audiomanager/files
"
,
"./resource/audio/audioManager/Believer.wav ->/data/a
pp/el2/100/base/ohos.acts.multimedia.audio.audiomanager/haps/entry/files/
"
,
"./resource/audio/audioManager/Believer60s.wav ->/data/a
ccounts/account_0/appdata/ohos.acts.multimedia.audio.audiomanager/files
"
,
"./resource/audio/audioManager/Believer60s.wav ->/data/a
pp/el2/100/base/ohos.acts.multimedia.audio.audiomanager/haps/entry/files/
"
,
"./resource/audio/audioManager/StarWars10s-1C-8000-2SW.wav ->/data/a
ccounts/account_0/appdata/ohos.acts.multimedia.audio.audiomanager/files
"
,
"./resource/audio/audioManager/StarWars10s-1C-8000-2SW.wav ->/data/a
pp/el2/100/base/ohos.acts.multimedia.audio.audiomanager/haps/entry/files/
"
,
"./resource/audio/audioManager/StarWars10s-1C-16000-2SW.wav ->/data/a
ccounts/account_0/appdata/ohos.acts.multimedia.audio.audiomanager/files
"
,
"./resource/audio/audioManager/StarWars10s-1C-16000-2SW.wav ->/data/a
pp/el2/100/base/ohos.acts.multimedia.audio.audiomanager/haps/entry/files/
"
,
"./resource/audio/audioManager/StarWars10s-1C-32000-1SW.wav ->/data/a
ccounts/account_0/appdata/ohos.acts.multimedia.audio.audiomanager/files
"
,
"./resource/audio/audioManager/StarWars10s-1C-32000-1SW.wav ->/data/a
pp/el2/100/base/ohos.acts.multimedia.audio.audiomanager/haps/entry/files/
"
,
"./resource/audio/audioManager/StarWars10s-1C-44100-2SW.wav ->/data/a
ccounts/account_0/appdata/ohos.acts.multimedia.audio.audiomanager/files
"
,
"./resource/audio/audioManager/StarWars10s-1C-44100-2SW.wav ->/data/a
pp/el2/100/base/ohos.acts.multimedia.audio.audiomanager/haps/entry/files/
"
,
"./resource/audio/audioManager/StarWars10s-1C-64000-3SW.wav ->/data/a
ccounts/account_0/appdata/ohos.acts.multimedia.audio.audiomanager/files
"
,
"./resource/audio/audioManager/StarWars10s-1C-64000-3SW.wav ->/data/a
pp/el2/100/base/ohos.acts.multimedia.audio.audiomanager/haps/entry/files/
"
,
"./resource/audio/audioManager/StarWars10s-1C-96000-4SW.wav ->/data/a
ccounts/account_0/appdata/ohos.acts.multimedia.audio.audiomanager/files
"
,
"./resource/audio/audioManager/StarWars10s-1C-96000-4SW.wav ->/data/a
pp/el2/100/base/ohos.acts.multimedia.audio.audiomanager/haps/entry/files/
"
,
"./resource/audio/audioManager/StarWars10s-2C-11025-1SW.wav ->/data/a
ccounts/account_0/appdata/ohos.acts.multimedia.audio.audiomanager/files
"
,
"./resource/audio/audioManager/StarWars10s-2C-11025-1SW.wav ->/data/a
pp/el2/100/base/ohos.acts.multimedia.audio.audiomanager/haps/entry/files/
"
,
"./resource/audio/audioManager/StarWars10s-2C-12000-2SW.wav ->/data/a
ccounts/account_0/appdata/ohos.acts.multimedia.audio.audiomanager/files
"
,
"./resource/audio/audioManager/StarWars10s-2C-12000-2SW.wav ->/data/a
pp/el2/100/base/ohos.acts.multimedia.audio.audiomanager/haps/entry/files/
"
,
"./resource/audio/audioManager/StarWars10s-2C-16000-3SW.wav ->/data/a
ccounts/account_0/appdata/ohos.acts.multimedia.audio.audiomanager/files
"
,
"./resource/audio/audioManager/StarWars10s-2C-16000-3SW.wav ->/data/a
pp/el2/100/base/ohos.acts.multimedia.audio.audiomanager/haps/entry/files/
"
,
"./resource/audio/audioManager/StarWars10s-2C-22050-2SW.wav ->/data/a
ccounts/account_0/appdata/ohos.acts.multimedia.audio.audiomanager/files
"
,
"./resource/audio/audioManager/StarWars10s-2C-22050-2SW.wav ->/data/a
pp/el2/100/base/ohos.acts.multimedia.audio.audiomanager/haps/entry/files/
"
,
"./resource/audio/audioManager/StarWars10s-2C-24000-3SW.wav ->/data/a
ccounts/account_0/appdata/ohos.acts.multimedia.audio.audiomanager/files
"
,
"./resource/audio/audioManager/StarWars10s-2C-24000-3SW.wav ->/data/a
pp/el2/100/base/ohos.acts.multimedia.audio.audiomanager/haps/entry/files/
"
,
"./resource/audio/audioManager/StarWars10s-2C-48000-4SW.wav ->/data/a
ccounts/account_0/appdata/ohos.acts.multimedia.audio.audiomanager/files
"
,
"./resource/audio/audioManager/StarWars10s-2C-48000-4SW.wav ->/data/a
pp/el2/100/base/ohos.acts.multimedia.audio.audiomanager/haps/entry/files/
"
,
"./resource/audio/audioManager/Believer.wav ->/data/a
ccounts/account_0/appdata/ohos.acts.multimedia.audio.audiomanager
/files/media"
,
"./resource/audio/audioManager/Believer.wav ->/data/a
pp/el2/100/base/ohos.acts.multimedia.audio.audiomanager/haps/entry
/files/media"
,
"./resource/audio/audioManager/file_example_WAV_1MG.wav ->/data/a
ccounts/account_0/appdata/ohos.acts.multimedia.audio.audiomanager
/files/media"
,
"./resource/audio/audioManager/file_example_WAV_1MG.wav ->/data/a
pp/el2/100/base/ohos.acts.multimedia.audio.audiomanager/haps/entry
/files/media"
,
"./resource/audio/audioManager/safe_and_sound_32.wav ->/data/a
ccounts/account_0/appdata/ohos.acts.multimedia.audio.audiomanager
/files/media"
,
"./resource/audio/audioManager/safe_and_sound_32.wav ->/data/a
pp/el2/100/base/ohos.acts.multimedia.audio.audiomanager/haps/entry
/files/media"
,
"./resource/audio/audioManager/test.mp3 ->/data/a
ccounts/account_0/appdata/ohos.acts.multimedia.audio.audiomanager
/files/media"
,
"./resource/audio/audioManager/test.mp3 ->/data/a
pp/el2/100/base/ohos.acts.multimedia.audio.audiomanager/haps/entry
/files/media"
,
"./resource/audio/audioManager/test.mp4 ->/data/a
ccounts/account_0/appdata/ohos.acts.multimedia.audio.audiomanager
/files/media"
"./resource/audio/audioManager/test.mp4 ->/data/a
pp/el2/100/base/ohos.acts.multimedia.audio.audiomanager/haps/entry
/files/media"
]
]
}
}
]
]
...
...
multimedia/audio/audio_js_standard/audioManager/src/main/js/test/AudioCall.test.js
浏览文件 @
348d3087
此差异已折叠。
点击以展开。
multimedia/audio/audio_js_standard/audioManager/src/main/js/test/AudioCapturer.test.js
浏览文件 @
348d3087
此差异已折叠。
点击以展开。
multimedia/audio/audio_js_standard/audioManager/src/main/js/test/AudioRenderer.test.js
浏览文件 @
348d3087
此差异已折叠。
点击以展开。
multimedia/audio/audio_js_standard/audioManager/src/main/js/test/AudioVOIP.test.js
浏览文件 @
348d3087
...
@@ -28,6 +28,8 @@ describe('audioRenderer_audo2', function () {
...
@@ -28,6 +28,8 @@ describe('audioRenderer_audo2', function () {
var
mediaDir
;
var
mediaDir
;
let
fdRead
;
let
fdRead
;
let
readpath
;
let
readpath
;
let
fdPath
;
let
filePath
;
/*async function getPathName(){
/*async function getPathName(){
var path1 = '/data/app/el1/bundle/public/';
var path1 = '/data/app/el1/bundle/public/';
var packageName;
var packageName;
...
@@ -55,7 +57,7 @@ describe('audioRenderer_audo2', function () {
...
@@ -55,7 +57,7 @@ describe('audioRenderer_audo2', function () {
beforeAll
(
async
function
()
{
beforeAll
(
async
function
()
{
await
applyPermission
();
await
applyPermission
();
console
.
info
(
'
AudioFrameworkTest: beforeAll: Prerequisites at the test suite level
'
);
console
.
info
(
'
AudioFrameworkTest: beforeAll: Prerequisites at the test suite level
'
);
mediaDir
=
'
/data/storage/el2/base/haps/entry/cache
'
;
//
mediaDir = '/data/storage/el2/base/haps/entry/cache';
})
})
beforeEach
(
async
function
()
{
beforeEach
(
async
function
()
{
...
@@ -75,18 +77,15 @@ describe('audioRenderer_audo2', function () {
...
@@ -75,18 +77,15 @@ describe('audioRenderer_audo2', function () {
return
new
Promise
(
resolve
=>
setTimeout
(
resolve
,
ms
));
return
new
Promise
(
resolve
=>
setTimeout
(
resolve
,
ms
));
}
}
async
function
getFileDescriptor
(
fileName
)
{
async
function
getAbilityInfo
(
fileName
)
{
let
fileDescriptor
=
undefined
;
let
context
=
await
featureAbility
.
getContext
();
await
resourceManager
.
getResourceManager
().
then
(
async
(
mgr
)
=>
{
console
.
info
(
"
case0 context is
"
+
context
);
await
mgr
.
getRawFileDescriptor
(
fileName
).
then
(
value
=>
{
await
context
.
getFilesDir
().
then
((
data
)
=>
{
fileDescriptor
=
{
fd
:
value
.
fd
,
offset
:
value
.
offset
,
length
:
value
.
length
};
console
.
info
(
"
case1 getFilesDir is path
"
+
data
);
}).
catch
(
error
=>
{
mediaDir
=
data
+
'
/
'
+
fileName
;
console
.
log
(
'
AudioFrameworkRenderLog:case getRawFileDescriptor err:
'
+
error
);
console
.
info
(
'
case2 mediaDir is
'
+
mediaDir
);
});
})
});
return
fileDescriptor
;
}
}
async
function
closeFileDescriptor
(
fileName
)
{
async
function
closeFileDescriptor
(
fileName
)
{
await
resourceManager
.
getResourceManager
().
then
(
async
(
mgr
)
=>
{
await
resourceManager
.
getResourceManager
().
then
(
async
(
mgr
)
=>
{
await
mgr
.
closeRawFileDescriptor
(
fileName
).
then
(
value
=>
{
await
mgr
.
closeRawFileDescriptor
(
fileName
).
then
(
value
=>
{
...
@@ -96,17 +95,39 @@ describe('audioRenderer_audo2', function () {
...
@@ -96,17 +95,39 @@ describe('audioRenderer_audo2', function () {
});
});
});
});
}
}
async
function
getFdRead
(
pathName
,
done
)
{
// async function getFdRead(pathName, done) {
await
getFileDescriptor
(
pathName
).
then
((
res
)
=>
{
// await getFileDescriptor(pathName).then((res) => {
if
(
res
==
undefined
)
{
// if (res == undefined) {
expect
().
assertFail
();
// expect().assertFail();
console
.
info
(
'
AudioFrameworkRenderLog:case error fileDescriptor undefined, open file fail
'
);
// console.info('AudioFrameworkRenderLog:case error fileDescriptor undefined, open file fail');
done
();
// done();
}
else
{
// } else {
fdRead
=
res
.
fd
;
// fdRead = res.fd;
console
.
info
(
"
AudioFrameworkRenderLog:case 0 fdRead is:
"
+
fdRead
);
// console.info("AudioFrameworkRenderLog:case 0 fdRead is: " + fdRead);
}
// }
// })
// }
async
function
getFdRead
(
pathName
)
{
let
context
=
await
featureAbility
.
getContext
();
console
.
info
(
"
case0 context is
"
+
context
);
await
context
.
getFilesDir
().
then
((
data
)
=>
{
console
.
info
(
"
case1 getFilesDir is path
"
+
data
);
filePath
=
data
+
'
/
'
+
pathName
;
console
.
info
(
'
case4 filePath is
'
+
filePath
);
})
})
fdPath
=
'
fd://
'
;
await
fileio
.
open
(
filePath
).
then
((
fdNumber
)
=>
{
fdPath
=
fdPath
+
''
+
fdNumber
;
fdRead
=
fdNumber
;
console
.
info
(
'
[fileIO]case open fd success,fdPath is
'
+
fdPath
);
console
.
info
(
'
[fileIO]case open fd success,fdRead is
'
+
fdRead
);
},
(
err
)
=>
{
console
.
info
(
'
[fileIO]case open fd failed
'
);
}).
catch
((
err
)
=>
{
console
.
info
(
'
[fileIO]case catch open fd failed
'
);
});
}
}
async
function
applyPermission
()
{
async
function
applyPermission
()
{
...
@@ -434,13 +455,13 @@ describe('audioRenderer_audo2', function () {
...
@@ -434,13 +455,13 @@ describe('audioRenderer_audo2', function () {
rendererInfo
:
AudioRendererInfo
rendererInfo
:
AudioRendererInfo
}
}
readpath
=
'
StarWars10s-1C-44100-2SW.wav
'
;
//
readpath = 'StarWars10s-1C-44100-2SW.wav';
await
getFdRead
(
readpath
,
done
);
await
getFdRead
(
"
StarWars10s-1C-44100-2SW.wav
"
);
var
resultFlag
=
await
playbackPromise
(
AudioRendererOptions
,
readp
ath
,
audio
.
AudioScene
.
AUDIO_SCENE_VOICE_CHAT
);
var
resultFlag
=
await
playbackPromise
(
AudioRendererOptions
,
fileP
ath
,
audio
.
AudioScene
.
AUDIO_SCENE_VOICE_CHAT
);
await
sleep
(
100
);
await
sleep
(
100
);
console
.
info
(
'
AudioFrameworkRenderLog: resultFlag :
'
+
resultFlag
);
console
.
info
(
'
AudioFrameworkRenderLog: resultFlag :
'
+
resultFlag
);
expect
(
resultFlag
).
assertTrue
();
expect
(
resultFlag
).
assertTrue
();
await
closeFileDescriptor
(
readp
ath
);
await
closeFileDescriptor
(
fileP
ath
);
done
();
done
();
})
})
...
@@ -470,8 +491,9 @@ describe('audioRenderer_audo2', function () {
...
@@ -470,8 +491,9 @@ describe('audioRenderer_audo2', function () {
streamInfo
:
AudioStreamInfo
,
streamInfo
:
AudioStreamInfo
,
capturerInfo
:
AudioCapturerInfo
capturerInfo
:
AudioCapturerInfo
}
}
await
getAbilityInfo
(
"
capture_js-44100-2C-16B.pcm
"
);
var
resultFlag
=
await
recPromise
(
AudioCapturerOptions
,
mediaDir
+
'
/capture_js-44100-2C-16B.pcm
'
,
audio
.
AudioScene
.
AUDIO_SCENE_VOICE_CHAT
);
var
resultFlag
=
await
recPromise
(
AudioCapturerOptions
,
mediaDir
,
audio
.
AudioScene
.
AUDIO_SCENE_VOICE_CHAT
);
// var resultFlag = await recPromise(AudioCapturerOptions, mediaDir+'/capture_js-44100-2C-16B.pcm', audio.AudioScene.AUDIO_SCENE_VOICE_CHAT);
await
sleep
(
100
);
await
sleep
(
100
);
console
.
info
(
'
AudioFrameworkRenderLog: resultFlag :
'
+
resultFlag
);
console
.
info
(
'
AudioFrameworkRenderLog: resultFlag :
'
+
resultFlag
);
expect
(
resultFlag
).
assertTrue
();
expect
(
resultFlag
).
assertTrue
();
...
@@ -522,17 +544,17 @@ describe('audioRenderer_audo2', function () {
...
@@ -522,17 +544,17 @@ describe('audioRenderer_audo2', function () {
streamInfo
:
AudioStreamInfoRen
,
streamInfo
:
AudioStreamInfoRen
,
rendererInfo
:
AudioRendererInfo
rendererInfo
:
AudioRendererInfo
}
}
await
getAbilityInfo
(
"
capture_js-44100-2C-16B-2.pcm
"
);
recPromise
(
AudioCapturerOptions
,
mediaDir
+
'
/capture_js-44100-2C-16B-2.pcm
'
,
audio
.
AudioScene
.
AUDIO_SCENE_PHONE_CHAT
);
recPromise
(
AudioCapturerOptions
,
mediaDir
,
audio
.
AudioScene
.
AUDIO_SCENE_PHONE_CHAT
);
await
sleep
(
500
);
await
sleep
(
500
);
readpath
=
'
StarWars10s-1C-44100-2SW.wav
'
;
readpath
=
'
StarWars10s-1C-44100-2SW.wav
'
;
await
getFdRead
(
readpath
,
done
);
await
getFdRead
(
readpath
);
var
resultFlag
=
await
playbackPromise
(
AudioRendererOptions
,
readpath
,
audio
.
AudioScene
.
AUDIO_SCENE_VOICE_CHAT
);
var
resultFlag
=
await
playbackPromise
(
AudioRendererOptions
,
readpath
,
audio
.
AudioScene
.
AUDIO_SCENE_VOICE_CHAT
);
await
sleep
(
100
);
await
sleep
(
100
);
console
.
info
(
'
AudioFrameworkRenderLog: resultFlag :
'
+
resultFlag
);
console
.
info
(
'
AudioFrameworkRenderLog: resultFlag :
'
+
resultFlag
);
expect
(
resultFlag
).
assertTrue
();
expect
(
resultFlag
).
assertTrue
();
await
closeFileDescriptor
(
readpath
,
done
);
await
closeFileDescriptor
(
readpath
);
done
();
done
();
})
})
...
...
multimedia/image/image_js_standard/Test.json
浏览文件 @
348d3087
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
{
{
"type"
:
"ShellKit"
,
"type"
:
"ShellKit"
,
"run-command"
:
[
"run-command"
:
[
"mkdir /data/app/el2/100/base/ohos.acts.multimedia.image/haps/entry/cache/"
,
"mkdir
-p
/data/app/el2/100/base/ohos.acts.multimedia.image/haps/entry/cache/"
,
"chmod -R 666 /data/app/el2/100/base/ohos.acts.multimedia.image/haps/entry/cache/*"
"chmod -R 666 /data/app/el2/100/base/ohos.acts.multimedia.image/haps/entry/cache/*"
],
],
"teardown-command"
:[
"teardown-command"
:[
...
...
multimedia/image/image_js_standard/src/main/java/ohos/acts/multimedia/image/MainAbility.java
已删除
100644 → 0
浏览文件 @
dcbec281
/*
* Copyright (C) 2021 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
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
ohos.acts.multimedia.image
;
import
ohos.ace.ability.AceAbility
;
import
ohos.aafwk.content.Intent
;
/*
* java MainAbility
*/
public
class
MainAbility
extends
AceAbility
{
@Override
public
void
onStart
(
Intent
intent
)
{
super
.
onStart
(
intent
);
}
@Override
public
void
onStop
()
{
super
.
onStop
();
}
}
multimedia/image/image_js_standard/src/main/java/ohos/acts/multimedia/image/MyApplication.java
已删除
100644 → 0
浏览文件 @
dcbec281
/*
* Copyright (C) 2021 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
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
ohos.acts.multimedia.image
;
import
ohos.aafwk.ability.AbilityPackage
;
/*
* java MyApplication
*/
public
class
MyApplication
extends
AbilityPackage
{
@Override
public
void
onInitialize
()
{
super
.
onInitialize
();
}
}
multimedia/image/image_js_standard/src/main/js/test/image.test.js
浏览文件 @
348d3087
...
@@ -2412,7 +2412,7 @@ describe('Image', function () {
...
@@ -2412,7 +2412,7 @@ describe('Image', function () {
expect
(
false
).
assertTrue
();
expect
(
false
).
assertTrue
();
done
();
done
();
}
else
{
}
else
{
let
packOpts
=
{
format
:
[
"
image/jpeg
"
]
,
quality
:
99
}
let
packOpts
=
{
format
:
"
image/jpeg
"
,
quality
:
99
}
imagePackerApi
.
packing
(
imageSourceApi
,
packOpts
)
imagePackerApi
.
packing
(
imageSourceApi
,
packOpts
)
.
then
(
data
=>
{
.
then
(
data
=>
{
console
.
info
(
'
TC_062 success
'
);
console
.
info
(
'
TC_062 success
'
);
...
@@ -2460,7 +2460,7 @@ describe('Image', function () {
...
@@ -2460,7 +2460,7 @@ describe('Image', function () {
expect
(
false
).
assertTrue
();
expect
(
false
).
assertTrue
();
done
();
done
();
}
else
{
}
else
{
let
packOpts
=
{
format
:
[
"
image/jpeg
"
]
,
quality
:
1
}
let
packOpts
=
{
format
:
"
image/jpeg
"
,
quality
:
1
}
imagePackerApi
.
packing
(
imageSourceApi
,
packOpts
,
(
err
,
data
)
=>
{
imagePackerApi
.
packing
(
imageSourceApi
,
packOpts
,
(
err
,
data
)
=>
{
console
.
info
(
'
TC_062-1 success
'
);
console
.
info
(
'
TC_062-1 success
'
);
expect
(
data
!=
undefined
).
assertTrue
();
expect
(
data
!=
undefined
).
assertTrue
();
...
@@ -2692,7 +2692,7 @@ describe('Image', function () {
...
@@ -2692,7 +2692,7 @@ describe('Image', function () {
expect
(
false
).
assertTrue
();
expect
(
false
).
assertTrue
();
done
();
done
();
}
else
{
}
else
{
let
packOpts
=
{
format
:
[
"
image/jpeg
"
]
,
quality
:
100
}
let
packOpts
=
{
format
:
"
image/jpeg
"
,
quality
:
100
}
imagePackerApi
.
packing
(
imageSourceApi
,
packOpts
,
(
err
,
data
)
=>
{
imagePackerApi
.
packing
(
imageSourceApi
,
packOpts
,
(
err
,
data
)
=>
{
if
(
err
)
{
if
(
err
)
{
expect
(
false
).
assertTrue
();
expect
(
false
).
assertTrue
();
...
@@ -2745,7 +2745,7 @@ describe('Image', function () {
...
@@ -2745,7 +2745,7 @@ describe('Image', function () {
expect
(
false
).
assertTrue
();
expect
(
false
).
assertTrue
();
done
();
done
();
}
else
{
}
else
{
let
packOpts
=
{
format
:
[
"
image/jpeg
"
]
,
quality
:
0
}
let
packOpts
=
{
format
:
"
image/jpeg
"
,
quality
:
0
}
imagePackerApi
.
packing
(
imageSourceApi
,
packOpts
,
(
err
,
data
)
=>
{
imagePackerApi
.
packing
(
imageSourceApi
,
packOpts
,
(
err
,
data
)
=>
{
console
.
info
(
'
TC_062-8 success
'
);
console
.
info
(
'
TC_062-8 success
'
);
expect
(
data
!=
undefined
).
assertTrue
();
expect
(
data
!=
undefined
).
assertTrue
();
...
@@ -2785,7 +2785,7 @@ describe('Image', function () {
...
@@ -2785,7 +2785,7 @@ describe('Image', function () {
expect
(
false
).
assertTrue
();
expect
(
false
).
assertTrue
();
done
();
done
();
}
else
{
}
else
{
let
packOpts
=
{
format
:
[
"
image/jpeg
"
]
,
quality
:
-
1
}
let
packOpts
=
{
format
:
"
image/jpeg
"
,
quality
:
-
1
}
imagePackerApi
.
packing
(
imageSourceApi
,
packOpts
,
(
err
,
data
)
=>
{
imagePackerApi
.
packing
(
imageSourceApi
,
packOpts
,
(
err
,
data
)
=>
{
console
.
info
(
'
TC_062-9 success
'
);
console
.
info
(
'
TC_062-9 success
'
);
expect
(
data
==
undefined
).
assertTrue
();
expect
(
data
==
undefined
).
assertTrue
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录