提交 7362b1d7 编写于 作者: L ling990

modify testcases Signed-off-by: ling990 <liling96@huawei.com>

Signed-off-by: Nling990 <ling990@qq.com>
上级 ce2124e7
...@@ -4,9 +4,16 @@ ...@@ -4,9 +4,16 @@
"type": "JSUnitTest", "type": "JSUnitTest",
"test-timeout": "2000000", "test-timeout": "2000000",
"package": "ohos.acts.multimedia.audio.audiodecoder", "package": "ohos.acts.multimedia.audio.audiodecoder",
"shell-timeout": "60000" "shell-timeout": "60000"
}, },
"kits": [ "kits": [
{
"test-file-name": [
"ActsAudioDecoderJsTest.hap"
],
"type": "AppInstallKit",
"cleanup-apps": true
},
{ {
"type": "PushKit", "type": "PushKit",
"pre-push": [ "pre-push": [
...@@ -19,7 +26,7 @@ ...@@ -19,7 +26,7 @@
"./resource/audio/audioDecode/vorbis.es ->/data/accounts/account_0/appdata/ohos.acts.multimedia.audio.audiodecoder/" "./resource/audio/audioDecode/vorbis.es ->/data/accounts/account_0/appdata/ohos.acts.multimedia.audio.audiodecoder/"
] ]
}, },
{ {
"type": "ShellKit", "type": "ShellKit",
"run-command": [ "run-command": [
"rm -R /data/accounts/account_0/appdata/ohos.acts.multimedia.audio.audiodecoder/results", "rm -R /data/accounts/account_0/appdata/ohos.acts.multimedia.audio.audiodecoder/results",
...@@ -29,13 +36,6 @@ ...@@ -29,13 +36,6 @@
], ],
"teardown-command":[ "teardown-command":[
] ]
},
{
"test-file-name": [
"ActsAudioDecoderJsTest.hap"
],
"type": "AppInstallKit",
"cleanup-apps": true
} }
] ]
} }
\ No newline at end of file
...@@ -4,9 +4,16 @@ ...@@ -4,9 +4,16 @@
"type": "JSUnitTest", "type": "JSUnitTest",
"test-timeout": "2000000", "test-timeout": "2000000",
"package": "ohos.acts.multimedia.audio.audioencoder", "package": "ohos.acts.multimedia.audio.audioencoder",
"shell-timeout": "60000" "shell-timeout": "60000"
}, },
"kits": [ "kits": [
{
"test-file-name": [
"ActsAudioEncoderJsTest.hap"
],
"type": "AppInstallKit",
"cleanup-apps": true
},
{ {
"type": "PushKit", "type": "PushKit",
"pre-push": [ "pre-push": [
...@@ -16,7 +23,7 @@ ...@@ -16,7 +23,7 @@
"./resource/audio/audioEncode/S32LE_2.pcm ->/data/accounts/account_0/appdata/ohos.acts.multimedia.audio.audioencoder/" "./resource/audio/audioEncode/S32LE_2.pcm ->/data/accounts/account_0/appdata/ohos.acts.multimedia.audio.audioencoder/"
] ]
}, },
{ {
"type": "ShellKit", "type": "ShellKit",
"run-command": [ "run-command": [
"rm -R /data/accounts/account_0/appdata/ohos.acts.multimedia.audio.audioencoder/results", "rm -R /data/accounts/account_0/appdata/ohos.acts.multimedia.audio.audioencoder/results",
...@@ -26,13 +33,6 @@ ...@@ -26,13 +33,6 @@
], ],
"teardown-command":[ "teardown-command":[
] ]
},
{
"test-file-name": [
"ActsAudioEncoderJsTest.hap"
],
"type": "AppInstallKit",
"cleanup-apps": true
} }
] ]
} }
\ No newline at end of file
# Copyright (C) 2021-2022 Huawei Device Co., Ltd. # Copyright (C) 2021 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. # you may not use this file except in compliance with the License.
# You may obtain a copy of the License at # You may obtain a copy of the License at
......
...@@ -2,11 +2,18 @@ ...@@ -2,11 +2,18 @@
"description": "Configuration for audioPlayer Tests", "description": "Configuration for audioPlayer Tests",
"driver": { "driver": {
"type": "JSUnitTest", "type": "JSUnitTest",
"test-timeout": "120000", "test-timeout": "2000000",
"package": "ohos.acts.multimedia.audio.audioplayer", "package": "ohos.acts.multimedia.audio.audioplayer",
"shell-timeout": "60000" "shell-timeout": "60000"
}, },
"kits": [ "kits": [
{
"test-file-name": [
"ActsAudioPlayerJsTest.hap"
],
"type": "AppInstallKit",
"cleanup-apps": true
},
{ {
"type": "PushKit", "type": "PushKit",
"pre-push": [ "pre-push": [
...@@ -44,13 +51,6 @@ ...@@ -44,13 +51,6 @@
], ],
"teardown-command":[ "teardown-command":[
] ]
},
{
"test-file-name": [
"ActsAudioPlayerJsTest.hap"
],
"type": "AppInstallKit",
"cleanup-apps": true
} }
] ]
} }
/* /*
* Copyright (C) 2022 Huawei Device Co., Ltd. * Copyright (C) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
......
/* /*
* Copyright (C) 2022 Huawei Device Co., Ltd. * Copyright (C) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
......
/* /*
* Copyright (C) 2021-2022 Huawei Device Co., Ltd. * Copyright (C) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
......
/*
* Copyright (C) 2021-2022 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.
*/
.container { .container {
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
......
<!--
Copyright (c) 2021-2022 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.
-->
<div class="container"> <div class="container">
<text class="title"> <text class="title">
{{ $t('strings.hello') }} {{ title }} {{ $t('strings.hello') }} {{ title }}
......
/* /*
* Copyright (C) 2021-2022 Huawei Device Co., Ltd. * Copyright (C) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
......
/* /*
* Copyright (C) 2021-2022 Huawei Device Co., Ltd. * Copyright (C) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
......
/* /*
* Copyright (C) 2021-2022 Huawei Device Co., Ltd. * Copyright (C) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
......
/* /*
* Copyright (C) 2021-2022 Huawei Device Co., Ltd. * Copyright (C) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
......
/* /*
* Copyright (C) 2021-2022 Huawei Device Co., Ltd. * Copyright (C) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
......
# Copyright (C) 2021-2022 Huawei Device Co., Ltd. # Copyright (C) 2021 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. # you may not use this file except in compliance with the License.
# You may obtain a copy of the License at # You may obtain a copy of the License at
......
/* /*
* Copyright (C) 2022 Huawei Device Co., Ltd. * Copyright (C) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
......
/* /*
* Copyright (C) 2022 Huawei Device Co., Ltd. * Copyright (C) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
......
/* /*
* Copyright (C) 2021-2022 Huawei Device Co., Ltd. * Copyright (C) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
......
/*
* Copyright (C) 2021-2022 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.
*/
.container { .container {
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
......
<!--
Copyright (c) 2021-2022 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.
-->
<div class="container"> <div class="container">
<text class="title"> <text class="title">
{{ $t('strings.hello') }} {{ title }} {{ $t('strings.hello') }} {{ title }}
......
/* /*
* Copyright (C) 2021-2022 Huawei Device Co., Ltd. * Copyright (C) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
......
/* /*
* Copyright (C) 2022 Huawei Device Co., Ltd. * Copyright (C) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
......
/* /*
* Copyright (C) 2021-2022 Huawei Device Co., Ltd. * Copyright (C) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
......
/* /*
* Copyright (C) 2021-2022 Huawei Device Co., Ltd. * Copyright (C) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
...@@ -216,9 +216,7 @@ describe('RecorderLocalTestAudioAPI', function () { ...@@ -216,9 +216,7 @@ describe('RecorderLocalTestAudioAPI', function () {
* @tc.level : Level2 * @tc.level : Level2
*/ */
it('SUB_MEDIA_RECORDER_createAudioRecorder_API_0100', 0, async function (done) { it('SUB_MEDIA_RECORDER_createAudioRecorder_API_0100', 0, async function (done) {
audioConfig.uri = fdPath; let testAudioRecorder = undefined;
let testAudioRecorder;
expect(testAudioRecorder).assertNull();
testAudioRecorder= media.createAudioRecorder(); testAudioRecorder= media.createAudioRecorder();
expect(testAudioRecorder != undefined).assertTrue(); expect(testAudioRecorder != undefined).assertTrue();
done(); done();
...@@ -233,6 +231,7 @@ describe('RecorderLocalTestAudioAPI', function () { ...@@ -233,6 +231,7 @@ describe('RecorderLocalTestAudioAPI', function () {
* @tc.level : Level2 * @tc.level : Level2
*/ */
it('SUB_MEDIA_RECORDER_AudioRecorder_Prepare_API_0100', 0, async function (done) { it('SUB_MEDIA_RECORDER_AudioRecorder_Prepare_API_0100', 0, async function (done) {
audioConfig.uri = fdPath;
let testAudioRecorder= media.createAudioRecorder(); let testAudioRecorder= media.createAudioRecorder();
expect(testAudioRecorder != null).assertTrue(); expect(testAudioRecorder != null).assertTrue();
testAudioRecorder.prepare(audioConfig); testAudioRecorder.prepare(audioConfig);
......
/* /*
* Copyright (C) 2021-2022 Huawei Device Co., Ltd. * Copyright (C) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
......
...@@ -4,9 +4,16 @@ ...@@ -4,9 +4,16 @@
"type": "JSUnitTest", "type": "JSUnitTest",
"test-timeout": "2000000", "test-timeout": "2000000",
"package": "ohos.acts.multimedia.video.videodecoder", "package": "ohos.acts.multimedia.video.videodecoder",
"shell-timeout": "60000" "shell-timeout": "60000"
}, },
"kits": [ "kits": [
{
"test-file-name": [
"ActsVideoDecoderJsTest.hap"
],
"type": "AppInstallKit",
"cleanup-apps": true
},
{ {
"type": "PushKit", "type": "PushKit",
"pre-push": [ "pre-push": [
...@@ -19,20 +26,13 @@ ...@@ -19,20 +26,13 @@
"./resource/media/es/out_320_240_10s.h264 ->/data/accounts/account_0/appdata/ohos.acts.multimedia.video.videodecoder/shared/" "./resource/media/es/out_320_240_10s.h264 ->/data/accounts/account_0/appdata/ohos.acts.multimedia.video.videodecoder/shared/"
] ]
}, },
{ {
"type": "ShellKit", "type": "ShellKit",
"run-command": [ "run-command": [
"mkdir -p /data/accounts/account_0/appdata/ohos.acts.multimedia.video.videodecoder/shared/" "mkdir -p /data/accounts/account_0/appdata/ohos.acts.multimedia.video.videodecoder/shared/"
], ],
"teardown-command":[ "teardown-command":[
] ]
},
{
"test-file-name": [
"ActsVideoDecoderJsTest.hap"
],
"type": "AppInstallKit",
"cleanup-apps": true
} }
] ]
} }
\ No newline at end of file
...@@ -183,7 +183,7 @@ describe('VideoDecoderEnum', function () { ...@@ -183,7 +183,7 @@ describe('VideoDecoderEnum', function () {
return; return;
} }
frameCountOut++; frameCountOut++;
await videoDecodeProcessor.renderOutputData(outputObject).then(() => { await videoDecodeProcessor.freeOutputBuffer(outputObject).then(() => {
console.log('in case: release output count:' + frameCountOut); console.log('in case: release output count:' + frameCountOut);
}, failCallback).catch(failCatch); }, failCallback).catch(failCatch);
} }
......
...@@ -437,8 +437,8 @@ describe('VideoDecoderFuncPromiseTest', function () { ...@@ -437,8 +437,8 @@ describe('VideoDecoderFuncPromiseTest', function () {
/* * /* *
* @tc.number : SUB_MEDIA_VIDEO_DECODER_MULTIINSTANCE_PROMISE_0100 * @tc.number : SUB_MEDIA_VIDEO_DECODER_MULTIINSTANCE_PROMISE_0100
* @tc.name : 001.creat 16 video decoder * @tc.name : 001.creat multiple video decoders
* @tc.desc : creat 16 video decoder * @tc.desc : creat multiple video decoders
* @tc.size : MediumTest * @tc.size : MediumTest
* @tc.type : Function test * @tc.type : Function test
* @tc.level : Level0 * @tc.level : Level0
...@@ -458,7 +458,7 @@ describe('VideoDecoderFuncPromiseTest', function () { ...@@ -458,7 +458,7 @@ describe('VideoDecoderFuncPromiseTest', function () {
} }
let array = new Array(); let array = new Array();
eventEmitter.on('releaseAllDecoder', async () => { eventEmitter.on('releaseAllDecoder', async () => {
for (let j = 0; j < 15; j++) { for (let j = 0; j < 3; j++) {
await array[j].release().then(() => { await array[j].release().then(() => {
array[j] = null; array[j] = null;
}, failCallback).catch(failCatch); }, failCallback).catch(failCatch);
...@@ -469,11 +469,11 @@ describe('VideoDecoderFuncPromiseTest', function () { ...@@ -469,11 +469,11 @@ describe('VideoDecoderFuncPromiseTest', function () {
videoDecodeProcessor = null; videoDecodeProcessor = null;
done(); done();
}) })
for (let i = 0; i < 16; i++) { for (let i = 0; i < 3; i++) {
await media.createVideoDecoderByMime('video/avc').then((processor) => { await media.createVideoDecoderByMime('video/avc').then((processor) => {
if (typeof (processor) != 'undefined') { if (typeof (processor) != 'undefined') {
console.info('in case : createVideoDecoderByMime success'); console.info('in case : createVideoDecoderByMime success');
if (i == 15) { if (i == 2) {
videoDecodeProcessor = processor; videoDecodeProcessor = processor;
} else { } else {
array[i] = processor; array[i] = processor;
......
...@@ -4,9 +4,16 @@ ...@@ -4,9 +4,16 @@
"type": "JSUnitTest", "type": "JSUnitTest",
"test-timeout": "2000000", "test-timeout": "2000000",
"package": "ohos.acts.multimedia.video.videoencoder", "package": "ohos.acts.multimedia.video.videoencoder",
"shell-timeout": "60000" "shell-timeout": "60000"
}, },
"kits": [ "kits": [
{
"test-file-name": [
"ActsVideoEncoderJsTest.hap"
],
"type": "AppInstallKit",
"cleanup-apps": true
},
{ {
"type": "PushKit", "type": "PushKit",
"pre-push": [ "pre-push": [
...@@ -14,7 +21,7 @@ ...@@ -14,7 +21,7 @@
"push": [ "push": [
] ]
}, },
{ {
"type": "ShellKit", "type": "ShellKit",
"run-command": [ "run-command": [
"rm -R /data/accounts/account_0/appdata/ohos.acts.multimedia.video.videoencoder/results", "rm -R /data/accounts/account_0/appdata/ohos.acts.multimedia.video.videoencoder/results",
...@@ -24,13 +31,6 @@ ...@@ -24,13 +31,6 @@
], ],
"teardown-command":[ "teardown-command":[
] ]
},
{
"test-file-name": [
"ActsVideoEncoderJsTest.hap"
],
"type": "AppInstallKit",
"cleanup-apps": true
} }
] ]
} }
\ No newline at end of file
...@@ -262,7 +262,7 @@ describe('videoEncoderSoftwareMultiInstances', function () { ...@@ -262,7 +262,7 @@ describe('videoEncoderSoftwareMultiInstances', function () {
/* * /* *
* @tc.number : SUB_MEDIA_VIDEO_SOFTWARE_ENCODER_MULTIINSTANCE_0100 * @tc.number : SUB_MEDIA_VIDEO_SOFTWARE_ENCODER_MULTIINSTANCE_0100
* @tc.name : 001.create 16 encoder * @tc.name : 001.create multiple encoders
* @tc.desc : basic encode function * @tc.desc : basic encode function
* @tc.size : MediumTest * @tc.size : MediumTest
* @tc.type : Function test * @tc.type : Function test
...@@ -284,7 +284,7 @@ describe('videoEncoderSoftwareMultiInstances', function () { ...@@ -284,7 +284,7 @@ describe('videoEncoderSoftwareMultiInstances', function () {
let array = new Array(); let array = new Array();
eventEmitter.once('nextStep', async () => { eventEmitter.once('nextStep', async () => {
for (let j = 1; j < 16; j++) { for (let j = 1; j < 3; j++) {
await array[j].release().then(() => { await array[j].release().then(() => {
console.info("case release encoder " + j); console.info("case release encoder " + j);
array[j] = null; array[j] = null;
...@@ -303,11 +303,11 @@ describe('videoEncoderSoftwareMultiInstances', function () { ...@@ -303,11 +303,11 @@ describe('videoEncoderSoftwareMultiInstances', function () {
toStartStream(); toStartStream();
await toStart(); await toStart();
} }
for (let i = 1; i <= 16; i += 1) { for (let i = 1; i <= 3; i += 1) {
await media.createVideoEncoderByMime(mime).then((processor) => { await media.createVideoEncoderByMime(mime).then((processor) => {
if (typeof(processor) != 'undefined') { if (typeof(processor) != 'undefined') {
console.info("case create createVideoEncoder success: " + i); console.info("case create createVideoEncoder success: " + i);
if (i == 16) { if (i == 3) {
videoEncodeProcessor = processor; videoEncodeProcessor = processor;
runCase(); runCase();
} else { } else {
......
# Copyright (C) 2022 Huawei Device Co., Ltd. # Copyright (C) 2021 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. # you may not use this file except in compliance with the License.
# You may obtain a copy of the License at # You may obtain a copy of the License at
...@@ -26,7 +26,7 @@ ohos_js_hap_suite("video_player_js_hap") { ...@@ -26,7 +26,7 @@ ohos_js_hap_suite("video_player_js_hap") {
# "//third_party/libpng:libpng", # "//third_party/libpng:libpng",
# ] # ]
certificate_profile = "./signature/openharmony_sx.p7b" certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "VideoPlayerJsTest" hap_name = "ActsVideoPlayerJsTest"
# part_name = "prebuilt_hap" # part_name = "prebuilt_hap"
# subsystem_name = "xts" # subsystem_name = "xts"
......
...@@ -7,6 +7,13 @@ ...@@ -7,6 +7,13 @@
"shell-timeout": "60000" "shell-timeout": "60000"
}, },
"kits": [ "kits": [
{
"test-file-name": [
"ActsVideoPlayerJsTest.hap"
],
"type": "AppInstallKit",
"cleanup-apps": true
},
{ {
"type": "PushKit", "type": "PushKit",
"pre-push": [ "pre-push": [
...@@ -15,19 +22,12 @@ ...@@ -15,19 +22,12 @@
"./resource/audio/H264_AAC.mp4 ->/data/accounts/account_0/appdata/ohos.acts.multimedia.video.videoplayer/" "./resource/audio/H264_AAC.mp4 ->/data/accounts/account_0/appdata/ohos.acts.multimedia.video.videoplayer/"
] ]
}, },
{ {
"type": "ShellKit", "type": "ShellKit",
"run-command": [ "run-command": [
], ],
"teardown-command":[ "teardown-command":[
] ]
},
{
"test-file-name": [
"VideoPlayerJsTest.hap"
],
"type": "AppInstallKit",
"cleanup-apps": true
} }
] ]
} }
/* /*
* Copyright (C) 2022 Huawei Device Co., Ltd. * Copyright (C) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
......
/*
* Copyright (C) 2022 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.
*/
.container { .container {
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
......
<!--
Copyright (c) 2022 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.
-->
<div class="container"> <div class="container">
<text class="title"> <text class="title">
{{ $t('strings.hello') }} {{ title }} {{ $t('strings.hello') }} {{ title }}
......
/* /*
* Copyright (C) 2022 Huawei Device Co., Ltd. * Copyright (C) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
......
/* /*
* Copyright (C) 2022 Huawei Device Co., Ltd. * Copyright (C) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
......
/* /*
* Copyright (C) 2022 Huawei Device Co., Ltd. * Copyright (C) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the 'License'); * Licensed under the Apache License, Version 2.0 (the 'License');
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
......
/* /*
* Copyright (C) 2022 Huawei Device Co., Ltd. * Copyright (C) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
......
/* /*
* Copyright (C) 2022 Huawei Device Co., Ltd. * Copyright (C) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the 'License'); * Licensed under the Apache License, Version 2.0 (the 'License');
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
......
/* /*
* Copyright (C) 2022 Huawei Device Co., Ltd. * Copyright (C) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the 'License'); * Licensed under the Apache License, Version 2.0 (the 'License');
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
......
# Copyright (C) 2022 Huawei Device Co., Ltd. # Copyright (C) 2021 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. # you may not use this file except in compliance with the License.
# You may obtain a copy of the License at # You may obtain a copy of the License at
...@@ -24,7 +24,7 @@ ohos_js_hap_suite("video_recorder_js_hap") { ...@@ -24,7 +24,7 @@ ohos_js_hap_suite("video_recorder_js_hap") {
# "//third_party/libpng:libpng", # "//third_party/libpng:libpng",
# ] # ]
certificate_profile = "./signature/openharmony_sx.p7b" certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "VideoRecorderJsTest" hap_name = "ActsVideoRecorderJsTest"
# part_name = "prebuilt_hap" # part_name = "prebuilt_hap"
# subsystem_name = "xts" # subsystem_name = "xts"
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
"description": "Configuration for videoRecorder Tests", "description": "Configuration for videoRecorder Tests",
"driver": { "driver": {
"type": "JSUnitTest", "type": "JSUnitTest",
"test-timeout": "1000000", "test-timeout": "2000000",
"package": "ohos.acts.multimedia.video.videorecorder", "package": "ohos.acts.multimedia.video.videorecorder",
"shell-timeout": "60000" "shell-timeout": "60000"
}, },
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
}, },
{ {
"test-file-name": [ "test-file-name": [
"VideoRecorderJsTest.hap" "ActsVideoRecorderJsTest.hap"
], ],
"type": "AppInstallKit", "type": "AppInstallKit",
"cleanup-apps": true "cleanup-apps": true
......
/* /*
* Copyright (C) 2022 Huawei Device Co., Ltd. * Copyright (C) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
......
/*
* Copyright (C) 2022 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.
*/
.container { .container {
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
......
<!--
Copyright (c) 2022 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.
-->
<div class="container"> <div class="container">
<text class="title"> <text class="title">
{{ $t('strings.hello') }} {{ title }} {{ $t('strings.hello') }} {{ title }}
......
/* /*
* Copyright (C) 2022 Huawei Device Co., Ltd. * Copyright (C) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
......
/* /*
* Copyright (C) 2022 Huawei Device Co., Ltd. * Copyright (C) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
......
/* /*
* Copyright (C) 2022 Huawei Device Co., Ltd. * Copyright (C) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the 'License'); * Licensed under the Apache License, Version 2.0 (the 'License');
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
......
/* /*
* Copyright (C) 2022 Huawei Device Co., Ltd. * Copyright (C) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the 'License'); * Licensed under the Apache License, Version 2.0 (the 'License');
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
...@@ -55,13 +55,13 @@ describe('VideoRecorderFuncCallbackTest', function () { ...@@ -55,13 +55,13 @@ describe('VideoRecorderFuncCallbackTest', function () {
videoFrameHeight : 480, videoFrameHeight : 480,
videoFrameRate : 10 videoFrameRate : 10
} }
// orientationHint 0, 90, 180, 270 // rotation 0, 90, 180, 270
let videoConfig = { let videoConfig = {
audioSourceType : 1, audioSourceType : 1,
videoSourceType : 0, videoSourceType : 0,
profile : configFile, profile : configFile,
url : 'file:///data/media/01.mp4', url : 'file:///data/media/01.mp4',
orientationHint : 0, rotation : 0,
location : { latitude : 30, longitude : 130 }, location : { latitude : 30, longitude : 130 },
maxSize : 100, maxSize : 100,
maxDuration : 500 maxDuration : 500
...@@ -81,7 +81,7 @@ describe('VideoRecorderFuncCallbackTest', function () { ...@@ -81,7 +81,7 @@ describe('VideoRecorderFuncCallbackTest', function () {
videoSourceType : 0, videoSourceType : 0,
profile : onlyVideoProfile, profile : onlyVideoProfile,
url : 'file:///data/media/01.mp4', url : 'file:///data/media/01.mp4',
orientationHint : 0, rotation : 0,
location : { latitude : 30, longitude : 130 }, location : { latitude : 30, longitude : 130 },
maxSize : 100, maxSize : 100,
maxDuration : 500 maxDuration : 500
...@@ -728,7 +728,7 @@ describe('VideoRecorderFuncCallbackTest', function () { ...@@ -728,7 +728,7 @@ describe('VideoRecorderFuncCallbackTest', function () {
/* * /* *
* @tc.number : SUB_MEDIA_VIDEO_RECORDER_FUNCTION_CALLBACK_1900 * @tc.number : SUB_MEDIA_VIDEO_RECORDER_FUNCTION_CALLBACK_1900
* @tc.name : 19.orientationHint 90 (callback) * @tc.name : 19.rotation 90 (callback)
* @tc.desc : Audio recordr control test * @tc.desc : Audio recordr control test
* @tc.size : MediumTest * @tc.size : MediumTest
* @tc.type : Function * @tc.type : Function
...@@ -737,7 +737,7 @@ describe('VideoRecorderFuncCallbackTest', function () { ...@@ -737,7 +737,7 @@ describe('VideoRecorderFuncCallbackTest', function () {
it('SUB_MEDIA_VIDEO_RECORDER_FUNCTION_CALLBACK_1900', 0, async function (done) { it('SUB_MEDIA_VIDEO_RECORDER_FUNCTION_CALLBACK_1900', 0, async function (done) {
await getFd('37.mp4'); await getFd('37.mp4');
videoConfig.url = fdPath; videoConfig.url = fdPath;
videoConfig.orientationHint = 90; videoConfig.rotation = 90;
let videoRecorder = null; let videoRecorder = null;
let mySteps = new Array(CREATE_EVENT, PREPARE_EVENT, GETSURFACE_EVENT, let mySteps = new Array(CREATE_EVENT, PREPARE_EVENT, GETSURFACE_EVENT,
START_EVENT, RELEASE_EVENT, END_EVENT); START_EVENT, RELEASE_EVENT, END_EVENT);
...@@ -746,7 +746,7 @@ describe('VideoRecorderFuncCallbackTest', function () { ...@@ -746,7 +746,7 @@ describe('VideoRecorderFuncCallbackTest', function () {
/* * /* *
* @tc.number : SUB_MEDIA_VIDEO_RECORDER_FUNCTION_CALLBACK_2000 * @tc.number : SUB_MEDIA_VIDEO_RECORDER_FUNCTION_CALLBACK_2000
* @tc.name : 20.orientationHint 180 (callback) * @tc.name : 20.rotation 180 (callback)
* @tc.desc : Audio recordr control test * @tc.desc : Audio recordr control test
* @tc.size : MediumTest * @tc.size : MediumTest
* @tc.type : Function * @tc.type : Function
...@@ -755,7 +755,7 @@ describe('VideoRecorderFuncCallbackTest', function () { ...@@ -755,7 +755,7 @@ describe('VideoRecorderFuncCallbackTest', function () {
it('SUB_MEDIA_VIDEO_RECORDER_FUNCTION_CALLBACK_2000', 0, async function (done) { it('SUB_MEDIA_VIDEO_RECORDER_FUNCTION_CALLBACK_2000', 0, async function (done) {
await getFd('38.mp4'); await getFd('38.mp4');
videoConfig.url = fdPath; videoConfig.url = fdPath;
videoConfig.orientationHint = 180; videoConfig.rotation = 180;
let videoRecorder = null; let videoRecorder = null;
let mySteps = new Array(CREATE_EVENT, PREPARE_EVENT, GETSURFACE_EVENT, START_EVENT, RELEASE_EVENT, END_EVENT); let mySteps = new Array(CREATE_EVENT, PREPARE_EVENT, GETSURFACE_EVENT, START_EVENT, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoRecorder, mySteps, done); eventEmitter.emit(mySteps[0], videoRecorder, mySteps, done);
...@@ -763,7 +763,7 @@ describe('VideoRecorderFuncCallbackTest', function () { ...@@ -763,7 +763,7 @@ describe('VideoRecorderFuncCallbackTest', function () {
/* * /* *
* @tc.number : SUB_MEDIA_VIDEO_RECORDER_FUNCTION_CALLBACK_2100 * @tc.number : SUB_MEDIA_VIDEO_RECORDER_FUNCTION_CALLBACK_2100
* @tc.name : 21.orientationHint 270 (callback) * @tc.name : 21.rotation 270 (callback)
* @tc.desc : Audio recordr control test * @tc.desc : Audio recordr control test
* @tc.size : MediumTest * @tc.size : MediumTest
* @tc.type : Function * @tc.type : Function
...@@ -772,7 +772,7 @@ describe('VideoRecorderFuncCallbackTest', function () { ...@@ -772,7 +772,7 @@ describe('VideoRecorderFuncCallbackTest', function () {
it('SUB_MEDIA_VIDEO_RECORDER_FUNCTION_CALLBACK_2100', 0, async function (done) { it('SUB_MEDIA_VIDEO_RECORDER_FUNCTION_CALLBACK_2100', 0, async function (done) {
await getFd('39.mp4'); await getFd('39.mp4');
videoConfig.url = fdPath; videoConfig.url = fdPath;
videoConfig.orientationHint = 270; videoConfig.rotation = 270;
let videoRecorder = null; let videoRecorder = null;
let mySteps = new Array(CREATE_EVENT, PREPARE_EVENT, GETSURFACE_EVENT, START_EVENT, RELEASE_EVENT, END_EVENT); let mySteps = new Array(CREATE_EVENT, PREPARE_EVENT, GETSURFACE_EVENT, START_EVENT, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoRecorder, mySteps, done); eventEmitter.emit(mySteps[0], videoRecorder, mySteps, done);
......
/* /*
* Copyright (C) 2022 Huawei Device Co., Ltd. * Copyright (C) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the 'License'); * Licensed under the Apache License, Version 2.0 (the 'License');
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
...@@ -46,7 +46,7 @@ describe('VideoRecorderFuncPromiseTest', function () { ...@@ -46,7 +46,7 @@ describe('VideoRecorderFuncPromiseTest', function () {
videoSourceType : 0, videoSourceType : 0,
profile : configFile, profile : configFile,
url : 'file:///data/media/01.mp4', url : 'file:///data/media/01.mp4',
orientationHint : 0, rotation : 0,
location : { latitude : 30, longitude : 130 }, location : { latitude : 30, longitude : 130 },
maxSize : 100, maxSize : 100,
maxDuration : 500 maxDuration : 500
...@@ -66,7 +66,7 @@ describe('VideoRecorderFuncPromiseTest', function () { ...@@ -66,7 +66,7 @@ describe('VideoRecorderFuncPromiseTest', function () {
videoSourceType : 0, videoSourceType : 0,
profile : onlyVideoProfile, profile : onlyVideoProfile,
url : 'file:///data/media/01.mp4', url : 'file:///data/media/01.mp4',
orientationHint : 0, rotation : 0,
location : { latitude : 30, longitude : 130 }, location : { latitude : 30, longitude : 130 },
maxSize : 100, maxSize : 100,
maxDuration : 500 maxDuration : 500
...@@ -1263,7 +1263,7 @@ describe('VideoRecorderFuncPromiseTest', function () { ...@@ -1263,7 +1263,7 @@ describe('VideoRecorderFuncPromiseTest', function () {
/* * /* *
* @tc.number : SUB_MEDIA_VIDEO_RECORDER_FUNCTION_PROMISE_1900 * @tc.number : SUB_MEDIA_VIDEO_RECORDER_FUNCTION_PROMISE_1900
* @tc.name : 19.orientationHint 90 (promise) * @tc.name : 19.rotation 90 (promise)
* @tc.desc : Audio recordr control test * @tc.desc : Audio recordr control test
* @tc.size : MediumTest * @tc.size : MediumTest
* @tc.type : Function * @tc.type : Function
...@@ -1275,7 +1275,7 @@ describe('VideoRecorderFuncPromiseTest', function () { ...@@ -1275,7 +1275,7 @@ describe('VideoRecorderFuncPromiseTest', function () {
let videoOutput; let videoOutput;
await getFd('40.mp4'); await getFd('40.mp4');
videoConfig.url = fdPath; videoConfig.url = fdPath;
videoConfig.orientationHint = 90; videoConfig.rotation = 90;
await media.createVideoRecorder().then((recorder) => { await media.createVideoRecorder().then((recorder) => {
console.info('case createVideoRecorder called'); console.info('case createVideoRecorder called');
if (typeof (recorder) != 'undefined') { if (typeof (recorder) != 'undefined') {
...@@ -1312,7 +1312,7 @@ describe('VideoRecorderFuncPromiseTest', function () { ...@@ -1312,7 +1312,7 @@ describe('VideoRecorderFuncPromiseTest', function () {
/* * /* *
* @tc.number : SUB_MEDIA_VIDEO_RECORDER_FUNCTION_PROMISE_2000 * @tc.number : SUB_MEDIA_VIDEO_RECORDER_FUNCTION_PROMISE_2000
* @tc.name : 20.orientationHint 180 (promise) * @tc.name : 20.rotation 180 (promise)
* @tc.desc : Audio recordr control test * @tc.desc : Audio recordr control test
* @tc.size : MediumTest * @tc.size : MediumTest
* @tc.type : Function * @tc.type : Function
...@@ -1324,7 +1324,7 @@ describe('VideoRecorderFuncPromiseTest', function () { ...@@ -1324,7 +1324,7 @@ describe('VideoRecorderFuncPromiseTest', function () {
let videoOutput; let videoOutput;
await getFd('41.mp4'); await getFd('41.mp4');
videoConfig.url = fdPath; videoConfig.url = fdPath;
videoConfig.orientationHint = 180; videoConfig.rotation = 180;
await media.createVideoRecorder().then((recorder) => { await media.createVideoRecorder().then((recorder) => {
console.info('case createVideoRecorder called'); console.info('case createVideoRecorder called');
if (typeof (recorder) != 'undefined') { if (typeof (recorder) != 'undefined') {
...@@ -1361,7 +1361,7 @@ describe('VideoRecorderFuncPromiseTest', function () { ...@@ -1361,7 +1361,7 @@ describe('VideoRecorderFuncPromiseTest', function () {
/* * /* *
* @tc.number : SUB_MEDIA_VIDEO_RECORDER_FUNCTION_PROMISE_2100 * @tc.number : SUB_MEDIA_VIDEO_RECORDER_FUNCTION_PROMISE_2100
* @tc.name : 21.orientationHint 270 (promise) * @tc.name : 21.rotation 270 (promise)
* @tc.desc : Audio recordr control test * @tc.desc : Audio recordr control test
* @tc.size : MediumTest * @tc.size : MediumTest
* @tc.type : Function * @tc.type : Function
...@@ -1373,7 +1373,7 @@ describe('VideoRecorderFuncPromiseTest', function () { ...@@ -1373,7 +1373,7 @@ describe('VideoRecorderFuncPromiseTest', function () {
let videoOutput; let videoOutput;
await getFd('42.mp4'); await getFd('42.mp4');
videoConfig.url = fdPath; videoConfig.url = fdPath;
videoConfig.orientationHint = 270; videoConfig.rotation = 270;
await media.createVideoRecorder().then((recorder) => { await media.createVideoRecorder().then((recorder) => {
console.info('case createVideoRecorder called'); console.info('case createVideoRecorder called');
if (typeof (recorder) != 'undefined') { if (typeof (recorder) != 'undefined') {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册