未验证 提交 64b2e7d7 编写于 作者: O openharmony_ci 提交者: Gitee

!7395 【媒体子系统】引入方法修改

Merge pull request !7395 from 秦莉文/master
......@@ -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 {
......
......@@ -244,7 +244,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)) {
......
......@@ -517,7 +517,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.
先完成此消息的编辑!
想要评论请 注册