提交 bda17148 编写于 作者: Q qinliwen

<媒体子系统部件化整改&Audio部件优化新增用例>

Signed-off-by: Nqinliwen <qinliwen3@huawei.com>
上级 826c08aa
...@@ -21,6 +21,8 @@ ohos_js_hap_suite("audio_manager_js_hap") { ...@@ -21,6 +21,8 @@ ohos_js_hap_suite("audio_manager_js_hap") {
] ]
certificate_profile = "./signature/openharmony_sx.p7b" certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsAudioManagerJsTest" hap_name = "ActsAudioManagerJsTest"
subsystem_name = "multimedia"
part_name = "multimedia_audio_framework"
} }
ohos_js_assets("audio_manager_js_assets") { ohos_js_assets("audio_manager_js_assets") {
source_dir = "./src/main/js/default" source_dir = "./src/main/js/default"
......
...@@ -742,51 +742,6 @@ describe('audioEM', function () { ...@@ -742,51 +742,6 @@ describe('audioEM', function () {
}); });
}) })
/* *
* @tc.number : SUB_AUDIO_MANAGER_DeviceType_001
* @tc.name : DeviceType - INVALID
* @tc.desc : DeviceType - INVALID
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it('SUB_AUDIO_MANAGER_DeviceType_001', 0, async function (done) {
expect(audio.DeviceType.INVALID).assertEqual(0);
await sleep(50);
done();
})
/* *
* @tc.number : SUB_AUDIO_MANAGER_DeviceType_002
* @tc.name : DeviceType - WIRED_HEADSET
* @tc.desc : DeviceType - WIRED_HEADSET
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it('SUB_AUDIO_MANAGER_DeviceType_002', 0, async function (done) {
expect(audio.DeviceType.WIRED_HEADSET).assertEqual(3);
await sleep(50);
done();
})
/* *
* @tc.number : SUB_AUDIO_MANAGER_DeviceType_003
* @tc.name : DeviceType - USB_HEADSET
* @tc.desc : DeviceType - USB_HEADSET
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it('SUB_AUDIO_MANAGER_DeviceType_003', 0, async function (done) {
var resultflag = false;
if (audio.DeviceType.USB_HEADSET == 22 || audio.DeviceType.USB_HEADSET == undefined)
resultflag = true;
expect(resultflag).assertTrue();
await sleep(50);
done();
})
/* * /* *
* @tc.number : SUB_AUDIO_MANAGER_DeviceChangeType_001 * @tc.number : SUB_AUDIO_MANAGER_DeviceChangeType_001
* @tc.name : DeviceChangeType - CONNECT * @tc.name : DeviceChangeType - CONNECT
...@@ -814,6 +769,4 @@ describe('audioEM', function () { ...@@ -814,6 +769,4 @@ describe('audioEM', function () {
await sleep(50); await sleep(50);
done(); done();
}) })
}) })
\ No newline at end of file
...@@ -2470,20 +2470,20 @@ describe('audioManager', function () { ...@@ -2470,20 +2470,20 @@ describe('audioManager', function () {
*/ */
it('SUB_AUDIO_MANAGER_mute_006', 0, async function (done) { it('SUB_AUDIO_MANAGER_mute_006', 0, async function (done) {
await audioManager.setVolume(audioMedia, highVol); await audioManager.setVolume(audioMedia, highVol);
await audioManager.mute(audioMedia, true, (err) => { audioManager.mute(audioMedia, true, (err) => {
if (err) { if (err) {
console.error(`AudioFrameworkTest: Failed to mute the stream. ${err.message}`); console.error(`AudioFrameworkTest: Failed to mute the stream. ${err.message}`);
expect(false).assertTrue(); expect(false).assertTrue();
done();
} }
console.log('AudioFrameworkTest: Callback invoked to indicate that the stream is muted.'); console.log('AudioFrameworkTest: Callback invoked to indicate that the stream is muted.');
}); audioManager.mute(audioMedia, false, (err) => {
await audioManager.mute(audioMedia, false, async (err) => {
if (err) { if (err) {
console.error(`AudioFrameworkTest: Set Stream Mute: Media: Callback: Error : ${err.message}`); console.error(`AudioFrameworkTest: Set Stream Mute: Media: Callback: Error : ${err.message}`);
expect(false).assertTrue(); expect(false).assertTrue();
} }
else { else {
await audioManager.getVolume(audioMedia, (err, value) => { audioManager.getVolume(audioMedia, (err, value) => {
if (err) { if (err) {
console.error(`Failed to obtain the volume. ${err.message}`); console.error(`Failed to obtain the volume. ${err.message}`);
expect(false).assertTrue(); expect(false).assertTrue();
...@@ -2497,7 +2497,7 @@ describe('audioManager', function () { ...@@ -2497,7 +2497,7 @@ describe('audioManager', function () {
expect(false).assertTrue(); expect(false).assertTrue();
} }
}); });
await audioManager.isMute(audioMedia, (err, data) => { audioManager.isMute(audioMedia, (err, data) => {
if (err) { if (err) {
console.error(`AudioFrameworkTest: Callback : FALSE: Media : failed to get Mute Status ${err.message}`); console.error(`AudioFrameworkTest: Callback : FALSE: Media : failed to get Mute Status ${err.message}`);
expect().assertFail(); expect().assertFail();
...@@ -2515,6 +2515,8 @@ describe('audioManager', function () { ...@@ -2515,6 +2515,8 @@ describe('audioManager', function () {
} }
done(); done();
}); });
});
}) })
/* * /* *
...@@ -2576,20 +2578,19 @@ describe('audioManager', function () { ...@@ -2576,20 +2578,19 @@ describe('audioManager', function () {
*/ */
it('SUB_AUDIO_MANAGER_mute_008', 0, async function (done) { it('SUB_AUDIO_MANAGER_mute_008', 0, async function (done) {
await audioManager.setVolume(audioRingtone, highVol); await audioManager.setVolume(audioRingtone, highVol);
await audioManager.mute(audioRingtone, true, (err) => { audioManager.mute(audioRingtone, true, (err) => {
if (err) { if (err) {
console.error(`AudioFrameworkTest: Failed to mute the stream. ${err.message}`); console.error(`AudioFrameworkTest: Failed to mute the stream. ${err.message}`);
expect(false).assertTrue(); expect(false).assertTrue();
} }
console.log('AudioFrameworkTest: Callback invoked to indicate that the stream is muted.'); console.log('AudioFrameworkTest: Callback invoked to indicate that the stream is muted.');
}); audioManager.mute(audioRingtone, false, (err) => {
await audioManager.mute(audioRingtone, false, async (err) => {
if (err) { if (err) {
console.error(`AudioFrameworkTest: Set Stream Mute: Media: Callback: Error : ${err.message}`); console.error(`AudioFrameworkTest: Set Stream Mute: Media: Callback: Error : ${err.message}`);
expect(false).assertTrue(); expect(false).assertTrue();
} }
else { else {
await audioManager.getVolume(audioRingtone, (err, value) => { audioManager.getVolume(audioRingtone, (err, value) => {
if (err) { if (err) {
console.error(`Failed to obtain the volume. ${err.message}`); console.error(`Failed to obtain the volume. ${err.message}`);
expect(false).assertTrue(); expect(false).assertTrue();
...@@ -2603,7 +2604,7 @@ describe('audioManager', function () { ...@@ -2603,7 +2604,7 @@ describe('audioManager', function () {
expect(false).assertTrue(); expect(false).assertTrue();
} }
}); });
await audioManager.isMute(audioRingtone, (err, data) => { audioManager.isMute(audioRingtone, (err, data) => {
if (err) { if (err) {
console.error(`AudioFrameworkTest: Callback : FALSE: Media : failed to get Mute Status ${err.message}`); console.error(`AudioFrameworkTest: Callback : FALSE: Media : failed to get Mute Status ${err.message}`);
expect().assertFail(); expect().assertFail();
...@@ -2621,6 +2622,8 @@ describe('audioManager', function () { ...@@ -2621,6 +2622,8 @@ describe('audioManager', function () {
} }
done(); done();
}); });
});
}) })
/* * /* *
...@@ -2682,20 +2685,19 @@ describe('audioManager', function () { ...@@ -2682,20 +2685,19 @@ describe('audioManager', function () {
*/ */
it('SUB_AUDIO_MANAGER_mute_015', 0, async function (done) { it('SUB_AUDIO_MANAGER_mute_015', 0, async function (done) {
await audioManager.setVolume(audio.AudioVolumeType.MEDIA, highVol); await audioManager.setVolume(audio.AudioVolumeType.MEDIA, highVol);
await audioManager.mute(audio.AudioVolumeType.MEDIA, true, (err) => { audioManager.mute(audio.AudioVolumeType.MEDIA, true, (err) => {
if (err) { if (err) {
console.error(`AudioFrameworkTest: Failed to mute the stream. ${err.message}`); console.error(`AudioFrameworkTest: Failed to mute the stream. ${err.message}`);
expect(false).assertTrue(); expect(false).assertTrue();
} }
console.log('AudioFrameworkTest: Callback invoked to indicate that the stream is muted.'); console.log('AudioFrameworkTest: Callback invoked to indicate that the stream is muted.');
}); audioManager.mute(audio.AudioVolumeType.MEDIA, false, (err) => {
await audioManager.mute(audio.AudioVolumeType.MEDIA, false, async (err) => {
if (err) { if (err) {
console.error(`AudioFrameworkTest: Set Stream Mute: Media: Callback: Error : ${err.message}`); console.error(`AudioFrameworkTest: Set Stream Mute: Media: Callback: Error : ${err.message}`);
expect(false).assertTrue(); expect(false).assertTrue();
} }
else { else {
await audioManager.getVolume(audio.AudioVolumeType.MEDIA, (err, value) => { audioManager.getVolume(audio.AudioVolumeType.MEDIA, (err, value) => {
if (err) { if (err) {
console.error(`Failed to obtain the volume. ${err.message}`); console.error(`Failed to obtain the volume. ${err.message}`);
expect(false).assertTrue(); expect(false).assertTrue();
...@@ -2709,7 +2711,7 @@ describe('audioManager', function () { ...@@ -2709,7 +2711,7 @@ describe('audioManager', function () {
expect(false).assertTrue(); expect(false).assertTrue();
} }
}); });
await audioManager.isMute(audio.AudioVolumeType.MEDIA, (err, data) => { audioManager.isMute(audio.AudioVolumeType.MEDIA, (err, data) => {
if (err) { if (err) {
console.error(`AudioFrameworkTest: Callback : FALSE: Media : failed to get Mute Status ${err.message}`); console.error(`AudioFrameworkTest: Callback : FALSE: Media : failed to get Mute Status ${err.message}`);
expect().assertFail(); expect().assertFail();
...@@ -2727,6 +2729,8 @@ describe('audioManager', function () { ...@@ -2727,6 +2729,8 @@ describe('audioManager', function () {
} }
done(); done();
}); });
});
}) })
/* * /* *
...@@ -2788,20 +2792,19 @@ describe('audioManager', function () { ...@@ -2788,20 +2792,19 @@ describe('audioManager', function () {
*/ */
it('SUB_AUDIO_MANAGER_mute_016', 0, async function (done) { it('SUB_AUDIO_MANAGER_mute_016', 0, async function (done) {
await audioManager.setVolume(audio.AudioVolumeType.RINGTONE, highVol); await audioManager.setVolume(audio.AudioVolumeType.RINGTONE, highVol);
await audioManager.mute(audio.AudioVolumeType.RINGTONE, true, (err) => { audioManager.mute(audio.AudioVolumeType.RINGTONE, true, (err) => {
if (err) { if (err) {
console.error(`AudioFrameworkTest: Failed to mute the stream. ${err.message}`); console.error(`AudioFrameworkTest: Failed to mute the stream. ${err.message}`);
expect(false).assertTrue(); expect(false).assertTrue();
} }
console.log('AudioFrameworkTest: Callback invoked to indicate that the stream is muted.'); console.log('AudioFrameworkTest: Callback invoked to indicate that the stream is muted.');
}); audioManager.mute(audio.AudioVolumeType.RINGTONE, false, (err) => {
await audioManager.mute(audio.AudioVolumeType.RINGTONE, false, async (err) => {
if (err) { if (err) {
console.error(`AudioFrameworkTest: Set Stream Mute: Media: Callback: Error : ${err.message}`); console.error(`AudioFrameworkTest: Set Stream Mute: Media: Callback: Error : ${err.message}`);
expect(false).assertTrue(); expect(false).assertTrue();
} }
else { else {
await audioManager.getVolume(audio.AudioVolumeType.RINGTONE, (err, value) => { audioManager.getVolume(audio.AudioVolumeType.RINGTONE, (err, value) => {
if (err) { if (err) {
console.error(`Failed to obtain the volume. ${err.message}`); console.error(`Failed to obtain the volume. ${err.message}`);
expect(false).assertTrue(); expect(false).assertTrue();
...@@ -2815,7 +2818,7 @@ describe('audioManager', function () { ...@@ -2815,7 +2818,7 @@ describe('audioManager', function () {
expect(false).assertTrue(); expect(false).assertTrue();
} }
}); });
await audioManager.isMute(audio.AudioVolumeType.RINGTONE, (err, data) => { audioManager.isMute(audio.AudioVolumeType.RINGTONE, (err, data) => {
if (err) { if (err) {
console.error(`AudioFrameworkTest: Callback : FALSE: Media : failed to get Mute Status ${err.message}`); console.error(`AudioFrameworkTest: Callback : FALSE: Media : failed to get Mute Status ${err.message}`);
expect().assertFail(); expect().assertFail();
...@@ -2833,6 +2836,7 @@ describe('audioManager', function () { ...@@ -2833,6 +2836,7 @@ describe('audioManager', function () {
} }
done(); done();
}); });
});
}) })
/* * /* *
...@@ -2894,20 +2898,19 @@ describe('audioManager', function () { ...@@ -2894,20 +2898,19 @@ describe('audioManager', function () {
*/ */
it('SUB_AUDIO_MANAGER_mute_021', 0, async function (done) { it('SUB_AUDIO_MANAGER_mute_021', 0, async function (done) {
await audioManager.setVolume(audio.AudioVolumeType.VOICE_CALL, highVol); await audioManager.setVolume(audio.AudioVolumeType.VOICE_CALL, highVol);
await audioManager.mute(audio.AudioVolumeType.VOICE_CALL, true, (err) => { audioManager.mute(audio.AudioVolumeType.VOICE_CALL, true, (err) => {
if (err) { if (err) {
console.error(`AudioFrameworkTest: Failed to mute the stream. ${err.message}`); console.error(`AudioFrameworkTest: Failed to mute the stream. ${err.message}`);
expect(false).assertTrue(); expect(false).assertTrue();
} }
console.log('AudioFrameworkTest: Callback invoked to indicate that the stream is muted.'); console.log('AudioFrameworkTest: Callback invoked to indicate that the stream is muted.');
}); audioManager.mute(audio.AudioVolumeType.VOICE_CALL, false, (err) => {
await audioManager.mute(audio.AudioVolumeType.VOICE_CALL, false, async (err) => {
if (err) { if (err) {
console.error(`AudioFrameworkTest: Set Stream Mute: VOICE_CALL: Callback: Error : ${err.message}`); console.error(`AudioFrameworkTest: Set Stream Mute: VOICE_CALL: Callback: Error : ${err.message}`);
expect(false).assertTrue(); expect(false).assertTrue();
} }
else { else {
await audioManager.getVolume(audio.AudioVolumeType.VOICE_CALL, (err, value) => { audioManager.getVolume(audio.AudioVolumeType.VOICE_CALL, (err, value) => {
if (err) { if (err) {
console.error(`Failed to obtain the volume. ${err.message}`); console.error(`Failed to obtain the volume. ${err.message}`);
expect(false).assertTrue(); expect(false).assertTrue();
...@@ -2921,7 +2924,7 @@ describe('audioManager', function () { ...@@ -2921,7 +2924,7 @@ describe('audioManager', function () {
expect(false).assertTrue(); expect(false).assertTrue();
} }
}); });
await audioManager.isMute(audio.AudioVolumeType.VOICE_CALL, (err, data) => { audioManager.isMute(audio.AudioVolumeType.VOICE_CALL, (err, data) => {
if (err) { if (err) {
console.error(`AudioFrameworkTest: Callback : FALSE: VOICE_CALL : failed to get Mute Status ${err.message}`); console.error(`AudioFrameworkTest: Callback : FALSE: VOICE_CALL : failed to get Mute Status ${err.message}`);
expect().assertFail(); expect().assertFail();
...@@ -2939,6 +2942,7 @@ describe('audioManager', function () { ...@@ -2939,6 +2942,7 @@ describe('audioManager', function () {
} }
done(); done();
}); });
});
}) })
/* * /* *
...@@ -3000,20 +3004,19 @@ describe('audioManager', function () { ...@@ -3000,20 +3004,19 @@ describe('audioManager', function () {
*/ */
it('SUB_AUDIO_MANAGER_mute_023', 0, async function (done) { it('SUB_AUDIO_MANAGER_mute_023', 0, async function (done) {
await audioManager.setVolume(audio.AudioVolumeType.VOICE_ASSISTANT, highVol); await audioManager.setVolume(audio.AudioVolumeType.VOICE_ASSISTANT, highVol);
await audioManager.mute(audio.AudioVolumeType.VOICE_ASSISTANT, true, (err) => { audioManager.mute(audio.AudioVolumeType.VOICE_ASSISTANT, true, (err) => {
if (err) { if (err) {
console.error(`AudioFrameworkTest: Failed to mute the stream. ${err.message}`); console.error(`AudioFrameworkTest: Failed to mute the stream. ${err.message}`);
expect(false).assertTrue(); expect(false).assertTrue();
} }
console.log('AudioFrameworkTest: Callback invoked to indicate that the stream is muted.'); console.log('AudioFrameworkTest: Callback invoked to indicate that the stream is muted.');
}); audioManager.mute(audio.AudioVolumeType.VOICE_ASSISTANT, false, (err) => {
await audioManager.mute(audio.AudioVolumeType.VOICE_ASSISTANT, false, async (err) => {
if (err) { if (err) {
console.error(`AudioFrameworkTest: Set Stream Mute: VOICE_ASSISTANT: Callback: Error : ${err.message}`); console.error(`AudioFrameworkTest: Set Stream Mute: VOICE_ASSISTANT: Callback: Error : ${err.message}`);
expect(false).assertTrue(); expect(false).assertTrue();
} }
else { else {
await audioManager.getVolume(audio.AudioVolumeType.VOICE_ASSISTANT, (err, value) => { audioManager.getVolume(audio.AudioVolumeType.VOICE_ASSISTANT, (err, value) => {
if (err) { if (err) {
console.error(`Failed to obtain the volume. ${err.message}`); console.error(`Failed to obtain the volume. ${err.message}`);
expect(false).assertTrue(); expect(false).assertTrue();
...@@ -3027,7 +3030,7 @@ describe('audioManager', function () { ...@@ -3027,7 +3030,7 @@ describe('audioManager', function () {
expect(false).assertTrue(); expect(false).assertTrue();
} }
}); });
await audioManager.isMute(audio.AudioVolumeType.VOICE_ASSISTANT, (err, data) => { audioManager.isMute(audio.AudioVolumeType.VOICE_ASSISTANT, (err, data) => {
if (err) { if (err) {
console.error(`AudioFrameworkTest: Callback : FALSE: VOICE_ASSISTANT : failed to get Mute Status ${err.message}`); console.error(`AudioFrameworkTest: Callback : FALSE: VOICE_ASSISTANT : failed to get Mute Status ${err.message}`);
expect().assertFail(); expect().assertFail();
...@@ -3045,6 +3048,7 @@ describe('audioManager', function () { ...@@ -3045,6 +3048,7 @@ describe('audioManager', function () {
} }
done(); done();
}); });
});
}) })
/* * /* *
...@@ -3108,17 +3112,12 @@ describe('audioManager', function () { ...@@ -3108,17 +3112,12 @@ describe('audioManager', function () {
await audioManager.setVolume(audioMedia, highVol); await audioManager.setVolume(audioMedia, highVol);
await audioManager.mute(audioMedia, true).then(async function () { await audioManager.mute(audioMedia, true).then(async function () {
console.log('AudioFrameworkTest: Set Stream Mute: Media: Promise: TRUE'); console.log('AudioFrameworkTest: Set Stream Mute: Media: Promise: TRUE');
await audioManager.getVolume(audioMedia, (err, value) => { await audioManager.getVolume(audioMedia).then((value) => {
if (err) {
console.error(`Failed to obtain the volume. ${err.message}`);
expect(false).assertTrue();
}
else if (value == 0) {
console.info("AudioFrameworkTest: value is " + value); console.info("AudioFrameworkTest: value is " + value);
if (value == 0) {
expect(true).assertTrue(); expect(true).assertTrue();
} }
else { else {
console.info("AudioFrameworkTest: mute fail");
expect(false).assertTrue(); expect(false).assertTrue();
} }
}); });
...@@ -3154,24 +3153,29 @@ describe('audioManager', function () { ...@@ -3154,24 +3153,29 @@ describe('audioManager', function () {
*/ */
it('SUB_AUDIO_MANAGER_mute_018', 0, async function (done) { it('SUB_AUDIO_MANAGER_mute_018', 0, async function (done) {
await audioManager.setVolume(audioMedia, lowVol); await audioManager.setVolume(audioMedia, lowVol);
await audioManager.mute(audioMedia, true, async (err) => { audioManager.mute(audioMedia, true, async (err) => {
if (err) { if (err) {
console.error(`AudioFrameworkTest: Callback : SetVolume: Media : failed to set Mute Status ${err.message}`); console.error(`AudioFrameworkTest: Callback : SetVolume: Media : failed to set Mute Status ${err.message}`);
expect().assertFail(); expect().assertFail();
} }
else { else {
console.log('AudioFrameworkTest: Set Stream Mute: Media: Callback : TRUE'); console.log('AudioFrameworkTest: Set Stream Mute: Media: Callback : TRUE');
await audioManager.getVolume(audioMedia).then((value) => { audioManager.getVolume(audioMedia, (err, value) => {
if (err) {
console.error(`Failed to obtain the volume. ${err.message}`);
expect(false).assertTrue();
}
else if (value == 0) {
console.info("AudioFrameworkTest: value is " + value); console.info("AudioFrameworkTest: value is " + value);
if (value == 0) {
expect(true).assertTrue(); expect(true).assertTrue();
} }
else { else {
console.info("AudioFrameworkTest: mute fail");
expect(false).assertTrue(); expect(false).assertTrue();
} }
}); });
await audioManager.setVolume(audioMedia, highVol); await audioManager.setVolume(audioMedia, highVol);
await audioManager.isMute(audioMedia, (err, data) => { audioManager.isMute(audioMedia, (err, data) => {
if (err) { if (err) {
console.error(`AudioFrameworkTest: Callback : SetVolume: Media : failed to get Mute Status ${err.message}`); console.error(`AudioFrameworkTest: Callback : SetVolume: Media : failed to get Mute Status ${err.message}`);
expect().assertFail(); expect().assertFail();
...@@ -3251,16 +3255,21 @@ describe('audioManager', function () { ...@@ -3251,16 +3255,21 @@ describe('audioManager', function () {
} }
else { else {
console.log('AudioFrameworkTest: Set Stream Mute: Ringtone: Callback : SetVolume'); console.log('AudioFrameworkTest: Set Stream Mute: Ringtone: Callback : SetVolume');
await audioManager.getVolume(audioRingtone).then((value) => { audioManager.getVolume(audioRingtone, (err, value) => {
if (value == 0) { if (err) {
console.error(`Failed to obtain the volume. ${err.message}`);
expect(false).assertTrue();
}
else if (value == 0) {
console.info("AudioFrameworkTest: value is " + value); console.info("AudioFrameworkTest: value is " + value);
expect(true).assertTrue(); expect(true).assertTrue();
} }
else { else {
console.info("AudioFrameworkTest: mute fail");
expect(false).assertTrue(); expect(false).assertTrue();
} }
}); });
audioManager.setVolume(audioRingtone, lowVol); await audioManager.setVolume(audioRingtone, lowVol);
audioManager.isMute(audioRingtone, (err, data) => { audioManager.isMute(audioRingtone, (err, data) => {
if (err) { if (err) {
console.error(`AudioFrameworkTest: Callback : SetVolume: Ringtone : failed to get Mute Status ${err.message}`); console.error(`AudioFrameworkTest: Callback : SetVolume: Ringtone : failed to get Mute Status ${err.message}`);
...@@ -3293,17 +3302,12 @@ describe('audioManager', function () { ...@@ -3293,17 +3302,12 @@ describe('audioManager', function () {
await audioManager.setVolume(audio.AudioVolumeType.VOICE_CALL, highVol); await audioManager.setVolume(audio.AudioVolumeType.VOICE_CALL, highVol);
await audioManager.mute(audio.AudioVolumeType.VOICE_CALL, true).then(async function () { await audioManager.mute(audio.AudioVolumeType.VOICE_CALL, true).then(async function () {
console.log('AudioFrameworkTest: Set Stream Mute: VOICE_CALL: Promise: TRUE'); console.log('AudioFrameworkTest: Set Stream Mute: VOICE_CALL: Promise: TRUE');
await audioManager.getVolume(audio.AudioVolumeType.VOICE_CALL, (err, value) => { await audioManager.getVolume(audio.AudioVolumeType.VOICE_CALL).then((value) => {
if (err) {
console.error(`Failed to obtain the volume. ${err.message}`);
expect(false).assertTrue();
}
else if (value == 0) {
console.info("AudioFrameworkTest: value is " + value); console.info("AudioFrameworkTest: value is " + value);
if (value == 0) {
expect(true).assertTrue(); expect(true).assertTrue();
} }
else { else {
console.info("AudioFrameworkTest: mute fail");
expect(false).assertTrue(); expect(false).assertTrue();
} }
}); });
...@@ -3346,16 +3350,21 @@ describe('audioManager', function () { ...@@ -3346,16 +3350,21 @@ describe('audioManager', function () {
} }
else { else {
console.log('AudioFrameworkTest: Set Stream Mute: VOICE_CALL: Callback : SetVolume'); console.log('AudioFrameworkTest: Set Stream Mute: VOICE_CALL: Callback : SetVolume');
await audioManager.getVolume(audio.AudioVolumeType.VOICE_CALL).then((value) => { audioManager.getVolume(audio.AudioVolumeType.VOICE_CALL, (err, value) => {
if (value == 0) { if (err) {
console.error(`Failed to obtain the volume. ${err.message}`);
expect(false).assertTrue();
}
else if (value == 0) {
console.info("AudioFrameworkTest: value is " + value); console.info("AudioFrameworkTest: value is " + value);
expect(true).assertTrue(); expect(true).assertTrue();
} }
else { else {
console.info("AudioFrameworkTest: mute fail");
expect(false).assertTrue(); expect(false).assertTrue();
} }
}); });
audioManager.setVolume(audio.AudioVolumeType.VOICE_CALL, lowVol); await audioManager.setVolume(audio.AudioVolumeType.VOICE_CALL, lowVol);
audioManager.isMute(audio.AudioVolumeType.VOICE_CALL, (err, data) => { audioManager.isMute(audio.AudioVolumeType.VOICE_CALL, (err, data) => {
if (err) { if (err) {
console.error(`AudioFrameworkTest: Callback : SetVolume: VOICE_CALL : failed to get Mute Status ${err.message}`); console.error(`AudioFrameworkTest: Callback : SetVolume: VOICE_CALL : failed to get Mute Status ${err.message}`);
...@@ -3388,17 +3397,12 @@ describe('audioManager', function () { ...@@ -3388,17 +3397,12 @@ describe('audioManager', function () {
await audioManager.setVolume(audio.AudioVolumeType.VOICE_ASSISTANT, highVol); await audioManager.setVolume(audio.AudioVolumeType.VOICE_ASSISTANT, highVol);
await audioManager.mute(audio.AudioVolumeType.VOICE_ASSISTANT, true).then(async function () { await audioManager.mute(audio.AudioVolumeType.VOICE_ASSISTANT, true).then(async function () {
console.log('AudioFrameworkTest: Set Stream Mute: VOICE_ASSISTANT: Promise: TRUE'); console.log('AudioFrameworkTest: Set Stream Mute: VOICE_ASSISTANT: Promise: TRUE');
await audioManager.getVolume(audio.AudioVolumeType.VOICE_ASSISTANT, (err, value) => { await audioManager.getVolume(audio.AudioVolumeType.VOICE_ASSISTANT).then((value) => {
if (err) {
console.error(`Failed to obtain the volume. ${err.message}`);
expect(false).assertTrue();
}
else if (value == 0) {
console.info("AudioFrameworkTest: value is " + value); console.info("AudioFrameworkTest: value is " + value);
if (value == 0) {
expect(true).assertTrue(); expect(true).assertTrue();
} }
else { else {
console.info("AudioFrameworkTest: mute fail");
expect(false).assertTrue(); expect(false).assertTrue();
} }
}); });
...@@ -3450,7 +3454,7 @@ describe('audioManager', function () { ...@@ -3450,7 +3454,7 @@ describe('audioManager', function () {
expect(false).assertTrue(); expect(false).assertTrue();
} }
}); });
audioManager.setVolume(audio.AudioVolumeType.VOICE_ASSISTANT, lowVol); await audioManager.setVolume(audio.AudioVolumeType.VOICE_ASSISTANT, lowVol);
audioManager.isMute(audio.AudioVolumeType.VOICE_ASSISTANT, (err, data) => { audioManager.isMute(audio.AudioVolumeType.VOICE_ASSISTANT, (err, data) => {
if (err) { if (err) {
console.error(`AudioFrameworkTest: Callback : SetVolume: VOICE_ASSISTANT : failed to get Mute Status ${err.message}`); console.error(`AudioFrameworkTest: Callback : SetVolume: VOICE_ASSISTANT : failed to get Mute Status ${err.message}`);
...@@ -4911,178 +4915,168 @@ describe('audioManager', function () { ...@@ -4911,178 +4915,168 @@ describe('audioManager', function () {
}) })
/* * /* *
* @tc.number : SUB_AUDIO_MANAGER_interrupt_001 * @tc.number : SUB_AUDIO_MANAGER_INTERRUPT_001
* @tc.name : InterruptType - INTERRUPT_TYPE_BEGIN * @tc.name : InterruptType - INTERRUPT_TYPE_BEGIN
* @tc.desc : InterruptType - INTERRUPT_TYPE_BEGIN * @tc.desc : InterruptType - INTERRUPT_TYPE_BEGIN
* @tc.size : MEDIUM * @tc.size : MEDIUM
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_AUDIO_MANAGER_interrupt_001', 0, async function (done) { it('SUB_AUDIO_MANAGER_INTERRUPT_001', 0, async function (done) {
expect(audio.InterruptType.INTERRUPT_TYPE_BEGIN).assertEqual(1); expect(audio.InterruptType.INTERRUPT_TYPE_BEGIN).assertEqual(1);
await sleep(50); await sleep(50);
done(); done();
}) })
/* * /* *
* @tc.number : SUB_AUDIO_MANAGER_interrupt_002 * @tc.number : SUB_AUDIO_MANAGER_INTERRUPT_002
* @tc.name : InterruptType - INTERRUPT_TYPE_END * @tc.name : InterruptType - INTERRUPT_TYPE_END
* @tc.desc : InterruptType - INTERRUPT_TYPE_END * @tc.desc : InterruptType - INTERRUPT_TYPE_END
* @tc.size : MEDIUM * @tc.size : MEDIUM
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_AUDIO_MANAGER_interrupt_002', 0, async function (done) { it('SUB_AUDIO_MANAGER_INTERRUPT_002', 0, async function (done) {
expect(audio.InterruptType.INTERRUPT_TYPE_END).assertEqual(2); expect(audio.InterruptType.INTERRUPT_TYPE_END).assertEqual(2);
await sleep(50); await sleep(50);
done(); done();
}) })
/* * /* *
* @tc.number : SUB_AUDIO_MANAGER_interrupt_003 * @tc.number : SUB_AUDIO_MANAGER_INTERRUPT_003
* @tc.name : InterruptHint - INTERRUPT_HINT_NONE * @tc.name : InterruptHint - INTERRUPT_HINT_NONE
* @tc.desc : InterruptHint - INTERRUPT_HINT_NONE * @tc.desc : InterruptHint - INTERRUPT_HINT_NONE
* @tc.size : MEDIUM * @tc.size : MEDIUM
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_AUDIO_MANAGER_interrupt_003', 0, async function (done) { it('SUB_AUDIO_MANAGER_INTERRUPT_003', 0, async function (done) {
expect(audio.InterruptHint.INTERRUPT_HINT_NONE).assertEqual(0); expect(audio.InterruptHint.INTERRUPT_HINT_NONE).assertEqual(0);
await sleep(50); await sleep(50);
done(); done();
}) })
/* * /* *
* @tc.number : SUB_AUDIO_MANAGER_interrupt_004 * @tc.number : SUB_AUDIO_MANAGER_INTERRUPT_004
* @tc.name : InterruptHint - INTERRUPT_HINT_RESUME * @tc.name : InterruptHint - INTERRUPT_HINT_RESUME
* @tc.desc : InterruptHint - INTERRUPT_HINT_RESUME * @tc.desc : InterruptHint - INTERRUPT_HINT_RESUME
* @tc.size : MEDIUM * @tc.size : MEDIUM
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_AUDIO_MANAGER_interrupt_004', 0, async function (done) { it('SUB_AUDIO_MANAGER_INTERRUPT_004', 0, async function (done) {
expect(audio.InterruptHint.INTERRUPT_HINT_RESUME).assertEqual(1); expect(audio.InterruptHint.INTERRUPT_HINT_RESUME).assertEqual(1);
await sleep(50); await sleep(50);
done(); done();
}) })
/* * /* *
* @tc.number : SUB_AUDIO_MANAGER_interrupt_005 * @tc.number : SUB_AUDIO_MANAGER_INTERRUPT_005
* @tc.name : InterruptHint - INTERRUPT_HINT_PAUSE * @tc.name : InterruptHint - INTERRUPT_HINT_PAUSE
* @tc.desc : InterruptHint - INTERRUPT_HINT_PAUSE * @tc.desc : InterruptHint - INTERRUPT_HINT_PAUSE
* @tc.size : MEDIUM * @tc.size : MEDIUM
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_AUDIO_MANAGER_interrupt_005', 0, async function (done) { it('SUB_AUDIO_MANAGER_INTERRUPT_005', 0, async function (done) {
expect(audio.InterruptHint.INTERRUPT_HINT_PAUSE).assertEqual(2); expect(audio.InterruptHint.INTERRUPT_HINT_PAUSE).assertEqual(2);
await sleep(50); await sleep(50);
done(); done();
}) })
/* * /* *
* @tc.number : SUB_AUDIO_MANAGER_interrupt_006 * @tc.number : SUB_AUDIO_MANAGER_INTERRUPT_006
* @tc.name : InterruptHint - INTERRUPT_HINT_STOP * @tc.name : InterruptHint - INTERRUPT_HINT_STOP
* @tc.desc : InterruptHint - INTERRUPT_HINT_STOP * @tc.desc : InterruptHint - INTERRUPT_HINT_STOP
* @tc.size : MEDIUM * @tc.size : MEDIUM
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_AUDIO_MANAGER_interrupt_006', 0, async function (done) { it('SUB_AUDIO_MANAGER_INTERRUPT_006', 0, async function (done) {
expect(audio.InterruptHint.INTERRUPT_HINT_STOP).assertEqual(3); expect(audio.InterruptHint.INTERRUPT_HINT_STOP).assertEqual(3);
await sleep(50); await sleep(50);
done(); done();
}) })
/* * /* *
* @tc.number : SUB_AUDIO_MANAGER_interrupt_007 * @tc.number : SUB_AUDIO_MANAGER_INTERRUPT_007
* @tc.name : InterruptHint - INTERRUPT_HINT_DUCK * @tc.name : InterruptHint - INTERRUPT_HINT_DUCK
* @tc.desc : InterruptHint - INTERRUPT_HINT_DUCK * @tc.desc : InterruptHint - INTERRUPT_HINT_DUCK
* @tc.size : MEDIUM * @tc.size : MEDIUM
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_AUDIO_MANAGER_interrupt_007', 0, async function (done) { it('SUB_AUDIO_MANAGER_INTERRUPT_007', 0, async function (done) {
expect(audio.InterruptHint.INTERRUPT_HINT_DUCK).assertEqual(4); expect(audio.InterruptHint.INTERRUPT_HINT_DUCK).assertEqual(4);
await sleep(50); await sleep(50);
done(); done();
}) })
/* * /* *
* @tc.number : SUB_AUDIO_MANAGER_interrupt_008 * @tc.number : SUB_AUDIO_MANAGER_INTERRUPT_008
* @tc.name : InterruptHint - INTERRUPT_HINT_UNDUCK * @tc.name : InterruptHint - INTERRUPT_HINT_UNDUCK
* @tc.desc : InterruptHint - INTERRUPT_HINT_UNDUCK * @tc.desc : InterruptHint - INTERRUPT_HINT_UNDUCK
* @tc.size : MEDIUM * @tc.size : MEDIUM
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_AUDIO_MANAGER_interrupt_008', 0, async function (done) { it('SUB_AUDIO_MANAGER_INTERRUPT_008', 0, async function (done) {
expect(audio.InterruptHint.INTERRUPT_HINT_UNDUCK).assertEqual(5); expect(audio.InterruptHint.INTERRUPT_HINT_UNDUCK).assertEqual(5);
await sleep(50); await sleep(50);
done(); done();
}) })
/* * /* *
* @tc.number : SUB_AUDIO_MANAGER_interrupt_009 * @tc.number : SUB_AUDIO_MANAGER_INTERRUPT_009
* @tc.name : InterruptForceType - INTERRUPT_FORCE * @tc.name : InterruptForceType - INTERRUPT_FORCE
* @tc.desc : InterruptForceType - INTERRUPT_FORCE * @tc.desc : InterruptForceType - INTERRUPT_FORCE
* @tc.size : MEDIUM * @tc.size : MEDIUM
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_AUDIO_MANAGER_interrupt_009', 0, async function (done) { it('SUB_AUDIO_MANAGER_INTERRUPT_009', 0, async function (done) {
expect(audio.InterruptForceType.INTERRUPT_FORCE).assertEqual(0); expect(audio.InterruptForceType.INTERRUPT_FORCE).assertEqual(0);
await sleep(50); await sleep(50);
done(); done();
}) })
/* * /* *
* @tc.number : SUB_AUDIO_MANAGER_interrupt_010 * @tc.number : SUB_AUDIO_MANAGER_INTERRUPT_010
* @tc.name : InterruptForceType - INTERRUPT_SHARE * @tc.name : InterruptForceType - INTERRUPT_SHARE
* @tc.desc : InterruptForceType - INTERRUPT_SHARE * @tc.desc : InterruptForceType - INTERRUPT_SHARE
* @tc.size : MEDIUM * @tc.size : MEDIUM
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_AUDIO_MANAGER_interrupt_009', 0, async function (done) { it('SUB_AUDIO_MANAGER_INTERRUPT_010', 0, async function (done) {
expect(audio.InterruptForceType.INTERRUPT_SHARE).assertEqual(1); expect(audio.InterruptForceType.INTERRUPT_SHARE).assertEqual(1);
await sleep(50); await sleep(50);
done(); done();
}) })
/* * /* *
* @tc.number : SUB_AUDIO_MANAGER_interrupt_010 * @tc.number : SUB_AUDIO_MANAGER_INTERRUPT_011
* @tc.name : ActiveDeviceType - BLUETOOTH_SCO * @tc.name : ActiveDeviceType - BLUETOOTH_SCO
* @tc.desc : ActiveDeviceType - BLUETOOTH_SCO * @tc.desc : ActiveDeviceType - BLUETOOTH_SCO
* @tc.size : MEDIUM * @tc.size : MEDIUM
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_AUDIO_MANAGER_interrupt_010', 0, async function (done) { it('SUB_AUDIO_MANAGER_INTERRUPT_011', 0, async function (done) {
expect(audio.ActiveDeviceType.BLUETOOTH_SCO).assertEqual(7); expect(audio.ActiveDeviceType.BLUETOOTH_SCO).assertEqual(7);
await sleep(50); await sleep(50);
done(); done();
}) })
/* * /* *
* @tc.number : SUB_AUDIO_MANAGER_interrupt_011 * @tc.number : SUB_AUDIO_MANAGER_INTERRUPT_012
* @tc.name : ActiveDeviceType - SPEAKER * @tc.name : ActiveDeviceType - SPEAKER
* @tc.desc : ActiveDeviceType - SPEAKER * @tc.desc : ActiveDeviceType - SPEAKER
* @tc.size : MEDIUM * @tc.size : MEDIUM
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_AUDIO_MANAGER_interrupt_011', 0, async function (done) { it('SUB_AUDIO_MANAGER_INTERRUPT_012', 0, async function (done) {
expect(audio.ActiveDeviceType.SPEAKER).assertEqual(2); expect(audio.ActiveDeviceType.SPEAKER).assertEqual(2);
await sleep(50); await sleep(50);
done(); done();
...@@ -5118,28 +5112,435 @@ describe('audioManager', function () { ...@@ -5118,28 +5112,435 @@ describe('audioManager', function () {
/* * /* *
* @tc.number : SUB_AUDIO_MANAGER_DeviceType_001 * @tc.number : SUB_AUDIO_MANAGER_DeviceType_001
* @tc.name : DeviceType - BLUETOOTH_SCO * @tc.name : DeviceType - ALL Device Type
* @tc.desc : DeviceType - BLUETOOTH_SCO * @tc.desc : DeviceType - ALL Device Type
* @tc.size : MEDIUM * @tc.size : MEDIUM
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_AUDIO_MANAGER_DeviceType_001', 0, async function (done) { it('SUB_AUDIO_MANAGER_DeviceType_001', 0, async function (done) {
expect(audio.DeviceType.INVALID).assertEqual(0);
console.info("audio.DeviceType.INVALID:"+audio.DeviceType.INVALID);
expect(audio.DeviceType.EARPIECE).assertEqual(1);
console.info("audio.DeviceType.EARPIECE:"+audio.DeviceType.EARPIECE);
expect(audio.DeviceType.SPEAKER).assertEqual(2);
console.info("audio.DeviceType.SPEAKER:"+audio.DeviceType.SPEAKER);
expect(audio.DeviceType.WIRED_HEADSET).assertEqual(3);
console.info("audio.DeviceType.WIRED_HEADSET:"+audio.DeviceType.WIRED_HEADSET);
expect(audio.DeviceType.WIRED_HEADPHONES).assertEqual(4);
console.info("audio.DeviceType.WIRED_HEADPHONES:"+audio.DeviceType.WIRED_HEADPHONES);
expect(audio.DeviceType.BLUETOOTH_SCO).assertEqual(7); expect(audio.DeviceType.BLUETOOTH_SCO).assertEqual(7);
console.info("audio.DeviceType.BLUETOOTH_SCO:"+audio.DeviceType.BLUETOOTH_SCO);
expect(audio.DeviceType.BLUETOOTH_A2DP).assertEqual(8);
console.info("audio.DeviceType.BLUETOOTH_A2DP:"+audio.DeviceType.BLUETOOTH_A2DP);
expect(audio.DeviceType.MIC).assertEqual(15);
console.info("audio.DeviceType.MIC:"+audio.DeviceType.MIC);
expect(audio.DeviceType.USB_HEADSET).assertEqual(22);
console.info("audio.DeviceType.USB_HEADSET:"+audio.DeviceType.USB_HEADSET);
await sleep(50); await sleep(50);
done(); done();
}) })
/* * /* *
* @tc.number : SUB_AUDIO_MANAGER_DeviceType_002 * @tc.number : SUB_AUDIO_MANAGER_DeviceRole_001
* @tc.name : DeviceType - WIRED_HEADPHONES * @tc.name : DeviceRole - ALL Device Role
* @tc.desc : DeviceType - WIRED_HEADPHONES * @tc.desc : DeviceRole - ALL Device Role
* @tc.size : MEDIUM * @tc.size : MEDIUM
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_AUDIO_MANAGER_DeviceType_002', 0, async function (done) { it('SUB_AUDIO_MANAGER_DeviceRole_001', 0, async function (done) {
expect(audio.DeviceType.WIRED_HEADPHONES).assertEqual(4); expect(audio.DeviceRole.INPUT_DEVICE).assertEqual(1);
console.info("audio.DeviceRole.INPUT_DEVICE :"+audio.DeviceRole.INPUT_DEVICE);
expect(audio.DeviceRole.OUTPUT_DEVICE).assertEqual(2);
console.info("audio.DeviceRole.OUTPUT_DEVICE :"+audio.DeviceRole.OUTPUT_DEVICE);
await sleep(50);
done();
})
/* *
* @tc.number : SUB_AUDIO_ROUTING_MANAGER_getDevices_001
* @tc.name : getDevices - Output device - Callback
* @tc.desc : getDevices - Output device
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it('SUB_AUDIO_ROUTING_MANAGER_getDevices_001', 0, async function (done) {
dRValue = null;
dTValue = null;
devId = null;
devName = null;
devAddr = null;
sRate = null;
cCount = null;
cMask = null;
let AudioRoutingManager = await audioManager.getRoutingManager();
AudioRoutingManager.getDevices(1, (err, value) => {
// Getting all Output devices Enumb 1 = OUTPUT_DEVICES_FLAG
console.info('AudioFrameworkTest: Callback: getDevices OUTPUT_DEVICES_FLAG');
if (err) {
console.error(`AudioFrameworkTest:Callback: OUTPUT_DEVICES_FLAG: failed to get devices ${err.message}`);
expect().assertFail();
}
else {
console.info('AudioFrameworkTest: Callback: getDevices OUTPUT_DEVICES_FLAG');
value.forEach(displayDeviceProp);
if (dTValue != null && dRValue != null && devId > 0 && sRate != null && cCount != null &&
cMask != null) {
console.info('AudioFrameworkTest: Callback: getDevices : OUTPUT_DEVICES_FLAG : PASS');
expect(true).assertTrue();
}
else {
console.info('AudioFrameworkTest: Callback: getDevices : OUTPUT_DEVICES_FLAG : FAIL');
expect(false).assertTrue();
}
}
done();
});
})
/* *
* @tc.number : SUB_AUDIO_ROUTING_MANAGER_getDevices_002
* @tc.name : getDevices - Input device - Callback
* @tc.desc : getDevices - Input device
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it('SUB_AUDIO_ROUTING_MANAGER_getDevices_002', 0, async function (done) {
dRValue = null;
dTValue = null;
devId = null;
devName = null;
devAddr = null;
sRate = null;
cCount = null;
cMask = null;
let AudioRoutingManager = await audioManager.getRoutingManager();
AudioRoutingManager.getDevices(2, (err, value) => {
// Getting all Input Devices ENUM 2 = INPUT_DEVICES_FLAG
console.info('AudioFrameworkTest: Callback: getDevices INPUT_DEVICES_FLAG');
if (err) {
console.error(`AudioFrameworkTest:Callback:INPUT_DEVICES_FLAG: failed to get devices ${err.message}`);
expect().assertFail();
}
else {
console.info('AudioFrameworkTest: Callback: getDevices INPUT_DEVICES_FLAG');
value.forEach(displayDeviceProp);
if (dTValue != null && dRValue != null && devId > 0 && sRate != null && cCount != null
&& cMask != null) {
console.info('AudioFrameworkTest: Callback: getDevices : INPUT_DEVICES_FLAG: PASS');
expect(true).assertTrue();
}
else {
console.info('AudioFrameworkTest: Callback: getDevices : INPUT_DEVICES_FLAG: FAIL');
expect(false).assertTrue();
}
}
done();
});
})
/* *
* @tc.number : SUB_AUDIO_ROUTING_MANAGER_getDevices_003
* @tc.name : getDevices - ALL device - Callback
* @tc.desc : getDevices - ALL device
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it('SUB_AUDIO_ROUTING_MANAGER_getDevices_003', 0, async function (done) {
dRValue = null;
dTValue = null;
devId = null;
devName = null;
devAddr = null;
sRate = null;
cCount = null;
cMask = null;
let AudioRoutingManager = await audioManager.getRoutingManager();
AudioRoutingManager.getDevices(3, (err, value) => {
// Getting all devies connected 3 = ALL_DEVICES_FLAG
console.info('AudioFrameworkTest: Callback: getDevices ALL_DEVICES_FLAG');
if (err) {
console.error(`AudioFrameworkTest:Callback:ALL_DEVICES_FLAG: failed to get devices ${err.message}`);
expect().assertFail();
}
else {
console.info('AudioFrameworkTest: Callback: getDevices ALL_DEVICES_FLAG');
value.forEach(displayDeviceProp);
if (dTValue != null && dRValue != null && devId > 0 && sRate != null && cCount != null &&
cMask != null) {
console.info('AudioFrameworkTest: Callback: getDevices : ALL_DEVICES_FLAG: PASS');
expect(true).assertTrue();
}
else {
console.info('AudioFrameworkTest: Callback: getDevices : ALL_DEVICES_FLAG: FAIL');
expect(false).assertTrue();
}
}
done();
});
})
/* *
* @tc.number : SUB_AUDIO_ROUTING_MANAGER_getDevices_004
* @tc.name : getDevices - Output device - Callback - ENAME
* @tc.desc : getDevices - Output device
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it('SUB_AUDIO_ROUTING_MANAGER_getDevices_004', 0, async function (done) {
dRValue = null;
dTValue = null;
devId = null;
devName = null;
devAddr = null;
sRate = null;
cCount = null;
cMask = null;
let AudioRoutingManager = await audioManager.getRoutingManager();
AudioRoutingManager.getDevices(audio.DeviceFlag.OUTPUT_DEVICES_FLAG, (err, value) => {
console.info('AudioFrameworkTest: Callback: getDevices OUTPUT_DEVICES_FLAG');
if (err) {
console.error(`AudioFrameworkTest:Callback:OUTPUT_DEVICES_FLAG:failed to get devices ${err.message}`);
expect().assertFail();
}
else {
console.info('AudioFrameworkTest: Callback: getDevices OUTPUT_DEVICES_FLAG');
value.forEach(displayDeviceProp);
if (dTValue != null && dRValue != null && devId > 0 && sRate != null && cCount != null &&
cMask != null) {
console.info('AudioFrameworkTest: Callback: getDevices : OUTPUT_DEVICES_FLAG : PASS');
expect(true).assertTrue();
}
else {
console.info('AudioFrameworkTest: Callback: getDevices : OUTPUT_DEVICES_FLAG : FAIL');
expect(false).assertTrue();
}
}
done();
});
})
/* *
* @tc.number : SUB_AUDIO_ROUTING_MANAGER_getDevices_005
* @tc.name : getDevices - Input device - Callback - ENAME
* @tc.desc : getDevices - Input device
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it('SUB_AUDIO_ROUTING_MANAGER_getDevices_005', 0, async function (done) {
dRValue = null;
dTValue = null;
devId = null;
devName = null;
devAddr = null;
sRate = null;
cCount = null;
cMask = null;
let AudioRoutingManager = await audioManager.getRoutingManager();
AudioRoutingManager.getDevices(audio.DeviceFlag.INPUT_DEVICES_FLAG, (err, value) => {
console.info('AudioFrameworkTest: Callback: getDevices INPUT_DEVICES_FLAG');
if (err) {
console.error(`AudioFrameworkTest:Callback:INPUT_DEVICES_FLAG: failed to get devices ${err.message}`);
expect().assertFail();
}
else {
console.info('AudioFrameworkTest: Callback: getDevices INPUT_DEVICES_FLAG');
value.forEach(displayDeviceProp);
if (dTValue != null && dRValue != null && devId > 0 && sRate != null && cCount != null &&
cMask != null) {
console.info('AudioFrameworkTest: Callback: getDevices : INPUT_DEVICES_FLAG: PASS');
expect(true).assertTrue();
}
else {
console.info('AudioFrameworkTest: Callback: getDevices : INPUT_DEVICES_FLAG: FAIL');
expect(false).assertTrue();
}
}
done();
});
})
/* *
* @tc.number : SUB_AUDIO_ROUTING_MANAGER_getDevices_006
* @tc.name : getDevices - ALL device - Callback - ENAME
* @tc.desc : getDevices - ALL device
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it('SUB_AUDIO_ROUTING_MANAGER_getDevices_006', 0, async function (done) {
dRValue = null;
dTValue = null;
devId = null;
devName = null;
devAddr = null;
sRate = null;
cCount = null;
cMask = null;
let AudioRoutingManager = await audioManager.getRoutingManager();
AudioRoutingManager.getDevices(audio.DeviceFlag.ALL_DEVICES_FLAG, (err, value) => {
console.info('AudioFrameworkTest: Callback: getDevices ALL_DEVICES_FLAG');
if (err) {
console.error(`AudioFrameworkTest: Callback: ALL_DEVICES_FLAG: failed to get devices ${err.message}`);
expect().assertFail();
}
else {
console.info('AudioFrameworkTest: Callback: getDevices ALL_DEVICES_FLAG');
value.forEach(displayDeviceProp);
if (dTValue != null && dRValue != null && devId > 0 && sRate != null && cCount != null &&
cMask != null) {
console.info('AudioFrameworkTest: Callback: getDevices : ALL_DEVICES_FLAG: PASS');
expect(true).assertTrue();
}
else {
console.info('AudioFrameworkTest: Callback: getDevices : ALL_DEVICES_FLAG: FAIL');
expect(false).assertTrue();
}
}
done();
});
})
/* *
* @tc.number : SUB_AUDIO_ROUTING_MANAGER_getDevices_008
* @tc.name : getDevices - OUTPUT device - Promise - ENAME
* @tc.desc : getDevices - OUTPUT device
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it('SUB_AUDIO_ROUTING_MANAGER_getDevices_008', 0, async function (done) {
dRValue = null;
dTValue = null;
devId = null;
devName = null;
devAddr = null;
sRate = null;
cCount = null;
cMask = null;
let AudioRoutingManager = await audioManager.getRoutingManager();
let value = await AudioRoutingManager.getDevices(audio.DeviceFlag.OUTPUT_DEVICES_FLAG);
console.info('AudioFrameworkTest: Promise: getDevices OUTPUT_DEVICES_FLAG');
value.forEach(displayDeviceProp);
if (dTValue != null && dRValue != null && devId > 0 && sRate != null && cCount != null &&
cMask != null) {
console.info('AudioFrameworkTest: Promise: getDevices:OUTPUT_DEVICES_FLAG : PASS');
expect(true).assertTrue();
}
else {
console.info('AudioFrameworkTest: Promise: getDevices:OUTPUT_DEVICES_FLAG : FAIL');
expect(false).assertTrue();
}
done();
})
/* *
* @tc.number : SUB_AUDIO_ROUTING_MANAGER_getDevices_009
* @tc.name : getDevices - INPUT device - Promise - ENAME
* @tc.desc : getDevices - INPUT device
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it('SUB_AUDIO_ROUTING_MANAGER_getDevices_009', 0, async function (done) {
dRValue = null;
dTValue = null;
devId = null;
devName = null;
devAddr = null;
sRate = null;
cCount = null;
cMask = null;
audioManager.getRoutingManager(async (err,AudioRoutingManager)=>{
if (err) {
console.error(`AudioFrameworkTest: Callback: failed to get RoutingManager ${err.message}`);
expect().assertFail();
} else {
let value = await AudioRoutingManager.getDevices(audio.DeviceFlag.INPUT_DEVICES_FLAG)
console.info('AudioFrameworkTest: Promise: getDevices INPUT_DEVICES_FLAG');
value.forEach(displayDeviceProp);
if (dTValue != null && dRValue != null && devId > 0 && sRate != null && cCount != null &&
cMask != null) {
console.info('AudioFrameworkTest: Promise: getDevices : INPUT_DEVICES_FLAG : PASS');
expect(true).assertTrue();
}
else {
console.info('AudioFrameworkTest: Promise: getDevices : INPUT_DEVICES_FLAG : FAIL');
expect(false).assertTrue();
}
}
done();
});
})
/* *
* @tc.number : SUB_AUDIO_ROUTING_MANAGER_getDevices_010
* @tc.name : getDevices - ALL device - Promise - ENAME
* @tc.desc : getDevices - ALL device
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it('SUB_AUDIO_ROUTING_MANAGER_getDevices_010', 0, async function (done) {
dRValue = null;
dTValue = null;
devId = null;
devName = null;
devAddr = null;
sRate = null;
cCount = null;
cMask = null;
audioManager.getRoutingManager(async (err,AudioRoutingManager)=>{
if (err) {
console.error(`AudioFrameworkTest:Callback:failed to get RoutingManager ${err.message}`);
expect().assertFail();
} else {
let value = await AudioRoutingManager.getDevices(audio.DeviceFlag.ALL_DEVICES_FLAG)
console.info('AudioFrameworkTest: Promise: getDevices ALL_DEVICES_FLAG');
value.forEach(displayDeviceProp);
if (dTValue != null && dRValue != null && devId > 0 && sRate != null && cCount != null &&
cMask != null) {
console.info('AudioFrameworkTest: Promise: getDevices : ALL_DEVICES_FLAG : PASS');
expect(true).assertTrue();
}
else {
console.info('AudioFrameworkTest: Promise: getDevices : ALL_DEVICES_FLAG : FAIL');
expect(false).assertTrue();
}
}
done();
});
})
/* *
* @tc.number : SUB_AUDIO_DeviceFlag_001
* @tc.name : NONE_DEVICES_FLAG
* @tc.desc : NONE_DEVICES_FLAG
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it('SUB_AUDIO_DeviceFlag_001', 0, async function (done) {
expect(audio.DeviceFlag.OUTPUT_DEVICES_FLAG).assertEqual(1);
expect(audio.DeviceFlag.INPUT_DEVICES_FLAG).assertEqual(2);
expect(audio.DeviceFlag.ALL_DEVICES_FLAG).assertEqual(3);
await sleep(50); await sleep(50);
done(); done();
}) })
......
...@@ -22,6 +22,8 @@ ohos_js_hap_suite("camera_standard_ets_hap") { ...@@ -22,6 +22,8 @@ ohos_js_hap_suite("camera_standard_ets_hap") {
certificate_profile = "./signature/openharmony_sx.p7b" certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsCameraStandardETSTest" hap_name = "ActsCameraStandardETSTest"
subsystem_name = "multimedia"
part_name = "multimedia_camera_standard"
} }
ohos_js_assets("camera_ets_assets") { ohos_js_assets("camera_ets_assets") {
source_dir = "./src/main/ets/MainAbility" source_dir = "./src/main/ets/MainAbility"
......
...@@ -21,6 +21,8 @@ ohos_js_hap_suite("image_js_hap") { ...@@ -21,6 +21,8 @@ ohos_js_hap_suite("image_js_hap") {
] ]
certificate_profile = "./signature/openharmony_sx.p7b" certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsImageJsTest" hap_name = "ActsImageJsTest"
subsystem_name = "multimedia"
part_name = "multimedia_image_standard"
} }
ohos_js_assets("image_js_assets") { ohos_js_assets("image_js_assets") {
js2abc = true js2abc = true
......
...@@ -21,6 +21,8 @@ ohos_js_hap_suite("image_colorspace_js_hap") { ...@@ -21,6 +21,8 @@ ohos_js_hap_suite("image_colorspace_js_hap") {
] ]
certificate_profile = "./signature/openharmony_sx.p7b" certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsImageColorspaceJsTest" hap_name = "ActsImageColorspaceJsTest"
subsystem_name = "multimedia"
part_name = "multimedia_image_standard"
} }
ohos_js_assets("image_colorspace_js_assets") { ohos_js_assets("image_colorspace_js_assets") {
js2abc = true js2abc = true
......
...@@ -21,6 +21,8 @@ ohos_js_hap_suite("image_DecodeOptions_js_hap") { ...@@ -21,6 +21,8 @@ ohos_js_hap_suite("image_DecodeOptions_js_hap") {
] ]
certificate_profile = "./signature/openharmony_sx.p7b" certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsImageDecodeOptionsJsTest" hap_name = "ActsImageDecodeOptionsJsTest"
subsystem_name = "multimedia"
part_name = "multimedia_image_standard"
} }
ohos_js_assets("image_DecodeOptions_js_assets") { ohos_js_assets("image_DecodeOptions_js_assets") {
js2abc = true js2abc = true
......
...@@ -21,6 +21,8 @@ ohos_js_hap_suite("image_exif_js_hap") { ...@@ -21,6 +21,8 @@ ohos_js_hap_suite("image_exif_js_hap") {
] ]
certificate_profile = "./signature/openharmony_sx.p7b" certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsImageExifJsTest" hap_name = "ActsImageExifJsTest"
subsystem_name = "multimedia"
part_name = "multimedia_image_standard"
} }
ohos_js_assets("image_exif_js_assets") { ohos_js_assets("image_exif_js_assets") {
source_dir = "./src/main/js/default" source_dir = "./src/main/js/default"
......
...@@ -21,6 +21,8 @@ ohos_js_hap_suite("image_modifyProperty_js_hap") { ...@@ -21,6 +21,8 @@ ohos_js_hap_suite("image_modifyProperty_js_hap") {
] ]
certificate_profile = "./signature/openharmony_sx.p7b" certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsImageModifyPropertyJsTest" hap_name = "ActsImageModifyPropertyJsTest"
subsystem_name = "multimedia"
part_name = "multimedia_image_standard"
} }
ohos_js_assets("image_modifyProperty_js_assets") { ohos_js_assets("image_modifyProperty_js_assets") {
js2abc = true js2abc = true
......
...@@ -21,6 +21,8 @@ ohos_js_hap_suite("image_packing_js_hap") { ...@@ -21,6 +21,8 @@ ohos_js_hap_suite("image_packing_js_hap") {
] ]
certificate_profile = "./signature/openharmony_sx.p7b" certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsImagePackingJsTest" hap_name = "ActsImagePackingJsTest"
subsystem_name = "multimedia"
part_name = "multimedia_image_standard"
} }
ohos_js_assets("image_packing_js_assets") { ohos_js_assets("image_packing_js_assets") {
js2abc = true js2abc = true
......
...@@ -21,6 +21,8 @@ ohos_js_hap_suite("image_pixelmapframework_js_hap") { ...@@ -21,6 +21,8 @@ ohos_js_hap_suite("image_pixelmapframework_js_hap") {
] ]
certificate_profile = "./signature/openharmony_sx.p7b" certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsImagePixelMapFrameworkJsTest" hap_name = "ActsImagePixelMapFrameworkJsTest"
subsystem_name = "multimedia"
part_name = "multimedia_image_standard"
} }
ohos_js_assets("image_pixelmapframework_js_assets") { ohos_js_assets("image_pixelmapframework_js_assets") {
js2abc = true js2abc = true
......
...@@ -21,6 +21,8 @@ ohos_js_hap_suite("image_receiver_js_hap") { ...@@ -21,6 +21,8 @@ ohos_js_hap_suite("image_receiver_js_hap") {
] ]
certificate_profile = "./signature/openharmony_sx.p7b" certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsImageReceiverJsTest" hap_name = "ActsImageReceiverJsTest"
subsystem_name = "multimedia"
part_name = "multimedia_image_standard"
} }
ohos_js_assets("image_receiver_js_assets") { ohos_js_assets("image_receiver_js_assets") {
js2abc = true js2abc = true
......
...@@ -21,6 +21,8 @@ ohos_js_hap_suite("image_webp_js_hap") { ...@@ -21,6 +21,8 @@ ohos_js_hap_suite("image_webp_js_hap") {
] ]
certificate_profile = "./signature/openharmony_sx.p7b" certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsImageWebpJsTest" hap_name = "ActsImageWebpJsTest"
subsystem_name = "multimedia"
part_name = "multimedia_image_standard"
} }
ohos_js_assets("image_webp_js_assets") { ohos_js_assets("image_webp_js_assets") {
js2abc = true js2abc = true
......
...@@ -21,6 +21,8 @@ ohos_js_hap_suite("image_yuv_js_hap") { ...@@ -21,6 +21,8 @@ ohos_js_hap_suite("image_yuv_js_hap") {
] ]
certificate_profile = "./signature/openharmony_sx.p7b" certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsImageyuvJsTest" hap_name = "ActsImageyuvJsTest"
subsystem_name = "multimedia"
part_name = "multimedia_image_standard"
} }
ohos_js_assets("image_yuv_js_assets") { ohos_js_assets("image_yuv_js_assets") {
js2abc = true js2abc = true
......
...@@ -23,6 +23,8 @@ ohos_js_hap_suite("image_pixelmap_ndk_hap") { ...@@ -23,6 +23,8 @@ ohos_js_hap_suite("image_pixelmap_ndk_hap") {
ets2abc = true ets2abc = true
certificate_profile = "./signature/openharmony_sx.p7b" certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsPixelMapNapiEtsTest" hap_name = "ActsPixelMapNapiEtsTest"
subsystem_name = "multimedia"
part_name = "multimedia_image_standard"
shared_libraries = [ "./entry/src/main/cpp:imagePixelmap" ] shared_libraries = [ "./entry/src/main/cpp:imagePixelmap" ]
} }
......
...@@ -22,6 +22,8 @@ ohos_js_hap_suite("audio_codec_format_js_hap") { ...@@ -22,6 +22,8 @@ ohos_js_hap_suite("audio_codec_format_js_hap") {
] ]
certificate_profile = "./signature/openharmony_sx.p7b" certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsAudioCodecFormatJsTest" hap_name = "ActsAudioCodecFormatJsTest"
subsystem_name = "multimedia"
part_name = "multimedia_player_framework"
} }
ohos_js_assets("audio_codec_format_js_assets") { ohos_js_assets("audio_codec_format_js_assets") {
source_dir = "./src/main/js/default" source_dir = "./src/main/js/default"
......
...@@ -22,6 +22,8 @@ ohos_js_hap_suite("audio_decoder_js_hap") { ...@@ -22,6 +22,8 @@ ohos_js_hap_suite("audio_decoder_js_hap") {
] ]
certificate_profile = "./signature/openharmony_sx.p7b" certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsAudioDecoderJsTest" hap_name = "ActsAudioDecoderJsTest"
subsystem_name = "multimedia"
part_name = "multimedia_player_framework"
} }
ohos_js_assets("audio_decoder_js_assets") { ohos_js_assets("audio_decoder_js_assets") {
source_dir = "./src/main/js/default" source_dir = "./src/main/js/default"
......
...@@ -22,6 +22,8 @@ ohos_js_hap_suite("audio_encoder_js_hap") { ...@@ -22,6 +22,8 @@ ohos_js_hap_suite("audio_encoder_js_hap") {
] ]
certificate_profile = "./signature/openharmony_sx.p7b" certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsAudioEncoderJsTest" hap_name = "ActsAudioEncoderJsTest"
subsystem_name = "multimedia"
part_name = "multimedia_player_framework"
} }
ohos_js_assets("audio_encoder_js_assets") { ohos_js_assets("audio_encoder_js_assets") {
source_dir = "./src/main/js/default" source_dir = "./src/main/js/default"
......
...@@ -21,6 +21,8 @@ ohos_js_hap_suite("audio_player_js_hap") { ...@@ -21,6 +21,8 @@ ohos_js_hap_suite("audio_player_js_hap") {
] ]
certificate_profile = "./signature/openharmony_sx.p7b" certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsAudioPlayerJsTest" hap_name = "ActsAudioPlayerJsTest"
subsystem_name = "multimedia"
part_name = "multimedia_player_framework"
} }
ohos_js_assets("audio_player_js_assets") { ohos_js_assets("audio_player_js_assets") {
js2abc = true js2abc = true
......
...@@ -21,6 +21,8 @@ ohos_js_hap_suite("audio_recorder_js_hap") { ...@@ -21,6 +21,8 @@ ohos_js_hap_suite("audio_recorder_js_hap") {
] ]
certificate_profile = "./signature/openharmony_sx.p7b" certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsAudioRecorderJsTest" hap_name = "ActsAudioRecorderJsTest"
subsystem_name = "multimedia"
part_name = "multimedia_player_framework"
} }
ohos_js_assets("audio_recorder_js_assets") { ohos_js_assets("audio_recorder_js_assets") {
source_dir = "./src/main/js/default" source_dir = "./src/main/js/default"
......
...@@ -27,6 +27,8 @@ ohos_js_hap_suite("hls_player_js_hap") { ...@@ -27,6 +27,8 @@ ohos_js_hap_suite("hls_player_js_hap") {
# ] # ]
certificate_profile = "./signature/openharmony_sx.p7b" certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsHLSPlayerJsTest" hap_name = "ActsHLSPlayerJsTest"
subsystem_name = "multimedia"
part_name = "multimedia_player_framework"
# part_name = "prebuilt_hap" # part_name = "prebuilt_hap"
# subsystem_name = "xts" # subsystem_name = "xts"
......
...@@ -27,6 +27,8 @@ ohos_js_hap_suite("http_player_js_hap") { ...@@ -27,6 +27,8 @@ ohos_js_hap_suite("http_player_js_hap") {
# ] # ]
certificate_profile = "./signature/openharmony_sx.p7b" certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsHTTPPlayerJsTest" hap_name = "ActsHTTPPlayerJsTest"
subsystem_name = "multimedia"
part_name = "multimedia_player_framework"
# part_name = "prebuilt_hap" # part_name = "prebuilt_hap"
# subsystem_name = "xts" # subsystem_name = "xts"
......
...@@ -21,6 +21,8 @@ ohos_js_hap_suite("recorder_format_js_hap") { ...@@ -21,6 +21,8 @@ ohos_js_hap_suite("recorder_format_js_hap") {
] ]
certificate_profile = "./signature/openharmony_sx.p7b" certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsRecorderFormatJsTest" hap_name = "ActsRecorderFormatJsTest"
subsystem_name = "multimedia"
part_name = "multimedia_player_framework"
} }
ohos_js_assets("recorder_format_js_assets") { ohos_js_assets("recorder_format_js_assets") {
js2abc = true js2abc = true
......
...@@ -22,6 +22,8 @@ ohos_js_hap_suite("recorder_profile_js_hap") { ...@@ -22,6 +22,8 @@ ohos_js_hap_suite("recorder_profile_js_hap") {
] ]
certificate_profile = "./signature/openharmony_sx.p7b" certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsRecorderProfileJsTest" hap_name = "ActsRecorderProfileJsTest"
subsystem_name = "multimedia"
part_name = "multimedia_player_framework"
} }
ohos_js_assets("profile_js_assets") { ohos_js_assets("profile_js_assets") {
js2abc = true js2abc = true
......
...@@ -21,6 +21,8 @@ ohos_js_hap_suite("video_codec_format_js_hap") { ...@@ -21,6 +21,8 @@ ohos_js_hap_suite("video_codec_format_js_hap") {
] ]
certificate_profile = "./signature/openharmony_sx.p7b" certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsVideoCodecFormatJsTest" hap_name = "ActsVideoCodecFormatJsTest"
subsystem_name = "multimedia"
part_name = "multimedia_player_framework"
} }
ohos_js_assets("video_codec_format_js_assets") { ohos_js_assets("video_codec_format_js_assets") {
source_dir = "./src/main/js/default" source_dir = "./src/main/js/default"
......
...@@ -21,6 +21,8 @@ ohos_js_hap_suite("video_decoder_js_hap") { ...@@ -21,6 +21,8 @@ ohos_js_hap_suite("video_decoder_js_hap") {
] ]
certificate_profile = "./signature/openharmony_sx.p7b" certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsVideoDecoderJsTest" hap_name = "ActsVideoDecoderJsTest"
subsystem_name = "multimedia"
part_name = "multimedia_player_framework"
} }
ohos_js_assets("video_decoder_js_assets") { ohos_js_assets("video_decoder_js_assets") {
source_dir = "./src/main/js/default" source_dir = "./src/main/js/default"
......
...@@ -22,6 +22,8 @@ ohos_js_hap_suite("video_encoder_js_hap") { ...@@ -22,6 +22,8 @@ ohos_js_hap_suite("video_encoder_js_hap") {
] ]
certificate_profile = "./signature/openharmony_sx.p7b" certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsVideoEncoderJsTest" hap_name = "ActsVideoEncoderJsTest"
subsystem_name = "multimedia"
part_name = "multimedia_player_framework"
} }
ohos_js_assets("video_encoder_js_assets") { ohos_js_assets("video_encoder_js_assets") {
source_dir = "./src/main/js/default" source_dir = "./src/main/js/default"
......
...@@ -27,6 +27,8 @@ ohos_js_hap_suite("video_player_js_hap") { ...@@ -27,6 +27,8 @@ ohos_js_hap_suite("video_player_js_hap") {
# ] # ]
certificate_profile = "./signature/openharmony_sx.p7b" certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsVideoPlayerJsTest" hap_name = "ActsVideoPlayerJsTest"
subsystem_name = "multimedia"
part_name = "multimedia_player_framework"
# part_name = "prebuilt_hap" # part_name = "prebuilt_hap"
# subsystem_name = "xts" # subsystem_name = "xts"
......
...@@ -25,6 +25,8 @@ ohos_js_hap_suite("video_recorder_js_hap") { ...@@ -25,6 +25,8 @@ ohos_js_hap_suite("video_recorder_js_hap") {
# ] # ]
certificate_profile = "./signature/openharmony_sx.p7b" certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsVideoRecorderJsTest" hap_name = "ActsVideoRecorderJsTest"
subsystem_name = "multimedia"
part_name = "multimedia_player_framework"
# part_name = "prebuilt_hap" # part_name = "prebuilt_hap"
# subsystem_name = "xts" # subsystem_name = "xts"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册