Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
838f3009
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看板
提交
838f3009
编写于
7月 09, 2022
作者:
N
NOBUGGERS
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
recorder profile xts testcase Signed-off-by: NOBUGGERS <ruanmeng@huawei.com>
Signed-off-by:
N
NOBUGGERS
<
ruanmeng@huawei.com
>
上级
0da8a211
变更
6
展开全部
隐藏空白更改
内联
并排
Showing
6 changed file
with
0 addition
and
2233 deletion
+0
-2233
multimedia/media/media_js_standard/recorderProfile/src/main/js/test/ProfileFuncCallbackTest.test.js
...rProfile/src/main/js/test/ProfileFuncCallbackTest.test.js
+0
-113
multimedia/media/media_js_standard/recorderProfile/src/main/js/test/ProfileFuncPromiseTest.test.js
...erProfile/src/main/js/test/ProfileFuncPromiseTest.test.js
+0
-75
multimedia/media/media_js_standard/recorderProfile/src/main/js/test/bak/ProfileAbnormalTest.test.js
...rProfile/src/main/js/test/bak/ProfileAbnormalTest.test.js
+0
-401
multimedia/media/media_js_standard/recorderProfile/src/main/js/test/bak/ProfileTest.test.js
.../recorderProfile/src/main/js/test/bak/ProfileTest.test.js
+0
-788
multimedia/media/media_js_standard/recorderProfile/src/main/js/test/bak/ProfileTestPromise.test.js
...erProfile/src/main/js/test/bak/ProfileTestPromise.test.js
+0
-856
multimedia/media/media_js_standard/recorderProfile/src/main/js/test/profileTest.rar
...standard/recorderProfile/src/main/js/test/profileTest.rar
+0
-0
未找到文件。
multimedia/media/media_js_standard/recorderProfile/src/main/js/test/ProfileFuncCallbackTest.test.js
已删除
100644 → 0
浏览文件 @
0da8a211
/*
* Copyright (C) 2022 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.
*/
import
media
from
'
@ohos.multimedia.media
'
import
{
checkAudioArray
,
checkVideoArray
}
from
'
./ProfileTestBase.js
'
;
import
{
describe
,
beforeAll
,
beforeEach
,
afterEach
,
afterAll
,
it
,
expect
}
from
'
deccjsunit/index
'
describe
(
'
ProfileFuncCallbackTest
'
,
function
()
{
beforeAll
(
function
()
{
console
.
info
(
'
beforeAll case
'
);
})
beforeEach
(
async
function
()
{
console
.
info
(
'
beforeEach case
'
);
})
afterEach
(
function
()
{
console
.
info
(
'
afterEach case
'
);
})
afterAll
(
function
()
{
console
.
info
(
'
afterAll case
'
);
})
async
function
getAudioRecorderCapsTest
(
done
)
{
media
.
getMediaCapability
((
err
,
mediaCaps
)
=>
{
expect
(
err
).
assertUndefined
();
console
.
info
(
'
getMediaCapability success
'
);
if
(
typeof
(
mediaCaps
)
!=
'
undefined
'
)
{
mediaCaps
.
getAudioRecorderCaps
((
err
,
audioCapsArray
)
=>
{
expect
(
err
).
assertUndefined
();
console
.
info
(
'
getAudioRecorderCaps success
'
);
if
(
typeof
(
audioCapsArray
)
!=
'
undefined
'
)
{
checkAudioArray
(
audioCapsArray
,
done
);
}
else
{
console
.
info
(
'
audioCaps is not defined
'
);
expect
().
assertFail
();
done
();
}
})
}
else
{
console
.
info
(
'
mediaCaps is not defined
'
);
expect
().
assertFail
();
done
();
}
})
}
async
function
getVideoRecorderCapsTest
(
done
)
{
media
.
getMediaCapability
((
err
,
mediaCaps
)
=>
{
expect
(
err
).
assertUndefined
();
console
.
info
(
'
getMediaCapability success
'
);
if
(
typeof
(
mediaCaps
)
!=
'
undefined
'
)
{
mediaCaps
.
getVideoRecorderCaps
((
err
,
videoCapsArray
)
=>
{
expect
(
err
).
assertUndefined
();
console
.
info
(
'
getVideoRecorderCapsTest success
'
);
if
(
typeof
(
videoCapsArray
)
!=
'
undefined
'
)
{
checkVideoArray
(
videoCapsArray
,
done
);
}
else
{
console
.
info
(
'
videoCaps is not defined
'
);
expect
().
assertFail
();
done
();
}
})
}
else
{
console
.
info
(
'
mediaCaps is not defined
'
);
expect
().
assertFail
();
done
();
}
})
}
/* *
* @tc.number : SUB_PROFILE_FUNCTION_CALLBACK_0100
* @tc.name : 01.test getAudioRecorderCaps
* @tc.desc : outputFormat/audioEncoderMime/sampleRates/bitrateRange/channelRange
* @tc.size : MediumTest
* @tc.type : Function test
* @tc.level : Level0
*/
it
(
'
SUB_PROFILE_FUNCTION_CALLBACK_0100
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
test getAudioRecorderCaps
"
);
getAudioRecorderCapsTest
(
done
);
console
.
info
(
"
test getAudioRecorderCaps 111
"
);
})
/* *
* @tc.number : SUB_PROFILE_FUNCTION_CALLBACK_0200
* @tc.name : 02.test getVideoRecorderCapsTest
* @tc.desc : audioEncoderMime/sampleRates/bitrateRange/channelRange
* @tc.size : MediumTest
* @tc.type : Function test
* @tc.level : Level0
*/
it
(
'
SUB_PROFILE_FUNCTION_CALLBACK_0200
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
test getAudioRecorderCaps
"
);
getVideoRecorderCapsTest
(
done
);
})
})
multimedia/media/media_js_standard/recorderProfile/src/main/js/test/ProfileFuncPromiseTest.test.js
已删除
100644 → 0
浏览文件 @
0da8a211
/*
* Copyright (C) 2022 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.
*/
import
media
from
'
@ohos.multimedia.media
'
import
{
checkAudioArray
,
checkVideoArray
}
from
'
./ProfileTestBase.js
'
;
import
{
describe
,
beforeAll
,
beforeEach
,
afterEach
,
afterAll
,
it
,
expect
}
from
'
deccjsunit/index
'
describe
(
'
ProfileFuncPromiseTest
'
,
function
()
{
beforeAll
(
function
()
{
console
.
info
(
'
beforeAll case
'
);
})
beforeEach
(
async
function
()
{
console
.
info
(
'
beforeEach case
'
);
})
afterEach
(
function
()
{
console
.
info
(
'
afterEach case
'
);
})
afterAll
(
function
()
{
console
.
info
(
'
afterAll case
'
);
})
async
function
getAudioRecorderCapsTest
(
done
)
{
await
media
.
getMediaCapability
().
then
(
async
(
mediaCaps
)
=>
{
console
.
info
(
'
getMediaCapability success
'
);
if
(
typeof
(
mediaCaps
)
!=
'
undefined
'
)
{
await
mediaCaps
.
getAudioRecorderCaps
().
then
(
async
(
audioCapsArray
)
=>
{
console
.
info
(
'
getAudioRecorderCaps success
'
);
if
(
typeof
(
audioCapsArray
)
!=
'
undefined
'
)
{
return
audioCapsArray
;
}
else
{
console
.
info
(
'
audioCaps is not defined
'
);
expect
().
assertFail
();
done
();
}
})
}
else
{
console
.
info
(
'
mediaCaps is not defined
'
);
expect
().
assertFail
();
done
();
}
})
}
/* *
* @tc.number : SUB_PROFILE_FUNCTION_PROMISE_0100
* @tc.name : 01.test getAudioRecorderCaps
* @tc.desc : outputFormat/audioEncoderMime/sampleRates/bitrateRange/channelRange
* @tc.size : MediumTest
* @tc.type : Function test
* @tc.level : Level0
*/
it
(
'
SUB_PROFILE_FUNCTION_PROMISE_0100
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
test getAudioRecorderCaps
"
);
let
audioCapsArray
=
getAudioRecorderCapsTest
(
done
);
checkAudioArray
(
audioCapsArray
,
done
);
console
.
info
(
"
test getAudioRecorderCaps 111
"
);
})
})
multimedia/media/media_js_standard/recorderProfile/src/main/js/test/bak/ProfileAbnormalTest.test.js
已删除
100644 → 0
浏览文件 @
0da8a211
/*
* Copyright (C) 2022 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.
*/
import
media
from
'
@ohos.multimedia.media
'
import
{
describe
,
beforeAll
,
beforeEach
,
afterEach
,
afterAll
,
it
,
expect
}
from
'
deccjsunit/index
'
describe
(
'
VideoRecorderProfileAbnormalCallback
'
,
function
()
{
/* *
* @tc.number : SUB_PROFILE_ABNORMAL_CALLBACK_0100
* @tc.name : 01.test getVideoRecorderProfile
* @tc.desc : sourceId -1 qualityLevel 0
* @tc.size : MediumTest
* @tc.type : Function test
* @tc.level : Level0
*/
it
(
'
SUB_PROFILE_ABNORMAL_CALLBACK_0100
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
test getVideoRecorderProfile
"
);
media
.
getMediaCapability
((
err
,
mediaCaps
)
=>
{
expect
(
err
).
assertUndefined
();
console
.
info
(
'
getMediaCapability success
'
);
if
(
typeof
(
mediaCaps
)
!=
'
undefined
'
)
{
mediaCaps
.
getVideoRecorderProfile
(
-
1
,
0
,
(
err
,
videoCapsArray
)
=>
{
expect
(
err
).
assertUndefined
();
console
.
info
(
'
getVideoRecorderProfile success
'
);
done
();
})
}
else
{
console
.
info
(
'
mediaCaps is not defined
'
);
done
();
}
})
})
/* *
* @tc.number : SUB_PROFILE_ABNORMAL_CALLBACK_0200
* @tc.name : 02.test getVideoRecorderProfile
* @tc.desc : sourceId 0 qualityLevel -1
* @tc.size : MediumTest
* @tc.type : Function test
* @tc.level : Level0
*/
it
(
'
SUB_PROFILE_ABNORMAL_CALLBACK_0200
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
test getVideoRecorderProfile
"
);
media
.
getMediaCapability
((
err
,
mediaCaps
)
=>
{
expect
(
err
).
assertUndefined
();
console
.
info
(
'
getMediaCapability success
'
);
if
(
typeof
(
mediaCaps
)
!=
'
undefined
'
)
{
mediaCaps
.
getVideoRecorderProfile
(
0
,
-
1
,
(
err
,
videoCapsArray
)
=>
{
expect
(
err
).
assertUndefined
();
console
.
info
(
'
getVideoRecorderProfile success
'
);
done
();
})
}
else
{
console
.
info
(
'
mediaCaps is not defined
'
);
done
();
}
})
})
/* *
* @tc.number : SUB_PROFILE_ABNORMAL_CALLBACK_0300
* @tc.name : 03.test getVideoRecorderProfile
* @tc.desc : sourceId 100000 qualityLevel 0
* @tc.size : MediumTest
* @tc.type : Function test
* @tc.level : Level0
*/
it
(
'
SUB_PROFILE_ABNORMAL_CALLBACK_0300
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
test getVideoRecorderProfile
"
);
media
.
getMediaCapability
((
err
,
mediaCaps
)
=>
{
expect
(
err
).
assertUndefined
();
console
.
info
(
'
getMediaCapability success
'
);
if
(
typeof
(
mediaCaps
)
!=
'
undefined
'
)
{
mediaCaps
.
getVideoRecorderProfile
(
100000
,
0
,
(
err
,
videoCapsArray
)
=>
{
expect
(
err
).
assertUndefined
();
console
.
info
(
'
getVideoRecorderProfile success
'
);
done
();
})
}
else
{
console
.
info
(
'
mediaCaps is not defined
'
);
done
();
}
})
})
/* *
* @tc.number : SUB_PROFILE_ABNORMAL_CALLBACK_0400
* @tc.name : 04.test getVideoRecorderProfile
* @tc.desc : sourceId 0 qualityLevel 100000
* @tc.size : MediumTest
* @tc.type : Function test
* @tc.level : Level0
*/
it
(
'
SUB_PROFILE_ABNORMAL_CALLBACK_0400
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
test getVideoRecorderProfile
"
);
media
.
getMediaCapability
((
err
,
mediaCaps
)
=>
{
expect
(
err
).
assertUndefined
();
console
.
info
(
'
getMediaCapability success
'
);
if
(
typeof
(
mediaCaps
)
!=
'
undefined
'
)
{
mediaCaps
.
getVideoRecorderProfile
(
0
,
100000
,
(
err
,
videoCapsArray
)
=>
{
expect
(
err
).
assertUndefined
();
console
.
info
(
'
getVideoRecorderProfile success
'
);
done
();
})
}
else
{
console
.
info
(
'
mediaCaps is not defined
'
);
done
();
}
})
})
/* *
* @tc.number : SUB_PROFILE_ABNORMAL_CALLBACK_0500
* @tc.name : 05.test isAudioRecoderConfigSupported
* @tc.desc : isAudioRecoderConfigSupported false
* @tc.size : MediumTest
* @tc.type : Function test
* @tc.level : Level0
*/
it
(
'
SUB_PROFILE_ABNORMAL_CALLBACK_0500
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
test isAudioRecoderConfigSupported
"
);
let
audioProfile
=
{
"
outputFormat
"
:
'
aaa
'
,
"
audioEncoderMime
"
:
media
.
CodecMimeType
.
AUDIO_AAC
,
"
bitrate
"
:
8000
,
"
sampleRate
"
:
500
,
"
channel
"
:
1
,
}
media
.
getMediaCapability
((
err
,
mediaCaps
)
=>
{
expect
(
err
).
assertUndefined
();
console
.
info
(
'
getMediaCapability success
'
);
if
(
typeof
(
mediaCaps
)
!=
'
undefined
'
)
{
mediaCaps
.
isAudioRecoderConfigSupported
(
audioProfile
,
(
err
,
ean
)
=>
{
expect
(
err
).
assertUndefined
();
expect
(
ean
).
assertEqual
(
false
);
console
.
info
(
'
isAudioRecoderConfigSupported: success
'
);
done
();
})
}
else
{
console
.
info
(
'
mediaCaps is not defined
'
);
done
();
}
})
})
/* *
* @tc.number : SUB_PROFILE_ABNORMAL_CALLBACK_0600
* @tc.name : 06.test hasVideoRecorderProfile
* @tc.desc : sourceId -1 qualityLevel 0
* @tc.size : MediumTest
* @tc.type : Function test
* @tc.level : Level0
*/
it
(
'
SUB_PROFILE_ABNORMAL_CALLBACK_0600
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
test hasVideoRecorderProfile
"
);
media
.
getMediaCapability
((
err
,
mediaCaps
)
=>
{
expect
(
err
).
assertUndefined
();
console
.
info
(
'
getMediaCapability success
'
);
if
(
typeof
(
mediaCaps
)
!=
'
undefined
'
)
{
mediaCaps
.
hasVideoRecorderProfile
(
-
1
,
0
,
(
err
,
ean
)
=>
{
expect
(
err
).
assertUndefined
();
expect
(
ean
).
assertEqual
(
false
);
console
.
info
(
'
hasVideoRecorderProfile success
'
);
done
();
})
}
else
{
console
.
info
(
'
mediaCaps is not defined
'
);
done
();
}
})
})
/* *
* @tc.number : SUB_PROFILE_ABNORMAL_CALLBACK_0700
* @tc.name : 07.test hasVideoRecorderProfile
* @tc.desc : sourceId 0 qualityLevel -1
* @tc.size : MediumTest
* @tc.type : Function test
* @tc.level : Level0
*/
it
(
'
SUB_PROFILE_ABNORMAL_CALLBACK_0700
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
test hasVideoRecorderProfile
"
);
media
.
getMediaCapability
((
err
,
mediaCaps
)
=>
{
expect
(
err
).
assertUndefined
();
console
.
info
(
'
getMediaCapability success
'
);
if
(
typeof
(
mediaCaps
)
!=
'
undefined
'
)
{
mediaCaps
.
hasVideoRecorderProfile
(
0
,
-
1
,
(
err
,
ean
)
=>
{
expect
(
err
).
assertUndefined
();
expect
(
ean
).
assertEqual
(
false
);
console
.
info
(
'
hasVideoRecorderProfile success
'
);
done
();
})
}
else
{
console
.
info
(
'
mediaCaps is not defined
'
);
done
();
}
})
})
/* *
* @tc.number : SUB_PROFILE_ABNORMAL_CALLBACK_0800
* @tc.name : 08.test hasVideoRecorderProfile
* @tc.desc : sourceId 100000 qualityLevel 0
* @tc.size : MediumTest
* @tc.type : Function test
* @tc.level : Level0
*/
it
(
'
SUB_PROFILE_ABNORMAL_CALLBACK_0800
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
test hasVideoRecorderProfile
"
);
media
.
getMediaCapability
((
err
,
mediaCaps
)
=>
{
expect
(
err
).
assertUndefined
();
console
.
info
(
'
getMediaCapability success
'
);
if
(
typeof
(
mediaCaps
)
!=
'
undefined
'
)
{
mediaCaps
.
hasVideoRecorderProfile
(
100000
,
0
,
(
err
,
ean
)
=>
{
expect
(
err
).
assertUndefined
();
expect
(
ean
).
assertEqual
(
false
);
console
.
info
(
'
hasVideoRecorderProfile success
'
);
done
();
})
}
else
{
console
.
info
(
'
mediaCaps is not defined
'
);
done
();
}
})
})
/* *
* @tc.number : SUB_PROFILE_ABNORMAL_CALLBACK_0900
* @tc.name : 09.test hasVideoRecorderProfile
* @tc.desc : sourceId 0 qualityLevel 100000
* @tc.size : MediumTest
* @tc.type : Function test
* @tc.level : Level0
*/
it
(
'
SUB_PROFILE_ABNORMAL_CALLBACK_0900
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
test hasVideoRecorderProfile
"
);
media
.
getMediaCapability
((
err
,
mediaCaps
)
=>
{
expect
(
err
).
assertUndefined
();
console
.
info
(
'
getMediaCapability success
'
);
if
(
typeof
(
mediaCaps
)
!=
'
undefined
'
)
{
mediaCaps
.
hasVideoRecorderProfile
(
0
,
100000
,
(
err
,
ean
)
=>
{
expect
(
err
).
assertUndefined
();
expect
(
ean
).
assertEqual
(
false
);
console
.
info
(
'
hasVideoRecorderProfile success
'
);
done
();
})
}
else
{
console
.
info
(
'
mediaCaps is not defined
'
);
done
();
}
})
})
/* *
* @tc.number : SUB_PROFILE_ABNORMAL_CALLBACK_1000
* @tc.name : 10.test isAudioRecoderConfigSupported
* @tc.desc : isAudioRecoderConfigSupported false
* @tc.size : MediumTest
* @tc.type : Function test
* @tc.level : Level0
*/
it
(
'
SUB_PROFILE_ABNORMAL_CALLBACK_1000
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
test isAudioRecoderConfigSupported
"
);
let
audioProfile
=
{
"
outputFormat
"
:
media
.
ContainerFormatType
.
CFT_MPEG_4A
,
"
audioEncoderMime
"
:
'
aaa
'
,
"
bitrate
"
:
8000
,
"
sampleRate
"
:
500
,
"
channel
"
:
1
,
}
media
.
getMediaCapability
((
err
,
mediaCaps
)
=>
{
expect
(
err
).
assertUndefined
();
console
.
info
(
'
getMediaCapability success
'
);
if
(
typeof
(
mediaCaps
)
!=
'
undefined
'
)
{
mediaCaps
.
isAudioRecoderConfigSupported
(
audioProfile
,
(
err
,
ean
)
=>
{
expect
(
err
).
assertUndefined
();
expect
(
ean
).
assertEqual
(
false
);
console
.
info
(
'
isAudioRecoderConfigSupported: success
'
);
done
();
})
}
else
{
console
.
info
(
'
mediaCaps is not defined
'
);
done
();
}
})
})
/* *
* @tc.number : SUB_PROFILE_ABNORMAL_CALLBACK_1100
* @tc.name : 11.test isAudioRecoderConfigSupported
* @tc.desc : isAudioRecoderConfigSupported false
* @tc.size : MediumTest
* @tc.type : Function test
* @tc.level : Level0
*/
it
(
'
SUB_PROFILE_ABNORMAL_CALLBACK_1100
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
test isAudioRecoderConfigSupported
"
);
let
audioProfile
=
{
"
outputFormat
"
:
media
.
ContainerFormatType
.
CFT_MPEG_4A
,
"
audioEncoderMime
"
:
media
.
CodecMimeType
.
AUDIO_AAC
,
"
bitrate
"
:
1000000
,
"
sampleRate
"
:
500
,
"
channel
"
:
1
,
}
media
.
getMediaCapability
((
err
,
mediaCaps
)
=>
{
expect
(
err
).
assertUndefined
();
console
.
info
(
'
getMediaCapability success
'
);
if
(
typeof
(
mediaCaps
)
!=
'
undefined
'
)
{
mediaCaps
.
isAudioRecoderConfigSupported
(
audioProfile
,
(
err
,
ean
)
=>
{
expect
(
err
).
assertUndefined
();
expect
(
ean
).
assertEqual
(
false
);
console
.
info
(
'
isAudioRecoderConfigSupported: success
'
);
done
();
})
}
else
{
console
.
info
(
'
mediaCaps is not defined
'
);
done
();
}
})
})
/* *
* @tc.number : SUB_PROFILE_ABNORMAL_CALLBACK_1200
* @tc.name : 12.test isAudioRecoderConfigSupported
* @tc.desc : isAudioRecoderConfigSupported false
* @tc.size : MediumTest
* @tc.type : Function test
* @tc.level : Level0
*/
it
(
'
SUB_PROFILE_ABNORMAL_CALLBACK_1200
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
test isAudioRecoderConfigSupported
"
);
let
audioProfile
=
{
"
outputFormat
"
:
media
.
ContainerFormatType
.
CFT_MPEG_4A
,
"
audioEncoderMime
"
:
media
.
CodecMimeType
.
AUDIO_AAC
,
"
bitrate
"
:
8000
,
"
sampleRate
"
:
1000000
,
"
channel
"
:
1
,
}
media
.
getMediaCapability
((
err
,
mediaCaps
)
=>
{
expect
(
err
).
assertUndefined
();
console
.
info
(
'
getMediaCapability success
'
);
if
(
typeof
(
mediaCaps
)
!=
'
undefined
'
)
{
mediaCaps
.
isAudioRecoderConfigSupported
(
audioProfile
,
(
err
,
ean
)
=>
{
expect
(
err
).
assertUndefined
();
expect
(
ean
).
assertEqual
(
false
);
console
.
info
(
'
isAudioRecoderConfigSupported: success
'
);
done
();
})
}
else
{
console
.
info
(
'
mediaCaps is not defined
'
);
done
();
}
})
})
/* *
* @tc.number : SUB_PROFILE_ABNORMAL_CALLBACK_1300
* @tc.name : 13.test isAudioRecoderConfigSupported
* @tc.desc : isAudioRecoderConfigSupported false
* @tc.size : MediumTest
* @tc.type : Function test
* @tc.level : Level0
*/
it
(
'
SUB_PROFILE_ABNORMAL_CALLBACK_1300
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
test isAudioRecoderConfigSupported
"
);
let
audioProfile
=
{
"
outputFormat
"
:
media
.
ContainerFormatType
.
CFT_MPEG_4A
,
"
audioEncoderMime
"
:
media
.
CodecMimeType
.
AUDIO_AAC
,
"
bitrate
"
:
8000
,
"
sampleRate
"
:
500
,
"
channel
"
:
0
,
}
media
.
getMediaCapability
((
err
,
mediaCaps
)
=>
{
expect
(
err
).
assertUndefined
();
console
.
info
(
'
getMediaCapability success
'
);
if
(
typeof
(
mediaCaps
)
!=
'
undefined
'
)
{
mediaCaps
.
isAudioRecoderConfigSupported
(
audioProfile
,
(
err
,
ean
)
=>
{
expect
(
err
).
assertUndefined
();
expect
(
ean
).
assertEqual
(
false
);
console
.
info
(
'
isAudioRecoderConfigSupported: success
'
);
done
();
})
}
else
{
console
.
info
(
'
mediaCaps is not defined
'
);
done
();
}
})
})
})
\ No newline at end of file
multimedia/media/media_js_standard/recorderProfile/src/main/js/test/bak/ProfileTest.test.js
已删除
100644 → 0
浏览文件 @
0da8a211
此差异已折叠。
点击以展开。
multimedia/media/media_js_standard/recorderProfile/src/main/js/test/bak/ProfileTestPromise.test.js
已删除
100644 → 0
浏览文件 @
0da8a211
此差异已折叠。
点击以展开。
multimedia/media/media_js_standard/recorderProfile/src/main/js/test/profileTest.rar
已删除
100644 → 0
浏览文件 @
0da8a211
文件已删除
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录