未验证 提交 7461aa2f 编写于 作者: O openharmony_ci 提交者: Gitee

!3721 修复写文件时缺少权限申请导致的用例卡住问题

Merge pull request !3721 from ling990/ling990
...@@ -2108,7 +2108,7 @@ describe('AudioDecoderFormatCompatibilityPromise', function () { ...@@ -2108,7 +2108,7 @@ describe('AudioDecoderFormatCompatibilityPromise', function () {
let permissionName1 = 'ohos.permission.MEDIA_LOCATION'; let permissionName1 = 'ohos.permission.MEDIA_LOCATION';
let permissionName2 = 'ohos.permission.READ_MEDIA'; let permissionName2 = 'ohos.permission.READ_MEDIA';
let permissionName3 = 'ohos.permission.WRITE_MEDIA'; let permissionName3 = 'ohos.permission.WRITE_MEDIA';
permissionNameList = [permissionName1, permissionName2, permissionName3]; let permissionNameList = [permissionName1, permissionName2, permissionName3];
let appName = 'ohos.acts.multimedia.audio.codecformat'; let appName = 'ohos.acts.multimedia.audio.codecformat';
await mediaTestBase.applyPermission(appName, permissionNameList); await mediaTestBase.applyPermission(appName, permissionNameList);
console.info('beforeAll case after get permission'); console.info('beforeAll case after get permission');
......
...@@ -56,7 +56,7 @@ describe('AudioEncoderFormatCompatibilityPromise', function () { ...@@ -56,7 +56,7 @@ describe('AudioEncoderFormatCompatibilityPromise', function () {
let permissionName1 = 'ohos.permission.MEDIA_LOCATION'; let permissionName1 = 'ohos.permission.MEDIA_LOCATION';
let permissionName2 = 'ohos.permission.READ_MEDIA'; let permissionName2 = 'ohos.permission.READ_MEDIA';
let permissionName3 = 'ohos.permission.WRITE_MEDIA'; let permissionName3 = 'ohos.permission.WRITE_MEDIA';
permissionNameList = [permissionName1, permissionName2, permissionName3]; let permissionNameList = [permissionName1, permissionName2, permissionName3];
let appName = 'ohos.acts.multimedia.audio.codecformat'; let appName = 'ohos.acts.multimedia.audio.codecformat';
await mediaTestBase.applyPermission(appName, permissionNameList); await mediaTestBase.applyPermission(appName, permissionNameList);
console.info('beforeAll case after get permission'); console.info('beforeAll case after get permission');
......
...@@ -54,7 +54,7 @@ describe('AudioDecoderFormatCallback', function () { ...@@ -54,7 +54,7 @@ describe('AudioDecoderFormatCallback', function () {
let permissionName1 = 'ohos.permission.MEDIA_LOCATION'; let permissionName1 = 'ohos.permission.MEDIA_LOCATION';
let permissionName2 = 'ohos.permission.READ_MEDIA'; let permissionName2 = 'ohos.permission.READ_MEDIA';
let permissionName3 = 'ohos.permission.WRITE_MEDIA'; let permissionName3 = 'ohos.permission.WRITE_MEDIA';
permissionNameList = [permissionName1, permissionName2, permissionName3]; let permissionNameList = [permissionName1, permissionName2, permissionName3];
let appName = 'ohos.acts.multimedia.audio.audiodecoder'; let appName = 'ohos.acts.multimedia.audio.audiodecoder';
await mediaTestBase.applyPermission(appName, permissionNameList); await mediaTestBase.applyPermission(appName, permissionNameList);
console.info('beforeAll case after get permission'); console.info('beforeAll case after get permission');
......
...@@ -54,7 +54,7 @@ describe('AudioDecoderFormatPromise', function () { ...@@ -54,7 +54,7 @@ describe('AudioDecoderFormatPromise', function () {
let permissionName1 = 'ohos.permission.MEDIA_LOCATION'; let permissionName1 = 'ohos.permission.MEDIA_LOCATION';
let permissionName2 = 'ohos.permission.READ_MEDIA'; let permissionName2 = 'ohos.permission.READ_MEDIA';
let permissionName3 = 'ohos.permission.WRITE_MEDIA'; let permissionName3 = 'ohos.permission.WRITE_MEDIA';
permissionNameList = [permissionName1, permissionName2, permissionName3]; let permissionNameList = [permissionName1, permissionName2, permissionName3];
let appName = 'ohos.acts.multimedia.audio.audiodecoder'; let appName = 'ohos.acts.multimedia.audio.audiodecoder';
await mediaTestBase.applyPermission(appName, permissionNameList); await mediaTestBase.applyPermission(appName, permissionNameList);
console.info('beforeAll case after get permission'); console.info('beforeAll case after get permission');
......
...@@ -145,7 +145,7 @@ describe('AudioDecoderFuncCallback', function () { ...@@ -145,7 +145,7 @@ describe('AudioDecoderFuncCallback', function () {
let permissionName1 = 'ohos.permission.MEDIA_LOCATION'; let permissionName1 = 'ohos.permission.MEDIA_LOCATION';
let permissionName2 = 'ohos.permission.READ_MEDIA'; let permissionName2 = 'ohos.permission.READ_MEDIA';
let permissionName3 = 'ohos.permission.WRITE_MEDIA'; let permissionName3 = 'ohos.permission.WRITE_MEDIA';
permissionNameList = [permissionName1, permissionName2, permissionName3]; let permissionNameList = [permissionName1, permissionName2, permissionName3];
let appName = 'ohos.acts.multimedia.audio.audiodecoder'; let appName = 'ohos.acts.multimedia.audio.audiodecoder';
await mediaTestBase.applyPermission(appName, permissionNameList); await mediaTestBase.applyPermission(appName, permissionNameList);
console.info('beforeAll case after get permission'); console.info('beforeAll case after get permission');
......
...@@ -144,7 +144,7 @@ describe('AudioDecoderFuncPromise', function () { ...@@ -144,7 +144,7 @@ describe('AudioDecoderFuncPromise', function () {
let permissionName1 = 'ohos.permission.MEDIA_LOCATION'; let permissionName1 = 'ohos.permission.MEDIA_LOCATION';
let permissionName2 = 'ohos.permission.READ_MEDIA'; let permissionName2 = 'ohos.permission.READ_MEDIA';
let permissionName3 = 'ohos.permission.WRITE_MEDIA'; let permissionName3 = 'ohos.permission.WRITE_MEDIA';
permissionNameList = [permissionName1, permissionName2, permissionName3]; let permissionNameList = [permissionName1, permissionName2, permissionName3];
let appName = 'ohos.acts.multimedia.audio.audiodecoder'; let appName = 'ohos.acts.multimedia.audio.audiodecoder';
await mediaTestBase.applyPermission(appName, permissionNameList); await mediaTestBase.applyPermission(appName, permissionNameList);
console.info('beforeAll case after get permission'); console.info('beforeAll case after get permission');
......
...@@ -53,7 +53,7 @@ describe('AudioEncoderFuncCallback', function () { ...@@ -53,7 +53,7 @@ describe('AudioEncoderFuncCallback', function () {
let permissionName1 = 'ohos.permission.MEDIA_LOCATION'; let permissionName1 = 'ohos.permission.MEDIA_LOCATION';
let permissionName2 = 'ohos.permission.READ_MEDIA'; let permissionName2 = 'ohos.permission.READ_MEDIA';
let permissionName3 = 'ohos.permission.WRITE_MEDIA'; let permissionName3 = 'ohos.permission.WRITE_MEDIA';
permissionNameList = [permissionName1, permissionName2, permissionName3]; let permissionNameList = [permissionName1, permissionName2, permissionName3];
let appName = 'ohos.acts.multimedia.audio.audioencoder'; let appName = 'ohos.acts.multimedia.audio.audioencoder';
await mediaTestBase.applyPermission(appName, permissionNameList); await mediaTestBase.applyPermission(appName, permissionNameList);
console.info('beforeAll case after get permission'); console.info('beforeAll case after get permission');
......
...@@ -53,7 +53,7 @@ describe('AudioEncoderFuncPromise', function () { ...@@ -53,7 +53,7 @@ describe('AudioEncoderFuncPromise', function () {
let permissionName1 = 'ohos.permission.MEDIA_LOCATION'; let permissionName1 = 'ohos.permission.MEDIA_LOCATION';
let permissionName2 = 'ohos.permission.READ_MEDIA'; let permissionName2 = 'ohos.permission.READ_MEDIA';
let permissionName3 = 'ohos.permission.WRITE_MEDIA'; let permissionName3 = 'ohos.permission.WRITE_MEDIA';
permissionNameList = [permissionName1, permissionName2, permissionName3]; let permissionNameList = [permissionName1, permissionName2, permissionName3];
let appName = 'ohos.acts.multimedia.audio.audioencoder'; let appName = 'ohos.acts.multimedia.audio.audioencoder';
await mediaTestBase.applyPermission(appName, permissionNameList); await mediaTestBase.applyPermission(appName, permissionNameList);
console.info('beforeAll case after get permission'); console.info('beforeAll case after get permission');
......
...@@ -18,6 +18,7 @@ import mediademo from '@ohos.multimedia.mediademo' ...@@ -18,6 +18,7 @@ import mediademo from '@ohos.multimedia.mediademo'
import fileio from '@ohos.fileio' import fileio from '@ohos.fileio'
import featureAbility from '@ohos.ability.featureAbility' import featureAbility from '@ohos.ability.featureAbility'
import mediaLibrary from '@ohos.multimedia.mediaLibrary' import mediaLibrary from '@ohos.multimedia.mediaLibrary'
import * as mediaTestBase from '../../../../../MediaTestBase.js'
import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index' import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index'
describe('VideoEncoderFormatPromise', function () { describe('VideoEncoderFormatPromise', function () {
...@@ -43,7 +44,7 @@ describe('VideoEncoderFormatPromise', function () { ...@@ -43,7 +44,7 @@ describe('VideoEncoderFormatPromise', function () {
let permissionName1 = 'ohos.permission.MEDIA_LOCATION'; let permissionName1 = 'ohos.permission.MEDIA_LOCATION';
let permissionName2 = 'ohos.permission.READ_MEDIA'; let permissionName2 = 'ohos.permission.READ_MEDIA';
let permissionName3 = 'ohos.permission.WRITE_MEDIA'; let permissionName3 = 'ohos.permission.WRITE_MEDIA';
permissionNameList = [permissionName1, permissionName2, permissionName3]; let permissionNameList = [permissionName1, permissionName2, permissionName3];
let appName = 'ohos.acts.multimedia.video.codecformat'; let appName = 'ohos.acts.multimedia.video.codecformat';
await mediaTestBase.applyPermission(appName, permissionNameList); await mediaTestBase.applyPermission(appName, permissionNameList);
console.info('beforeAll case after get permission'); console.info('beforeAll case after get permission');
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册