提交 f1f38af3 编写于 作者: D durui

枚举覆盖

Signed-off-by: Ndurui <durui15@huawei.com>
上级 785e3d66
......@@ -31,12 +31,12 @@ export default function AVSession() {
let context = featureAbility.getContext();
let castControlCommandType = 'play';
let deviceInfo = {
castCategory : 0,
deviceId : "deviceId",
deviceName : "deviceName",
castCategory: 0,
deviceId: "deviceId",
deviceName: "deviceName",
}
let outputDeviceInfo = {
devices : [ deviceInfo ],
devices: [deviceInfo],
}
function sleep(ms) {
......@@ -677,7 +677,7 @@ export default function AVSession() {
it('SUB_MULTIMEDIA_AVSESSION_SETAVPLAYBACKSTATE_PROMISE_0100', 0, async function (done) {
let PlaybackState1 = {
state: avSession.PlaybackState.PLAYBACK_STATE_PLAY,
activeItemId : 0,
activeItemId: 0,
};
await session.setAVPlaybackState(PlaybackState1).then(() => {
console.info('TestLog: Set State successfully');
......@@ -1458,7 +1458,7 @@ export default function AVSession() {
});
await sleep(500);
try{
try {
session.deactivate((err) => {
if (err) {
console.info(`TestLog: Deactivate session error: code: ${err.code}, message: ${err.message}`);
......@@ -2863,8 +2863,8 @@ export default function AVSession() {
* @tc.level : Level2
*/
it('SUB_MULTIMEDIA_AVSESSION_SENDAVKEYEVENT_CALLBACK_0100', 0, async function (done) {
let keyItem = {code: 0x49, pressedTime: 123456789, deviceId: 0};
let event = {action: 2, key: keyItem, keys: [keyItem]};
let keyItem = { code: 0x49, pressedTime: 123456789, deviceId: 0 };
let event = { action: 2, key: keyItem, keys: [keyItem] };
try {
controller.sendAVKeyEvent(event, (err, data) => {
if (err) {
......@@ -2891,8 +2891,8 @@ export default function AVSession() {
* @tc.level : Level2
*/
it('SUB_MULTIMEDIA_AVSESSION_SENDAVKEYEVENT_PROMISE_0100', 0, async function (done) {
let keyItem = {code: 0x49, pressedTime: 123456789, deviceId: 0};
let event = {action: 2, key: keyItem, keys: [keyItem]};
let keyItem = { code: 0x49, pressedTime: 123456789, deviceId: 0 };
let event = { action: 2, key: keyItem, keys: [keyItem] };
await controller.sendAVKeyEvent(event).then(() => {
console.info('sendAVKeyEvent Successfully');
expect(true).assertTrue();
......@@ -2914,7 +2914,7 @@ export default function AVSession() {
it('SUB_MULTIMEDIA_AVSESSION_GETREALPLAYBACKPOSITIONSYNC_0100', 0, async function (done) {
let realPosition = -1;
try {
realPosition= controller.getRealPlaybackPositionSync();
realPosition = controller.getRealPlaybackPositionSync();
} catch (err) {
console.info(`TestLog: getRealPlaybackPositionSync error: code: ${err.code}, message: ${err.message}`);
expect(false).assertTrue();
......
......@@ -33,9 +33,6 @@ export default function AVSessionControllerJsTest() {
let receivedParam2 = null;
let receivedExtras = null;
let receivedExtras2 = null;
// let value = Uint8Array = resourceManager.getRawFileContent('IMAGE_URI');
// let imageSource = imageImageSource = image.createImageSource(value.buffer);
// let imagePixel = image.PixelMap = imageSource.createPixelMap({desiredSize:{width: 150, height: 150}});
const INVALID_STRING = "invalid string";
const UPDATE_LYRICS_EVENT = "dynamic_lyrics";
const UPDATE_LYRICS_WANT_PARAMS = {
......@@ -58,17 +55,16 @@ export default function AVSessionControllerJsTest() {
mediaId: QUEUE_ITEM_KEY_WORD,
title: QUEUE_ITEM_KEY_WORD,
extras: EXTRAS,
// icon: undefined,
iconUri: "iconUri",
mediaSize: 10,
albumTitle: "albumTitle",
albumCoverUri : "albumCoverUri",
lyricContent : "lyricContent",
lyricUri : "lyricUri",
mediaUri : "mediaUri",
startPosition : 0,
creditsPosition : 0,
appName : "appName"
albumCoverUri: "albumCoverUri",
lyricContent: "lyricContent",
lyricUri: "lyricUri",
mediaUri: "mediaUri",
startPosition: 0,
creditsPosition: 0,
appName: "appName"
};
const QUEUE_ITEM_DESCRIPTION_ERROR = {
mediaId: QUEUE_ITEM_KEY_WORD,
......@@ -78,13 +74,13 @@ export default function AVSessionControllerJsTest() {
iconUri: "iconUri",
mediaSize: 10,
albumTitle: "albumTitle",
albumCoverUri : "albumCoverUri",
lyricContent : "lyricContent",
lyricUri : "lyricUri",
mediaUri : "mediaUri",
startPosition : 0,
creditsPosition : 0,
appName : "appName"
albumCoverUri: "albumCoverUri",
lyricContent: "lyricContent",
lyricUri: "lyricUri",
mediaUri: "mediaUri",
startPosition: 0,
creditsPosition: 0,
appName: "appName"
};
const QUEUE_ITEM = {
itemId: QUEUE_ITEM_ID,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册