Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
9f1d9ce4
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看板
提交
9f1d9ce4
编写于
4月 12, 2023
作者:
Q
qinliwen
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
<删除冗余无效用例>
Signed-off-by:
N
qinliwen
<
qinliwen3@huawei.com
>
上级
799a1637
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
0 addition
and
265 deletion
+0
-265
multimedia/audio/audio_js_standard/AudioEventManagement/src/main/js/test/AudioEventManagement.test.js
...tManagement/src/main/js/test/AudioEventManagement.test.js
+0
-265
未找到文件。
multimedia/audio/audio_js_standard/AudioEventManagement/src/main/js/test/AudioEventManagement.test.js
浏览文件 @
9f1d9ce4
...
@@ -440,271 +440,6 @@ describe('audioEventManagement', function () {
...
@@ -440,271 +440,6 @@ describe('audioEventManagement', function () {
});
});
})
})
/**
*@tc.number : SUB_MULTIMEDIA_AUDIO_MANAGER_SETDEVICEACTIVE_PR_DEACTIVATE_0100
*@tc.name : setDeviceActive - SPEAKER - deactivate - Promise
*@tc.desc : Deactivate speaker - Promise
*@tc.size : MEDIUM
*@tc.type : Function
*@tc.level : Level 2
*/
it
(
'
SUB_MULTIMEDIA_AUDIO_MANAGER_SETDEVICEACTIVE_PR_DEACTIVATE_0100
'
,
2
,
async
function
(
done
)
{
await
audioManager
.
setDeviceActive
(
audio
.
ActiveDeviceType
.
SPEAKER
,
false
).
then
(
function
()
{
// Setting device active ENUM 2 = SPEAKER
console
.
info
(
`
${
TagFrmwk
}
: Device Test: Promise : setDeviceActive : SPEAKER: Deactivate`
);
audioManager
.
isDeviceActive
(
audio
.
ActiveDeviceType
.
SPEAKER
).
then
(
function
(
value
)
{
if
(
value
==
false
)
{
console
.
info
(
`
${
TagFrmwk
}
: Device Test: Promise : isDeviceActive : SPEAKER: Deactivate : PASS :
${
value
}
`
);
expect
(
true
).
assertTrue
();
}
else
{
console
.
info
(
`
${
TagFrmwk
}
: Device Test: Promise : isDeviceActive : SPEAKER: Deactivate : FAIL :
${
value
}
`
);
expect
(
false
).
assertTrue
();
}
});
}).
catch
((
err
)
=>
{
console
.
info
(
`
${
TagFrmwk
}
: Device Test: Promise : isDeviceActive : SPEAKER: Deactivate : FAIL : Error :
${
err
.
message
}
`
);
expect
(
false
).
assertTrue
();
});
done
();
})
/**
*@tc.number : SUB_MULTIMEDIA_AUDIO_MANAGER_SETDEVICEACTIVE_PR_DEACTIVATE_ENUM_0100
*@tc.name : setDeviceActive - SPEAKER - deactivate - Promise - ENUM
*@tc.desc : Deactivate speaker - Promise
*@tc.size : MEDIUM
*@tc.type : Function
*@tc.level : Level 2
*/
it
(
'
SUB_MULTIMEDIA_AUDIO_MANAGER_SETDEVICEACTIVE_PR_DEACTIVATE_ENUM_0100
'
,
2
,
async
function
(
done
)
{
await
audioManager
.
setDeviceActive
(
2
,
true
).
then
(
function
()
{
console
.
info
(
`
${
TagFrmwk
}
: Device Test: Promise : setDeviceActive : SPEAKER: Active`
);
});
await
audioManager
.
setDeviceActive
(
2
,
false
).
then
(
function
()
{
// Setting device active ENUM 2 = SPEAKER
console
.
info
(
`
${
TagFrmwk
}
: Device Test: Promise : setDeviceActive : SPEAKER: Deactivate`
);
audioManager
.
isDeviceActive
(
2
).
then
(
function
(
value
)
{
if
(
value
==
false
)
{
console
.
info
(
`
${
TagFrmwk
}
: Device Test: Promise : isDeviceActive : SPEAKER: Deactivate : PASS :
${
value
}
`
);
expect
(
true
).
assertTrue
();
}
else
{
console
.
info
(
`
${
TagFrmwk
}
: Device Test: Promise : isDeviceActive : SPEAKER: Deactivate : FAIL :
${
value
}
`
);
expect
(
false
).
assertTrue
();
}
});
}).
catch
((
err
)
=>
{
console
.
info
(
`
${
TagFrmwk
}
: Device Test: Promise : isDeviceActive : SPEAKER: Deactivate : FAIL : Error :
${
err
.
message
}
`
);
expect
(
false
).
assertTrue
();
});
done
();
})
/**
*@tc.number : SUB_MULTIMEDIA_AUDIO_MANAGER_SETDEVICEACTIVE_PR_ACTIVATE_0100
*@tc.name : setDeviceActive - SPEAKER - Activate - Promise
*@tc.desc : Activate speaker - Promise
*@tc.size : MEDIUM
*@tc.type : Function
*@tc.level : Level 2
*/
it
(
'
SUB_MULTIMEDIA_AUDIO_MANAGER_SETDEVICEACTIVE_PR_ACTIVATE_0100
'
,
2
,
async
function
(
done
)
{
await
audioManager
.
setDeviceActive
(
audio
.
ActiveDeviceType
.
SPEAKER
,
true
).
then
(
function
()
{
console
.
info
(
`
${
TagFrmwk
}
: Device Test: Promise : setDeviceActive : SPEAKER: Activate`
);
audioManager
.
isDeviceActive
(
audio
.
ActiveDeviceType
.
SPEAKER
).
then
(
function
(
value
)
{
if
(
value
==
true
)
{
console
.
info
(
`
${
TagFrmwk
}
: Device Test: Promise : isDeviceActive : SPEAKER: Activate : PASS :
${
value
}
`
);
expect
(
true
).
assertTrue
();
}
else
{
console
.
info
(
`
${
TagFrmwk
}
: Device Test: Promise : isDeviceActive : SPEAKER: Activate : FAIL :
${
value
}
`
);
expect
(
false
).
assertTrue
();
}
});
}).
catch
((
err
)
=>
{
console
.
info
(
`
${
TagFrmwk
}
: Device Test: Promise : isDeviceActive : SPEAKER: Activate : FAIL :Error :
${
err
.
message
}
`
);
expect
(
false
).
assertTrue
();
});
done
();
})
/**
*@tc.number : SUB_MULTIMEDIA_AUDIO_MANAGER_SETDEVICEACTIVE_PR_ACTIVATE_ENUM_0100
*@tc.name : setDeviceActive - SPEAKER - Activate - Promise - ENUM
*@tc.desc : Activate speaker - Promise
*@tc.size : MEDIUM
*@tc.type : Function
*@tc.level : Level 2
*/
it
(
'
SUB_MULTIMEDIA_AUDIO_MANAGER_SETDEVICEACTIVE_PR_ACTIVATE_ENUM_0100
'
,
2
,
async
function
(
done
)
{
await
audioManager
.
setDeviceActive
(
2
,
true
).
then
(
function
()
{
console
.
info
(
`
${
TagFrmwk
}
: Device Test: Promise : setDeviceActive : SPEAKER: Activate`
);
audioManager
.
isDeviceActive
(
2
).
then
(
function
(
value
)
{
if
(
value
==
true
)
{
console
.
info
(
`
${
TagFrmwk
}
: Device Test: Promise : isDeviceActive : SPEAKER: Activate : PASS :
${
value
}
`
);
expect
(
true
).
assertTrue
();
}
else
{
console
.
info
(
`
${
TagFrmwk
}
: Device Test: Promise : isDeviceActive : SPEAKER: Activate : FAIL :
${
value
}
`
);
expect
(
false
).
assertTrue
();
}
});
}).
catch
((
err
)
=>
{
console
.
info
(
`
${
TagFrmwk
}
: Device Test: Promise : isDeviceActive : SPEAKER: Activate : FAIL :Error :
${
err
.
message
}
`
);
expect
(
false
).
assertTrue
();
});
done
();
})
/**
*@tc.number : SUB_MULTIMEDIA_AUDIO_MANAGER_SETDEVICEACTIVE_CB_DEACTIVATE_0100
*@tc.name : setDeviceActive - SPEAKER - deactivate - Callback
*@tc.desc : Deactivate speaker - Callback
*@tc.size : MEDIUM
*@tc.type : Function
*@tc.level : Level 2
*/
it
(
'
SUB_MULTIMEDIA_AUDIO_MANAGER_SETDEVICEACTIVE_CB_DEACTIVATE_0100
'
,
2
,
function
(
done
)
{
audioManager
.
setDeviceActive
(
audio
.
ActiveDeviceType
.
SPEAKER
,
false
,
(
err
)
=>
{
if
(
err
)
{
console
.
error
(
`
${
TagFrmwk
}
: Device Test: Callback : setDeviceActive : SPEAKER: Deactivate: Error:
${
err
.
message
}
`
);
expect
(
false
).
assertTrue
();
}
else
{
console
.
info
(
`
${
TagFrmwk
}
: Device Test: Callback : setDeviceActive : SPEAKER: Active`
);
audioManager
.
isDeviceActive
(
audio
.
ActiveDeviceType
.
SPEAKER
,
(
err
,
value
)
=>
{
if
(
err
)
{
console
.
error
(
`
${
TagFrmwk
}
: Device Test: Callback : isDeviceActive : SPEAKER: Deactivate: Error:
${
err
.
message
}
`
);
expect
(
false
).
assertTrue
();
}
else
if
(
value
==
false
)
{
console
.
info
(
`
${
TagFrmwk
}
: Device Test: Callback : isDeviceActive : SPEAKER: Deactivate : PASS :
${
value
}
`
);
expect
(
true
).
assertTrue
();
}
else
{
console
.
info
(
`
${
TagFrmwk
}
: Device Test: Callback : isDeviceActive : SPEAKER: Deactivate : FAIL :
${
value
}
`
);
expect
(
false
).
assertTrue
();
}
done
();
});
}
done
();
});
})
/**
*@tc.number : SUB_MULTIMEDIA_AUDIO_MANAGER_SETDEVICEACTIVE_CB_DEACTIVATE_ENUM_0100
*@tc.name : setDeviceActive - SPEAKER - deactivate - Callback - ENUM
*@tc.desc : Deactivate speaker - Callback
*@tc.size : MEDIUM
*@tc.type : Function
*@tc.level : Level 2
*/
it
(
'
SUB_MULTIMEDIA_AUDIO_MANAGER_SETDEVICEACTIVE_CB_DEACTIVATE_ENUM_0100
'
,
2
,
async
function
(
done
)
{
await
audioManager
.
setDeviceActive
(
2
,
true
).
then
(
function
()
{
console
.
info
(
`
${
TagFrmwk
}
: Device Test: Promise : setDeviceActive : SPEAKER : Active`
);
});
audioManager
.
setDeviceActive
(
2
,
false
,
(
err
)
=>
{
if
(
err
)
{
console
.
error
(
`
${
TagFrmwk
}
: Device Test: Callback : setDeviceActive : SPEAKER: Deactivate: Error:
${
err
.
message
}
`
);
expect
(
false
).
assertTrue
();
}
else
{
console
.
info
(
`
${
TagFrmwk
}
: Device Test: Callback : setDeviceActive : SPEAKER: Active`
);
audioManager
.
isDeviceActive
(
2
,
(
err
,
value
)
=>
{
if
(
err
)
{
console
.
error
(
`
${
TagFrmwk
}
: Device Test: Callback : isDeviceActive : SPEAKER: Deactivate: Error:
${
err
.
message
}
`
);
expect
(
false
).
assertTrue
();
}
else
if
(
value
==
false
)
{
console
.
info
(
`
${
TagFrmwk
}
: Device Test: Callback : isDeviceActive : SPEAKER: Deactivate : PASS :
${
value
}
`
);
expect
(
true
).
assertTrue
();
}
else
{
console
.
info
(
`
${
TagFrmwk
}
: Device Test: Callback : isDeviceActive : SPEAKER: Deactivate : FAIL :
${
value
}
`
);
expect
(
false
).
assertTrue
();
}
done
();
});
}
done
();
});
})
/**
*@tc.number : SUB_MULTIMEDIA_AUDIO_MANAGER_SETDEVICEACTIVE_CB_ACTIVATE_0100
*@tc.name : setDeviceActive - SPEAKER - activate - Callback
*@tc.desc : Activate speaker - Callback
*@tc.size : MEDIUM
*@tc.type : Function
*@tc.level : Level 2
*/
it
(
'
SUB_MULTIMEDIA_AUDIO_MANAGER_SETDEVICEACTIVE_CB_ACTIVATE_0100
'
,
2
,
function
(
done
)
{
audioManager
.
setDeviceActive
(
audio
.
ActiveDeviceType
.
SPEAKER
,
true
,
(
err
)
=>
{
if
(
err
)
{
console
.
error
(
`
${
TagFrmwk
}
: Device Test: Callback : setDeviceActive : SPEAKER: Active: Error:
${
err
.
message
}
`
);
expect
(
false
).
assertTrue
();
}
else
{
console
.
info
(
`
${
TagFrmwk
}
: Device Test: Callback : setDeviceActive : SPEAKER: Active`
);
audioManager
.
isDeviceActive
(
audio
.
ActiveDeviceType
.
SPEAKER
,
(
err
,
value
)
=>
{
if
(
err
)
{
console
.
error
(
`
${
TagFrmwk
}
: Device Test: Callback : isDeviceActive : SPEAKER: Active: Error:
${
err
.
message
}
`
);
expect
(
false
).
assertTrue
();
}
else
if
(
value
==
true
)
{
console
.
info
(
`
${
TagFrmwk
}
: Device Test: Callback : isDeviceActive : SPEAKER: Active : PASS :
${
value
}
`
);
expect
(
true
).
assertTrue
();
}
else
{
console
.
info
(
`
${
TagFrmwk
}
: Device Test: Callback : isDeviceActive : SPEAKER: Active : FAIL :
${
value
}
`
);
expect
(
false
).
assertTrue
();
}
done
();
});
}
done
();
});
})
/**
*@tc.number : SUB_MULTIMEDIA_AUDIO_MANAGER_SETDEVICEACTIVE_CB_ACTIVATE_ENUM_0100
*@tc.name : setDeviceActive - SPEAKER - activate - Callback - ENUM
*@tc.desc : Activate speaker - Callback
*@tc.size : MEDIUM
*@tc.type : Function
*@tc.level : Level 2
*/
it
(
'
SUB_MULTIMEDIA_AUDIO_MANAGER_SETDEVICEACTIVE_CB_ACTIVATE_ENUM_0100
'
,
2
,
function
(
done
)
{
audioManager
.
setDeviceActive
(
2
,
true
,
(
err
)
=>
{
if
(
err
)
{
console
.
error
(
`
${
TagFrmwk
}
: Device Test: Callback : setDeviceActive : SPEAKER: Active: Error:
${
err
.
message
}
`
);
expect
(
false
).
assertTrue
();
}
else
{
console
.
info
(
`
${
TagFrmwk
}
: Device Test: Callback : setDeviceActive : SPEAKER: Active`
);
audioManager
.
isDeviceActive
(
2
,
(
err
,
value
)
=>
{
if
(
err
)
{
console
.
error
(
`
${
TagFrmwk
}
: Device Test: Callback : isDeviceActive : SPEAKER: Active: Error:
${
err
.
message
}
`
);
expect
(
false
).
assertTrue
();
}
else
if
(
value
==
true
)
{
console
.
info
(
`
${
TagFrmwk
}
: Device Test: Callback : isDeviceActive : SPEAKER: Active : PASS :
${
value
}
`
);
expect
(
true
).
assertTrue
();
}
else
{
console
.
info
(
`
${
TagFrmwk
}
: Device Test: Callback : isDeviceActive : SPEAKER: Active : FAIL :
${
value
}
`
);
expect
(
false
).
assertTrue
();
}
done
();
});
}
done
();
});
})
/**
/**
*@tc.number : SUB_MULTIMEDIA_AUDIO_MANAGER_DEVICECHANGETYPE_0100
*@tc.number : SUB_MULTIMEDIA_AUDIO_MANAGER_DEVICECHANGETYPE_0100
*@tc.name : DeviceChangeType - CONNECT
*@tc.name : DeviceChangeType - CONNECT
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录