提交 5c7ee5ee 编写于 作者: O openharmony_ci 提交者: Gitee

!1028 multmedia子系统测试套适配更新

Merge pull request !1028 from tianfenxia/master
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
"description": "Configuration for audio manager Tests", "description": "Configuration for audio manager Tests",
"driver": { "driver": {
"type": "JSUnitTest", "type": "JSUnitTest",
"test-timeout": "4800000", "test-timeout": "200000",
"package": "ohos.acts.multimedia.audio.audiomanager", "package": "ohos.acts.multimedia.audio.audiomanager",
"shell-timeout": "60000" "shell-timeout": "60000"
}, },
......
{ {
"app": { "app": {
"bundleName": "ohos.acts.multimedia.audio.audiomanager", "apiVersion": {
"compatible": 6,
"releaseType": "Beta1",
"target": 7
},
"vendor": "acts", "vendor": "acts",
"bundleName": "ohos.acts.multimedia.audio.audiomanager",
"version": { "version": {
"code": 1, "code": 1000000,
"name": "1.0" "name": "1.0.0"
}
}, },
"apiVersion": { "deviceConfig": {
"compatible": 6, "default": {
"target": 5 "debug": true
} }
}, },
"deviceConfig": {},
"module": { "module": {
"package": "ohos.acts.multimedia.audio.audiomanager",
"name": ".MyApplication",
"deviceType": [
"phone"
],
"distro": {
"deliveryWithInstall": true,
"moduleName": "entry",
"moduleType": "entry"
},
"abilities": [ "abilities": [
{ {
"iconId": 16777218,
"skills": [ "skills": [
{ {
"entities": [ "entities": [
...@@ -35,15 +31,33 @@ ...@@ -35,15 +31,33 @@
] ]
} }
], ],
"descriptionId": 16777217,
"visible": true, "visible": true,
"name": "ohos.acts.multimedia.audio.audiomanager.MainAbility", "labelId": 16777216,
"icon": "$media:icon", "icon": "$media:icon",
"name": "ohos.acts.multimedia.audio.audiomanager.MainAbility",
"description": "$string:mainability_description", "description": "$string:mainability_description",
"label": "$string:entry_MainAbility", "label": "$string:entry_MainAbility",
"type": "page", "type": "page",
"homeAbility": true,
"launchType": "standard" "launchType": "standard"
} }
], ],
"deviceType": [
"phone",
"tablet",
"tv",
"wearable"
],
"mainAbility": "ohos.acts.multimedia.audio.audiomanager.MainAbility",
"distro": {
"moduleType": "entry",
"installationFree": false,
"deliveryWithInstall": true,
"moduleName": "entry"
},
"package": "ohos.acts.multimedia.audio.audiomanager",
"name": ".MyApplication",
"js": [ "js": [
{ {
"pages": [ "pages": [
......
/*
* Copyright (C) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package ohos.acts.multimedia.audio.audioplayer;
import ohos.ace.ability.AceAbility;
import ohos.aafwk.content.Intent;
/*
* java MainAbility
*/
public class MainAbility extends AceAbility {
@Override
public void onStart(Intent intent) {
super.onStart(intent);
}
@Override
public void onStop() {
super.onStop();
}
}
/*
* Copyright (C) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package ohos.acts.multimedia.audio.audioplayer;
import ohos.aafwk.ability.AbilityPackage;
/*
* java MyApplication
*/
public class MyApplication extends AbilityPackage {
@Override
public void onInitialize() {
super.onInitialize();
}
}
...@@ -19,10 +19,10 @@ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from ' ...@@ -19,10 +19,10 @@ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from '
describe('audioApiResponseTime', function () { describe('audioApiResponseTime', function () {
console.info('AudioFrameworkTestPerf: Running AudioManger API Perfomance Test'); console.info('AudioFrameworkTestPerf: Running AudioManger API Perfomance Test');
var audioMedia = 3; var AUDIO_MEDIA = 3;
var audioRingtone = 2; var AUDIO_RINGTONE = 2;
var maxVol = 15; var MAX_VOL = 15;
var lowVol = 5; var LOW_VOL = 5;
var MAXNUM = 1000; var MAXNUM = 1000;
var err; var err;
...@@ -50,11 +50,12 @@ describe('audioApiResponseTime', function () { ...@@ -50,11 +50,12 @@ describe('audioApiResponseTime', function () {
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_AUDIO_MANAGER_Performance_001', 0, function (done) { it('SUB_AUDIO_MANAGER_Performance_001', 0, function (done) {
let audioManagerPerf = audio.getAudioManager(); let audioManagerPerf = audio.getAudioManager();
let startTime = new Date().getTime(); let startTime = new Date().getTime();
for (let i = 0; i < MAXNUM; i++) { for (let i = 0; i < MAXNUM; i++) {
audioManagerPerf.setVolume(audioRingtone,maxVol); audioManagerPerf.setVolume(AUDIO_RINGTONE,MAX_VOL);
}; };
let waitTime = new Date().getTime()-startTime; let waitTime = new Date().getTime()-startTime;
let avgTime = waitTime/MAXNUM; let avgTime = waitTime/MAXNUM;
...@@ -79,11 +80,12 @@ describe('audioApiResponseTime', function () { ...@@ -79,11 +80,12 @@ describe('audioApiResponseTime', function () {
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_AUDIO_MANAGER_Performance_002', 0, function (done) { it('SUB_AUDIO_MANAGER_Performance_002', 0, function (done) {
let audioManagerPerf = audio.getAudioManager(); let audioManagerPerf = audio.getAudioManager();
let startTime = new Date().getTime(); let startTime = new Date().getTime();
for (let i = 0; i < MAXNUM; i++) { for (let i = 0; i < MAXNUM; i++) {
audioManagerPerf.setVolume(audioMedia,lowVol,(err, value) => { audioManagerPerf.setVolume(AUDIO_MEDIA,LOW_VOL,(err, value) => {
if (err) { if (err) {
console.error(`AudioFrameworkTestPerf: callback : ERROR : ${err.message}`); console.error(`AudioFrameworkTestPerf: callback : ERROR : ${err.message}`);
expect(false).assertTrue(); expect(false).assertTrue();
...@@ -113,11 +115,12 @@ describe('audioApiResponseTime', function () { ...@@ -113,11 +115,12 @@ describe('audioApiResponseTime', function () {
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_AUDIO_MANAGER_Performance_003', 0, function (done) { it('SUB_AUDIO_MANAGER_Performance_003', 0, function (done) {
let audioManagerPerf = audio.getAudioManager(); let audioManagerPerf = audio.getAudioManager();
let startTime = new Date().getTime(); let startTime = new Date().getTime();
for (let i = 0; i < MAXNUM; i++) { for (let i = 0; i < MAXNUM; i++) {
audioManagerPerf.getVolume(audioRingtone); audioManagerPerf.getVolume(AUDIO_RINGTONE);
}; };
let waitTime = new Date().getTime()-startTime; let waitTime = new Date().getTime()-startTime;
let avgTime = waitTime/MAXNUM; let avgTime = waitTime/MAXNUM;
...@@ -142,11 +145,12 @@ describe('audioApiResponseTime', function () { ...@@ -142,11 +145,12 @@ describe('audioApiResponseTime', function () {
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_AUDIO_MANAGER_Performance_004', 0, function (done) { it('SUB_AUDIO_MANAGER_Performance_004', 0, function (done) {
let audioManagerPerf = audio.getAudioManager(); let audioManagerPerf = audio.getAudioManager();
let startTime = new Date().getTime(); let startTime = new Date().getTime();
for (let i = 0; i < MAXNUM; i++) { for (let i = 0; i < MAXNUM; i++) {
audioManagerPerf.getVolume(audioMedia,(err, value) => { audioManagerPerf.getVolume(AUDIO_MEDIA,(err, value) => {
if (err) { if (err) {
console.error(`AudioFrameworkTestPerf: callback : ERROR : ${err.message}`); console.error(`AudioFrameworkTestPerf: callback : ERROR : ${err.message}`);
expect(false).assertTrue(); expect(false).assertTrue();
...@@ -176,11 +180,12 @@ describe('audioApiResponseTime', function () { ...@@ -176,11 +180,12 @@ describe('audioApiResponseTime', function () {
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_AUDIO_MANAGER_Performance_005', 0, function (done) { it('SUB_AUDIO_MANAGER_Performance_005', 0, function (done) {
let audioManagerPerf = audio.getAudioManager(); let audioManagerPerf = audio.getAudioManager();
let startTime = new Date().getTime(); let startTime = new Date().getTime();
for (let i = 0; i < MAXNUM; i++) { for (let i = 0; i < MAXNUM; i++) {
audioManagerPerf.getMinVolume(audioMedia); audioManagerPerf.getMinVolume(AUDIO_MEDIA);
}; };
let waitTime = new Date().getTime()-startTime; let waitTime = new Date().getTime()-startTime;
let avgTime = waitTime/MAXNUM; let avgTime = waitTime/MAXNUM;
...@@ -205,11 +210,12 @@ describe('audioApiResponseTime', function () { ...@@ -205,11 +210,12 @@ describe('audioApiResponseTime', function () {
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_AUDIO_MANAGER_Performance_006', 0, function (done) { it('SUB_AUDIO_MANAGER_Performance_006', 0, function (done) {
let audioManagerPerf = audio.getAudioManager(); let audioManagerPerf = audio.getAudioManager();
let startTime = new Date().getTime(); let startTime = new Date().getTime();
for (let i = 0; i < MAXNUM; i++) { for (let i = 0; i < MAXNUM; i++) {
audioManagerPerf.getMinVolume(audioRingtone,(err, value) => { audioManagerPerf.getMinVolume(AUDIO_RINGTONE,(err, value) => {
if (err) { if (err) {
console.error(`AudioFrameworkTestPerf: callback : ERROR : ${err.message}`); console.error(`AudioFrameworkTestPerf: callback : ERROR : ${err.message}`);
expect(false).assertTrue(); expect(false).assertTrue();
...@@ -239,11 +245,12 @@ describe('audioApiResponseTime', function () { ...@@ -239,11 +245,12 @@ describe('audioApiResponseTime', function () {
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_AUDIO_MANAGER_Performance_007', 0, function (done) { it('SUB_AUDIO_MANAGER_Performance_007', 0, function (done) {
let audioManagerPerf = audio.getAudioManager(); let audioManagerPerf = audio.getAudioManager();
let startTime = new Date().getTime(); let startTime = new Date().getTime();
for (let i = 0; i < MAXNUM; i++) { for (let i = 0; i < MAXNUM; i++) {
audioManagerPerf.getMaxVolume(audioMedia); audioManagerPerf.getMaxVolume(AUDIO_MEDIA);
}; };
let waitTime = new Date().getTime()-startTime; let waitTime = new Date().getTime()-startTime;
let avgTime = waitTime/MAXNUM; let avgTime = waitTime/MAXNUM;
...@@ -268,11 +275,12 @@ describe('audioApiResponseTime', function () { ...@@ -268,11 +275,12 @@ describe('audioApiResponseTime', function () {
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_AUDIO_MANAGER_Performance_008', 0, function (done) { it('SUB_AUDIO_MANAGER_Performance_008', 0, function (done) {
let audioManagerPerf = audio.getAudioManager(); let audioManagerPerf = audio.getAudioManager();
let startTime = new Date().getTime(); let startTime = new Date().getTime();
for (let i = 0; i < MAXNUM; i++) { for (let i = 0; i < MAXNUM; i++) {
audioManagerPerf.getMaxVolume(audioRingtone,(err, value) => { audioManagerPerf.getMaxVolume(AUDIO_RINGTONE,(err, value) => {
if (err) { if (err) {
console.error(`AudioFrameworkTestPerf: callback : ERROR : ${err.message}`); console.error(`AudioFrameworkTestPerf: callback : ERROR : ${err.message}`);
expect(false).assertTrue(); expect(false).assertTrue();
...@@ -302,11 +310,12 @@ describe('audioApiResponseTime', function () { ...@@ -302,11 +310,12 @@ describe('audioApiResponseTime', function () {
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_AUDIO_MANAGER_Performance_009', 0, function (done) { it('SUB_AUDIO_MANAGER_Performance_009', 0, function (done) {
let audioManagerPerf = audio.getAudioManager(); let audioManagerPerf = audio.getAudioManager();
let startTime = new Date().getTime(); let startTime = new Date().getTime();
for (let i = 0; i < MAXNUM; i++) { for (let i = 0; i < MAXNUM; i++) {
audioManagerPerf.mute(audioMedia,true); audioManagerPerf.mute(AUDIO_MEDIA,true);
}; };
let waitTime = new Date().getTime()-startTime; let waitTime = new Date().getTime()-startTime;
let avgTime = waitTime/MAXNUM; let avgTime = waitTime/MAXNUM;
...@@ -331,11 +340,12 @@ describe('audioApiResponseTime', function () { ...@@ -331,11 +340,12 @@ describe('audioApiResponseTime', function () {
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_AUDIO_MANAGER_Performance_010', 0, function (done) { it('SUB_AUDIO_MANAGER_Performance_010', 0, function (done) {
let audioManagerPerf = audio.getAudioManager(); let audioManagerPerf = audio.getAudioManager();
let startTime = new Date().getTime(); let startTime = new Date().getTime();
for (let i = 0; i < MAXNUM; i++) { for (let i = 0; i < MAXNUM; i++) {
audioManagerPerf.mute(audioRingtone,true,(err, value) => { audioManagerPerf.mute(AUDIO_RINGTONE,true,(err, value) => {
if (err) { if (err) {
console.error(`AudioFrameworkTestPerf: callback : ERROR : ${err.message}`); console.error(`AudioFrameworkTestPerf: callback : ERROR : ${err.message}`);
expect(false).assertTrue(); expect(false).assertTrue();
...@@ -365,11 +375,12 @@ describe('audioApiResponseTime', function () { ...@@ -365,11 +375,12 @@ describe('audioApiResponseTime', function () {
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_AUDIO_MANAGER_Performance_011', 0, function (done) { it('SUB_AUDIO_MANAGER_Performance_011', 0, function (done) {
let audioManagerPerf = audio.getAudioManager(); let audioManagerPerf = audio.getAudioManager();
let startTime = new Date().getTime(); let startTime = new Date().getTime();
for (let i = 0; i < MAXNUM; i++) { for (let i = 0; i < MAXNUM; i++) {
audioManagerPerf.isMute(audioMedia); audioManagerPerf.isMute(AUDIO_MEDIA);
}; };
let waitTime = new Date().getTime()-startTime; let waitTime = new Date().getTime()-startTime;
let avgTime = waitTime/MAXNUM; let avgTime = waitTime/MAXNUM;
...@@ -394,11 +405,12 @@ describe('audioApiResponseTime', function () { ...@@ -394,11 +405,12 @@ describe('audioApiResponseTime', function () {
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_AUDIO_MANAGER_Performance_012', 0, function (done) { it('SUB_AUDIO_MANAGER_Performance_012', 0, function (done) {
let audioManagerPerf = audio.getAudioManager(); let audioManagerPerf = audio.getAudioManager();
let startTime = new Date().getTime(); let startTime = new Date().getTime();
for (let i = 0; i < MAXNUM; i++) { for (let i = 0; i < MAXNUM; i++) {
audioManagerPerf.isMute(audioRingtone,(err, value) => { audioManagerPerf.isMute(AUDIO_RINGTONE,(err, value) => {
if (err) { if (err) {
console.error(`AudioFrameworkTestPerf: callback : ERROR : ${err.message}`); console.error(`AudioFrameworkTestPerf: callback : ERROR : ${err.message}`);
expect(false).assertTrue(); expect(false).assertTrue();
...@@ -428,11 +440,12 @@ describe('audioApiResponseTime', function () { ...@@ -428,11 +440,12 @@ describe('audioApiResponseTime', function () {
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_AUDIO_MANAGER_Performance_013', 0, function (done) { it('SUB_AUDIO_MANAGER_Performance_013', 0, function (done) {
let audioManagerPerf = audio.getAudioManager(); let audioManagerPerf = audio.getAudioManager();
let startTime = new Date().getTime(); let startTime = new Date().getTime();
for (let i = 0; i < MAXNUM; i++) { for (let i = 0; i < MAXNUM; i++) {
audioManagerPerf.isActive(audioMedia); audioManagerPerf.isActive(AUDIO_MEDIA);
}; };
let waitTime = new Date().getTime()-startTime; let waitTime = new Date().getTime()-startTime;
let avgTime = waitTime/MAXNUM; let avgTime = waitTime/MAXNUM;
...@@ -457,11 +470,12 @@ describe('audioApiResponseTime', function () { ...@@ -457,11 +470,12 @@ describe('audioApiResponseTime', function () {
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_AUDIO_MANAGER_Performance_014', 0, function (done) { it('SUB_AUDIO_MANAGER_Performance_014', 0, function (done) {
let audioManagerPerf = audio.getAudioManager(); let audioManagerPerf = audio.getAudioManager();
let startTime = new Date().getTime(); let startTime = new Date().getTime();
for (let i = 0; i < MAXNUM; i++) { for (let i = 0; i < MAXNUM; i++) {
audioManagerPerf.isActive(audioRingtone,(err, value) => { audioManagerPerf.isActive(AUDIO_RINGTONE,(err, value) => {
if (err) { if (err) {
console.error(`AudioFrameworkTestPerf: callback : ERROR : ${err.message}`); console.error(`AudioFrameworkTestPerf: callback : ERROR : ${err.message}`);
expect(false).assertTrue(); expect(false).assertTrue();
...@@ -491,6 +505,7 @@ describe('audioApiResponseTime', function () { ...@@ -491,6 +505,7 @@ describe('audioApiResponseTime', function () {
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_AUDIO_MANAGER_Performance_015', 0, function (done) { it('SUB_AUDIO_MANAGER_Performance_015', 0, function (done) {
let audioManagerPerf = audio.getAudioManager(); let audioManagerPerf = audio.getAudioManager();
let startTime = new Date().getTime(); let startTime = new Date().getTime();
...@@ -520,6 +535,7 @@ describe('audioApiResponseTime', function () { ...@@ -520,6 +535,7 @@ describe('audioApiResponseTime', function () {
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_AUDIO_MANAGER_Performance_016', 0, function (done) { it('SUB_AUDIO_MANAGER_Performance_016', 0, function (done) {
let audioManagerPerf = audio.getAudioManager(); let audioManagerPerf = audio.getAudioManager();
let startTime = new Date().getTime(); let startTime = new Date().getTime();
...@@ -554,6 +570,7 @@ describe('audioApiResponseTime', function () { ...@@ -554,6 +570,7 @@ describe('audioApiResponseTime', function () {
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_AUDIO_MANAGER_Performance_017', 0, function (done) { it('SUB_AUDIO_MANAGER_Performance_017', 0, function (done) {
let audioManagerPerf = audio.getAudioManager(); let audioManagerPerf = audio.getAudioManager();
let startTime = new Date().getTime(); let startTime = new Date().getTime();
...@@ -583,6 +600,7 @@ describe('audioApiResponseTime', function () { ...@@ -583,6 +600,7 @@ describe('audioApiResponseTime', function () {
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_AUDIO_MANAGER_Performance_018', 0, function (done) { it('SUB_AUDIO_MANAGER_Performance_018', 0, function (done) {
let audioManagerPerf = audio.getAudioManager(); let audioManagerPerf = audio.getAudioManager();
let startTime = new Date().getTime(); let startTime = new Date().getTime();
...@@ -617,6 +635,7 @@ describe('audioApiResponseTime', function () { ...@@ -617,6 +635,7 @@ describe('audioApiResponseTime', function () {
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_AUDIO_MANAGER_Performance_019', 0, function (done) { it('SUB_AUDIO_MANAGER_Performance_019', 0, function (done) {
let audioManagerPerf = audio.getAudioManager(); let audioManagerPerf = audio.getAudioManager();
let startTime = new Date().getTime(); let startTime = new Date().getTime();
...@@ -646,6 +665,7 @@ describe('audioApiResponseTime', function () { ...@@ -646,6 +665,7 @@ describe('audioApiResponseTime', function () {
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_AUDIO_MANAGER_Performance_020', 0, function (done) { it('SUB_AUDIO_MANAGER_Performance_020', 0, function (done) {
let audioManagerPerf = audio.getAudioManager(); let audioManagerPerf = audio.getAudioManager();
let startTime = new Date().getTime(); let startTime = new Date().getTime();
...@@ -680,6 +700,7 @@ describe('audioApiResponseTime', function () { ...@@ -680,6 +700,7 @@ describe('audioApiResponseTime', function () {
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_AUDIO_MANAGER_Performance_021', 0, function (done) { it('SUB_AUDIO_MANAGER_Performance_021', 0, function (done) {
let audioManagerPerf = audio.getAudioManager(); let audioManagerPerf = audio.getAudioManager();
let startTime = new Date().getTime(); let startTime = new Date().getTime();
...@@ -709,6 +730,7 @@ describe('audioApiResponseTime', function () { ...@@ -709,6 +730,7 @@ describe('audioApiResponseTime', function () {
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_AUDIO_MANAGER_Performance_022', 0, function (done) { it('SUB_AUDIO_MANAGER_Performance_022', 0, function (done) {
let audioManagerPerf = audio.getAudioManager(); let audioManagerPerf = audio.getAudioManager();
let startTime = new Date().getTime(); let startTime = new Date().getTime();
...@@ -743,6 +765,7 @@ describe('audioApiResponseTime', function () { ...@@ -743,6 +765,7 @@ describe('audioApiResponseTime', function () {
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_AUDIO_MANAGER_Performance_023', 0, function (done) { it('SUB_AUDIO_MANAGER_Performance_023', 0, function (done) {
let audioManagerPerf = audio.getAudioManager(); let audioManagerPerf = audio.getAudioManager();
let startTime = new Date().getTime(); let startTime = new Date().getTime();
...@@ -772,6 +795,7 @@ describe('audioApiResponseTime', function () { ...@@ -772,6 +795,7 @@ describe('audioApiResponseTime', function () {
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_AUDIO_MANAGER_Performance_024', 0, function (done) { it('SUB_AUDIO_MANAGER_Performance_024', 0, function (done) {
let audioManagerPerf = audio.getAudioManager(); let audioManagerPerf = audio.getAudioManager();
let startTime = new Date().getTime(); let startTime = new Date().getTime();
...@@ -806,6 +830,7 @@ describe('audioApiResponseTime', function () { ...@@ -806,6 +830,7 @@ describe('audioApiResponseTime', function () {
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_AUDIO_MANAGER_Performance_025', 0, function (done) { it('SUB_AUDIO_MANAGER_Performance_025', 0, function (done) {
let audioManagerPerf = audio.getAudioManager(); let audioManagerPerf = audio.getAudioManager();
let startTime = new Date().getTime(); let startTime = new Date().getTime();
...@@ -835,6 +860,7 @@ describe('audioApiResponseTime', function () { ...@@ -835,6 +860,7 @@ describe('audioApiResponseTime', function () {
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_AUDIO_MANAGER_Performance_026', 0, function (done) { it('SUB_AUDIO_MANAGER_Performance_026', 0, function (done) {
let audioManagerPerf = audio.getAudioManager(); let audioManagerPerf = audio.getAudioManager();
let startTime = new Date().getTime(); let startTime = new Date().getTime();
...@@ -869,6 +895,7 @@ describe('audioApiResponseTime', function () { ...@@ -869,6 +895,7 @@ describe('audioApiResponseTime', function () {
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_AUDIO_MANAGER_Performance_027', 0, function (done) { it('SUB_AUDIO_MANAGER_Performance_027', 0, function (done) {
let audioManagerPerf = audio.getAudioManager(); let audioManagerPerf = audio.getAudioManager();
let startTime = new Date().getTime(); let startTime = new Date().getTime();
...@@ -898,6 +925,7 @@ describe('audioApiResponseTime', function () { ...@@ -898,6 +925,7 @@ describe('audioApiResponseTime', function () {
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_AUDIO_MANAGER_Performance_028', 0, function (done) { it('SUB_AUDIO_MANAGER_Performance_028', 0, function (done) {
let audioManagerPerf = audio.getAudioManager(); let audioManagerPerf = audio.getAudioManager();
let startTime = new Date().getTime(); let startTime = new Date().getTime();
...@@ -932,6 +960,7 @@ describe('audioApiResponseTime', function () { ...@@ -932,6 +960,7 @@ describe('audioApiResponseTime', function () {
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_AUDIO_MANAGER_Performance_029', 0, function (done) { it('SUB_AUDIO_MANAGER_Performance_029', 0, function (done) {
let audioManagerPerf = audio.getAudioManager(); let audioManagerPerf = audio.getAudioManager();
let startTime = new Date().getTime(); let startTime = new Date().getTime();
...@@ -961,6 +990,7 @@ describe('audioApiResponseTime', function () { ...@@ -961,6 +990,7 @@ describe('audioApiResponseTime', function () {
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_AUDIO_MANAGER_Performance_030', 0, function (done) { it('SUB_AUDIO_MANAGER_Performance_030', 0, function (done) {
let audioManagerPerf = audio.getAudioManager(); let audioManagerPerf = audio.getAudioManager();
let startTime = new Date().getTime(); let startTime = new Date().getTime();
...@@ -995,6 +1025,7 @@ describe('audioApiResponseTime', function () { ...@@ -995,6 +1025,7 @@ describe('audioApiResponseTime', function () {
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_AUDIO_MANAGER_Performance_031', 0, function (done) { it('SUB_AUDIO_MANAGER_Performance_031', 0, function (done) {
let audioManagerPerf = audio.getAudioManager(); let audioManagerPerf = audio.getAudioManager();
let startTime = new Date().getTime(); let startTime = new Date().getTime();
...@@ -1024,6 +1055,7 @@ describe('audioApiResponseTime', function () { ...@@ -1024,6 +1055,7 @@ describe('audioApiResponseTime', function () {
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_AUDIO_MANAGER_Performance_032', 0, function (done) { it('SUB_AUDIO_MANAGER_Performance_032', 0, function (done) {
let audioManagerPerf = audio.getAudioManager(); let audioManagerPerf = audio.getAudioManager();
let startTime = new Date().getTime(); let startTime = new Date().getTime();
......
...@@ -13,8 +13,5 @@ ...@@ -13,8 +13,5 @@
* limitations under the License. * limitations under the License.
*/ */
// require('./AudioPerf.test.js')
require('./AudioFramework.test.js') require('./AudioFramework.test.js')
//require('./AudioFramework.test-Gitee.js')
//require('./AudioCapturer.test.js')
//require('./AudioRenderer.test.js')
\ No newline at end of file
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
"description": "Configuration for audioPlayer Tests", "description": "Configuration for audioPlayer Tests",
"driver": { "driver": {
"type": "JSUnitTest", "type": "JSUnitTest",
"test-timeout": "3000000", "test-timeout": "2000000",
"package": "ohos.acts.multimedia.audio.audioplayer", "package": "ohos.acts.multimedia.audio.audioplayer",
"shell-timeout": "60000" "shell-timeout": "60000"
}, },
...@@ -12,39 +12,32 @@ ...@@ -12,39 +12,32 @@
"pre-push": [ "pre-push": [
], ],
"push": [ "push": [
"resource/audio/01.mp3 ->/data/media/", "./resource/audio/01.mp3 ->/data/media/",
"resource/audio/02.mp3 ->/data/media/", "./resource/audio/02.mp3 ->/data/media/",
"resource/audio/03.mp3 ->/data/media/", "./resource/audio/03.mp3 ->/data/media/",
"resource/audio/04.mp3 ->/data/media/", "./resource/audio/04.mp3 ->/data/media/",
"resource/audio/47.mp4 ->/data/media/", "./resource/audio/47.mp4 ->/data/media/",
"resource/audio/49.mp4 ->/data/media/", "./resource/audio/49.mp4 ->/data/media/",
"resource/audio/50.mp4 ->/data/media/", "./resource/audio/50.mp4 ->/data/media/",
"resource/audio/51.mp4 ->/data/media/", "./resource/audio/51.mp4 ->/data/media/",
"resource/audio/54.mp4 ->/data/media/", "./resource/audio/54.mp4 ->/data/media/",
"resource/audio/55.m4a ->/data/media/", "./resource/audio/55.m4a ->/data/media/",
"resource/audio/57.m4a ->/data/media/", "./resource/audio/57.m4a ->/data/media/",
"resource/audio/58.m4a ->/data/media/", "./resource/audio/58.m4a ->/data/media/",
"resource/audio/59.m4a ->/data/media/", "./resource/audio/59.m4a ->/data/media/",
"resource/audio/62.m4a ->/data/media/", "./resource/audio/62.m4a ->/data/media/",
"resource/audio/64.mp4 ->/data/media/", "./resource/audio/64.mp4 ->/data/media/",
"resource/audio/65.mp4 ->/data/media/", "./resource/audio/65.mp4 ->/data/media/",
"resource/audio/66.mp4 ->/data/media/", "./resource/audio/66.mp4 ->/data/media/",
"resource/audio/67.mp4 ->/data/media/", "./resource/audio/67.mp4 ->/data/media/",
"resource/audio/92.mp4 ->/data/media/", "./resource/audio/92.mp4 ->/data/media/",
"resource/audio/93.mp4 ->/data/media/", "./resource/audio/93.mp4 ->/data/media/",
"resource/audio/94.mp4 ->/data/media/", "./resource/audio/94.mp4 ->/data/media/",
"resource/audio/96.mp4 ->/data/media/", "./resource/audio/96.mp4 ->/data/media/",
"resource/audio/97.mp4 ->/data/media/", "./resource/audio/97.mp4 ->/data/media/",
"resource/audio/98.mp4 ->/data/media/" "./resource/audio/98.mp4 ->/data/media/"
] ]
}, },
{
"test-file-name": [
"AudioPlayerJsTest.hap"
],
"type": "AppInstallKit",
"cleanup-apps": true
},
{ {
"type": "ShellKit", "type": "ShellKit",
"run-command": [ "run-command": [
...@@ -54,6 +47,13 @@ ...@@ -54,6 +47,13 @@
"teardown-command":[ "teardown-command":[
"setenforce 1" "setenforce 1"
] ]
},
{
"test-file-name": [
"AudioPlayerJsTest.hap"
],
"type": "AppInstallKit",
"cleanup-apps": true
} }
] ]
} }
{ {
"app": { "app": {
"bundleName": "ohos.acts.multimedia.audio.audioplayer", "apiVersion": {
"compatible": 6,
"releaseType": "Beta1",
"target": 7
},
"vendor": "acts", "vendor": "acts",
"bundleName": "ohos.acts.multimedia.audio.audioplayer",
"version": { "version": {
"code": 1, "code": 1000000,
"name": "1.0" "name": "1.0.0"
}
}, },
"apiVersion": { "deviceConfig": {
"compatible": 6, "default": {
"target": 5 "debug": true
} }
}, },
"deviceConfig": {},
"module": { "module": {
"package": "ohos.acts.multimedia.audio.audioplayer",
"name": ".MyApplication",
"deviceType": [
"phone"
],
"distro": {
"deliveryWithInstall": true,
"moduleName": "entry",
"moduleType": "entry"
},
"abilities": [ "abilities": [
{ {
"iconId": 16777218,
"skills": [ "skills": [
{ {
"entities": [ "entities": [
...@@ -35,15 +31,33 @@ ...@@ -35,15 +31,33 @@
] ]
} }
], ],
"descriptionId": 16777217,
"visible": true, "visible": true,
"name": "ohos.acts.multimedia.audio.audioplayer.MainAbility", "labelId": 16777216,
"icon": "$media:icon", "icon": "$media:icon",
"name": "ohos.acts.multimedia.audio.audioplayer.MainAbility",
"description": "$string:mainability_description", "description": "$string:mainability_description",
"label": "$string:entry_MainAbility", "label": "$string:entry_MainAbility",
"type": "page", "type": "page",
"homeAbility": true,
"launchType": "standard" "launchType": "standard"
} }
], ],
"deviceType": [
"phone",
"tablet",
"tv",
"wearable"
],
"mainAbility": "ohos.acts.multimedia.audio.audioplayer.MainAbility",
"distro": {
"moduleType": "entry",
"installationFree": false,
"deliveryWithInstall": true,
"moduleName": "entry"
},
"package": "ohos.acts.multimedia.audio.audioplayer",
"name": ".MyApplication",
"js": [ "js": [
{ {
"pages": [ "pages": [
......
/*
* Copyright (C) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package ohos.acts.multimedia.audio.audioplayer;
import ohos.ace.ability.AceAbility;
import ohos.aafwk.content.Intent;
/*
* java MainAbility
*/
public class MainAbility extends AceAbility {
@Override
public void onStart(Intent intent) {
super.onStart(intent);
}
@Override
public void onStop() {
super.onStop();
}
}
/*
* Copyright (C) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package ohos.acts.multimedia.audio.audioplayer;
import ohos.aafwk.ability.AbilityPackage;
/*
* java MyApplication
*/
public class MyApplication extends AbilityPackage {
@Override
public void onInitialize() {
super.onInitialize();
}
}
...@@ -74,9 +74,10 @@ describe('PlayerLocalTestAudioFUNC', function () { ...@@ -74,9 +74,10 @@ describe('PlayerLocalTestAudioFUNC', function () {
} }
} }
function nextStep(mySteps) { function nextStep(mySteps,done) {
if (mySteps[0] == END_STATE) { if (mySteps[0] == END_STATE) {
isTimeOut = true; done();
console.info('case to done');
return; return;
} }
switch (mySteps[0]) { switch (mySteps[0]) {
...@@ -125,18 +126,16 @@ describe('PlayerLocalTestAudioFUNC', function () { ...@@ -125,18 +126,16 @@ describe('PlayerLocalTestAudioFUNC', function () {
} }
} }
function setSrcCallback(mySteps) { function setCallback(mySteps, done) {
console.info(`case setCallback`);
audioPlayer.on('dataLoad', () => { audioPlayer.on('dataLoad', () => {
mySteps.shift(); mySteps.shift();
console.info(`case dataLoad called`); console.info(`case dataLoad called`);
expect(audioPlayer.currentTime).assertEqual(0); expect(audioPlayer.currentTime).assertEqual(0);
expect(audioPlayer.duration).assertEqual(DURATION_TIME); expect(audioPlayer.duration).assertEqual(DURATION_TIME);
expect(audioPlayer.state).assertEqual('paused'); expect(audioPlayer.state).assertEqual('paused');
nextStep(mySteps); nextStep(mySteps,done);
}); });
}
function setPlayCallback(mySteps) {
audioPlayer.on('play', () => { audioPlayer.on('play', () => {
mySteps.shift(); mySteps.shift();
console.info(`case play called`); console.info(`case play called`);
...@@ -148,31 +147,22 @@ describe('PlayerLocalTestAudioFUNC', function () { ...@@ -148,31 +147,22 @@ describe('PlayerLocalTestAudioFUNC', function () {
return; return;
} }
expect(audioPlayer.state).assertEqual('playing'); expect(audioPlayer.state).assertEqual('playing');
nextStep(mySteps); nextStep(mySteps,done);
}); });
}
function setPauseCallback(mySteps) {
audioPlayer.on('pause', () => { audioPlayer.on('pause', () => {
mySteps.shift(); mySteps.shift();
console.info(`case pause called`); console.info(`case pause called`);
console.info(`case pause currentTime is ${audioPlayer.currentTime}`); console.info(`case pause currentTime is ${audioPlayer.currentTime}`);
expect(audioPlayer.duration).assertEqual(DURATION_TIME); expect(audioPlayer.duration).assertEqual(DURATION_TIME);
expect(audioPlayer.state).assertEqual('paused'); expect(audioPlayer.state).assertEqual('paused');
nextStep(mySteps); nextStep(mySteps,done);
}); });
}
function setResetCallback(mySteps) {
audioPlayer.on('reset', () => { audioPlayer.on('reset', () => {
mySteps.shift(); mySteps.shift();
console.info(`case reset called`); console.info(`case reset called`);
expect(audioPlayer.state).assertEqual('idle'); expect(audioPlayer.state).assertEqual('idle');
nextStep(mySteps); nextStep(mySteps,done);
}); });
}
function setStopCallback(mySteps) {
audioPlayer.on('stop', () => { audioPlayer.on('stop', () => {
if (mySteps[0] == RESET_STATE) { if (mySteps[0] == RESET_STATE) {
console.info(`case reset stop called`); console.info(`case reset stop called`);
...@@ -183,11 +173,8 @@ describe('PlayerLocalTestAudioFUNC', function () { ...@@ -183,11 +173,8 @@ describe('PlayerLocalTestAudioFUNC', function () {
expect(audioPlayer.currentTime).assertEqual(0); expect(audioPlayer.currentTime).assertEqual(0);
expect(audioPlayer.duration).assertEqual(DURATION_TIME); expect(audioPlayer.duration).assertEqual(DURATION_TIME);
expect(audioPlayer.state).assertEqual('stopped'); expect(audioPlayer.state).assertEqual('stopped');
nextStep(mySteps); nextStep(mySteps,done);
}); });
}
function setSeekCallback(mySteps) {
audioPlayer.on('timeUpdate', (seekDoneTime) => { audioPlayer.on('timeUpdate', (seekDoneTime) => {
if (typeof (seekDoneTime) == 'undefined') { if (typeof (seekDoneTime) == 'undefined') {
console.info(`case seek filed,errcode is ${seekDoneTime}`); console.info(`case seek filed,errcode is ${seekDoneTime}`);
...@@ -207,12 +194,9 @@ describe('PlayerLocalTestAudioFUNC', function () { ...@@ -207,12 +194,9 @@ describe('PlayerLocalTestAudioFUNC', function () {
sleep(PLAY_STATE); sleep(PLAY_STATE);
} }
if ((seekDoneTime < audioPlayer.duration) || (audioPlayer.state == 'paused')) { if ((seekDoneTime < audioPlayer.duration) || (audioPlayer.state == 'paused')) {
nextStep(mySteps); nextStep(mySteps,done);
} }
}); });
}
function setVolumeCallback(mySteps) {
audioPlayer.on('volumeChange', () => { audioPlayer.on('volumeChange', () => {
console.info(`case setvolume called`); console.info(`case setvolume called`);
mySteps.shift(); mySteps.shift();
...@@ -220,21 +204,15 @@ describe('PlayerLocalTestAudioFUNC', function () { ...@@ -220,21 +204,15 @@ describe('PlayerLocalTestAudioFUNC', function () {
if (audioPlayer.state == 'playing') { if (audioPlayer.state == 'playing') {
sleep(PLAY_TIME); sleep(PLAY_TIME);
} }
nextStep(mySteps); nextStep(mySteps,done);
}); });
}
function setFinishCallback(mySteps) {
audioPlayer.on('finish', () => { audioPlayer.on('finish', () => {
mySteps.shift(); mySteps.shift();
expect(audioPlayer.state).assertEqual('stopped'); expect(audioPlayer.state).assertEqual('stopped');
expect(audioPlayer.currentTime).assertClose(audioPlayer.duration, DELTA_TIME); expect(audioPlayer.currentTime).assertClose(audioPlayer.duration, DELTA_TIME);
console.info(`case finish called`); console.info(`case finish called`);
nextStep(mySteps); nextStep(mySteps,done);
}); });
}
function setErrorCallback(mySteps) {
audioPlayer.on('error', (err) => { audioPlayer.on('error', (err) => {
console.info(`case error called,errName is ${err.name}`); console.info(`case error called,errName is ${err.name}`);
console.info(`case error called,errCode is ${err.code}`); console.info(`case error called,errCode is ${err.code}`);
...@@ -247,28 +225,9 @@ describe('PlayerLocalTestAudioFUNC', function () { ...@@ -247,28 +225,9 @@ describe('PlayerLocalTestAudioFUNC', function () {
mySteps.shift(); mySteps.shift();
mySteps.shift(); mySteps.shift();
} }
nextStep(mySteps); nextStep(mySteps,done);
}); });
}
function setCallback(mySteps, done) {
console.info(`case setCallback`);
setSrcCallback(mySteps);
setPlayCallback(mySteps);
setPauseCallback(mySteps);
setResetCallback(mySteps);
setStopCallback(mySteps);
setSeekCallback(mySteps);
setVolumeCallback(mySteps);
setFinishCallback(mySteps);
setErrorCallback(mySteps);
setTimeout(function() {
if (!isTimeOut) {
console.info(`case is time out!`);
expect().assertFail();
}
done();
}, TIME_OUT);
}; };
/* * /* *
...@@ -279,7 +238,9 @@ describe('PlayerLocalTestAudioFUNC', function () { ...@@ -279,7 +238,9 @@ describe('PlayerLocalTestAudioFUNC', function () {
* @tc.type : Function test * @tc.type : Function test
* @tc.level : Level0 * @tc.level : Level0
*/ */
it('SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_0100', 0, async function (done) { it('SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_0100', 0, async function (done) {
console.info(`case update`);
let mySteps = new Array(SRC_STATE, PLAY_STATE, END_STATE); let mySteps = new Array(SRC_STATE, PLAY_STATE, END_STATE);
initAudioPlayer(); initAudioPlayer();
setCallback(mySteps, done); setCallback(mySteps, done);
...@@ -294,6 +255,7 @@ describe('PlayerLocalTestAudioFUNC', function () { ...@@ -294,6 +255,7 @@ describe('PlayerLocalTestAudioFUNC', function () {
* @tc.type : Function test * @tc.type : Function test
* @tc.level : Level0 * @tc.level : Level0
*/ */
it('SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_0200', 0, async function (done) { it('SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_0200', 0, async function (done) {
let mySteps = new Array(SRC_STATE, PLAY_STATE, PAUSE_STATE, RESET_STATE, END_STATE); let mySteps = new Array(SRC_STATE, PLAY_STATE, PAUSE_STATE, RESET_STATE, END_STATE);
initAudioPlayer(); initAudioPlayer();
...@@ -309,6 +271,7 @@ describe('PlayerLocalTestAudioFUNC', function () { ...@@ -309,6 +271,7 @@ describe('PlayerLocalTestAudioFUNC', function () {
* @tc.type : Function test * @tc.type : Function test
* @tc.level : Level0 * @tc.level : Level0
*/ */
it('SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_0300', 0, async function (done) { it('SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_0300', 0, async function (done) {
let mySteps = new Array(SRC_STATE, PLAY_STATE, PAUSE_STATE, PLAY_STATE, RESET_STATE, END_STATE); let mySteps = new Array(SRC_STATE, PLAY_STATE, PAUSE_STATE, PLAY_STATE, RESET_STATE, END_STATE);
initAudioPlayer(); initAudioPlayer();
...@@ -324,6 +287,7 @@ describe('PlayerLocalTestAudioFUNC', function () { ...@@ -324,6 +287,7 @@ describe('PlayerLocalTestAudioFUNC', function () {
* @tc.type : Function test * @tc.type : Function test
* @tc.level : Level0 * @tc.level : Level0
*/ */
it('SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_0500', 0, async function (done) { it('SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_0500', 0, async function (done) {
let mySteps = new Array(SRC_STATE, PLAY_STATE, RESET_STATE, END_STATE); let mySteps = new Array(SRC_STATE, PLAY_STATE, RESET_STATE, END_STATE);
initAudioPlayer(); initAudioPlayer();
...@@ -339,6 +303,7 @@ describe('PlayerLocalTestAudioFUNC', function () { ...@@ -339,6 +303,7 @@ describe('PlayerLocalTestAudioFUNC', function () {
* @tc.type : Function test * @tc.type : Function test
* @tc.level : Level0 * @tc.level : Level0
*/ */
it('SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_0600', 0, async function (done) { it('SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_0600', 0, async function (done) {
let mySteps = new Array(SRC_STATE, PLAY_STATE, PAUSE_STATE, PLAY_STATE, PAUSE_STATE, END_STATE); let mySteps = new Array(SRC_STATE, PLAY_STATE, PAUSE_STATE, PLAY_STATE, PAUSE_STATE, END_STATE);
initAudioPlayer(); initAudioPlayer();
...@@ -354,6 +319,7 @@ describe('PlayerLocalTestAudioFUNC', function () { ...@@ -354,6 +319,7 @@ describe('PlayerLocalTestAudioFUNC', function () {
* @tc.type : Function test * @tc.type : Function test
* @tc.level : Level0 * @tc.level : Level0
*/ */
it('SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_0700', 0, async function (done) { it('SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_0700', 0, async function (done) {
let mySteps = new Array(SRC_STATE, PLAY_STATE, PAUSE_STATE, STOP_STATE, END_STATE); let mySteps = new Array(SRC_STATE, PLAY_STATE, PAUSE_STATE, STOP_STATE, END_STATE);
initAudioPlayer(); initAudioPlayer();
...@@ -369,6 +335,7 @@ describe('PlayerLocalTestAudioFUNC', function () { ...@@ -369,6 +335,7 @@ describe('PlayerLocalTestAudioFUNC', function () {
* @tc.type : Function test * @tc.type : Function test
* @tc.level : Level0 * @tc.level : Level0
*/ */
it('SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_0800', 0, async function (done) { it('SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_0800', 0, async function (done) {
let mySteps = new Array(SRC_STATE, PLAY_STATE, PAUSE_STATE, PLAY_STATE, STOP_STATE, END_STATE); let mySteps = new Array(SRC_STATE, PLAY_STATE, PAUSE_STATE, PLAY_STATE, STOP_STATE, END_STATE);
initAudioPlayer(); initAudioPlayer();
...@@ -384,6 +351,7 @@ describe('PlayerLocalTestAudioFUNC', function () { ...@@ -384,6 +351,7 @@ describe('PlayerLocalTestAudioFUNC', function () {
* @tc.type : Function test * @tc.type : Function test
* @tc.level : Level0 * @tc.level : Level0
*/ */
it('SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_0900', 0, async function (done) { it('SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_0900', 0, async function (done) {
let mySteps = new Array(SRC_STATE, PLAY_STATE, STOP_STATE, RESET_STATE, SRC_STATE, PLAY_STATE, let mySteps = new Array(SRC_STATE, PLAY_STATE, STOP_STATE, RESET_STATE, SRC_STATE, PLAY_STATE,
PAUSE_STATE, PLAY_STATE, RESET_STATE, END_STATE); PAUSE_STATE, PLAY_STATE, RESET_STATE, END_STATE);
...@@ -400,6 +368,7 @@ describe('PlayerLocalTestAudioFUNC', function () { ...@@ -400,6 +368,7 @@ describe('PlayerLocalTestAudioFUNC', function () {
* @tc.type : Function test * @tc.type : Function test
* @tc.level : Level0 * @tc.level : Level0
*/ */
it('SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_1000', 0, async function (done) { it('SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_1000', 0, async function (done) {
let mySteps = new Array(SRC_STATE, PLAY_STATE, PAUSE_STATE, STOP_STATE, RESET_STATE, SRC_STATE, PLAY_STATE, let mySteps = new Array(SRC_STATE, PLAY_STATE, PAUSE_STATE, STOP_STATE, RESET_STATE, SRC_STATE, PLAY_STATE,
PAUSE_STATE, RESET_STATE, END_STATE); PAUSE_STATE, RESET_STATE, END_STATE);
...@@ -416,6 +385,7 @@ describe('PlayerLocalTestAudioFUNC', function () { ...@@ -416,6 +385,7 @@ describe('PlayerLocalTestAudioFUNC', function () {
* @tc.type : Function test * @tc.type : Function test
* @tc.level : Level0 * @tc.level : Level0
*/ */
it('SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_1100', 0, async function (done) { it('SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_1100', 0, async function (done) {
let mySteps = new Array(SRC_STATE, PLAY_STATE, STOP_STATE, RESET_STATE, let mySteps = new Array(SRC_STATE, PLAY_STATE, STOP_STATE, RESET_STATE,
SRC_STATE, PLAY_STATE, RESET_STATE, END_STATE); SRC_STATE, PLAY_STATE, RESET_STATE, END_STATE);
...@@ -432,6 +402,7 @@ describe('PlayerLocalTestAudioFUNC', function () { ...@@ -432,6 +402,7 @@ describe('PlayerLocalTestAudioFUNC', function () {
* @tc.type : Function test * @tc.type : Function test
* @tc.level : Level0 * @tc.level : Level0
*/ */
it('SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_1200', 0, async function (done) { it('SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_1200', 0, async function (done) {
let mySteps = new Array(SRC_STATE, PLAY_STATE, PAUSE_STATE, PLAY_STATE, RESET_STATE, END_STATE); let mySteps = new Array(SRC_STATE, PLAY_STATE, PAUSE_STATE, PLAY_STATE, RESET_STATE, END_STATE);
initAudioPlayer(); initAudioPlayer();
...@@ -447,6 +418,7 @@ describe('PlayerLocalTestAudioFUNC', function () { ...@@ -447,6 +418,7 @@ describe('PlayerLocalTestAudioFUNC', function () {
* @tc.type : Function test * @tc.type : Function test
* @tc.level : Level0 * @tc.level : Level0
*/ */
it('SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_1300', 0, async function (done) { it('SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_1300', 0, async function (done) {
let mySteps = new Array(SRC_STATE, PLAY_STATE, STOP_STATE, PAUSE_STATE, ERROR_STATE, END_STATE); let mySteps = new Array(SRC_STATE, PLAY_STATE, STOP_STATE, PAUSE_STATE, ERROR_STATE, END_STATE);
initAudioPlayer(); initAudioPlayer();
...@@ -462,6 +434,7 @@ describe('PlayerLocalTestAudioFUNC', function () { ...@@ -462,6 +434,7 @@ describe('PlayerLocalTestAudioFUNC', function () {
* @tc.type : Function test * @tc.type : Function test
* @tc.level : Level0 * @tc.level : Level0
*/ */
it('SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_1400', 0, async function (done) { it('SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_1400', 0, async function (done) {
let mySteps = new Array(SRC_STATE, PLAY_STATE, SEEK_STATE, 0, PAUSE_STATE, END_STATE); let mySteps = new Array(SRC_STATE, PLAY_STATE, SEEK_STATE, 0, PAUSE_STATE, END_STATE);
initAudioPlayer(); initAudioPlayer();
...@@ -477,6 +450,7 @@ describe('PlayerLocalTestAudioFUNC', function () { ...@@ -477,6 +450,7 @@ describe('PlayerLocalTestAudioFUNC', function () {
* @tc.type : Function test * @tc.type : Function test
* @tc.level : Level0 * @tc.level : Level0
*/ */
it('SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_1500', 0, async function (done) { it('SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_1500', 0, async function (done) {
let mySteps = new Array(SRC_STATE, PLAY_STATE, PAUSE_STATE, SEEK_STATE, DURATION_TIME, let mySteps = new Array(SRC_STATE, PLAY_STATE, PAUSE_STATE, SEEK_STATE, DURATION_TIME,
PLAY_STATE, FINISH_STATE, END_STATE); PLAY_STATE, FINISH_STATE, END_STATE);
...@@ -493,6 +467,7 @@ describe('PlayerLocalTestAudioFUNC', function () { ...@@ -493,6 +467,7 @@ describe('PlayerLocalTestAudioFUNC', function () {
* @tc.type : Function test * @tc.type : Function test
* @tc.level : Level0 * @tc.level : Level0
*/ */
it('SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_1600', 0, async function (done) { it('SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_1600', 0, async function (done) {
let mySteps = new Array(SRC_STATE, PLAY_STATE, PAUSE_STATE, PLAY_STATE, SEEK_STATE, 0, PAUSE_STATE, END_STATE); let mySteps = new Array(SRC_STATE, PLAY_STATE, PAUSE_STATE, PLAY_STATE, SEEK_STATE, 0, PAUSE_STATE, END_STATE);
initAudioPlayer(); initAudioPlayer();
...@@ -508,6 +483,7 @@ describe('PlayerLocalTestAudioFUNC', function () { ...@@ -508,6 +483,7 @@ describe('PlayerLocalTestAudioFUNC', function () {
* @tc.type : Function test * @tc.type : Function test
* @tc.level : Level0 * @tc.level : Level0
*/ */
it('SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_1700', 0, async function (done) { it('SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_1700', 0, async function (done) {
let mySteps = new Array(SRC_STATE, PLAY_STATE, SEEK_STATE, 0, RESET_STATE, END_STATE); let mySteps = new Array(SRC_STATE, PLAY_STATE, SEEK_STATE, 0, RESET_STATE, END_STATE);
initAudioPlayer(); initAudioPlayer();
...@@ -523,6 +499,7 @@ describe('PlayerLocalTestAudioFUNC', function () { ...@@ -523,6 +499,7 @@ describe('PlayerLocalTestAudioFUNC', function () {
* @tc.type : Function test * @tc.type : Function test
* @tc.level : Level0 * @tc.level : Level0
*/ */
it('SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_1800', 0, async function (done) { it('SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_1800', 0, async function (done) {
let mySteps = new Array(SRC_STATE, PLAY_STATE, SEEK_STATE, 0, STOP_STATE, RESET_STATE, END_STATE); let mySteps = new Array(SRC_STATE, PLAY_STATE, SEEK_STATE, 0, STOP_STATE, RESET_STATE, END_STATE);
initAudioPlayer(); initAudioPlayer();
...@@ -538,6 +515,7 @@ describe('PlayerLocalTestAudioFUNC', function () { ...@@ -538,6 +515,7 @@ describe('PlayerLocalTestAudioFUNC', function () {
* @tc.type : Function test * @tc.type : Function test
* @tc.level : Level0 * @tc.level : Level0
*/ */
it('SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_1900', 0, async function (done) { it('SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_1900', 0, async function (done) {
let mySteps = new Array(SRC_STATE, PLAY_STATE, STOP_STATE, SEEK_STATE, 0, ERROR_STATE, END_STATE); let mySteps = new Array(SRC_STATE, PLAY_STATE, STOP_STATE, SEEK_STATE, 0, ERROR_STATE, END_STATE);
initAudioPlayer(); initAudioPlayer();
...@@ -553,6 +531,7 @@ describe('PlayerLocalTestAudioFUNC', function () { ...@@ -553,6 +531,7 @@ describe('PlayerLocalTestAudioFUNC', function () {
* @tc.type : Function test * @tc.type : Function test
* @tc.level : Level0 * @tc.level : Level0
*/ */
it('SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_2000', 0, async function (done) { it('SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_2000', 0, async function (done) {
let mySteps = new Array(SRC_STATE, PLAY_STATE, PAUSE_STATE, SEEK_STATE, 0, RESET_STATE, END_STATE); let mySteps = new Array(SRC_STATE, PLAY_STATE, PAUSE_STATE, SEEK_STATE, 0, RESET_STATE, END_STATE);
initAudioPlayer(); initAudioPlayer();
...@@ -568,6 +547,7 @@ describe('PlayerLocalTestAudioFUNC', function () { ...@@ -568,6 +547,7 @@ describe('PlayerLocalTestAudioFUNC', function () {
* @tc.type : Function test * @tc.type : Function test
* @tc.level : Level0 * @tc.level : Level0
*/ */
it('SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_2100', 0, async function (done) { it('SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_2100', 0, async function (done) {
let mySteps = new Array(SRC_STATE, PLAY_STATE, PAUSE_STATE, SEEK_STATE, DURATION_TIME / RAND_NUM, let mySteps = new Array(SRC_STATE, PLAY_STATE, PAUSE_STATE, SEEK_STATE, DURATION_TIME / RAND_NUM,
STOP_STATE, END_STATE); STOP_STATE, END_STATE);
...@@ -584,6 +564,7 @@ describe('PlayerLocalTestAudioFUNC', function () { ...@@ -584,6 +564,7 @@ describe('PlayerLocalTestAudioFUNC', function () {
* @tc.type : Function test * @tc.type : Function test
* @tc.level : Level0 * @tc.level : Level0
*/ */
it('SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_2200', 0, async function (done) { it('SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_2200', 0, async function (done) {
let mySteps = new Array(SRC_STATE, PLAY_STATE, PAUSE_STATE, PLAY_STATE, SEEK_STATE, 0, END_STATE); let mySteps = new Array(SRC_STATE, PLAY_STATE, PAUSE_STATE, PLAY_STATE, SEEK_STATE, 0, END_STATE);
initAudioPlayer(); initAudioPlayer();
...@@ -599,6 +580,7 @@ describe('PlayerLocalTestAudioFUNC', function () { ...@@ -599,6 +580,7 @@ describe('PlayerLocalTestAudioFUNC', function () {
* @tc.type : Function test * @tc.type : Function test
* @tc.level : Level0 * @tc.level : Level0
*/ */
it('SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_2300', 0, async function (done) { it('SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_2300', 0, async function (done) {
let mySteps = new Array(SRC_STATE, PLAY_STATE, PAUSE_STATE, PLAY_STATE, SEEK_STATE, 0, STOP_STATE, END_STATE); let mySteps = new Array(SRC_STATE, PLAY_STATE, PAUSE_STATE, PLAY_STATE, SEEK_STATE, 0, STOP_STATE, END_STATE);
initAudioPlayer(); initAudioPlayer();
...@@ -614,6 +596,7 @@ describe('PlayerLocalTestAudioFUNC', function () { ...@@ -614,6 +596,7 @@ describe('PlayerLocalTestAudioFUNC', function () {
* @tc.type : Function test * @tc.type : Function test
* @tc.level : Level0 * @tc.level : Level0
*/ */
it('SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_2400', 0, async function (done) { it('SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_2400', 0, async function (done) {
let mySteps = new Array(SRC_STATE, PLAY_STATE, STOP_STATE, SEEK_STATE, 0, ERROR_STATE, let mySteps = new Array(SRC_STATE, PLAY_STATE, STOP_STATE, SEEK_STATE, 0, ERROR_STATE,
RESET_STATE, SRC_STATE, PLAY_STATE, END_STATE); RESET_STATE, SRC_STATE, PLAY_STATE, END_STATE);
...@@ -630,6 +613,7 @@ describe('PlayerLocalTestAudioFUNC', function () { ...@@ -630,6 +613,7 @@ describe('PlayerLocalTestAudioFUNC', function () {
* @tc.type : Function test * @tc.type : Function test
* @tc.level : Level0 * @tc.level : Level0
*/ */
it('SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_2500', 0, async function (done) { it('SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_2500', 0, async function (done) {
let mySteps = new Array(SRC_STATE, PLAY_STATE, SEEK_STATE, 0, END_STATE); let mySteps = new Array(SRC_STATE, PLAY_STATE, SEEK_STATE, 0, END_STATE);
initAudioPlayer(); initAudioPlayer();
...@@ -645,6 +629,7 @@ describe('PlayerLocalTestAudioFUNC', function () { ...@@ -645,6 +629,7 @@ describe('PlayerLocalTestAudioFUNC', function () {
* @tc.type : Function test * @tc.type : Function test
* @tc.level : Level 3 * @tc.level : Level 3
*/ */
it('SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_2600', 0, async function (done) { it('SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_2600', 0, async function (done) {
let mySteps = new Array(SRC_STATE, PLAY_STATE, STOP_STATE, SEEK_STATE, SEEK_TIME, ERROR_STATE, let mySteps = new Array(SRC_STATE, PLAY_STATE, STOP_STATE, SEEK_STATE, SEEK_TIME, ERROR_STATE,
PAUSE_STATE, ERROR_STATE, RESET_STATE, END_STATE); PAUSE_STATE, ERROR_STATE, RESET_STATE, END_STATE);
...@@ -661,6 +646,7 @@ describe('PlayerLocalTestAudioFUNC', function () { ...@@ -661,6 +646,7 @@ describe('PlayerLocalTestAudioFUNC', function () {
* @tc.type : Function test * @tc.type : Function test
* @tc.level : Level 3 * @tc.level : Level 3
*/ */
it('SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_2700', 0, async function (done) { it('SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_2700', 0, async function (done) {
let mySteps = new Array(SRC_STATE, PLAY_STATE, STOP_STATE, SEEK_STATE, SEEK_TIME, ERROR_STATE, let mySteps = new Array(SRC_STATE, PLAY_STATE, STOP_STATE, SEEK_STATE, SEEK_TIME, ERROR_STATE,
RESET_STATE, SRC_STATE, PLAY_STATE, END_STATE); RESET_STATE, SRC_STATE, PLAY_STATE, END_STATE);
...@@ -677,6 +663,7 @@ describe('PlayerLocalTestAudioFUNC', function () { ...@@ -677,6 +663,7 @@ describe('PlayerLocalTestAudioFUNC', function () {
* @tc.type : Function test * @tc.type : Function test
* @tc.level : Level0 * @tc.level : Level0
*/ */
it('SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_2800', 0, async function (done) { it('SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_2800', 0, async function (done) {
let mySteps = new Array(SRC_STATE, PLAY_STATE, SEEK_STATE, DURATION_TIME, FINISH_STATE, END_STATE); let mySteps = new Array(SRC_STATE, PLAY_STATE, SEEK_STATE, DURATION_TIME, FINISH_STATE, END_STATE);
initAudioPlayer(); initAudioPlayer();
...@@ -692,6 +679,7 @@ describe('PlayerLocalTestAudioFUNC', function () { ...@@ -692,6 +679,7 @@ describe('PlayerLocalTestAudioFUNC', function () {
* @tc.type : Function test * @tc.type : Function test
* @tc.level : Level 3 * @tc.level : Level 3
*/ */
it('SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_2900', 0, async function (done) { it('SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_2900', 0, async function (done) {
let mySteps = new Array(SRC_STATE, PLAY_STATE, SEEK_STATE, DURATION_TIME + DELTA_TIME, let mySteps = new Array(SRC_STATE, PLAY_STATE, SEEK_STATE, DURATION_TIME + DELTA_TIME,
FINISH_STATE, END_STATE); FINISH_STATE, END_STATE);
...@@ -708,6 +696,7 @@ describe('PlayerLocalTestAudioFUNC', function () { ...@@ -708,6 +696,7 @@ describe('PlayerLocalTestAudioFUNC', function () {
* @tc.type : Function test * @tc.type : Function test
* @tc.level : Level0 * @tc.level : Level0
*/ */
it('SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_3000', 0, async function (done) { it('SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_3000', 0, async function (done) {
let mySteps = new Array(SRC_STATE, PLAY_STATE, SEEK_STATE, DURATION_TIME / RAND_NUM, END_STATE); let mySteps = new Array(SRC_STATE, PLAY_STATE, SEEK_STATE, DURATION_TIME / RAND_NUM, END_STATE);
initAudioPlayer(); initAudioPlayer();
...@@ -723,6 +712,7 @@ describe('PlayerLocalTestAudioFUNC', function () { ...@@ -723,6 +712,7 @@ describe('PlayerLocalTestAudioFUNC', function () {
* @tc.type : Function test * @tc.type : Function test
* @tc.level : Level0 * @tc.level : Level0
*/ */
it('SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_3200', 0, async function (done) { it('SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_3200', 0, async function (done) {
let mySteps = new Array(SRC_STATE, PLAY_STATE, PAUSE_STATE, SEEK_STATE, 0, PLAY_STATE, RESET_STATE, END_STATE); let mySteps = new Array(SRC_STATE, PLAY_STATE, PAUSE_STATE, SEEK_STATE, 0, PLAY_STATE, RESET_STATE, END_STATE);
initAudioPlayer(); initAudioPlayer();
...@@ -738,6 +728,7 @@ describe('PlayerLocalTestAudioFUNC', function () { ...@@ -738,6 +728,7 @@ describe('PlayerLocalTestAudioFUNC', function () {
* @tc.type : Function test * @tc.type : Function test
* @tc.level : Level0 * @tc.level : Level0
*/ */
it('SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_3300', 0, async function (done) { it('SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_3300', 0, async function (done) {
let mySteps = new Array(SRC_STATE, PLAY_STATE, PAUSE_STATE, SEEK_STATE, DURATION_TIME, PLAY_STATE, let mySteps = new Array(SRC_STATE, PLAY_STATE, PAUSE_STATE, SEEK_STATE, DURATION_TIME, PLAY_STATE,
FINISH_STATE, RESET_STATE, END_STATE); FINISH_STATE, RESET_STATE, END_STATE);
...@@ -754,6 +745,7 @@ describe('PlayerLocalTestAudioFUNC', function () { ...@@ -754,6 +745,7 @@ describe('PlayerLocalTestAudioFUNC', function () {
* @tc.type : Function test * @tc.type : Function test
* @tc.level : Level 3 * @tc.level : Level 3
*/ */
it('SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_3400', 0, async function (done) { it('SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_3400', 0, async function (done) {
let mySteps = new Array(SRC_STATE, PLAY_STATE, PAUSE_STATE, SEEK_STATE, DURATION_TIME + DELTA_TIME, PLAY_STATE, let mySteps = new Array(SRC_STATE, PLAY_STATE, PAUSE_STATE, SEEK_STATE, DURATION_TIME + DELTA_TIME, PLAY_STATE,
FINISH_STATE, RESET_STATE, END_STATE); FINISH_STATE, RESET_STATE, END_STATE);
...@@ -770,6 +762,7 @@ describe('PlayerLocalTestAudioFUNC', function () { ...@@ -770,6 +762,7 @@ describe('PlayerLocalTestAudioFUNC', function () {
* @tc.type : Function test * @tc.type : Function test
* @tc.level : Level 3 * @tc.level : Level 3
*/ */
it('SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_3500', 0, async function (done) { it('SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_3500', 0, async function (done) {
let mySteps = new Array(SRC_STATE, PLAY_STATE, SEEK_STATE, DURATION_TIME + DELTA_TIME, let mySteps = new Array(SRC_STATE, PLAY_STATE, SEEK_STATE, DURATION_TIME + DELTA_TIME,
FINISH_STATE, PLAY_STATE, RESET_STATE, END_STATE); FINISH_STATE, PLAY_STATE, RESET_STATE, END_STATE);
...@@ -786,6 +779,7 @@ describe('PlayerLocalTestAudioFUNC', function () { ...@@ -786,6 +779,7 @@ describe('PlayerLocalTestAudioFUNC', function () {
* @tc.type : Function test * @tc.type : Function test
* @tc.level : Level0 * @tc.level : Level0
*/ */
it('SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_3600', 0, async function (done) { it('SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_3600', 0, async function (done) {
let playCount = 0; let playCount = 0;
let seekCount = 0; let seekCount = 0;
...@@ -852,6 +846,7 @@ describe('PlayerLocalTestAudioFUNC', function () { ...@@ -852,6 +846,7 @@ describe('PlayerLocalTestAudioFUNC', function () {
* @tc.type : Function test * @tc.type : Function test
* @tc.level : Level0 * @tc.level : Level0
*/ */
it('SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_3700', 0, async function (done) { it('SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_3700', 0, async function (done) {
let mySteps = new Array(SRC_STATE, PLAY_STATE, VOLUME_STATE, 0, let mySteps = new Array(SRC_STATE, PLAY_STATE, VOLUME_STATE, 0,
VOLUME_STATE, MAX_VOLUME, RESET_STATE, END_STATE); VOLUME_STATE, MAX_VOLUME, RESET_STATE, END_STATE);
......
...@@ -45,16 +45,15 @@ describe('PlayerLocalTestAudioFormat', function () { ...@@ -45,16 +45,15 @@ describe('PlayerLocalTestAudioFormat', function () {
for(let t = Date.now(); Date.now() - t <= time;); for(let t = Date.now(); Date.now() - t <= time;);
} }
function setSrcCallback(audioPlayer) { function playSource(audioSource, done) {
let audioPlayer = media.createAudioPlayer();
audioPlayer.src = audioSource;
audioPlayer.on('dataLoad', () => { audioPlayer.on('dataLoad', () => {
console.info('case set source success'); console.info('case set source success');
expect(audioPlayer.state).assertEqual('paused'); expect(audioPlayer.state).assertEqual('paused');
expect(audioPlayer.currentTime).assertEqual(0); expect(audioPlayer.currentTime).assertEqual(0);
audioPlayer.play(); audioPlayer.play();
}); });
}
function setPlayCallback(audioPlayer) {
audioPlayer.on('play', () => { audioPlayer.on('play', () => {
console.info('case start to play'); console.info('case start to play');
expect(audioPlayer.state).assertEqual('playing'); expect(audioPlayer.state).assertEqual('playing');
...@@ -65,17 +64,16 @@ describe('PlayerLocalTestAudioFormat', function () { ...@@ -65,17 +64,16 @@ describe('PlayerLocalTestAudioFormat', function () {
audioPlayer.seek(SEEK_TIME); audioPlayer.seek(SEEK_TIME);
} }
}); });
}
function setPauseCallback(audioPlayer) {
audioPlayer.on('pause', () => { audioPlayer.on('pause', () => {
console.info('case now is paused'); console.info('case now is paused');
expect(audioPlayer.state).assertEqual('paused'); expect(audioPlayer.state).assertEqual('paused');
audioPlayer.setVolume(MAX_VOLUME); audioPlayer.setVolume(MAX_VOLUME);
}); });
} audioPlayer.on('stop', () => {
console.info('case stop success');
function setResetCallback(audioPlayer, done) { expect(audioPlayer.state).assertEqual('stopped');
audioPlayer.reset();
});
audioPlayer.on('reset', () => { audioPlayer.on('reset', () => {
console.info('case reset success'); console.info('case reset success');
expect(audioPlayer.state).assertEqual('idle'); expect(audioPlayer.state).assertEqual('idle');
...@@ -83,17 +81,6 @@ describe('PlayerLocalTestAudioFormat', function () { ...@@ -83,17 +81,6 @@ describe('PlayerLocalTestAudioFormat', function () {
audioPlayer = undefined; audioPlayer = undefined;
done(); done();
}); });
}
function setStopCallback(audioPlayer) {
audioPlayer.on('stop', () => {
console.info('case stop success');
expect(audioPlayer.state).assertEqual('stopped');
audioPlayer.reset();
});
}
function setSeekCallback(audioPlayer, done) {
audioPlayer.on('timeUpdate', (seekDoneTime) => { audioPlayer.on('timeUpdate', (seekDoneTime) => {
if (typeof (seekDoneTime) == "undefined") { if (typeof (seekDoneTime) == "undefined") {
console.info(`case seek filed,errcode is ${seekDoneTime}`); console.info(`case seek filed,errcode is ${seekDoneTime}`);
...@@ -112,25 +99,16 @@ describe('PlayerLocalTestAudioFormat', function () { ...@@ -112,25 +99,16 @@ describe('PlayerLocalTestAudioFormat', function () {
expect(audioPlayer.duration).assertEqual(seekDoneTime); expect(audioPlayer.duration).assertEqual(seekDoneTime);
} }
}); });
}
function setVolumeCallback(audioPlayer) {
audioPlayer.on('volumeChange', () => { audioPlayer.on('volumeChange', () => {
console.info('case set volume value to ' + MAX_VOLUME); console.info('case set volume value to ' + MAX_VOLUME);
audioPlayer.play(); audioPlayer.play();
isToSeek = true; isToSeek = true;
}); });
}
function setFinishCallback(audioPlayer) {
audioPlayer.on('finish', () => { audioPlayer.on('finish', () => {
console.info('case play end'); console.info('case play end');
expect(audioPlayer.state).assertEqual('stopped'); expect(audioPlayer.state).assertEqual('stopped');
audioPlayer.stop(); audioPlayer.stop();
}); });
}
function setErrorCallback(audioPlayer, done) {
audioPlayer.on('error', (err) => { audioPlayer.on('error', (err) => {
console.info(`case error called,errName is ${err.name}`); console.info(`case error called,errName is ${err.name}`);
console.info(`case error called,errCode is ${err.code}`); console.info(`case error called,errCode is ${err.code}`);
...@@ -141,26 +119,6 @@ describe('PlayerLocalTestAudioFormat', function () { ...@@ -141,26 +119,6 @@ describe('PlayerLocalTestAudioFormat', function () {
}); });
} }
function playSource(audioSource, done) {
let audioPlayer = media.createAudioPlayer();
if (typeof (audioPlayer) == 'undefined') {
console.info('case create player is faild');
expect().assertFail();
done();
return;
}
setSrcCallback(audioPlayer);
setPlayCallback(audioPlayer);
setPauseCallback(audioPlayer);
setResetCallback(audioPlayer, done);
setStopCallback(audioPlayer);
setSeekCallback(audioPlayer, done);
setVolumeCallback(audioPlayer);
setFinishCallback(audioPlayer);
setErrorCallback(audioPlayer, done);
audioPlayer.src = audioSource;
}
/* * /* *
* @tc.number : SUB_MEDIA_PLAYER_LOCAL_Format_MP3_01_0100 * @tc.number : SUB_MEDIA_PLAYER_LOCAL_Format_MP3_01_0100
* @tc.name : 001.Playing mp3 streams * @tc.name : 001.Playing mp3 streams
...@@ -173,6 +131,7 @@ describe('PlayerLocalTestAudioFormat', function () { ...@@ -173,6 +131,7 @@ describe('PlayerLocalTestAudioFormat', function () {
* @tc.type : Function test * @tc.type : Function test
* @tc.level : Level0 * @tc.level : Level0
*/ */
it('SUB_MEDIA_PLAYER_LOCAL_Format_MP3_01_0100', 0, async function (done) { it('SUB_MEDIA_PLAYER_LOCAL_Format_MP3_01_0100', 0, async function (done) {
playSource(BASIC_PATH + '01.mp3', done); playSource(BASIC_PATH + '01.mp3', done);
}) })
...@@ -189,6 +148,7 @@ describe('PlayerLocalTestAudioFormat', function () { ...@@ -189,6 +148,7 @@ describe('PlayerLocalTestAudioFormat', function () {
* @tc.type : Function test * @tc.type : Function test
* @tc.level : Level0 * @tc.level : Level0
*/ */
it('SUB_MEDIA_PLAYER_LOCAL_Format_MP3_01_0200', 0, async function (done) { it('SUB_MEDIA_PLAYER_LOCAL_Format_MP3_01_0200', 0, async function (done) {
playSource(BASIC_PATH + '02.mp3', done); playSource(BASIC_PATH + '02.mp3', done);
}) })
...@@ -205,6 +165,7 @@ describe('PlayerLocalTestAudioFormat', function () { ...@@ -205,6 +165,7 @@ describe('PlayerLocalTestAudioFormat', function () {
* @tc.type : Function test * @tc.type : Function test
* @tc.level : Level0 * @tc.level : Level0
*/ */
it('SUB_MEDIA_PLAYER_LOCAL_Format_MP3_01_0300', 0, async function (done) { it('SUB_MEDIA_PLAYER_LOCAL_Format_MP3_01_0300', 0, async function (done) {
playSource(BASIC_PATH + '03.mp3', done); playSource(BASIC_PATH + '03.mp3', done);
}) })
...@@ -221,6 +182,7 @@ describe('PlayerLocalTestAudioFormat', function () { ...@@ -221,6 +182,7 @@ describe('PlayerLocalTestAudioFormat', function () {
* @tc.type : Function test * @tc.type : Function test
* @tc.level : Level0 * @tc.level : Level0
*/ */
it('SUB_MEDIA_PLAYER_LOCAL_Format_MP3_01_0400', 0, async function (done) { it('SUB_MEDIA_PLAYER_LOCAL_Format_MP3_01_0400', 0, async function (done) {
playSource(BASIC_PATH + '04.mp3', done); playSource(BASIC_PATH + '04.mp3', done);
}) })
...@@ -237,6 +199,7 @@ describe('PlayerLocalTestAudioFormat', function () { ...@@ -237,6 +199,7 @@ describe('PlayerLocalTestAudioFormat', function () {
* @tc.type : Function test * @tc.type : Function test
* @tc.level : Level0 * @tc.level : Level0
*/ */
it('SUB_MEDIA_PLAYER_LOCAL_Format_MP4_01_0100', 0, async function (done) { it('SUB_MEDIA_PLAYER_LOCAL_Format_MP4_01_0100', 0, async function (done) {
playSource(BASIC_PATH + '47.mp4', done); playSource(BASIC_PATH + '47.mp4', done);
}) })
...@@ -254,6 +217,7 @@ describe('PlayerLocalTestAudioFormat', function () { ...@@ -254,6 +217,7 @@ describe('PlayerLocalTestAudioFormat', function () {
* @tc.type : Function test * @tc.type : Function test
* @tc.level : Level0 * @tc.level : Level0
*/ */
it('SUB_MEDIA_PLAYER_LOCAL_Format_MP4_01_0300', 0, async function (done) { it('SUB_MEDIA_PLAYER_LOCAL_Format_MP4_01_0300', 0, async function (done) {
playSource(BASIC_PATH + '49.mp4', done); playSource(BASIC_PATH + '49.mp4', done);
}) })
...@@ -270,6 +234,7 @@ describe('PlayerLocalTestAudioFormat', function () { ...@@ -270,6 +234,7 @@ describe('PlayerLocalTestAudioFormat', function () {
* @tc.type : Function test * @tc.type : Function test
* @tc.level : Level0 * @tc.level : Level0
*/ */
it('SUB_MEDIA_PLAYER_LOCAL_Format_MP4_01_0400', 0, async function (done) { it('SUB_MEDIA_PLAYER_LOCAL_Format_MP4_01_0400', 0, async function (done) {
playSource(BASIC_PATH + '50.mp4', done); playSource(BASIC_PATH + '50.mp4', done);
}) })
...@@ -286,6 +251,7 @@ describe('PlayerLocalTestAudioFormat', function () { ...@@ -286,6 +251,7 @@ describe('PlayerLocalTestAudioFormat', function () {
* @tc.type : Function test * @tc.type : Function test
* @tc.level : Level0 * @tc.level : Level0
*/ */
it('SUB_MEDIA_PLAYER_LOCAL_Format_MP4_01_0500', 0, async function (done) { it('SUB_MEDIA_PLAYER_LOCAL_Format_MP4_01_0500', 0, async function (done) {
playSource(BASIC_PATH + '51.mp4', done); playSource(BASIC_PATH + '51.mp4', done);
}) })
...@@ -302,6 +268,7 @@ describe('PlayerLocalTestAudioFormat', function () { ...@@ -302,6 +268,7 @@ describe('PlayerLocalTestAudioFormat', function () {
* @tc.type : Function test * @tc.type : Function test
* @tc.level : Level0 * @tc.level : Level0
*/ */
it('SUB_MEDIA_PLAYER_LOCAL_Format_MP4_01_0600', 0, async function (done) { it('SUB_MEDIA_PLAYER_LOCAL_Format_MP4_01_0600', 0, async function (done) {
playSource(BASIC_PATH + '54.mp4', done); playSource(BASIC_PATH + '54.mp4', done);
}) })
...@@ -318,6 +285,7 @@ describe('PlayerLocalTestAudioFormat', function () { ...@@ -318,6 +285,7 @@ describe('PlayerLocalTestAudioFormat', function () {
* @tc.type : Function test * @tc.type : Function test
* @tc.level : Level0 * @tc.level : Level0
*/ */
it('SUB_MEDIA_PLAYER_LOCAL_Format_MP4_01_0700', 0, async function (done) { it('SUB_MEDIA_PLAYER_LOCAL_Format_MP4_01_0700', 0, async function (done) {
playSource(BASIC_PATH + '64.mp4', done); playSource(BASIC_PATH + '64.mp4', done);
}) })
...@@ -334,6 +302,7 @@ describe('PlayerLocalTestAudioFormat', function () { ...@@ -334,6 +302,7 @@ describe('PlayerLocalTestAudioFormat', function () {
* @tc.type : Function test * @tc.type : Function test
* @tc.level : Level0 * @tc.level : Level0
*/ */
it('SUB_MEDIA_PLAYER_LOCAL_Format_MP4_01_0800', 0, async function (done) { it('SUB_MEDIA_PLAYER_LOCAL_Format_MP4_01_0800', 0, async function (done) {
playSource(BASIC_PATH + '65.mp4', done); playSource(BASIC_PATH + '65.mp4', done);
}) })
...@@ -350,6 +319,7 @@ describe('PlayerLocalTestAudioFormat', function () { ...@@ -350,6 +319,7 @@ describe('PlayerLocalTestAudioFormat', function () {
* @tc.type : Function test * @tc.type : Function test
* @tc.level : Level0 * @tc.level : Level0
*/ */
it('SUB_MEDIA_PLAYER_LOCAL_Format_MP4_01_0900', 0, async function (done) { it('SUB_MEDIA_PLAYER_LOCAL_Format_MP4_01_0900', 0, async function (done) {
playSource(BASIC_PATH + '66.mp4', done); playSource(BASIC_PATH + '66.mp4', done);
}) })
...@@ -366,6 +336,7 @@ describe('PlayerLocalTestAudioFormat', function () { ...@@ -366,6 +336,7 @@ describe('PlayerLocalTestAudioFormat', function () {
* @tc.type : Function test * @tc.type : Function test
* @tc.level : Level0 * @tc.level : Level0
*/ */
it('SUB_MEDIA_PLAYER_LOCAL_Format_MP4_01_1000', 0, async function (done) { it('SUB_MEDIA_PLAYER_LOCAL_Format_MP4_01_1000', 0, async function (done) {
playSource(BASIC_PATH + '67.mp4', done); playSource(BASIC_PATH + '67.mp4', done);
}) })
...@@ -382,6 +353,7 @@ describe('PlayerLocalTestAudioFormat', function () { ...@@ -382,6 +353,7 @@ describe('PlayerLocalTestAudioFormat', function () {
* @tc.type : Function test * @tc.type : Function test
* @tc.level : Level0 * @tc.level : Level0
*/ */
it('SUB_MEDIA_PLAYER_LOCAL_Format_MP4_01_1100', 0, async function (done) { it('SUB_MEDIA_PLAYER_LOCAL_Format_MP4_01_1100', 0, async function (done) {
playSource(BASIC_PATH + '92.mp4', done); playSource(BASIC_PATH + '92.mp4', done);
}) })
...@@ -398,6 +370,7 @@ describe('PlayerLocalTestAudioFormat', function () { ...@@ -398,6 +370,7 @@ describe('PlayerLocalTestAudioFormat', function () {
* @tc.type : Function test * @tc.type : Function test
* @tc.level : Level0 * @tc.level : Level0
*/ */
it('SUB_MEDIA_PLAYER_LOCAL_Format_MP4_01_1200', 0, async function (done) { it('SUB_MEDIA_PLAYER_LOCAL_Format_MP4_01_1200', 0, async function (done) {
playSource(BASIC_PATH + '93.mp4', done); playSource(BASIC_PATH + '93.mp4', done);
}) })
...@@ -414,6 +387,7 @@ describe('PlayerLocalTestAudioFormat', function () { ...@@ -414,6 +387,7 @@ describe('PlayerLocalTestAudioFormat', function () {
* @tc.type : Function test * @tc.type : Function test
* @tc.level : Level0 * @tc.level : Level0
*/ */
it('SUB_MEDIA_PLAYER_LOCAL_Format_MP4_01_1300', 0, async function (done) { it('SUB_MEDIA_PLAYER_LOCAL_Format_MP4_01_1300', 0, async function (done) {
playSource(BASIC_PATH + '94.mp4', done); playSource(BASIC_PATH + '94.mp4', done);
}) })
...@@ -430,6 +404,7 @@ describe('PlayerLocalTestAudioFormat', function () { ...@@ -430,6 +404,7 @@ describe('PlayerLocalTestAudioFormat', function () {
* @tc.type : Function test * @tc.type : Function test
* @tc.level : Level0 * @tc.level : Level0
*/ */
it('SUB_MEDIA_PLAYER_LOCAL_Format_MP4_01_1400', 0, async function (done) { it('SUB_MEDIA_PLAYER_LOCAL_Format_MP4_01_1400', 0, async function (done) {
playSource(BASIC_PATH + '96.mp4', done); playSource(BASIC_PATH + '96.mp4', done);
}) })
...@@ -446,6 +421,7 @@ describe('PlayerLocalTestAudioFormat', function () { ...@@ -446,6 +421,7 @@ describe('PlayerLocalTestAudioFormat', function () {
* @tc.type : Function test * @tc.type : Function test
* @tc.level : Level0 * @tc.level : Level0
*/ */
it('SUB_MEDIA_PLAYER_LOCAL_Format_MP4_01_1500', 0, async function (done) { it('SUB_MEDIA_PLAYER_LOCAL_Format_MP4_01_1500', 0, async function (done) {
playSource(BASIC_PATH + '97.mp4', done); playSource(BASIC_PATH + '97.mp4', done);
}) })
...@@ -462,6 +438,7 @@ describe('PlayerLocalTestAudioFormat', function () { ...@@ -462,6 +438,7 @@ describe('PlayerLocalTestAudioFormat', function () {
* @tc.type : Function test * @tc.type : Function test
* @tc.level : Level0 * @tc.level : Level0
*/ */
it('SUB_MEDIA_PLAYER_LOCAL_Format_MP4_01_1600', 0, async function (done) { it('SUB_MEDIA_PLAYER_LOCAL_Format_MP4_01_1600', 0, async function (done) {
playSource(BASIC_PATH + '98.mp4', done); playSource(BASIC_PATH + '98.mp4', done);
}) })
...@@ -478,6 +455,7 @@ describe('PlayerLocalTestAudioFormat', function () { ...@@ -478,6 +455,7 @@ describe('PlayerLocalTestAudioFormat', function () {
* @tc.type : Function test * @tc.type : Function test
* @tc.level : Level0 * @tc.level : Level0
*/ */
it('SUB_MEDIA_PLAYER_LOCAL_Format_M4A_01_0100', 0, async function (done) { it('SUB_MEDIA_PLAYER_LOCAL_Format_M4A_01_0100', 0, async function (done) {
playSource(BASIC_PATH + '55.m4a', done); playSource(BASIC_PATH + '55.m4a', done);
}) })
...@@ -495,6 +473,7 @@ describe('PlayerLocalTestAudioFormat', function () { ...@@ -495,6 +473,7 @@ describe('PlayerLocalTestAudioFormat', function () {
* @tc.type : Function test * @tc.type : Function test
* @tc.level : Level0 * @tc.level : Level0
*/ */
it('SUB_MEDIA_PLAYER_LOCAL_Format_M4A_01_0300', 0, async function (done) { it('SUB_MEDIA_PLAYER_LOCAL_Format_M4A_01_0300', 0, async function (done) {
playSource(BASIC_PATH + '57.m4a', done); playSource(BASIC_PATH + '57.m4a', done);
}) })
...@@ -511,6 +490,7 @@ describe('PlayerLocalTestAudioFormat', function () { ...@@ -511,6 +490,7 @@ describe('PlayerLocalTestAudioFormat', function () {
* @tc.type : Function test * @tc.type : Function test
* @tc.level : Level0 * @tc.level : Level0
*/ */
it('SUB_MEDIA_PLAYER_LOCAL_Format_M4A_01_0400', 0, async function (done) { it('SUB_MEDIA_PLAYER_LOCAL_Format_M4A_01_0400', 0, async function (done) {
playSource(BASIC_PATH + '58.m4a', done); playSource(BASIC_PATH + '58.m4a', done);
}) })
...@@ -527,6 +507,7 @@ describe('PlayerLocalTestAudioFormat', function () { ...@@ -527,6 +507,7 @@ describe('PlayerLocalTestAudioFormat', function () {
* @tc.type : Function test * @tc.type : Function test
* @tc.level : Level0 * @tc.level : Level0
*/ */
it('SUB_MEDIA_PLAYER_LOCAL_Format_M4A_01_0500', 0, async function (done) { it('SUB_MEDIA_PLAYER_LOCAL_Format_M4A_01_0500', 0, async function (done) {
playSource(BASIC_PATH + '59.m4a', done); playSource(BASIC_PATH + '59.m4a', done);
}) })
...@@ -543,6 +524,7 @@ describe('PlayerLocalTestAudioFormat', function () { ...@@ -543,6 +524,7 @@ describe('PlayerLocalTestAudioFormat', function () {
* @tc.type : Function test * @tc.type : Function test
* @tc.level : Level0 * @tc.level : Level0
*/ */
it('SUB_MEDIA_PLAYER_LOCAL_Format_M4A_01_0700', 0, async function (done) { it('SUB_MEDIA_PLAYER_LOCAL_Format_M4A_01_0700', 0, async function (done) {
playSource(BASIC_PATH + '62.m4a', done); playSource(BASIC_PATH + '62.m4a', done);
}) })
......
/*
* Copyright (C) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package ohos.acts.multimedia.audio.audioplayerapi;
import ohos.ace.ability.AceAbility;
import ohos.aafwk.content.Intent;
/*
* java MainAbility
*/
public class MainAbility extends AceAbility {
@Override
public void onStart(Intent intent) {
super.onStart(intent);
}
@Override
public void onStop() {
super.onStop();
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册