提交 80ae7fc3 编写于 作者: Z zljzero

sign

Signed-off-by: Nzljzero <zhanglejie1@huawei.com>
上级 f4b8a8ed
......@@ -1817,6 +1817,76 @@ export default function AVSession() {
})
/* *
* @tc.number : SUB_MULTIMEDIA_AVSESSION_OFFPLAY_0100
* @tc.name : OFFPLAY_0100
* @tc.desc : Testing offPlay callback
* @tc.size : MediumTest
* @tc.type : Function
* @tc.level : Level2
*/
it('SUB_MULTIMEDIA_AVSESSION_OFFPLAY_0100', 0, async function (done) {
function callback1() {
console.info('TestLog: Play command registration1 success');
expect(false).assertTrue();
}
function callback2() {
console.info('TestLog: Play command registration2 success');
expect(false).assertTrue();
}
session.on('play', callback1);
session.on('play', callback2);
session.off('play');
await controller.sendControlCommand({ command: 'play' }).then(() => {
console.info('TestLog: Controller send command successfully');
}).catch((err) => {
console.info(`TestLog: Controller send command error: code: ${err.code}, message: ${err.message}`);
expect(true).assertTrue();
});
await sleep(500);
done();
})
/* *
* @tc.number : SUB_MULTIMEDIA_AVSESSION_OFFPLAY_0200
* @tc.name : OFFPLAY_0200
* @tc.desc : Testing offPlay callback
* @tc.size : MediumTest
* @tc.type : Function
* @tc.level : Level2
*/
it('SUB_MULTIMEDIA_AVSESSION_OFFPLAY_0200', 0, async function (done) {
function callback1() {
console.info('TestLog: Play command registration1 success');
expect(false).assertTrue();
}
function callback2() {
console.info('TestLog: Play command registration2 success');
expect(true).assertTrue();
}
session.on('play', callback1);
session.on('play', callback2);
session.off('play', callback1);
await controller.sendControlCommand({ command: 'play' }).then(() => {
console.info('TestLog: Controller send command successfully');
}).catch((err) => {
console.info(`TestLog: Controller send command error: code: ${err.code}, message: ${err.message}`);
expect(false).assertTrue();
});
await sleep(500);
done();
})
/* *
* @tc.number : SUB_MULTIMEDIA_AVSESSION_OFFPAUSE_0100
......
......@@ -59,12 +59,7 @@ export default function AVSessionCallback() {
expect(false).assertTrue();
});
await avSession.createController(session.sessionId).then((data) => {
controller = data;
}).catch((err) => {
console.info(`TestLog: Controller created error: code: ${err.code}, message: ${err.message}`);
expect(false).assertTrue();
});
controller = await session.getController();
})
afterEach(async function (done) {
......
......@@ -59,12 +59,7 @@ export default function AVSessionErrorCode() {
expect(false).assertTrue();
});
await avSession.createController(session.sessionId).then((data) => {
controller = data;
}).catch((err) => {
console.info(`TestLog: Controller create error: code: ${err.code}, message: ${err.message}`);
expect(false).assertTrue();
});
controller = await session.getController();
})
afterEach(async function (done) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册