From 7362b1d7ab52b28176df2703cd58a7522ea52842 Mon Sep 17 00:00:00 2001 From: ling990 Date: Mon, 14 Mar 2022 15:18:11 +0800 Subject: [PATCH] modify testcases Signed-off-by: ling990 Signed-off-by: ling990 --- .../media_js_standard/audioDecoder/Test.json | 20 +++++++++---------- .../media_js_standard/audioEncoder/Test.json | 20 +++++++++---------- .../media_js_standard/audioPlayer/BUILD.gn | 2 +- .../media_js_standard/audioPlayer/Test.json | 16 +++++++-------- .../audio/audioplayer/MainAbility.java | 2 +- .../audio/audioplayer/MyApplication.java | 2 +- .../audioPlayer/src/main/js/default/app.js | 2 +- .../src/main/js/default/pages/index/index.css | 15 -------------- .../src/main/js/default/pages/index/index.hml | 15 -------------- .../src/main/js/default/pages/index/index.js | 2 +- .../audioPlayer/src/main/js/test/List.test.js | 2 +- .../js/test/PlayerLocalTestAudioAPI.test.js | 2 +- .../js/test/PlayerLocalTestAudioFUNC.test.js | 2 +- .../test/PlayerLocalTestAudioFormat.test.js | 2 +- .../media_js_standard/audioRecorder/BUILD.gn | 2 +- .../audio/audioplayer/MainAbility.java | 2 +- .../audio/audioplayer/MyApplication.java | 2 +- .../audioRecorder/src/main/js/default/app.js | 2 +- .../src/main/js/default/pages/index/index.css | 15 -------------- .../src/main/js/default/pages/index/index.hml | 15 -------------- .../src/main/js/default/pages/index/index.js | 2 +- .../js/test/AudioRecorderEnumTest.test.js | 2 +- .../src/main/js/test/List.test.js | 2 +- .../js/test/RecorderLocalTestAudioAPI.test.js | 7 +++---- .../test/RecorderLocalTestAudioFUNC.test.js | 2 +- .../media_js_standard/videoDecoder/Test.json | 20 +++++++++---------- .../main/js/test/VideoDecoderEnumTest.test.js | 2 +- .../test/VideoDecoderFuncPromiseTest.test.js | 10 +++++----- .../media_js_standard/videoEncoder/Test.json | 20 +++++++++---------- .../VideoEncoderMultiInstancesTest.test.js | 8 ++++---- .../media_js_standard/videoPlayer/BUILD.gn | 4 ++-- .../media_js_standard/videoPlayer/Test.json | 16 +++++++-------- .../videoPlayer/src/main/js/default/app.js | 2 +- .../src/main/js/default/pages/index/index.css | 15 -------------- .../src/main/js/default/pages/index/index.hml | 15 -------------- .../src/main/js/default/pages/index/index.js | 2 +- .../videoPlayer/src/main/js/test/List.test.js | 2 +- .../test/VideoPlayerAPICallbackTest.test.js | 2 +- .../main/js/test/VideoPlayerEnumTest.test.js | 2 +- .../test/VideoPlayerFuncCallbackTest.test.js | 2 +- .../test/VideoPlayerFuncPromiseTest.test.js | 2 +- .../media_js_standard/videoRecorder/BUILD.gn | 4 ++-- .../media_js_standard/videoRecorder/Test.json | 4 ++-- .../videoRecorder/src/main/js/default/app.js | 2 +- .../src/main/js/default/pages/index/index.css | 15 -------------- .../src/main/js/default/pages/index/index.hml | 15 -------------- .../src/main/js/default/pages/index/index.js | 2 +- .../src/main/js/test/List.test.js | 2 +- .../test/VideoRecorderAPICallbackTest.test.js | 2 +- .../VideoRecorderFuncCallbackTest.test.js | 20 +++++++++---------- .../test/VideoRecorderFuncPromiseTest.test.js | 18 ++++++++--------- 51 files changed, 122 insertions(+), 243 deletions(-) diff --git a/multimedia/media/media_js_standard/audioDecoder/Test.json b/multimedia/media/media_js_standard/audioDecoder/Test.json index e25486fa9..cedb3b5ec 100644 --- a/multimedia/media/media_js_standard/audioDecoder/Test.json +++ b/multimedia/media/media_js_standard/audioDecoder/Test.json @@ -4,9 +4,16 @@ "type": "JSUnitTest", "test-timeout": "2000000", "package": "ohos.acts.multimedia.audio.audiodecoder", - "shell-timeout": "60000" + "shell-timeout": "60000" }, "kits": [ + { + "test-file-name": [ + "ActsAudioDecoderJsTest.hap" + ], + "type": "AppInstallKit", + "cleanup-apps": true + }, { "type": "PushKit", "pre-push": [ @@ -19,7 +26,7 @@ "./resource/audio/audioDecode/vorbis.es ->/data/accounts/account_0/appdata/ohos.acts.multimedia.audio.audiodecoder/" ] }, - { + { "type": "ShellKit", "run-command": [ "rm -R /data/accounts/account_0/appdata/ohos.acts.multimedia.audio.audiodecoder/results", @@ -29,13 +36,6 @@ ], "teardown-command":[ ] - }, - { - "test-file-name": [ - "ActsAudioDecoderJsTest.hap" - ], - "type": "AppInstallKit", - "cleanup-apps": true } ] -} +} \ No newline at end of file diff --git a/multimedia/media/media_js_standard/audioEncoder/Test.json b/multimedia/media/media_js_standard/audioEncoder/Test.json index dea08584c..62300221e 100644 --- a/multimedia/media/media_js_standard/audioEncoder/Test.json +++ b/multimedia/media/media_js_standard/audioEncoder/Test.json @@ -4,9 +4,16 @@ "type": "JSUnitTest", "test-timeout": "2000000", "package": "ohos.acts.multimedia.audio.audioencoder", - "shell-timeout": "60000" + "shell-timeout": "60000" }, "kits": [ + { + "test-file-name": [ + "ActsAudioEncoderJsTest.hap" + ], + "type": "AppInstallKit", + "cleanup-apps": true + }, { "type": "PushKit", "pre-push": [ @@ -16,7 +23,7 @@ "./resource/audio/audioEncode/S32LE_2.pcm ->/data/accounts/account_0/appdata/ohos.acts.multimedia.audio.audioencoder/" ] }, - { + { "type": "ShellKit", "run-command": [ "rm -R /data/accounts/account_0/appdata/ohos.acts.multimedia.audio.audioencoder/results", @@ -26,13 +33,6 @@ ], "teardown-command":[ ] - }, - { - "test-file-name": [ - "ActsAudioEncoderJsTest.hap" - ], - "type": "AppInstallKit", - "cleanup-apps": true } ] -} +} \ No newline at end of file diff --git a/multimedia/media/media_js_standard/audioPlayer/BUILD.gn b/multimedia/media/media_js_standard/audioPlayer/BUILD.gn index 5b1d783ea..9bad2266c 100644 --- a/multimedia/media/media_js_standard/audioPlayer/BUILD.gn +++ b/multimedia/media/media_js_standard/audioPlayer/BUILD.gn @@ -1,4 +1,4 @@ -# 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"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at diff --git a/multimedia/media/media_js_standard/audioPlayer/Test.json b/multimedia/media/media_js_standard/audioPlayer/Test.json index ddb68ab09..8d705ef06 100644 --- a/multimedia/media/media_js_standard/audioPlayer/Test.json +++ b/multimedia/media/media_js_standard/audioPlayer/Test.json @@ -2,11 +2,18 @@ "description": "Configuration for audioPlayer Tests", "driver": { "type": "JSUnitTest", - "test-timeout": "120000", + "test-timeout": "2000000", "package": "ohos.acts.multimedia.audio.audioplayer", "shell-timeout": "60000" }, "kits": [ + { + "test-file-name": [ + "ActsAudioPlayerJsTest.hap" + ], + "type": "AppInstallKit", + "cleanup-apps": true + }, { "type": "PushKit", "pre-push": [ @@ -44,13 +51,6 @@ ], "teardown-command":[ ] - }, - { - "test-file-name": [ - "ActsAudioPlayerJsTest.hap" - ], - "type": "AppInstallKit", - "cleanup-apps": true } ] } diff --git a/multimedia/media/media_js_standard/audioPlayer/src/main/java/ohos/acts/multimedia/audio/audioplayer/MainAbility.java b/multimedia/media/media_js_standard/audioPlayer/src/main/java/ohos/acts/multimedia/audio/audioplayer/MainAbility.java index c3adacfc7..84cb3efd1 100644 --- a/multimedia/media/media_js_standard/audioPlayer/src/main/java/ohos/acts/multimedia/audio/audioplayer/MainAbility.java +++ b/multimedia/media/media_js_standard/audioPlayer/src/main/java/ohos/acts/multimedia/audio/audioplayer/MainAbility.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2022 Huawei Device Co., Ltd. + * 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 diff --git a/multimedia/media/media_js_standard/audioPlayer/src/main/java/ohos/acts/multimedia/audio/audioplayer/MyApplication.java b/multimedia/media/media_js_standard/audioPlayer/src/main/java/ohos/acts/multimedia/audio/audioplayer/MyApplication.java index 956bc8897..a735d0a33 100644 --- a/multimedia/media/media_js_standard/audioPlayer/src/main/java/ohos/acts/multimedia/audio/audioplayer/MyApplication.java +++ b/multimedia/media/media_js_standard/audioPlayer/src/main/java/ohos/acts/multimedia/audio/audioplayer/MyApplication.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2022 Huawei Device Co., Ltd. + * 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 diff --git a/multimedia/media/media_js_standard/audioPlayer/src/main/js/default/app.js b/multimedia/media/media_js_standard/audioPlayer/src/main/js/default/app.js index dab1e8146..e423f4bce 100644 --- a/multimedia/media/media_js_standard/audioPlayer/src/main/js/default/app.js +++ b/multimedia/media/media_js_standard/audioPlayer/src/main/js/default/app.js @@ -1,5 +1,5 @@ /* - * 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"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/multimedia/media/media_js_standard/audioPlayer/src/main/js/default/pages/index/index.css b/multimedia/media/media_js_standard/audioPlayer/src/main/js/default/pages/index/index.css index 9fbc8868a..5bd756702 100644 --- a/multimedia/media/media_js_standard/audioPlayer/src/main/js/default/pages/index/index.css +++ b/multimedia/media/media_js_standard/audioPlayer/src/main/js/default/pages/index/index.css @@ -1,18 +1,3 @@ -/* - * 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 { flex-direction: column; justify-content: center; diff --git a/multimedia/media/media_js_standard/audioPlayer/src/main/js/default/pages/index/index.hml b/multimedia/media/media_js_standard/audioPlayer/src/main/js/default/pages/index/index.hml index e886a71e3..f64b040a5 100644 --- a/multimedia/media/media_js_standard/audioPlayer/src/main/js/default/pages/index/index.hml +++ b/multimedia/media/media_js_standard/audioPlayer/src/main/js/default/pages/index/index.hml @@ -1,18 +1,3 @@ - -
{{ $t('strings.hello') }} {{ title }} diff --git a/multimedia/media/media_js_standard/audioPlayer/src/main/js/default/pages/index/index.js b/multimedia/media/media_js_standard/audioPlayer/src/main/js/default/pages/index/index.js index fe1249a61..a0719cee5 100644 --- a/multimedia/media/media_js_standard/audioPlayer/src/main/js/default/pages/index/index.js +++ b/multimedia/media/media_js_standard/audioPlayer/src/main/js/default/pages/index/index.js @@ -1,5 +1,5 @@ /* - * 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"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/multimedia/media/media_js_standard/audioPlayer/src/main/js/test/List.test.js b/multimedia/media/media_js_standard/audioPlayer/src/main/js/test/List.test.js index e5393d50d..7ac6af3fe 100644 --- a/multimedia/media/media_js_standard/audioPlayer/src/main/js/test/List.test.js +++ b/multimedia/media/media_js_standard/audioPlayer/src/main/js/test/List.test.js @@ -1,5 +1,5 @@ /* - * 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"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/multimedia/media/media_js_standard/audioPlayer/src/main/js/test/PlayerLocalTestAudioAPI.test.js b/multimedia/media/media_js_standard/audioPlayer/src/main/js/test/PlayerLocalTestAudioAPI.test.js index 8c430d985..859f90b13 100644 --- a/multimedia/media/media_js_standard/audioPlayer/src/main/js/test/PlayerLocalTestAudioAPI.test.js +++ b/multimedia/media/media_js_standard/audioPlayer/src/main/js/test/PlayerLocalTestAudioAPI.test.js @@ -1,5 +1,5 @@ /* - * 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"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/multimedia/media/media_js_standard/audioPlayer/src/main/js/test/PlayerLocalTestAudioFUNC.test.js b/multimedia/media/media_js_standard/audioPlayer/src/main/js/test/PlayerLocalTestAudioFUNC.test.js index f689bd128..801d08eb4 100644 --- a/multimedia/media/media_js_standard/audioPlayer/src/main/js/test/PlayerLocalTestAudioFUNC.test.js +++ b/multimedia/media/media_js_standard/audioPlayer/src/main/js/test/PlayerLocalTestAudioFUNC.test.js @@ -1,5 +1,5 @@ /* - * 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"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/multimedia/media/media_js_standard/audioPlayer/src/main/js/test/PlayerLocalTestAudioFormat.test.js b/multimedia/media/media_js_standard/audioPlayer/src/main/js/test/PlayerLocalTestAudioFormat.test.js index 02074a017..1582a5c86 100644 --- a/multimedia/media/media_js_standard/audioPlayer/src/main/js/test/PlayerLocalTestAudioFormat.test.js +++ b/multimedia/media/media_js_standard/audioPlayer/src/main/js/test/PlayerLocalTestAudioFormat.test.js @@ -1,5 +1,5 @@ /* - * 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"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/multimedia/media/media_js_standard/audioRecorder/BUILD.gn b/multimedia/media/media_js_standard/audioRecorder/BUILD.gn index b641f9f7e..a91e5e187 100644 --- a/multimedia/media/media_js_standard/audioRecorder/BUILD.gn +++ b/multimedia/media/media_js_standard/audioRecorder/BUILD.gn @@ -1,4 +1,4 @@ -# 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"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at diff --git a/multimedia/media/media_js_standard/audioRecorder/src/main/java/ohos/acts/multimedia/audio/audioplayer/MainAbility.java b/multimedia/media/media_js_standard/audioRecorder/src/main/java/ohos/acts/multimedia/audio/audioplayer/MainAbility.java index c3adacfc7..84cb3efd1 100644 --- a/multimedia/media/media_js_standard/audioRecorder/src/main/java/ohos/acts/multimedia/audio/audioplayer/MainAbility.java +++ b/multimedia/media/media_js_standard/audioRecorder/src/main/java/ohos/acts/multimedia/audio/audioplayer/MainAbility.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2022 Huawei Device Co., Ltd. + * 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 diff --git a/multimedia/media/media_js_standard/audioRecorder/src/main/java/ohos/acts/multimedia/audio/audioplayer/MyApplication.java b/multimedia/media/media_js_standard/audioRecorder/src/main/java/ohos/acts/multimedia/audio/audioplayer/MyApplication.java index 956bc8897..a735d0a33 100644 --- a/multimedia/media/media_js_standard/audioRecorder/src/main/java/ohos/acts/multimedia/audio/audioplayer/MyApplication.java +++ b/multimedia/media/media_js_standard/audioRecorder/src/main/java/ohos/acts/multimedia/audio/audioplayer/MyApplication.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2022 Huawei Device Co., Ltd. + * 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 diff --git a/multimedia/media/media_js_standard/audioRecorder/src/main/js/default/app.js b/multimedia/media/media_js_standard/audioRecorder/src/main/js/default/app.js index dab1e8146..e423f4bce 100644 --- a/multimedia/media/media_js_standard/audioRecorder/src/main/js/default/app.js +++ b/multimedia/media/media_js_standard/audioRecorder/src/main/js/default/app.js @@ -1,5 +1,5 @@ /* - * 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"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/multimedia/media/media_js_standard/audioRecorder/src/main/js/default/pages/index/index.css b/multimedia/media/media_js_standard/audioRecorder/src/main/js/default/pages/index/index.css index 9fbc8868a..5bd756702 100644 --- a/multimedia/media/media_js_standard/audioRecorder/src/main/js/default/pages/index/index.css +++ b/multimedia/media/media_js_standard/audioRecorder/src/main/js/default/pages/index/index.css @@ -1,18 +1,3 @@ -/* - * 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 { flex-direction: column; justify-content: center; diff --git a/multimedia/media/media_js_standard/audioRecorder/src/main/js/default/pages/index/index.hml b/multimedia/media/media_js_standard/audioRecorder/src/main/js/default/pages/index/index.hml index e886a71e3..f64b040a5 100644 --- a/multimedia/media/media_js_standard/audioRecorder/src/main/js/default/pages/index/index.hml +++ b/multimedia/media/media_js_standard/audioRecorder/src/main/js/default/pages/index/index.hml @@ -1,18 +1,3 @@ - -
{{ $t('strings.hello') }} {{ title }} diff --git a/multimedia/media/media_js_standard/audioRecorder/src/main/js/default/pages/index/index.js b/multimedia/media/media_js_standard/audioRecorder/src/main/js/default/pages/index/index.js index fe1249a61..a0719cee5 100644 --- a/multimedia/media/media_js_standard/audioRecorder/src/main/js/default/pages/index/index.js +++ b/multimedia/media/media_js_standard/audioRecorder/src/main/js/default/pages/index/index.js @@ -1,5 +1,5 @@ /* - * 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"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/multimedia/media/media_js_standard/audioRecorder/src/main/js/test/AudioRecorderEnumTest.test.js b/multimedia/media/media_js_standard/audioRecorder/src/main/js/test/AudioRecorderEnumTest.test.js index 25073b11e..6b6f59b96 100644 --- a/multimedia/media/media_js_standard/audioRecorder/src/main/js/test/AudioRecorderEnumTest.test.js +++ b/multimedia/media/media_js_standard/audioRecorder/src/main/js/test/AudioRecorderEnumTest.test.js @@ -1,5 +1,5 @@ /* - * Copyright (C) 2022 Huawei Device Co., Ltd. + * 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 diff --git a/multimedia/media/media_js_standard/audioRecorder/src/main/js/test/List.test.js b/multimedia/media/media_js_standard/audioRecorder/src/main/js/test/List.test.js index fcb3354f0..12ac9395c 100644 --- a/multimedia/media/media_js_standard/audioRecorder/src/main/js/test/List.test.js +++ b/multimedia/media/media_js_standard/audioRecorder/src/main/js/test/List.test.js @@ -1,5 +1,5 @@ /* - * 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"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/multimedia/media/media_js_standard/audioRecorder/src/main/js/test/RecorderLocalTestAudioAPI.test.js b/multimedia/media/media_js_standard/audioRecorder/src/main/js/test/RecorderLocalTestAudioAPI.test.js index 712f1feaa..0d624cf30 100644 --- a/multimedia/media/media_js_standard/audioRecorder/src/main/js/test/RecorderLocalTestAudioAPI.test.js +++ b/multimedia/media/media_js_standard/audioRecorder/src/main/js/test/RecorderLocalTestAudioAPI.test.js @@ -1,5 +1,5 @@ /* - * 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"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -216,9 +216,7 @@ describe('RecorderLocalTestAudioAPI', function () { * @tc.level : Level2 */ it('SUB_MEDIA_RECORDER_createAudioRecorder_API_0100', 0, async function (done) { - audioConfig.uri = fdPath; - let testAudioRecorder; - expect(testAudioRecorder).assertNull(); + let testAudioRecorder = undefined; testAudioRecorder= media.createAudioRecorder(); expect(testAudioRecorder != undefined).assertTrue(); done(); @@ -233,6 +231,7 @@ describe('RecorderLocalTestAudioAPI', function () { * @tc.level : Level2 */ it('SUB_MEDIA_RECORDER_AudioRecorder_Prepare_API_0100', 0, async function (done) { + audioConfig.uri = fdPath; let testAudioRecorder= media.createAudioRecorder(); expect(testAudioRecorder != null).assertTrue(); testAudioRecorder.prepare(audioConfig); diff --git a/multimedia/media/media_js_standard/audioRecorder/src/main/js/test/RecorderLocalTestAudioFUNC.test.js b/multimedia/media/media_js_standard/audioRecorder/src/main/js/test/RecorderLocalTestAudioFUNC.test.js index e88bfb7f1..01c912119 100644 --- a/multimedia/media/media_js_standard/audioRecorder/src/main/js/test/RecorderLocalTestAudioFUNC.test.js +++ b/multimedia/media/media_js_standard/audioRecorder/src/main/js/test/RecorderLocalTestAudioFUNC.test.js @@ -1,5 +1,5 @@ /* - * 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"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/multimedia/media/media_js_standard/videoDecoder/Test.json b/multimedia/media/media_js_standard/videoDecoder/Test.json index 1597d451a..38d998cd6 100644 --- a/multimedia/media/media_js_standard/videoDecoder/Test.json +++ b/multimedia/media/media_js_standard/videoDecoder/Test.json @@ -4,9 +4,16 @@ "type": "JSUnitTest", "test-timeout": "2000000", "package": "ohos.acts.multimedia.video.videodecoder", - "shell-timeout": "60000" + "shell-timeout": "60000" }, "kits": [ + { + "test-file-name": [ + "ActsVideoDecoderJsTest.hap" + ], + "type": "AppInstallKit", + "cleanup-apps": true + }, { "type": "PushKit", "pre-push": [ @@ -19,20 +26,13 @@ "./resource/media/es/out_320_240_10s.h264 ->/data/accounts/account_0/appdata/ohos.acts.multimedia.video.videodecoder/shared/" ] }, - { + { "type": "ShellKit", "run-command": [ "mkdir -p /data/accounts/account_0/appdata/ohos.acts.multimedia.video.videodecoder/shared/" ], "teardown-command":[ ] - }, - { - "test-file-name": [ - "ActsVideoDecoderJsTest.hap" - ], - "type": "AppInstallKit", - "cleanup-apps": true } ] -} +} \ No newline at end of file diff --git a/multimedia/media/media_js_standard/videoDecoder/src/main/js/test/VideoDecoderEnumTest.test.js b/multimedia/media/media_js_standard/videoDecoder/src/main/js/test/VideoDecoderEnumTest.test.js index 5537ee327..b04ed42ac 100644 --- a/multimedia/media/media_js_standard/videoDecoder/src/main/js/test/VideoDecoderEnumTest.test.js +++ b/multimedia/media/media_js_standard/videoDecoder/src/main/js/test/VideoDecoderEnumTest.test.js @@ -183,7 +183,7 @@ describe('VideoDecoderEnum', function () { return; } frameCountOut++; - await videoDecodeProcessor.renderOutputData(outputObject).then(() => { + await videoDecodeProcessor.freeOutputBuffer(outputObject).then(() => { console.log('in case: release output count:' + frameCountOut); }, failCallback).catch(failCatch); } diff --git a/multimedia/media/media_js_standard/videoDecoder/src/main/js/test/VideoDecoderFuncPromiseTest.test.js b/multimedia/media/media_js_standard/videoDecoder/src/main/js/test/VideoDecoderFuncPromiseTest.test.js index 8c96c5b49..1d38876b6 100644 --- a/multimedia/media/media_js_standard/videoDecoder/src/main/js/test/VideoDecoderFuncPromiseTest.test.js +++ b/multimedia/media/media_js_standard/videoDecoder/src/main/js/test/VideoDecoderFuncPromiseTest.test.js @@ -437,8 +437,8 @@ describe('VideoDecoderFuncPromiseTest', function () { /* * * @tc.number : SUB_MEDIA_VIDEO_DECODER_MULTIINSTANCE_PROMISE_0100 - * @tc.name : 001.creat 16 video decoder - * @tc.desc : creat 16 video decoder + * @tc.name : 001.creat multiple video decoders + * @tc.desc : creat multiple video decoders * @tc.size : MediumTest * @tc.type : Function test * @tc.level : Level0 @@ -458,7 +458,7 @@ describe('VideoDecoderFuncPromiseTest', function () { } let array = new Array(); eventEmitter.on('releaseAllDecoder', async () => { - for (let j = 0; j < 15; j++) { + for (let j = 0; j < 3; j++) { await array[j].release().then(() => { array[j] = null; }, failCallback).catch(failCatch); @@ -469,11 +469,11 @@ describe('VideoDecoderFuncPromiseTest', function () { videoDecodeProcessor = null; done(); }) - for (let i = 0; i < 16; i++) { + for (let i = 0; i < 3; i++) { await media.createVideoDecoderByMime('video/avc').then((processor) => { if (typeof (processor) != 'undefined') { console.info('in case : createVideoDecoderByMime success'); - if (i == 15) { + if (i == 2) { videoDecodeProcessor = processor; } else { array[i] = processor; diff --git a/multimedia/media/media_js_standard/videoEncoder/Test.json b/multimedia/media/media_js_standard/videoEncoder/Test.json index 205dd92ef..15a97d265 100644 --- a/multimedia/media/media_js_standard/videoEncoder/Test.json +++ b/multimedia/media/media_js_standard/videoEncoder/Test.json @@ -4,9 +4,16 @@ "type": "JSUnitTest", "test-timeout": "2000000", "package": "ohos.acts.multimedia.video.videoencoder", - "shell-timeout": "60000" + "shell-timeout": "60000" }, "kits": [ + { + "test-file-name": [ + "ActsVideoEncoderJsTest.hap" + ], + "type": "AppInstallKit", + "cleanup-apps": true + }, { "type": "PushKit", "pre-push": [ @@ -14,7 +21,7 @@ "push": [ ] }, - { + { "type": "ShellKit", "run-command": [ "rm -R /data/accounts/account_0/appdata/ohos.acts.multimedia.video.videoencoder/results", @@ -24,13 +31,6 @@ ], "teardown-command":[ ] - }, - { - "test-file-name": [ - "ActsVideoEncoderJsTest.hap" - ], - "type": "AppInstallKit", - "cleanup-apps": true } ] -} +} \ No newline at end of file diff --git a/multimedia/media/media_js_standard/videoEncoder/src/main/js/test/VideoEncoderMultiInstancesTest.test.js b/multimedia/media/media_js_standard/videoEncoder/src/main/js/test/VideoEncoderMultiInstancesTest.test.js index 6623b1e93..383500418 100644 --- a/multimedia/media/media_js_standard/videoEncoder/src/main/js/test/VideoEncoderMultiInstancesTest.test.js +++ b/multimedia/media/media_js_standard/videoEncoder/src/main/js/test/VideoEncoderMultiInstancesTest.test.js @@ -262,7 +262,7 @@ describe('videoEncoderSoftwareMultiInstances', function () { /* * * @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.size : MediumTest * @tc.type : Function test @@ -284,7 +284,7 @@ describe('videoEncoderSoftwareMultiInstances', function () { let array = new Array(); eventEmitter.once('nextStep', async () => { - for (let j = 1; j < 16; j++) { + for (let j = 1; j < 3; j++) { await array[j].release().then(() => { console.info("case release encoder " + j); array[j] = null; @@ -303,11 +303,11 @@ describe('videoEncoderSoftwareMultiInstances', function () { toStartStream(); await toStart(); } - for (let i = 1; i <= 16; i += 1) { + for (let i = 1; i <= 3; i += 1) { await media.createVideoEncoderByMime(mime).then((processor) => { if (typeof(processor) != 'undefined') { console.info("case create createVideoEncoder success: " + i); - if (i == 16) { + if (i == 3) { videoEncodeProcessor = processor; runCase(); } else { diff --git a/multimedia/media/media_js_standard/videoPlayer/BUILD.gn b/multimedia/media/media_js_standard/videoPlayer/BUILD.gn index 2798964f1..95e552cd2 100644 --- a/multimedia/media/media_js_standard/videoPlayer/BUILD.gn +++ b/multimedia/media/media_js_standard/videoPlayer/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (C) 2022 Huawei Device Co., Ltd. +# 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 @@ -26,7 +26,7 @@ ohos_js_hap_suite("video_player_js_hap") { # "//third_party/libpng:libpng", # ] certificate_profile = "./signature/openharmony_sx.p7b" - hap_name = "VideoPlayerJsTest" + hap_name = "ActsVideoPlayerJsTest" # part_name = "prebuilt_hap" # subsystem_name = "xts" diff --git a/multimedia/media/media_js_standard/videoPlayer/Test.json b/multimedia/media/media_js_standard/videoPlayer/Test.json index 38a50cf8a..093ca77fb 100644 --- a/multimedia/media/media_js_standard/videoPlayer/Test.json +++ b/multimedia/media/media_js_standard/videoPlayer/Test.json @@ -7,6 +7,13 @@ "shell-timeout": "60000" }, "kits": [ + { + "test-file-name": [ + "ActsVideoPlayerJsTest.hap" + ], + "type": "AppInstallKit", + "cleanup-apps": true + }, { "type": "PushKit", "pre-push": [ @@ -15,19 +22,12 @@ "./resource/audio/H264_AAC.mp4 ->/data/accounts/account_0/appdata/ohos.acts.multimedia.video.videoplayer/" ] }, - { + { "type": "ShellKit", "run-command": [ ], "teardown-command":[ ] - }, - { - "test-file-name": [ - "VideoPlayerJsTest.hap" - ], - "type": "AppInstallKit", - "cleanup-apps": true } ] } diff --git a/multimedia/media/media_js_standard/videoPlayer/src/main/js/default/app.js b/multimedia/media/media_js_standard/videoPlayer/src/main/js/default/app.js index 830070d19..e423f4bce 100644 --- a/multimedia/media/media_js_standard/videoPlayer/src/main/js/default/app.js +++ b/multimedia/media/media_js_standard/videoPlayer/src/main/js/default/app.js @@ -1,5 +1,5 @@ /* - * Copyright (C) 2022 Huawei Device Co., Ltd. + * 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 diff --git a/multimedia/media/media_js_standard/videoPlayer/src/main/js/default/pages/index/index.css b/multimedia/media/media_js_standard/videoPlayer/src/main/js/default/pages/index/index.css index c9195944a..5bd756702 100644 --- a/multimedia/media/media_js_standard/videoPlayer/src/main/js/default/pages/index/index.css +++ b/multimedia/media/media_js_standard/videoPlayer/src/main/js/default/pages/index/index.css @@ -1,18 +1,3 @@ -/* - * 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 { flex-direction: column; justify-content: center; diff --git a/multimedia/media/media_js_standard/videoPlayer/src/main/js/default/pages/index/index.hml b/multimedia/media/media_js_standard/videoPlayer/src/main/js/default/pages/index/index.hml index 2f5e3fb8a..72f3c770a 100644 --- a/multimedia/media/media_js_standard/videoPlayer/src/main/js/default/pages/index/index.hml +++ b/multimedia/media/media_js_standard/videoPlayer/src/main/js/default/pages/index/index.hml @@ -1,18 +1,3 @@ - -
{{ $t('strings.hello') }} {{ title }} diff --git a/multimedia/media/media_js_standard/videoPlayer/src/main/js/default/pages/index/index.js b/multimedia/media/media_js_standard/videoPlayer/src/main/js/default/pages/index/index.js index 592512fd2..94aded985 100644 --- a/multimedia/media/media_js_standard/videoPlayer/src/main/js/default/pages/index/index.js +++ b/multimedia/media/media_js_standard/videoPlayer/src/main/js/default/pages/index/index.js @@ -1,5 +1,5 @@ /* - * Copyright (C) 2022 Huawei Device Co., Ltd. + * 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 diff --git a/multimedia/media/media_js_standard/videoPlayer/src/main/js/test/List.test.js b/multimedia/media/media_js_standard/videoPlayer/src/main/js/test/List.test.js index cae717499..322b7acdb 100644 --- a/multimedia/media/media_js_standard/videoPlayer/src/main/js/test/List.test.js +++ b/multimedia/media/media_js_standard/videoPlayer/src/main/js/test/List.test.js @@ -1,5 +1,5 @@ /* - * Copyright (C) 2022 Huawei Device Co., Ltd. + * 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 diff --git a/multimedia/media/media_js_standard/videoPlayer/src/main/js/test/VideoPlayerAPICallbackTest.test.js b/multimedia/media/media_js_standard/videoPlayer/src/main/js/test/VideoPlayerAPICallbackTest.test.js index a86b723ee..54786070f 100644 --- a/multimedia/media/media_js_standard/videoPlayer/src/main/js/test/VideoPlayerAPICallbackTest.test.js +++ b/multimedia/media/media_js_standard/videoPlayer/src/main/js/test/VideoPlayerAPICallbackTest.test.js @@ -1,5 +1,5 @@ /* - * Copyright (C) 2022 Huawei Device Co., Ltd. + * 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 diff --git a/multimedia/media/media_js_standard/videoPlayer/src/main/js/test/VideoPlayerEnumTest.test.js b/multimedia/media/media_js_standard/videoPlayer/src/main/js/test/VideoPlayerEnumTest.test.js index 41d2c3469..3ae970e2b 100644 --- a/multimedia/media/media_js_standard/videoPlayer/src/main/js/test/VideoPlayerEnumTest.test.js +++ b/multimedia/media/media_js_standard/videoPlayer/src/main/js/test/VideoPlayerEnumTest.test.js @@ -1,5 +1,5 @@ /* - * Copyright (C) 2022 Huawei Device Co., Ltd. + * 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 diff --git a/multimedia/media/media_js_standard/videoPlayer/src/main/js/test/VideoPlayerFuncCallbackTest.test.js b/multimedia/media/media_js_standard/videoPlayer/src/main/js/test/VideoPlayerFuncCallbackTest.test.js index e21d92d3c..7d1da3e15 100644 --- a/multimedia/media/media_js_standard/videoPlayer/src/main/js/test/VideoPlayerFuncCallbackTest.test.js +++ b/multimedia/media/media_js_standard/videoPlayer/src/main/js/test/VideoPlayerFuncCallbackTest.test.js @@ -1,5 +1,5 @@ /* - * Copyright (C) 2022 Huawei Device Co., Ltd. + * 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 diff --git a/multimedia/media/media_js_standard/videoPlayer/src/main/js/test/VideoPlayerFuncPromiseTest.test.js b/multimedia/media/media_js_standard/videoPlayer/src/main/js/test/VideoPlayerFuncPromiseTest.test.js index 1161dffe5..178a4d150 100644 --- a/multimedia/media/media_js_standard/videoPlayer/src/main/js/test/VideoPlayerFuncPromiseTest.test.js +++ b/multimedia/media/media_js_standard/videoPlayer/src/main/js/test/VideoPlayerFuncPromiseTest.test.js @@ -1,5 +1,5 @@ /* - * Copyright (C) 2022 Huawei Device Co., Ltd. + * 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 diff --git a/multimedia/media/media_js_standard/videoRecorder/BUILD.gn b/multimedia/media/media_js_standard/videoRecorder/BUILD.gn index ffa1ae7e2..4c0c22699 100644 --- a/multimedia/media/media_js_standard/videoRecorder/BUILD.gn +++ b/multimedia/media/media_js_standard/videoRecorder/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (C) 2022 Huawei Device Co., Ltd. +# 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 @@ -24,7 +24,7 @@ ohos_js_hap_suite("video_recorder_js_hap") { # "//third_party/libpng:libpng", # ] certificate_profile = "./signature/openharmony_sx.p7b" - hap_name = "VideoRecorderJsTest" + hap_name = "ActsVideoRecorderJsTest" # part_name = "prebuilt_hap" # subsystem_name = "xts" diff --git a/multimedia/media/media_js_standard/videoRecorder/Test.json b/multimedia/media/media_js_standard/videoRecorder/Test.json index f8008548a..c8c2aac4f 100644 --- a/multimedia/media/media_js_standard/videoRecorder/Test.json +++ b/multimedia/media/media_js_standard/videoRecorder/Test.json @@ -2,7 +2,7 @@ "description": "Configuration for videoRecorder Tests", "driver": { "type": "JSUnitTest", - "test-timeout": "1000000", + "test-timeout": "2000000", "package": "ohos.acts.multimedia.video.videorecorder", "shell-timeout": "60000" }, @@ -16,7 +16,7 @@ }, { "test-file-name": [ - "VideoRecorderJsTest.hap" + "ActsVideoRecorderJsTest.hap" ], "type": "AppInstallKit", "cleanup-apps": true diff --git a/multimedia/media/media_js_standard/videoRecorder/src/main/js/default/app.js b/multimedia/media/media_js_standard/videoRecorder/src/main/js/default/app.js index 830070d19..e423f4bce 100644 --- a/multimedia/media/media_js_standard/videoRecorder/src/main/js/default/app.js +++ b/multimedia/media/media_js_standard/videoRecorder/src/main/js/default/app.js @@ -1,5 +1,5 @@ /* - * Copyright (C) 2022 Huawei Device Co., Ltd. + * 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 diff --git a/multimedia/media/media_js_standard/videoRecorder/src/main/js/default/pages/index/index.css b/multimedia/media/media_js_standard/videoRecorder/src/main/js/default/pages/index/index.css index df9cfd9f9..5bd756702 100644 --- a/multimedia/media/media_js_standard/videoRecorder/src/main/js/default/pages/index/index.css +++ b/multimedia/media/media_js_standard/videoRecorder/src/main/js/default/pages/index/index.css @@ -1,18 +1,3 @@ -/* - * 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 { flex-direction: column; justify-content: center; diff --git a/multimedia/media/media_js_standard/videoRecorder/src/main/js/default/pages/index/index.hml b/multimedia/media/media_js_standard/videoRecorder/src/main/js/default/pages/index/index.hml index 689212399..f64b040a5 100644 --- a/multimedia/media/media_js_standard/videoRecorder/src/main/js/default/pages/index/index.hml +++ b/multimedia/media/media_js_standard/videoRecorder/src/main/js/default/pages/index/index.hml @@ -1,18 +1,3 @@ - -
{{ $t('strings.hello') }} {{ title }} diff --git a/multimedia/media/media_js_standard/videoRecorder/src/main/js/default/pages/index/index.js b/multimedia/media/media_js_standard/videoRecorder/src/main/js/default/pages/index/index.js index 67f8b8567..a0719cee5 100644 --- a/multimedia/media/media_js_standard/videoRecorder/src/main/js/default/pages/index/index.js +++ b/multimedia/media/media_js_standard/videoRecorder/src/main/js/default/pages/index/index.js @@ -1,5 +1,5 @@ /* - * Copyright (C) 2022 Huawei Device Co., Ltd. + * 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 diff --git a/multimedia/media/media_js_standard/videoRecorder/src/main/js/test/List.test.js b/multimedia/media/media_js_standard/videoRecorder/src/main/js/test/List.test.js index 9f6a6e773..b894eaf3c 100644 --- a/multimedia/media/media_js_standard/videoRecorder/src/main/js/test/List.test.js +++ b/multimedia/media/media_js_standard/videoRecorder/src/main/js/test/List.test.js @@ -1,5 +1,5 @@ /* - * Copyright (C) 2022 Huawei Device Co., Ltd. + * 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 diff --git a/multimedia/media/media_js_standard/videoRecorder/src/main/js/test/VideoRecorderAPICallbackTest.test.js b/multimedia/media/media_js_standard/videoRecorder/src/main/js/test/VideoRecorderAPICallbackTest.test.js index cb16d1e41..31020098e 100644 --- a/multimedia/media/media_js_standard/videoRecorder/src/main/js/test/VideoRecorderAPICallbackTest.test.js +++ b/multimedia/media/media_js_standard/videoRecorder/src/main/js/test/VideoRecorderAPICallbackTest.test.js @@ -1,5 +1,5 @@ /* - * Copyright (C) 2022 Huawei Device Co., Ltd. + * 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 diff --git a/multimedia/media/media_js_standard/videoRecorder/src/main/js/test/VideoRecorderFuncCallbackTest.test.js b/multimedia/media/media_js_standard/videoRecorder/src/main/js/test/VideoRecorderFuncCallbackTest.test.js index eb0e015b2..790e3d580 100644 --- a/multimedia/media/media_js_standard/videoRecorder/src/main/js/test/VideoRecorderFuncCallbackTest.test.js +++ b/multimedia/media/media_js_standard/videoRecorder/src/main/js/test/VideoRecorderFuncCallbackTest.test.js @@ -1,5 +1,5 @@ /* - * Copyright (C) 2022 Huawei Device Co., Ltd. + * 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 @@ -55,13 +55,13 @@ describe('VideoRecorderFuncCallbackTest', function () { videoFrameHeight : 480, videoFrameRate : 10 } - // orientationHint 0, 90, 180, 270 + // rotation 0, 90, 180, 270 let videoConfig = { audioSourceType : 1, videoSourceType : 0, profile : configFile, url : 'file:///data/media/01.mp4', - orientationHint : 0, + rotation : 0, location : { latitude : 30, longitude : 130 }, maxSize : 100, maxDuration : 500 @@ -81,7 +81,7 @@ describe('VideoRecorderFuncCallbackTest', function () { videoSourceType : 0, profile : onlyVideoProfile, url : 'file:///data/media/01.mp4', - orientationHint : 0, + rotation : 0, location : { latitude : 30, longitude : 130 }, maxSize : 100, maxDuration : 500 @@ -728,7 +728,7 @@ describe('VideoRecorderFuncCallbackTest', function () { /* * * @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.size : MediumTest * @tc.type : Function @@ -737,7 +737,7 @@ describe('VideoRecorderFuncCallbackTest', function () { it('SUB_MEDIA_VIDEO_RECORDER_FUNCTION_CALLBACK_1900', 0, async function (done) { await getFd('37.mp4'); videoConfig.url = fdPath; - videoConfig.orientationHint = 90; + videoConfig.rotation = 90; let videoRecorder = null; let mySteps = new Array(CREATE_EVENT, PREPARE_EVENT, GETSURFACE_EVENT, START_EVENT, RELEASE_EVENT, END_EVENT); @@ -746,7 +746,7 @@ describe('VideoRecorderFuncCallbackTest', function () { /* * * @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.size : MediumTest * @tc.type : Function @@ -755,7 +755,7 @@ describe('VideoRecorderFuncCallbackTest', function () { it('SUB_MEDIA_VIDEO_RECORDER_FUNCTION_CALLBACK_2000', 0, async function (done) { await getFd('38.mp4'); videoConfig.url = fdPath; - videoConfig.orientationHint = 180; + videoConfig.rotation = 180; let videoRecorder = null; let mySteps = new Array(CREATE_EVENT, PREPARE_EVENT, GETSURFACE_EVENT, START_EVENT, RELEASE_EVENT, END_EVENT); eventEmitter.emit(mySteps[0], videoRecorder, mySteps, done); @@ -763,7 +763,7 @@ describe('VideoRecorderFuncCallbackTest', function () { /* * * @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.size : MediumTest * @tc.type : Function @@ -772,7 +772,7 @@ describe('VideoRecorderFuncCallbackTest', function () { it('SUB_MEDIA_VIDEO_RECORDER_FUNCTION_CALLBACK_2100', 0, async function (done) { await getFd('39.mp4'); videoConfig.url = fdPath; - videoConfig.orientationHint = 270; + videoConfig.rotation = 270; let videoRecorder = null; let mySteps = new Array(CREATE_EVENT, PREPARE_EVENT, GETSURFACE_EVENT, START_EVENT, RELEASE_EVENT, END_EVENT); eventEmitter.emit(mySteps[0], videoRecorder, mySteps, done); diff --git a/multimedia/media/media_js_standard/videoRecorder/src/main/js/test/VideoRecorderFuncPromiseTest.test.js b/multimedia/media/media_js_standard/videoRecorder/src/main/js/test/VideoRecorderFuncPromiseTest.test.js index 62ab24618..c6c98e99b 100644 --- a/multimedia/media/media_js_standard/videoRecorder/src/main/js/test/VideoRecorderFuncPromiseTest.test.js +++ b/multimedia/media/media_js_standard/videoRecorder/src/main/js/test/VideoRecorderFuncPromiseTest.test.js @@ -1,5 +1,5 @@ /* - * Copyright (C) 2022 Huawei Device Co., Ltd. + * 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 @@ -46,7 +46,7 @@ describe('VideoRecorderFuncPromiseTest', function () { videoSourceType : 0, profile : configFile, url : 'file:///data/media/01.mp4', - orientationHint : 0, + rotation : 0, location : { latitude : 30, longitude : 130 }, maxSize : 100, maxDuration : 500 @@ -66,7 +66,7 @@ describe('VideoRecorderFuncPromiseTest', function () { videoSourceType : 0, profile : onlyVideoProfile, url : 'file:///data/media/01.mp4', - orientationHint : 0, + rotation : 0, location : { latitude : 30, longitude : 130 }, maxSize : 100, maxDuration : 500 @@ -1263,7 +1263,7 @@ describe('VideoRecorderFuncPromiseTest', function () { /* * * @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.size : MediumTest * @tc.type : Function @@ -1275,7 +1275,7 @@ describe('VideoRecorderFuncPromiseTest', function () { let videoOutput; await getFd('40.mp4'); videoConfig.url = fdPath; - videoConfig.orientationHint = 90; + videoConfig.rotation = 90; await media.createVideoRecorder().then((recorder) => { console.info('case createVideoRecorder called'); if (typeof (recorder) != 'undefined') { @@ -1312,7 +1312,7 @@ describe('VideoRecorderFuncPromiseTest', function () { /* * * @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.size : MediumTest * @tc.type : Function @@ -1324,7 +1324,7 @@ describe('VideoRecorderFuncPromiseTest', function () { let videoOutput; await getFd('41.mp4'); videoConfig.url = fdPath; - videoConfig.orientationHint = 180; + videoConfig.rotation = 180; await media.createVideoRecorder().then((recorder) => { console.info('case createVideoRecorder called'); if (typeof (recorder) != 'undefined') { @@ -1361,7 +1361,7 @@ describe('VideoRecorderFuncPromiseTest', function () { /* * * @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.size : MediumTest * @tc.type : Function @@ -1373,7 +1373,7 @@ describe('VideoRecorderFuncPromiseTest', function () { let videoOutput; await getFd('42.mp4'); videoConfig.url = fdPath; - videoConfig.orientationHint = 270; + videoConfig.rotation = 270; await media.createVideoRecorder().then((recorder) => { console.info('case createVideoRecorder called'); if (typeof (recorder) != 'undefined') { -- GitLab