提交 aaa57390 编写于 作者: T tianfenxia

tianfenxia1@huawei.com

Signed-off-by: Ntianfenxia <tianfenxia1@huawei.com>
上级 b55d8074
...@@ -20,8 +20,7 @@ group("multimedia") { ...@@ -20,8 +20,7 @@ group("multimedia") {
"audio/audio_js_standard/audioManager:audio_manager_js_hap", "audio/audio_js_standard/audioManager:audio_manager_js_hap",
"audio/audio_js_standard/audioPlayer:audio_player_js_hap", "audio/audio_js_standard/audioPlayer:audio_player_js_hap",
"audio/audio_js_standard/audioPlayer_API:audio_player_api_js_hap", "audio/audio_js_standard/audioPlayer_API:audio_player_api_js_hap",
"audio/audio_js_standard/audioRecorder:audio_recorder_js_hap",
#"audio/audio_js_standard/audioRecorder:audio_recorder_js_hap",
"media/media_cpp_test_standard:ActsMediaCppStandardTest", "media/media_cpp_test_standard:ActsMediaCppStandardTest",
] ]
} else { } else {
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
"driver": { "driver": {
"type": "JSUnitTest", "type": "JSUnitTest",
"test-timeout": "4800000", "test-timeout": "4800000",
"package": "ohos.acts.multimedia.audio.function", "package": "ohos.acts.multimedia.audio.audiomanager",
"shell-timeout": "60000" "shell-timeout": "60000"
}, },
"kits": [ "kits": [
......
{ {
"app": { "app": {
"bundleName": "ohos.acts.multimedia.audio.function", "bundleName": "ohos.acts.multimedia.audio.audiomanager",
"vendor": "acts", "vendor": "acts",
"version": { "version": {
"code": 1000000, "code": 1000000,
"name": "1.0.0" "name": "1.0.0"
},
"apiVersion": {
"compatible": 4,
"target": 5
} }
}, },
"deviceConfig": {}, "deviceConfig": {},
"module": { "module": {
"package": "ohos.acts.multimedia.audio.function", "package": "ohos.acts.multimedia.audio.audiomanager",
"name": ".MyApplication", "name": ".MyApplication",
"mainAbility": "ohos.acts.multimedia.audio.audiomanager.MainAbility",
"deviceType": [ "deviceType": [
"phone" "phone",
"tablet",
"tv",
"wearable"
], ],
"distro": { "distro": {
"deliveryWithInstall": true, "deliveryWithInstall": true,
"moduleName": "entry", "moduleName": "entry",
"moduleType": "entry" "moduleType": "entry",
"installationFree": false
}, },
"abilities": [ "abilities": [
{ {
"visible": true,
"skills": [ "skills": [
{ {
"entities": [ "entities": [
...@@ -36,10 +36,11 @@ ...@@ -36,10 +36,11 @@
] ]
} }
], ],
"name": "ohos.acts.multimedia.audio.function.MainAbility", "visible": true,
"name": "ohos.acts.multimedia.audio.audiomanager.MainAbility",
"icon": "$media:icon", "icon": "$media:icon",
"description": "$string:mainability_description", "description": "$string:mainability_description",
"label": "$string:app_name", "label": "$string:entry_MainAbility",
"type": "page", "type": "page",
"launchType": "standard" "launchType": "standard"
} }
...@@ -52,9 +53,9 @@ ...@@ -52,9 +53,9 @@
"name": "default", "name": "default",
"window": { "window": {
"designWidth": 720, "designWidth": 720,
"autoDesignWidth": false "autoDesignWidth": true
} }
} }
] ]
} }
} }
\ 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.
*/
package ohos.acts.multimedia.audio.audiomanager;
import ohos.ace.ability.AceAbility;
import ohos.aafwk.content.Intent;
public class MainAbility extends AceAbility {
@Override
public void onStart(Intent intent) {
super.onStart(intent);
}
@Override
public void onStop() {
super.onStop();
}
}
/*
* Copyright (C) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package ohos.acts.multimedia.audio.audiomanager;
import ohos.aafwk.ability.AbilityPackage;
public class MyApplication extends AbilityPackage {
@Override
public void onInitialize() {
super.onInitialize();
}
}
...@@ -13,8 +13,6 @@ ...@@ -13,8 +13,6 @@
* limitations under the License. * limitations under the License.
*/ */
import device from '@system.device';
export default { export default {
onCreate() { onCreate() {
console.info('AceApplication onCreate'); console.info('AceApplication onCreate');
......
...@@ -2,8 +2,45 @@ ...@@ -2,8 +2,45 @@
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
width: 100%;
height: 100%;
} }
.title { .title {
font-size: 100px; font-size: 40px;
color: #000000;
opacity: 0.9;
}
@media screen and (device-type: tablet) and (orientation: landscape) {
.title {
font-size: 100px;
}
}
@media screen and (device-type: wearable) {
.title {
font-size: 28px;
color: #FFFFFF;
}
}
@media screen and (device-type: tv) {
.container {
background-image: url("/common/images/Wallpaper.png");
background-size: cover;
background-repeat: no-repeat;
background-position: center;
}
.title {
font-size: 100px;
color: #FFFFFF;
}
}
@media screen and (device-type: phone) and (orientation: landscape) {
.title {
font-size: 60px;
}
} }
...@@ -13,11 +13,11 @@ ...@@ -13,11 +13,11 @@
* limitations under the License. * limitations under the License.
*/ */
import file from '@system.file'
import app from '@system.app' import app from '@system.app'
import {Core, ExpectExtend} from 'deccjsunit/index' import device from '@system.device'
import router from '@system.router'
const injectRef = Object.getPrototypeOf(global) || global import {Core, Constant, ExpectExtend, ReportExtend, InstrumentLog} from 'deccjsunit/index'
injectRef.regeneratorRuntime = require('@babel/runtime/regenerator')
export default { export default {
data: { data: {
...@@ -32,12 +32,23 @@ export default { ...@@ -32,12 +32,23 @@ export default {
const expectExtend = new ExpectExtend({ const expectExtend = new ExpectExtend({
'id': 'extend' 'id': 'extend'
}) })
const reportExtend = new ReportExtend(file)
const instrumentLog = new InstrumentLog({
'id': 'report',
'version': '1.0.3'
})
core.addService('expect', expectExtend) core.addService('expect', expectExtend)
core.addService('report', reportExtend)
core.addService('report', instrumentLog)
core.init() core.init()
core.subscribeEvent('spec', instrumentLog)
core.subscribeEvent('suite', instrumentLog)
core.subscribeEvent('task', instrumentLog)
const configService = core.getDefaultService('config') const configService = core.getDefaultService('config')
configService.setConfig(this) configService.setConfig(this)
require('../../test/List.test') require('../../../test/List.test')
core.execute() core.execute()
}, },
onReady() { onReady() {
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
// require('./AudioPerf.test.js') // require('./AudioPerf.test.js')
require('./AudioFramework.test.js') require('./AudioFramework.test.js')
//require('./AudioFramework.test-Gitee.js') //require('./AudioFramework.test-Gitee.js')
......
{ {
"string": [ "string": [
{ {
"name": "app_name", "name": "entry_MainAbility",
"value": "MyApplication" "value": "entry_MainAbility"
}, },
{ {
"name": "mainability_description", "name": "mainability_description",
"value": "JS_Phone_Empty Feature Ability" "value": "JS_Empty Ability"
} }
] ]
} }
\ No newline at end of file
{ {
"description": "Configuration for audio manager Tests", "description": "Configuration for audioPlayer Tests",
"driver": { "driver": {
"type": "JSUnitTest", "type": "JSUnitTest",
"test-timeout": "60000", "test-timeout": "3000000",
"package": "ohos.acts.multimedia.audio.function", "package": "ohos.acts.multimedia.audio.audioplayer",
"shell-timeout": "60000" "shell-timeout": "60000"
}, },
"kits": [ "kits": [
{
"type": "PushKit",
"pre-push": [
],
"push": [
"resource/audio/01.mP3 ->/data/media/",
"resource/audio/02.mp3 ->/data/media/",
"resource/audio/03.mp3 ->/data/media/",
"resource/audio/04.mp3 ->/data/media/",
"resource/audio/47.mp4 ->/data/media/",
"resource/audio/49.mp4 ->/data/media/",
"resource/audio/50.mp4 ->/data/media/",
"resource/audio/51.mp4 ->/data/media/",
"resource/audio/54.mp4 ->/data/media/",
"resource/audio/55.m4a ->/data/media/",
"resource/audio/57.m4a ->/data/media/",
"resource/audio/58.m4a ->/data/media/",
"resource/audio/59.m4a ->/data/media/",
"resource/audio/62.m4a ->/data/media/",
"resource/audio/64.mp4 ->/data/media/",
"resource/audio/65.mp4 ->/data/media/",
"resource/audio/66.mp4 ->/data/media/",
"resource/audio/67.mp4 ->/data/media/",
"resource/audio/92.mp4 ->/data/media/",
"resource/audio/93.mp4 ->/data/media/",
"resource/audio/94.mp4 ->/data/media/",
"resource/audio/96.mp4 ->/data/media/",
"resource/audio/97.mp4 ->/data/media/",
"resource/audio/98.mp4 ->/data/media/"
]
},
{
"type": "ShellKit",
"run-command": [
"chmod -R 666 /data/media/*",
"setenforce 0"
],
"teardown-command":[
"setenforce 1"
]
},
{ {
"test-file-name": [ "test-file-name": [
"AudioPlayerJsTest.hap" "AudioPlayerApiJsTest.hap"
], ],
"type": "AppInstallKit", "type": "AppInstallKit",
"cleanup-apps": true "cleanup-apps": true
......
{ {
"app": { "app": {
"bundleName": "ohos.acts.multimedia.audio.function", "bundleName": "ohos.acts.multimedia.audio.audioplayer",
"vendor": "acts", "vendor": "acts",
"version": { "version": {
"code": 1000000, "code": 1000000,
"name": "1.0.0" "name": "1.0.0"
},
"apiVersion": {
"compatible": 4,
"target": 5
} }
}, },
"deviceConfig": {}, "deviceConfig": {},
"module": { "module": {
"package": "ohos.acts.multimedia.audio.function", "package": "ohos.acts.multimedia.audio.audioplayer",
"name": ".MyApplication", "name": ".MyApplication",
"mainAbility": "ohos.acts.multimedia.audio.audioplayer.MainAbility",
"deviceType": [ "deviceType": [
"phone" "phone",
"tablet",
"tv",
"wearable"
], ],
"distro": { "distro": {
"deliveryWithInstall": true, "deliveryWithInstall": true,
"moduleName": "entry", "moduleName": "entry",
"moduleType": "entry" "moduleType": "entry",
"installationFree": false
}, },
"abilities": [ "abilities": [
{ {
"visible": true,
"skills": [ "skills": [
{ {
"entities": [ "entities": [
...@@ -36,10 +36,11 @@ ...@@ -36,10 +36,11 @@
] ]
} }
], ],
"name": "ohos.acts.multimedia.audio.function.MainAbility", "visible": true,
"name": "ohos.acts.multimedia.audio.audioplayer.MainAbility",
"icon": "$media:icon", "icon": "$media:icon",
"description": "$string:mainability_description", "description": "$string:mainability_description",
"label": "$string:app_name", "label": "$string:entry_MainAbility",
"type": "page", "type": "page",
"launchType": "standard" "launchType": "standard"
} }
...@@ -52,9 +53,9 @@ ...@@ -52,9 +53,9 @@
"name": "default", "name": "default",
"window": { "window": {
"designWidth": 720, "designWidth": 720,
"autoDesignWidth": false "autoDesignWidth": true
} }
} }
] ]
} }
} }
\ 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.
*/
package ohos.acts.multimedia.audio.audioplayer;
import ohos.ace.ability.AceAbility;
import ohos.aafwk.content.Intent;
public class MainAbility extends AceAbility {
@Override
public void onStart(Intent intent) {
super.onStart(intent);
}
@Override
public void onStop() {
super.onStop();
}
}
/*
* Copyright (C) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package ohos.acts.multimedia.audio.audioplayer;
import ohos.aafwk.ability.AbilityPackage;
public class MyApplication extends AbilityPackage {
@Override
public void onInitialize() {
super.onInitialize();
}
}
...@@ -13,8 +13,6 @@ ...@@ -13,8 +13,6 @@
* limitations under the License. * limitations under the License.
*/ */
import device from '@system.device';
export default { export default {
onCreate() { onCreate() {
console.info('AceApplication onCreate'); console.info('AceApplication onCreate');
......
...@@ -2,8 +2,45 @@ ...@@ -2,8 +2,45 @@
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
width: 100%;
height: 100%;
} }
.title { .title {
font-size: 100px; font-size: 40px;
color: #000000;
opacity: 0.9;
}
@media screen and (device-type: tablet) and (orientation: landscape) {
.title {
font-size: 100px;
}
}
@media screen and (device-type: wearable) {
.title {
font-size: 28px;
color: #FFFFFF;
}
}
@media screen and (device-type: tv) {
.container {
background-image: url("/common/images/Wallpaper.png");
background-size: cover;
background-repeat: no-repeat;
background-position: center;
}
.title {
font-size: 100px;
color: #FFFFFF;
}
}
@media screen and (device-type: phone) and (orientation: landscape) {
.title {
font-size: 60px;
}
} }
...@@ -13,11 +13,11 @@ ...@@ -13,11 +13,11 @@
* limitations under the License. * limitations under the License.
*/ */
import file from '@system.file'
import app from '@system.app' import app from '@system.app'
import {Core, ExpectExtend} from 'deccjsunit/index' import device from '@system.device'
import router from '@system.router'
const injectRef = Object.getPrototypeOf(global) || global import {Core, Constant, ExpectExtend, ReportExtend, InstrumentLog} from 'deccjsunit/index'
injectRef.regeneratorRuntime = require('@babel/runtime/regenerator')
export default { export default {
data: { data: {
...@@ -32,12 +32,23 @@ export default { ...@@ -32,12 +32,23 @@ export default {
const expectExtend = new ExpectExtend({ const expectExtend = new ExpectExtend({
'id': 'extend' 'id': 'extend'
}) })
const reportExtend = new ReportExtend(file)
const instrumentLog = new InstrumentLog({
'id': 'report',
'version': '1.0.3'
})
core.addService('expect', expectExtend) core.addService('expect', expectExtend)
core.addService('report', reportExtend)
core.addService('report', instrumentLog)
core.init() core.init()
core.subscribeEvent('spec', instrumentLog)
core.subscribeEvent('suite', instrumentLog)
core.subscribeEvent('task', instrumentLog)
const configService = core.getDefaultService('config') const configService = core.getDefaultService('config')
configService.setConfig(this) configService.setConfig(this)
require('../../test/List.test') require('../../../test/List.test')
core.execute() core.execute()
}, },
onReady() { onReady() {
......
...@@ -19,9 +19,9 @@ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from ' ...@@ -19,9 +19,9 @@ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from '
describe('PlayerLocalTestAudioFUNC', function () { describe('PlayerLocalTestAudioFUNC', function () {
let audioPlayer = media.createAudioPlayer(); let audioPlayer = media.createAudioPlayer();
let isTimeOut = false; let isTimeOut = false;
const AUDIO_SOURCE = 'file://data/media/audio/01.mp3'; const AUDIO_SOURCE = 'file://data/media/01.mp3';
const PLAY_TIME = 3000; const PLAY_TIME = 3000;
const DURATION_TIME = 99432; const DURATION_TIME = 219600;
const SEEK_TIME = 5000; const SEEK_TIME = 5000;
const DELTA_TIME = 1000; const DELTA_TIME = 1000;
const END_STATE = 0; const END_STATE = 0;
......
{ {
"string": [ "string": [
{ {
"name": "app_name", "name": "entry_MainAbility",
"value": "MyApplication" "value": "entry_MainAbility"
}, },
{ {
"name": "mainability_description", "name": "mainability_description",
"value": "JS_Phone_Empty Feature Ability" "value": "JS_Empty Ability"
} }
] ]
} }
\ No newline at end of file
{ {
"description": "Configuration for audio manager Tests", "description": "Configuration for audioPlayerApi Tests",
"driver": { "driver": {
"type": "JSUnitTest", "type": "JSUnitTest",
"test-timeout": "60000", "test-timeout": "3000000",
"package": "ohos.acts.multimedia.audio.function", "package": "ohos.acts.multimedia.audio.audioplayerapi",
"shell-timeout": "60000" "shell-timeout": "60000"
}, },
"kits": [ "kits": [
{
"type": "PushKit",
"pre-push": [
],
"push": [
"resource/audio/01.mP3 ->/data/media/",
"resource/audio/02.mp3 ->/data/media/",
"resource/audio/03.mp3 ->/data/media/",
"resource/audio/04.mp3 ->/data/media/",
"resource/audio/47.mp4 ->/data/media/",
"resource/audio/49.mp4 ->/data/media/",
"resource/audio/50.mp4 ->/data/media/",
"resource/audio/51.mp4 ->/data/media/",
"resource/audio/54.mp4 ->/data/media/",
"resource/audio/55.m4a ->/data/media/",
"resource/audio/57.m4a ->/data/media/",
"resource/audio/58.m4a ->/data/media/",
"resource/audio/59.m4a ->/data/media/",
"resource/audio/62.m4a ->/data/media/",
"resource/audio/64.mp4 ->/data/media/",
"resource/audio/65.mp4 ->/data/media/",
"resource/audio/66.mp4 ->/data/media/",
"resource/audio/67.mp4 ->/data/media/",
"resource/audio/92.mp4 ->/data/media/",
"resource/audio/93.mp4 ->/data/media/",
"resource/audio/94.mp4 ->/data/media/",
"resource/audio/96.mp4 ->/data/media/",
"resource/audio/97.mp4 ->/data/media/",
"resource/audio/98.mp4 ->/data/media/"
]
},
{
"type": "ShellKit",
"run-command": [
"chmod -R 666 /data/media/*",
"setenforce 0"
],
"teardown-command":[
"setenforce 1"
]
},
{ {
"test-file-name": [ "test-file-name": [
"AudioPlayerApiJsTest.hap" "AudioPlayerApiJsTest.hap"
......
{ {
"app": { "app": {
"bundleName": "ohos.acts.multimedia.audio.function", "bundleName": "ohos.acts.multimedia.audio.audioplayerapi",
"vendor": "acts", "vendor": "acts",
"version": { "version": {
"code": 1000000, "code": 1000000,
"name": "1.0.0" "name": "1.0.0"
},
"apiVersion": {
"compatible": 4,
"target": 5
} }
}, },
"deviceConfig": {}, "deviceConfig": {},
"module": { "module": {
"package": "ohos.acts.multimedia.audio.function", "package": "ohos.acts.multimedia.audio.audioplayerapi",
"name": ".MyApplication", "name": ".MyApplication",
"mainAbility": "ohos.acts.multimedia.audio.audioplayerapi.MainAbility",
"deviceType": [ "deviceType": [
"phone" "phone",
"tablet",
"tv",
"wearable"
], ],
"distro": { "distro": {
"deliveryWithInstall": true, "deliveryWithInstall": true,
"moduleName": "entry", "moduleName": "entry",
"moduleType": "entry" "moduleType": "entry",
"installationFree": false
}, },
"abilities": [ "abilities": [
{ {
"visible": true,
"skills": [ "skills": [
{ {
"entities": [ "entities": [
...@@ -36,10 +36,11 @@ ...@@ -36,10 +36,11 @@
] ]
} }
], ],
"name": "ohos.acts.multimedia.audio.function.MainAbility", "visible": true,
"name": "ohos.acts.multimedia.audio.audioplayerapi.MainAbility",
"icon": "$media:icon", "icon": "$media:icon",
"description": "$string:mainability_description", "description": "$string:mainability_description",
"label": "$string:app_name", "label": "$string:entry_MainAbility",
"type": "page", "type": "page",
"launchType": "standard" "launchType": "standard"
} }
...@@ -52,9 +53,9 @@ ...@@ -52,9 +53,9 @@
"name": "default", "name": "default",
"window": { "window": {
"designWidth": 720, "designWidth": 720,
"autoDesignWidth": false "autoDesignWidth": true
} }
} }
] ]
} }
} }
\ 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.
*/
package ohos.acts.multimedia.audio.audioplayerapi;
import ohos.ace.ability.AceAbility;
import ohos.aafwk.content.Intent;
public class MainAbility extends AceAbility {
@Override
public void onStart(Intent intent) {
super.onStart(intent);
}
@Override
public void onStop() {
super.onStop();
}
}
/*
* Copyright (C) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package ohos.acts.multimedia.audio.audioplayerapi;
import ohos.aafwk.ability.AbilityPackage;
public class MyApplication extends AbilityPackage {
@Override
public void onInitialize() {
super.onInitialize();
}
}
...@@ -13,8 +13,6 @@ ...@@ -13,8 +13,6 @@
* limitations under the License. * limitations under the License.
*/ */
import device from '@system.device';
export default { export default {
onCreate() { onCreate() {
console.info('AceApplication onCreate'); console.info('AceApplication onCreate');
......
...@@ -2,8 +2,45 @@ ...@@ -2,8 +2,45 @@
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
width: 100%;
height: 100%;
} }
.title { .title {
font-size: 100px; font-size: 40px;
color: #000000;
opacity: 0.9;
}
@media screen and (device-type: tablet) and (orientation: landscape) {
.title {
font-size: 100px;
}
}
@media screen and (device-type: wearable) {
.title {
font-size: 28px;
color: #FFFFFF;
}
}
@media screen and (device-type: tv) {
.container {
background-image: url("/common/images/Wallpaper.png");
background-size: cover;
background-repeat: no-repeat;
background-position: center;
}
.title {
font-size: 100px;
color: #FFFFFF;
}
}
@media screen and (device-type: phone) and (orientation: landscape) {
.title {
font-size: 60px;
}
} }
...@@ -13,11 +13,11 @@ ...@@ -13,11 +13,11 @@
* limitations under the License. * limitations under the License.
*/ */
import file from '@system.file'
import app from '@system.app' import app from '@system.app'
import {Core, ExpectExtend} from 'deccjsunit/index' import device from '@system.device'
import router from '@system.router'
const injectRef = Object.getPrototypeOf(global) || global import {Core, Constant, ExpectExtend, ReportExtend, InstrumentLog} from 'deccjsunit/index'
injectRef.regeneratorRuntime = require('@babel/runtime/regenerator')
export default { export default {
data: { data: {
...@@ -32,12 +32,23 @@ export default { ...@@ -32,12 +32,23 @@ export default {
const expectExtend = new ExpectExtend({ const expectExtend = new ExpectExtend({
'id': 'extend' 'id': 'extend'
}) })
const reportExtend = new ReportExtend(file)
const instrumentLog = new InstrumentLog({
'id': 'report',
'version': '1.0.3'
})
core.addService('expect', expectExtend) core.addService('expect', expectExtend)
core.addService('report', reportExtend)
core.addService('report', instrumentLog)
core.init() core.init()
core.subscribeEvent('spec', instrumentLog)
core.subscribeEvent('suite', instrumentLog)
core.subscribeEvent('task', instrumentLog)
const configService = core.getDefaultService('config') const configService = core.getDefaultService('config')
configService.setConfig(this) configService.setConfig(this)
require('../../test/List.test') require('../../../test/List.test')
core.execute() core.execute()
}, },
onReady() { onReady() {
......
...@@ -20,7 +20,7 @@ describe('PlayerLocalTestAudioAPI', function () { ...@@ -20,7 +20,7 @@ describe('PlayerLocalTestAudioAPI', function () {
let audioPlayer = media.createAudioPlayer(); let audioPlayer = media.createAudioPlayer();
let loopValue = false; let loopValue = false;
let isTimeOut = false; let isTimeOut = false;
const AUDIO_SOURCE = 'file://data/media/audio/01.mp3'; const AUDIO_SOURCE = 'file://data/media/01.mp3';
const PLAY_TIME = 3000; const PLAY_TIME = 3000;
const END_STATE = 0; const END_STATE = 0;
const SRC_STATE = 1; const SRC_STATE = 1;
...@@ -34,7 +34,7 @@ describe('PlayerLocalTestAudioAPI', function () { ...@@ -34,7 +34,7 @@ describe('PlayerLocalTestAudioAPI', function () {
const ERROR_STATE = 9; const ERROR_STATE = 9;
const FINISH_STATE = 10; const FINISH_STATE = 10;
const LOOP_STATE = 11; const LOOP_STATE = 11;
const DURATION_TIME = 99432; const DURATION_TIME = 219600;
const SEEK_TIME = 5000; const SEEK_TIME = 5000;
const DELTA_TIME = 1000; const DELTA_TIME = 1000;
const SECOND_INDEX = 1; const SECOND_INDEX = 1;
......
{ {
"string": [ "string": [
{ {
"name": "app_name", "name": "entry_MainAbility",
"value": "MyApplication" "value": "entry_MainAbility"
}, },
{ {
"name": "mainability_description", "name": "mainability_description",
"value": "JS_Phone_Empty Feature Ability" "value": "JS_Empty Ability"
} }
] ]
} }
\ No newline at end of file
{ {
"description": "Configuration for audio manager Tests", "description": "Configuration for audioRecorder Tests",
"driver": { "driver": {
"type": "JSUnitTest", "type": "JSUnitTest",
"test-timeout": "60000", "test-timeout": "3000000",
"package": "ohos.acts.multimedia.audio.function", "package": "ohos.acts.multimedia.audio.audiorecorder",
"shell-timeout": "60000" "shell-timeout": "60000"
}, },
"kits": [ "kits": [
......
{ {
"app": { "app": {
"bundleName": "ohos.acts.multimedia.audio.function", "bundleName": "ohos.acts.multimedia.audio.audiorecorder",
"vendor": "acts", "vendor": "acts",
"version": { "version": {
"code": 1000000, "code": 1000000,
"name": "1.0.0" "name": "1.0.0"
},
"apiVersion": {
"compatible": 4,
"target": 5
} }
}, },
"deviceConfig": {}, "deviceConfig": {},
"module": { "module": {
"package": "ohos.acts.multimedia.audio.function", "package": "ohos.acts.multimedia.audio.audiorecorder",
"name": ".MyApplication", "name": ".MyApplication",
"mainAbility": "ohos.acts.multimedia.audio.audiorecorder.MainAbility",
"deviceType": [ "deviceType": [
"phone" "phone",
"tablet",
"tv",
"wearable"
], ],
"distro": { "distro": {
"deliveryWithInstall": true, "deliveryWithInstall": true,
"moduleName": "entry", "moduleName": "entry",
"moduleType": "entry" "moduleType": "entry",
"installationFree": false
}, },
"abilities": [ "abilities": [
{ {
"visible": true,
"skills": [ "skills": [
{ {
"entities": [ "entities": [
...@@ -36,10 +36,11 @@ ...@@ -36,10 +36,11 @@
] ]
} }
], ],
"name": "ohos.acts.multimedia.audio.function.MainAbility", "visible": true,
"name": "ohos.acts.multimedia.audio.audiorecorder.MainAbility",
"icon": "$media:icon", "icon": "$media:icon",
"description": "$string:mainability_description", "description": "$string:mainability_description",
"label": "$string:app_name", "label": "$string:entry_MainAbility",
"type": "page", "type": "page",
"launchType": "standard" "launchType": "standard"
} }
...@@ -52,9 +53,9 @@ ...@@ -52,9 +53,9 @@
"name": "default", "name": "default",
"window": { "window": {
"designWidth": 720, "designWidth": 720,
"autoDesignWidth": false "autoDesignWidth": true
} }
} }
] ]
} }
} }
\ 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.
*/
package ohos.acts.multimedia.audio.audiorecorder;
import ohos.ace.ability.AceAbility;
import ohos.aafwk.content.Intent;
public class MainAbility extends AceAbility {
@Override
public void onStart(Intent intent) {
super.onStart(intent);
}
@Override
public void onStop() {
super.onStop();
}
}
/*
* Copyright (C) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package ohos.acts.multimedia.audio.audiorecorder;
import ohos.aafwk.ability.AbilityPackage;
public class MyApplication extends AbilityPackage {
@Override
public void onInitialize() {
super.onInitialize();
}
}
...@@ -13,8 +13,6 @@ ...@@ -13,8 +13,6 @@
* limitations under the License. * limitations under the License.
*/ */
import device from '@system.device';
export default { export default {
onCreate() { onCreate() {
console.info('AceApplication onCreate'); console.info('AceApplication onCreate');
......
...@@ -2,8 +2,45 @@ ...@@ -2,8 +2,45 @@
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
width: 100%;
height: 100%;
} }
.title { .title {
font-size: 100px; font-size: 40px;
color: #000000;
opacity: 0.9;
}
@media screen and (device-type: tablet) and (orientation: landscape) {
.title {
font-size: 100px;
}
}
@media screen and (device-type: wearable) {
.title {
font-size: 28px;
color: #FFFFFF;
}
}
@media screen and (device-type: tv) {
.container {
background-image: url("/common/images/Wallpaper.png");
background-size: cover;
background-repeat: no-repeat;
background-position: center;
}
.title {
font-size: 100px;
color: #FFFFFF;
}
}
@media screen and (device-type: phone) and (orientation: landscape) {
.title {
font-size: 60px;
}
} }
...@@ -13,11 +13,11 @@ ...@@ -13,11 +13,11 @@
* limitations under the License. * limitations under the License.
*/ */
import file from '@system.file'
import app from '@system.app' import app from '@system.app'
import {Core, ExpectExtend} from 'deccjsunit/index' import device from '@system.device'
import router from '@system.router'
const injectRef = Object.getPrototypeOf(global) || global import {Core, Constant, ExpectExtend, ReportExtend, InstrumentLog} from 'deccjsunit/index'
injectRef.regeneratorRuntime = require('@babel/runtime/regenerator')
export default { export default {
data: { data: {
...@@ -32,14 +32,25 @@ export default { ...@@ -32,14 +32,25 @@ export default {
const expectExtend = new ExpectExtend({ const expectExtend = new ExpectExtend({
'id': 'extend' 'id': 'extend'
}) })
const reportExtend = new ReportExtend(file)
const instrumentLog = new InstrumentLog({
'id': 'report',
'version': '1.0.3'
})
core.addService('expect', expectExtend) core.addService('expect', expectExtend)
core.addService('report', reportExtend)
core.addService('report', instrumentLog)
core.init() core.init()
core.subscribeEvent('spec', instrumentLog)
core.subscribeEvent('suite', instrumentLog)
core.subscribeEvent('task', instrumentLog)
const configService = core.getDefaultService('config') const configService = core.getDefaultService('config')
configService.setConfig(this) configService.setConfig(this)
require('../../test/List.test') require('../../../test/List.test')
core.execute() core.execute()
}, },
onReady() { onReady() {
}, },
} }
\ No newline at end of file
{ {
"string": [ "string": [
{ {
"name": "app_name", "name": "entry_MainAbility",
"value": "MyApplication" "value": "entry_MainAbility"
}, },
{ {
"name": "mainability_description", "name": "mainability_description",
"value": "JS_Phone_Empty Feature Ability" "value": "JS_Empty Ability"
} }
] ]
} }
\ No newline at end of file
{ {
"kits": [ "description": "Configuration for ActsMediaCppStandardTest Tests",
{
"push": [
"ActsMediaCppStandardTest->/data/local/tmp/ActsMediaCppStandardTest"
],
"type": "PushKit"
}
],
"driver": { "driver": {
"native-test-timeout": "120000", "native-test-timeout": "4800000",
"type": "CppTest", "type": "CppTest",
"module-name": "ActsMediaCppStandardTest", "module-name": "ActsMediaCppStandardTest",
"runtime-hint": "1s", "runtime-hint": "1s",
"native-test-device-path": "/data/local/tmp" "native-test-device-path": "/data/local/tmp"
}, },
"description": "Configuration for ActsMediaCppStandardTest Tests" "kits": [
{
"type": "PushKit",
"pre-push": [
],
"push": [
"ActsMediaCppStandardTest->/data/local/tmp/ActsMediaCppStandardTest",
"resource/media/1h264_320x240_60.3gp ->/data/media/",
"resource/media/h264_320x240_60.m4v ->/data/media/",
"resource/media/hevc_320x240_30.mp4 ->/data/media/",
"resource/media/hevc_320x240_60.mp4 ->/data/media/"
]
},
{
"type": "ShellKit",
"run-command": [
"chmod -R 666 /data/media/*",
"setenforce 0"
],
"teardown-command":[
"setenforce 1"
]
}
]
} }
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册