Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
c9bb741b
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看板
提交
c9bb741b
编写于
8月 29, 2022
作者:
D
daiweiqi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Modify AudioTestCase Name
Signed-off-by:
N
daiweiqi
<
daiweiqi@huawei.com
>
上级
007e3b23
变更
9
展开全部
隐藏空白更改
内联
并排
Showing
9 changed file
with
6395 addition
and
6480 deletion
+6395
-6480
multimedia/audio/audio_js_standard/audioManager/src/main/js/test/AudioCall.test.js
..._standard/audioManager/src/main/js/test/AudioCall.test.js
+27
-35
multimedia/audio/audio_js_standard/audioManager/src/main/js/test/AudioCapturer.test.js
...ndard/audioManager/src/main/js/test/AudioCapturer.test.js
+741
-769
multimedia/audio/audio_js_standard/audioManager/src/main/js/test/AudioCapturerChangeInfo.test.js
...oManager/src/main/js/test/AudioCapturerChangeInfo.test.js
+1165
-1189
multimedia/audio/audio_js_standard/audioManager/src/main/js/test/AudioEventManagement.test.js
...udioManager/src/main/js/test/AudioEventManagement.test.js
+301
-301
multimedia/audio/audio_js_standard/audioManager/src/main/js/test/AudioFramework.test.js
...dard/audioManager/src/main/js/test/AudioFramework.test.js
+1547
-1548
multimedia/audio/audio_js_standard/audioManager/src/main/js/test/AudioRenderer.test.js
...ndard/audioManager/src/main/js/test/AudioRenderer.test.js
+823
-821
multimedia/audio/audio_js_standard/audioManager/src/main/js/test/AudioRendererChangeInfo.test.js
...oManager/src/main/js/test/AudioRendererChangeInfo.test.js
+1723
-1748
multimedia/audio/audio_js_standard/audioManager/src/main/js/test/AudioVOIP.test.js
..._standard/audioManager/src/main/js/test/AudioVOIP.test.js
+27
-27
multimedia/audio/audio_js_standard/audioManager/src/main/js/test/getPermission.test.js
...ndard/audioManager/src/main/js/test/getPermission.test.js
+41
-42
未找到文件。
multimedia/audio/audio_js_standard/audioManager/src/main/js/test/AudioCall.test.js
浏览文件 @
c9bb741b
...
...
@@ -348,30 +348,26 @@ describe('audioCall', function () {
}
/* *
* @tc.number : SUB_AUDIO_VOIP_Play_001
* @tc.name :
* @tc.desc :
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
SUB_AUDIO_CALL_Play_001
'
,
0
,
async
function
(
done
)
{
/**
*@tc.number : SUB_MULTIMEDIA_AUDIO_CALL_PlAY_0100
*@tc.name
*@tc.desc
*@tc.size : MEDIUM
*@tc.type : Function
*@tc.level : Level 2
*/
it
(
'
SUB_MULTIMEDIA_AUDIO_CALL_PlAY_0100
'
,
2
,
async
function
(
done
)
{
var
AudioStreamInfo
=
{
samplingRate
:
audio
.
AudioSamplingRate
.
SAMPLE_RATE_44100
,
channels
:
audio
.
AudioChannel
.
CHANNEL_1
,
sampleFormat
:
audio
.
AudioSampleFormat
.
SAMPLE_FORMAT_S16LE
,
encodingType
:
audio
.
AudioEncodingType
.
ENCODING_TYPE_RAW
}
var
AudioRendererInfo
=
{
content
:
audio
.
ContentType
.
CONTENT_TYPE_SPEECH
,
usage
:
audio
.
StreamUsage
.
STREAM_USAGE_VOICE_COMMUNICATION
,
rendererFlags
:
0
}
var
AudioRendererOptions
=
{
streamInfo
:
AudioStreamInfo
,
rendererInfo
:
AudioRendererInfo
...
...
@@ -386,16 +382,15 @@ describe('audioCall', function () {
done
();
})
/* *
* @tc.number : SUB_AUDIO_VOIP_Rec_001
* @tc.name :
* @tc.desc :
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
SUB_AUDIO_CALL_Rec_001
'
,
0
,
async
function
(
done
)
{
/**
*@tc.number : SUB_MULTIMEDIA_AUDIO_CALL_REC_0100
*@tc.name
*@tc.desc
*@tc.size : MEDIUM
*@tc.type : Function
*@tc.level : Level 2
*/
it
(
'
SUB_MULTIMEDIA_AUDIO_CALL_REC_0100
'
,
2
,
async
function
(
done
)
{
var
AudioStreamInfo
=
{
samplingRate
:
audio
.
AudioSamplingRate
.
SAMPLE_RATE_44100
,
channels
:
audio
.
AudioChannel
.
CHANNEL_2
,
...
...
@@ -421,17 +416,15 @@ describe('audioCall', function () {
done
();
})
/* *
* @tc.number : SUB_AUDIO_VOIP_RecPlay_001
* @tc.name :
* @tc.desc :
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
SUB_AUDIO_CALL_RecPlay_001
'
,
0
,
async
function
(
done
)
{
/**
*@tc.number : SUB_MULTIMEDIA_AUDIO_CALL_RECPLAY_0100
*@tc.name
*@tc.desc
*@tc.size : MEDIUM
*@tc.type : Function
*@tc.level : Level 2
*/
it
(
'
SUB_MULTIMEDIA_AUDIO_CALL_RECPLAY_0100
'
,
2
,
async
function
(
done
)
{
var
AudioStreamInfoCap
=
{
samplingRate
:
audio
.
AudioSamplingRate
.
SAMPLE_RATE_44100
,
channels
:
audio
.
AudioChannel
.
CHANNEL_2
,
...
...
@@ -485,5 +478,4 @@ describe('audioCall', function () {
await
closeFileDescriptor
(
readpath
);
done
();
})
})
\ No newline at end of file
multimedia/audio/audio_js_standard/audioManager/src/main/js/test/AudioCapturer.test.js
浏览文件 @
c9bb741b
此差异已折叠。
点击以展开。
multimedia/audio/audio_js_standard/audioManager/src/main/js/test/AudioCapturerChangeInfo.test.js
浏览文件 @
c9bb741b
此差异已折叠。
点击以展开。
multimedia/audio/audio_js_standard/audioManager/src/main/js/test/AudioEventManagement.test.js
浏览文件 @
c9bb741b
此差异已折叠。
点击以展开。
multimedia/audio/audio_js_standard/audioManager/src/main/js/test/AudioFramework.test.js
浏览文件 @
c9bb741b
此差异已折叠。
点击以展开。
multimedia/audio/audio_js_standard/audioManager/src/main/js/test/AudioRenderer.test.js
浏览文件 @
c9bb741b
此差异已折叠。
点击以展开。
multimedia/audio/audio_js_standard/audioManager/src/main/js/test/AudioRendererChangeInfo.test.js
浏览文件 @
c9bb741b
此差异已折叠。
点击以展开。
multimedia/audio/audio_js_standard/audioManager/src/main/js/test/AudioVOIP.test.js
浏览文件 @
c9bb741b
...
...
@@ -360,15 +360,15 @@ describe('audioVoip', function () {
}
/*
*
* @tc.number : SUB_AUDIO_VOIP_Play_001
* @tc.name : AudioRenderer-Set1-Media
* @tc.desc : AudioRenderer with parameter set 1
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
SUB_
AUDIO_VOIP_Play_001
'
,
0
,
async
function
(
done
)
{
/**
* @tc.number : SUB_MULTIMEDIA_VOIP_PLAY_0100
* @tc.name : AudioRenderer-Set1-Media
* @tc.desc : AudioRenderer with parameter set 1
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 2
*/
it
(
'
SUB_
MULTIMEDIA_VOIP_PLAY_0100
'
,
2
,
async
function
(
done
)
{
var
AudioStreamInfo
=
{
samplingRate
:
audio
.
AudioSamplingRate
.
SAMPLE_RATE_44100
,
...
...
@@ -397,15 +397,15 @@ describe('audioVoip', function () {
done
();
})
/*
*
* @tc.number : SUB_AUDIO_VOIP_Rec_001
* @tc.name : AudioCapturer-Set1-Media
* @tc.desc : AudioCapturer with parameter set 1
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
SUB_
AUDIO_VOIP_Rec_001
'
,
0
,
async
function
(
done
)
{
/**
* @tc.number : SUB_MULTIMEDIA_VOIP_REC_0100
* @tc.name : AudioCapturer-Set1-Media
* @tc.desc : AudioCapturer with parameter set 1
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 2
*/
it
(
'
SUB_
MULTIMEDIA_VOIP_REC_0100
'
,
2
,
async
function
(
done
)
{
var
AudioStreamInfo
=
{
samplingRate
:
audio
.
AudioSamplingRate
.
SAMPLE_RATE_44100
,
...
...
@@ -432,15 +432,15 @@ describe('audioVoip', function () {
done
();
})
/*
*
* @tc.number : SUB_AUDIO_VOIP_RecPlay_001
* @tc.name : AudioCapturer-Set1-Media
* @tc.desc : AudioCapturer with parameter set 1
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
SUB_
AUDIO_VOIP_RecPlay_001
'
,
0
,
async
function
(
done
)
{
/**
* @tc.number : SUB_MULTIMEDIA_VOIP_RECPLAY_0100
* @tc.name : AudioCapturer-Set1-Media
* @tc.desc : AudioCapturer with parameter set 1
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 2
*/
it
(
'
SUB_
MULTIMEDIA_VOIP_RECPLAY_0100
'
,
2
,
async
function
(
done
)
{
var
AudioStreamInfoCap
=
{
samplingRate
:
audio
.
AudioSamplingRate
.
SAMPLE_RATE_44100
,
...
...
multimedia/audio/audio_js_standard/audioManager/src/main/js/test/getPermission.test.js
浏览文件 @
c9bb741b
...
...
@@ -13,42 +13,41 @@
* limitations under the License.
*/
import
{
describe
,
beforeAll
,
afterAll
,
it
,
expect
}
from
'
deccjsunit/index
'
;
import
{
describe
,
beforeAll
,
afterAll
,
it
,
expect
}
from
'
deccjsunit/index
'
;
import
abilityAccessCtrl
from
'
@ohos.abilityAccessCtrl
'
;
import
bundle
from
'
@ohos.bundle
'
;
import
account
from
'
@ohos.account.osAccount
'
;
describe
(
"
get_permission
"
,
function
()
{
let
userId
;
async
function
getUserId
()
{
await
account
.
getAccountManager
().
getOsAccountLocalIdFromProcess
().
then
(
account
=>
{
console
.
info
(
"
getOsAccountLocalIdFromProcess userid ==========
"
+
account
);
userId
=
account
;
}).
catch
(
err
=>
{
console
.
info
(
"
getOsAccountLocalIdFromProcess err ==========
"
+
JSON
.
stringify
(
err
));
})
}
let
userId
;
async
function
getUserId
()
{
await
account
.
getAccountManager
().
getOsAccountLocalIdFromProcess
().
then
(
account
=>
{
console
.
info
(
"
getOsAccountLocalIdFromProcess userid ==========
"
+
account
);
userId
=
account
;
}).
catch
(
err
=>
{
console
.
info
(
"
getOsAccountLocalIdFromProcess err ==========
"
+
JSON
.
stringify
(
err
));
})
}
/**
* @tc.number SUB_DF_GRANT_USER_GRANTED_PERMISSION_0000
* @tc.name grant_user_granted_permission_async_000
* @tc.desc Test grantUserGrantedPermission() interfaces, grant permission.
* @tc.size MEDIUM
* @tc.type Function
* @tc.level Level 0
* @tc.require
*/
* @tc.number SUB_DF_GRANT_USER_GRANTED_PERMISSION_0000
* @tc.name grant_user_granted_permission_async_000
* @tc.desc Test grantUserGrantedPermission() interfaces, grant permission.
* @tc.size MEDIUM
* @tc.type Function
* @tc.level Level 0
*/
it
(
"
grant_user_granted_permission_async_000
"
,
0
,
async
function
(
done
)
{
await
getUserId
();
let
appInfo
=
await
bundle
.
getApplicationInfo
(
'
ohos.acts.multimedia.audio.audiomanager
'
,
0
,
userId
);
let
tokenID
=
appInfo
.
accessTokenId
;
let
atManager
=
abilityAccessCtrl
.
createAtManager
();
let
result1
=
await
atManager
.
grantUserGrantedPermission
(
tokenID
,
"
ohos.permission.MEDIA_LOCATION
"
,
1
);
let
result2
=
await
atManager
.
grantUserGrantedPermission
(
tokenID
,
"
ohos.permission.READ_MEDIA
"
,
1
);
let
result3
=
await
atManager
.
grantUserGrantedPermission
(
tokenID
,
"
ohos.permission.WRITE_MEDIA
"
,
1
);
let
result4
=
await
atManager
.
grantUserGrantedPermission
(
tokenID
,
"
ohos.permission.GRANT_SENSITIVE_PERMISSIONS
"
,
1
);
let
result5
=
await
atManager
.
grantUserGrantedPermission
(
tokenID
,
"
ohos.permission.REVOKE_SENSITIVE_PERMISSIONS
"
,
1
);
let
result6
=
await
atManager
.
grantUserGrantedPermission
(
tokenID
,
"
ohos.permission.MICROPHONE
"
,
1
);
let
result7
=
await
atManager
.
grantUserGrantedPermission
(
tokenID
,
"
ohos.permission.ACCESS_NOTIFICATION_POLICY
"
,
1
);
let
result8
=
await
atManager
.
grantUserGrantedPermission
(
tokenID
,
"
ohos.permission.MODIFY_AUDIO_SETTINGS
"
,
1
);
let
result1
=
await
atManager
.
grantUserGrantedPermission
(
tokenID
,
"
ohos.permission.MEDIA_LOCATION
"
,
1
);
let
result2
=
await
atManager
.
grantUserGrantedPermission
(
tokenID
,
"
ohos.permission.READ_MEDIA
"
,
1
);
let
result3
=
await
atManager
.
grantUserGrantedPermission
(
tokenID
,
"
ohos.permission.WRITE_MEDIA
"
,
1
);
let
result4
=
await
atManager
.
grantUserGrantedPermission
(
tokenID
,
"
ohos.permission.GRANT_SENSITIVE_PERMISSIONS
"
,
1
);
let
result5
=
await
atManager
.
grantUserGrantedPermission
(
tokenID
,
"
ohos.permission.REVOKE_SENSITIVE_PERMISSIONS
"
,
1
);
let
result6
=
await
atManager
.
grantUserGrantedPermission
(
tokenID
,
"
ohos.permission.MICROPHONE
"
,
1
);
let
result7
=
await
atManager
.
grantUserGrantedPermission
(
tokenID
,
"
ohos.permission.ACCESS_NOTIFICATION_POLICY
"
,
1
);
let
result8
=
await
atManager
.
grantUserGrantedPermission
(
tokenID
,
"
ohos.permission.MODIFY_AUDIO_SETTINGS
"
,
1
);
let
isGranted1
=
await
atManager
.
verifyAccessToken
(
tokenID
,
"
ohos.permission.MEDIA_LOCATION
"
);
let
isGranted2
=
await
atManager
.
verifyAccessToken
(
tokenID
,
"
ohos.permission.READ_MEDIA
"
);
let
isGranted3
=
await
atManager
.
verifyAccessToken
(
tokenID
,
"
ohos.permission.WRITE_MEDIA
"
);
...
...
@@ -57,22 +56,22 @@ describe("get_permission", function () {
let
isGranted6
=
await
atManager
.
verifyAccessToken
(
tokenID
,
"
ohos.permission.MICROPHONE
"
);
let
isGranted7
=
await
atManager
.
verifyAccessToken
(
tokenID
,
"
ohos.permission.ACCESS_NOTIFICATION_POLICY
"
);
let
isGranted8
=
await
atManager
.
verifyAccessToken
(
tokenID
,
"
ohos.permission.MODIFY_AUDIO_SETTINGS
"
);
console
.
info
(
"
AudioManagerLog: Perm1:
"
+
result1
);
console
.
info
(
"
AudioManagerLog: Perm2:
"
+
result2
);
console
.
info
(
"
AudioManagerLog: Perm3:
"
+
result3
);
console
.
info
(
"
AudioManagerLog: Perm1G:
"
+
isGranted1
);
console
.
info
(
"
AudioManagerLog: Perm2G:
"
+
isGranted2
);
console
.
info
(
"
AudioManagerLog: Perm3G:
"
+
isGranted3
);
console
.
info
(
"
AudioManagerLog: Perm4:
"
+
result4
);
console
.
info
(
"
AudioManagerLog: Perm5:
"
+
result5
);
console
.
info
(
"
AudioManagerLog: Perm6:
"
+
result6
);
console
.
info
(
"
AudioManagerLog: Perm4G:
"
+
isGranted4
);
console
.
info
(
"
AudioManagerLog: Perm5G:
"
+
isGranted5
);
console
.
info
(
"
AudioManagerLog: Perm6G:
"
+
isGranted6
);
console
.
info
(
"
AudioManagerLog: Perm7:
"
+
result7
);
console
.
info
(
"
AudioManagerLog: Perm8:
"
+
result8
);
console
.
info
(
"
AudioManagerLog: Perm7G:
"
+
isGranted7
);
console
.
info
(
"
AudioManagerLog: Perm8G:
"
+
isGranted8
);
console
.
info
(
"
AudioManagerLog: Perm1:
"
+
result1
);
console
.
info
(
"
AudioManagerLog: Perm2:
"
+
result2
);
console
.
info
(
"
AudioManagerLog: Perm3:
"
+
result3
);
console
.
info
(
"
AudioManagerLog: Perm1G:
"
+
isGranted1
);
console
.
info
(
"
AudioManagerLog: Perm2G:
"
+
isGranted2
);
console
.
info
(
"
AudioManagerLog: Perm3G:
"
+
isGranted3
);
console
.
info
(
"
AudioManagerLog: Perm4:
"
+
result4
);
console
.
info
(
"
AudioManagerLog: Perm5:
"
+
result5
);
console
.
info
(
"
AudioManagerLog: Perm6:
"
+
result6
);
console
.
info
(
"
AudioManagerLog: Perm4G:
"
+
isGranted4
);
console
.
info
(
"
AudioManagerLog: Perm5G:
"
+
isGranted5
);
console
.
info
(
"
AudioManagerLog: Perm6G:
"
+
isGranted6
);
console
.
info
(
"
AudioManagerLog: Perm7:
"
+
result7
);
console
.
info
(
"
AudioManagerLog: Perm8:
"
+
result8
);
console
.
info
(
"
AudioManagerLog: Perm7G:
"
+
isGranted7
);
console
.
info
(
"
AudioManagerLog: Perm8G:
"
+
isGranted8
);
done
();
});
});
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录