提交 a9a68dea 编写于 作者: B bearplusplus

add videoPlayer and videoRecorder xts enumeration testcases...

add videoPlayer and videoRecorder xts enumeration testcases Signed-off-by:bearplusplus<study_bear@foxmail.com>
Signed-off-by: Nbearplusplus <study_bear@foxmail.com>
上级 a1116370
{
}
\ No newline at end of file
......@@ -100,4 +100,71 @@ describe('VideoPlayerEnumTest', function () {
expect(media.BufferingInfoType.CACHED_DURATION).assertEqual(4);
done();
})
/* *
* @tc.number : SUB_MEDIA_VIDEO_PLAYER_ENUM_PLAYBACK_SPEED_00_0100
* @tc.name : PlaybackSpeed
* @tc.desc : PlaybackSpeed Enumeration test
* @tc.size : MediumTest
* @tc.type : Function test
* @tc.level : Level0
*/
it('SUB_MEDIA_VIDEO_PLAYER_ENUM_PLAYBACK_SPEED_00_0100', 0, async function (done) {
expect(media.PlaybackSpeed.SPEED_FORWARD_0_75_X).assertEqual(0);
expect(media.PlaybackSpeed.SPEED_FORWARD_1_00_X).assertEqual(1);
expect(media.PlaybackSpeed.SPEED_FORWARD_1_25_X).assertEqual(2);
expect(media.PlaybackSpeed.SPEED_FORWARD_1_75_X).assertEqual(3);
expect(media.PlaybackSpeed.SPEED_FORWARD_2_00_X).assertEqual(4);
done();
})
/* *
* @tc.number : SUB_MEDIA_VIDEO_PLAYER_ENUM_CONTAINER_FORMAT_TYPE_00_0100
* @tc.name : ContainerFormatType
* @tc.desc : ContainerFormatType Enumeration test
* @tc.size : MediumTest
* @tc.type : Function test
* @tc.level : Level0
*/
it('SUB_MEDIA_VIDEO_PLAYER_ENUM_CONTAINER_FORMAT_TYPE_00_0100', 0, async function (done) {
expect(media.ContainerFormatType.CFT_MPEG_4).assertEqual("mp4");
expect(media.ContainerFormatType.CFT_MPEG_4A).assertEqual("m4a");
done();
})
/* *
* @tc.number : SUB_MEDIA_VIDEO_PLAYER_ENUM_MEDIA_TYPE_00_0100
* @tc.name : MediaType
* @tc.desc : MediaType Enumeration test
* @tc.size : MediumTest
* @tc.type : Function test
* @tc.level : Level0
*/
it('SUB_MEDIA_VIDEO_PLAYER_ENUM_MEDIA_TYPE_00_0100', 0, async function (done) {
expect(media.MediaType.MEDIA_TYPE_AUD).assertEqual(0);
expect(media.MediaType.MEDIA_TYPE_VID).assertEqual(1);
expect(media.MediaType.MEDIA_TYPE_SUBTITLE).assertEqual(2);
done();
})
/* *
* @tc.number : SUB_MEDIA_VIDEO_PLAYER_ENUM_MEDIA_DESCRIPTION_KEY_00_0100
* @tc.name : MediaDescriptionKey
* @tc.desc : MediaDescriptionKey Enumeration test
* @tc.size : MediumTest
* @tc.type : Function test
* @tc.level : Level0
*/
it('SUB_MEDIA_VIDEO_PLAYER_ENUM_MEDIA_DESCRIPTION_KEY_00_0100', 0, async function (done) {
expect(media.MediaDescriptionKey.MD_KEY_TRACK_INDEX).assertEqual("track_index");
expect(media.MediaDescriptionKey.MD_KEY_TRACK_TYPE).assertEqual("track_type");
expect(media.MediaDescriptionKey.MD_KEY_CODEC_MIME).assertEqual("codec_mime");
expect(media.MediaDescriptionKey.MD_KEY_DURATION).assertEqual("duration");
expect(media.MediaDescriptionKey.MD_KEY_BITRATE).assertEqual("bitrate");
expect(media.MediaDescriptionKey.MD_KEY_WIDTH).assertEqual("width");
expect(media.MediaDescriptionKey.MD_KEY_HEIGHT).assertEqual("height");
expect(media.MediaDescriptionKey.MD_KEY_AUD_CHANNEL_COUNT).assertEqual("channel_count");
expect(media.MediaDescriptionKey.MD_KEY_AUD_SAMPLE_RATE).assertEqual("sample_rate");
done();
})
})
\ No newline at end of file
......@@ -14,4 +14,5 @@
*/
require('./VideoRecorderFuncPromiseTest.test.js')
require('./VideoRecorderFuncCallbackTest.test.js')
require('./VideoRecorderAPICallbackTest.test.js')
\ No newline at end of file
require('./VideoRecorderAPICallbackTest.test.js')
require('./VideoRecorderEnumTest.test.js')
\ No newline at end of file
/*
* Copyright (C) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import media from '@ohos.multimedia.media'
import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index'
describe('VideoRecorderEnumTest', function () {
beforeAll(function() {
console.info('beforeAll case');
})
beforeEach(function() {
console.info('beforeEach case');
})
afterEach(function() {
console.info('afterEach case');
})
afterAll(function() {
console.info('afterAll case');
})
/* *
* @tc.number : SUB_MEDIA_VIDEO_RECORDER_ENUM_AUDIO_SOURCE_TYPE_00_0100
* @tc.name : AudioSourceType
* @tc.desc : AudioSourceType Enumeration test
* @tc.size : MediumTest
* @tc.type : Function test
* @tc.level : Level0
*/
it('SUB_MEDIA_VIDEO_RECORDER_ENUM_AUDIO_SOURCE_TYPE_00_0100', 0, async function (done) {
expect(media.AudioSourceType.AUDIO_SOURCE_TYPE_DEFAULT).assertEqual(0);
expect(media.AudioSourceType.AUDIO_SOURCE_TYPE_MIC).assertEqual(1);
done();
})
/* *
* @tc.number : SUB_MEDIA_VIDEO_RECORDER_ENUM_VIDEO_SOURCE_TYPE_00_0100
* @tc.name : VideoSourceType
* @tc.desc : VideoSourceType Enumeration test
* @tc.size : MediumTest
* @tc.type : Function test
* @tc.level : Level0
*/
it('SUB_MEDIA_VIDEO_RECORDER_ENUM_VIDEO_SOURCE_TYPE_00_0100', 0, async function (done) {
expect(media.VideoSourceType.VIDEO_SOURCE_TYPE_SURFACE_YUV).assertEqual(0);
expect(media.VideoSourceType.VIDEO_SOURCE_TYPE_SURFACE_ES).assertEqual(1);
done();
})
})
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册