提交 3f599ad7 编写于 作者: L lwx1121892

<方法适配>

Signed-off-by: Nlwx1121892 <liuxueqi3@huawei.com>
上级 424a5d84
......@@ -155,6 +155,16 @@ export function checkDescription(actualDescription, descriptionKey, descriptionV
}
}
export function checkOldDescription(actualDescription, descriptionKey, descriptionValue) {
for (let i = 0; i < descriptionKey.length; i++) {
let property = actualDescription[descriptionKey[i]];
console.info('case key is '+ descriptionKey[i]);
console.info('case actual value is '+ property);
console.info('case hope value is '+ descriptionValue[i]);
expect(property).assertEqual(descriptionValue[i]);
}
}
export function printDescription(obj) {
let description = "";
for(let i in obj) {
......
......@@ -157,7 +157,7 @@ describe('PlayerLocalTestAudioFUNC', function () {
console.info('case getTrackDescription called!!');
if (typeof (arrayList) != 'undefined') {
for (let i = 0; i < arrayList.length; i++) {
mediaTestBase.checkDescription(arrayList[i], descriptionKey[i], descriptionValue[i]);
mediaTestBase.checkOldDescription(arrayList[i], descriptionKey[i], descriptionValue[i]);
}
} else {
console.info('case getTrackDescription is failed');
......@@ -171,7 +171,7 @@ describe('PlayerLocalTestAudioFUNC', function () {
audioPlayer.getTrackDescription((err, arrayList) => {
if (typeof (err) == 'undefined') {
for (let i = 0; i < arrayList.length; i++) {
mediaTestBase.checkDescription(arrayList[i], descriptionKey[i], descriptionValue[i]);
mediaTestBase.checkOldDescription(arrayList[i], descriptionKey[i], descriptionValue[i]);
}
nextStep(mySteps, done);
} else {
......
......@@ -243,7 +243,7 @@ describe('VideoPlayerFuncCallbackTest', function () {
videoPlayer.getTrackDescription((err, arrlist) => {
if (err == null) {
for (let i = 0; i < arrlist.length; i++) {
mediaTestBase.checkDescription(arrlist[i], descriptionKey[i], descriptionValue[i]);
mediaTestBase.checkOldDescription(arrlist[i], descriptionKey[i], descriptionValue[i]);
}
toNextStep(videoPlayer, steps, done);
} else if ((err != null) && (steps[0] == ERROR_EVENT)) {
......
......@@ -516,7 +516,7 @@ describe('VideoPlayerFuncPromiseTest', function () {
}, mediaTestBase.failureCallback).catch(mediaTestBase.catchCallback);
for (let i = 0; i < arrayDescription.length; i++) {
mediaTestBase.checkDescription(arrayDescription[i], descriptionKey[i], descriptionValue[i]);
mediaTestBase.checkOldDescription(arrayDescription[i], descriptionKey[i], descriptionValue[i]);
}
await videoPlayer.release().then(() => {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册