提交 aaa57390 编写于 作者: T tianfenxia

tianfenxia1@huawei.com

Signed-off-by: Ntianfenxia <tianfenxia1@huawei.com>
上级 b55d8074
......@@ -20,8 +20,7 @@ group("multimedia") {
"audio/audio_js_standard/audioManager:audio_manager_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/audioRecorder:audio_recorder_js_hap",
"audio/audio_js_standard/audioRecorder:audio_recorder_js_hap",
"media/media_cpp_test_standard:ActsMediaCppStandardTest",
]
} else {
......
......@@ -3,7 +3,7 @@
"driver": {
"type": "JSUnitTest",
"test-timeout": "4800000",
"package": "ohos.acts.multimedia.audio.function",
"package": "ohos.acts.multimedia.audio.audiomanager",
"shell-timeout": "60000"
},
"kits": [
......
{
"app": {
"bundleName": "ohos.acts.multimedia.audio.function",
"bundleName": "ohos.acts.multimedia.audio.audiomanager",
"vendor": "acts",
"version": {
"code": 1000000,
"name": "1.0.0"
},
"apiVersion": {
"compatible": 4,
"target": 5
}
},
"deviceConfig": {},
"module": {
"package": "ohos.acts.multimedia.audio.function",
"package": "ohos.acts.multimedia.audio.audiomanager",
"name": ".MyApplication",
"mainAbility": "ohos.acts.multimedia.audio.audiomanager.MainAbility",
"deviceType": [
"phone"
"phone",
"tablet",
"tv",
"wearable"
],
"distro": {
"deliveryWithInstall": true,
"moduleName": "entry",
"moduleType": "entry"
"moduleType": "entry",
"installationFree": false
},
"abilities": [
{
"visible": true,
"skills": [
{
"entities": [
......@@ -36,10 +36,11 @@
]
}
],
"name": "ohos.acts.multimedia.audio.function.MainAbility",
"visible": true,
"name": "ohos.acts.multimedia.audio.audiomanager.MainAbility",
"icon": "$media:icon",
"description": "$string:mainability_description",
"label": "$string:app_name",
"label": "$string:entry_MainAbility",
"type": "page",
"launchType": "standard"
}
......@@ -52,9 +53,9 @@
"name": "default",
"window": {
"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 @@
* limitations under the License.
*/
import device from '@system.device';
export default {
onCreate() {
console.info('AceApplication onCreate');
......
......@@ -2,8 +2,45 @@
flex-direction: column;
justify-content: center;
align-items: center;
width: 100%;
height: 100%;
}
.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 @@
* limitations under the License.
*/
import file from '@system.file'
import app from '@system.app'
import {Core, ExpectExtend} from 'deccjsunit/index'
const injectRef = Object.getPrototypeOf(global) || global
injectRef.regeneratorRuntime = require('@babel/runtime/regenerator')
import device from '@system.device'
import router from '@system.router'
import {Core, Constant, ExpectExtend, ReportExtend, InstrumentLog} from 'deccjsunit/index'
export default {
data: {
......@@ -32,12 +32,23 @@ export default {
const expectExtend = new ExpectExtend({
'id': 'extend'
})
const reportExtend = new ReportExtend(file)
const instrumentLog = new InstrumentLog({
'id': 'report',
'version': '1.0.3'
})
core.addService('expect', expectExtend)
core.addService('report', reportExtend)
core.addService('report', instrumentLog)
core.init()
core.subscribeEvent('spec', instrumentLog)
core.subscribeEvent('suite', instrumentLog)
core.subscribeEvent('task', instrumentLog)
const configService = core.getDefaultService('config')
configService.setConfig(this)
require('../../test/List.test')
require('../../../test/List.test')
core.execute()
},
onReady() {
......
......@@ -12,6 +12,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// require('./AudioPerf.test.js')
require('./AudioFramework.test.js')
//require('./AudioFramework.test-Gitee.js')
......
{
"string": [
{
"name": "app_name",
"value": "MyApplication"
"name": "entry_MainAbility",
"value": "entry_MainAbility"
},
{
"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": {
"type": "JSUnitTest",
"test-timeout": "60000",
"package": "ohos.acts.multimedia.audio.function",
"test-timeout": "3000000",
"package": "ohos.acts.multimedia.audio.audioplayer",
"shell-timeout": "60000"
},
"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": [
"AudioPlayerJsTest.hap"
"AudioPlayerApiJsTest.hap"
],
"type": "AppInstallKit",
"cleanup-apps": true
......
{
"app": {
"bundleName": "ohos.acts.multimedia.audio.function",
"bundleName": "ohos.acts.multimedia.audio.audioplayer",
"vendor": "acts",
"version": {
"code": 1000000,
"name": "1.0.0"
},
"apiVersion": {
"compatible": 4,
"target": 5
}
},
"deviceConfig": {},
"module": {
"package": "ohos.acts.multimedia.audio.function",
"package": "ohos.acts.multimedia.audio.audioplayer",
"name": ".MyApplication",
"mainAbility": "ohos.acts.multimedia.audio.audioplayer.MainAbility",
"deviceType": [
"phone"
"phone",
"tablet",
"tv",
"wearable"
],
"distro": {
"deliveryWithInstall": true,
"moduleName": "entry",
"moduleType": "entry"
"moduleType": "entry",
"installationFree": false
},
"abilities": [
{
"visible": true,
"skills": [
{
"entities": [
......@@ -36,10 +36,11 @@
]
}
],
"name": "ohos.acts.multimedia.audio.function.MainAbility",
"visible": true,
"name": "ohos.acts.multimedia.audio.audioplayer.MainAbility",
"icon": "$media:icon",
"description": "$string:mainability_description",
"label": "$string:app_name",
"label": "$string:entry_MainAbility",
"type": "page",
"launchType": "standard"
}
......@@ -52,9 +53,9 @@
"name": "default",
"window": {
"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 @@
* limitations under the License.
*/
import device from '@system.device';
export default {
onCreate() {
console.info('AceApplication onCreate');
......
......@@ -2,8 +2,45 @@
flex-direction: column;
justify-content: center;
align-items: center;
width: 100%;
height: 100%;
}
.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 @@
* limitations under the License.
*/
import file from '@system.file'
import app from '@system.app'
import {Core, ExpectExtend} from 'deccjsunit/index'
const injectRef = Object.getPrototypeOf(global) || global
injectRef.regeneratorRuntime = require('@babel/runtime/regenerator')
import device from '@system.device'
import router from '@system.router'
import {Core, Constant, ExpectExtend, ReportExtend, InstrumentLog} from 'deccjsunit/index'
export default {
data: {
......@@ -32,12 +32,23 @@ export default {
const expectExtend = new ExpectExtend({
'id': 'extend'
})
const reportExtend = new ReportExtend(file)
const instrumentLog = new InstrumentLog({
'id': 'report',
'version': '1.0.3'
})
core.addService('expect', expectExtend)
core.addService('report', reportExtend)
core.addService('report', instrumentLog)
core.init()
core.subscribeEvent('spec', instrumentLog)
core.subscribeEvent('suite', instrumentLog)
core.subscribeEvent('task', instrumentLog)
const configService = core.getDefaultService('config')
configService.setConfig(this)
require('../../test/List.test')
require('../../../test/List.test')
core.execute()
},
onReady() {
......
......@@ -19,9 +19,9 @@ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from '
describe('PlayerLocalTestAudioFUNC', function () {
let audioPlayer = media.createAudioPlayer();
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 DURATION_TIME = 99432;
const DURATION_TIME = 219600;
const SEEK_TIME = 5000;
const DELTA_TIME = 1000;
const END_STATE = 0;
......
{
"string": [
{
"name": "app_name",
"value": "MyApplication"
"name": "entry_MainAbility",
"value": "entry_MainAbility"
},
{
"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": {
"type": "JSUnitTest",
"test-timeout": "60000",
"package": "ohos.acts.multimedia.audio.function",
"test-timeout": "3000000",
"package": "ohos.acts.multimedia.audio.audioplayerapi",
"shell-timeout": "60000"
},
"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": [
"AudioPlayerApiJsTest.hap"
......
{
"app": {
"bundleName": "ohos.acts.multimedia.audio.function",
"bundleName": "ohos.acts.multimedia.audio.audioplayerapi",
"vendor": "acts",
"version": {
"code": 1000000,
"name": "1.0.0"
},
"apiVersion": {
"compatible": 4,
"target": 5
}
},
"deviceConfig": {},
"module": {
"package": "ohos.acts.multimedia.audio.function",
"package": "ohos.acts.multimedia.audio.audioplayerapi",
"name": ".MyApplication",
"mainAbility": "ohos.acts.multimedia.audio.audioplayerapi.MainAbility",
"deviceType": [
"phone"
"phone",
"tablet",
"tv",
"wearable"
],
"distro": {
"deliveryWithInstall": true,
"moduleName": "entry",
"moduleType": "entry"
"moduleType": "entry",
"installationFree": false
},
"abilities": [
{
"visible": true,
"skills": [
{
"entities": [
......@@ -36,10 +36,11 @@
]
}
],
"name": "ohos.acts.multimedia.audio.function.MainAbility",
"visible": true,
"name": "ohos.acts.multimedia.audio.audioplayerapi.MainAbility",
"icon": "$media:icon",
"description": "$string:mainability_description",
"label": "$string:app_name",
"label": "$string:entry_MainAbility",
"type": "page",
"launchType": "standard"
}
......@@ -52,9 +53,9 @@
"name": "default",
"window": {
"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 @@
* limitations under the License.
*/
import device from '@system.device';
export default {
onCreate() {
console.info('AceApplication onCreate');
......
......@@ -2,8 +2,45 @@
flex-direction: column;
justify-content: center;
align-items: center;
width: 100%;
height: 100%;
}
.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 @@
* limitations under the License.
*/
import file from '@system.file'
import app from '@system.app'
import {Core, ExpectExtend} from 'deccjsunit/index'
const injectRef = Object.getPrototypeOf(global) || global
injectRef.regeneratorRuntime = require('@babel/runtime/regenerator')
import device from '@system.device'
import router from '@system.router'
import {Core, Constant, ExpectExtend, ReportExtend, InstrumentLog} from 'deccjsunit/index'
export default {
data: {
......@@ -32,12 +32,23 @@ export default {
const expectExtend = new ExpectExtend({
'id': 'extend'
})
const reportExtend = new ReportExtend(file)
const instrumentLog = new InstrumentLog({
'id': 'report',
'version': '1.0.3'
})
core.addService('expect', expectExtend)
core.addService('report', reportExtend)
core.addService('report', instrumentLog)
core.init()
core.subscribeEvent('spec', instrumentLog)
core.subscribeEvent('suite', instrumentLog)
core.subscribeEvent('task', instrumentLog)
const configService = core.getDefaultService('config')
configService.setConfig(this)
require('../../test/List.test')
require('../../../test/List.test')
core.execute()
},
onReady() {
......
......@@ -20,7 +20,7 @@ describe('PlayerLocalTestAudioAPI', function () {
let audioPlayer = media.createAudioPlayer();
let loopValue = 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 END_STATE = 0;
const SRC_STATE = 1;
......@@ -34,7 +34,7 @@ describe('PlayerLocalTestAudioAPI', function () {
const ERROR_STATE = 9;
const FINISH_STATE = 10;
const LOOP_STATE = 11;
const DURATION_TIME = 99432;
const DURATION_TIME = 219600;
const SEEK_TIME = 5000;
const DELTA_TIME = 1000;
const SECOND_INDEX = 1;
......
{
"string": [
{
"name": "app_name",
"value": "MyApplication"
"name": "entry_MainAbility",
"value": "entry_MainAbility"
},
{
"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": {
"type": "JSUnitTest",
"test-timeout": "60000",
"package": "ohos.acts.multimedia.audio.function",
"test-timeout": "3000000",
"package": "ohos.acts.multimedia.audio.audiorecorder",
"shell-timeout": "60000"
},
"kits": [
......
{
"app": {
"bundleName": "ohos.acts.multimedia.audio.function",
"bundleName": "ohos.acts.multimedia.audio.audiorecorder",
"vendor": "acts",
"version": {
"code": 1000000,
"name": "1.0.0"
},
"apiVersion": {
"compatible": 4,
"target": 5
}
},
"deviceConfig": {},
"module": {
"package": "ohos.acts.multimedia.audio.function",
"package": "ohos.acts.multimedia.audio.audiorecorder",
"name": ".MyApplication",
"mainAbility": "ohos.acts.multimedia.audio.audiorecorder.MainAbility",
"deviceType": [
"phone"
"phone",
"tablet",
"tv",
"wearable"
],
"distro": {
"deliveryWithInstall": true,
"moduleName": "entry",
"moduleType": "entry"
"moduleType": "entry",
"installationFree": false
},
"abilities": [
{
"visible": true,
"skills": [
{
"entities": [
......@@ -36,10 +36,11 @@
]
}
],
"name": "ohos.acts.multimedia.audio.function.MainAbility",
"visible": true,
"name": "ohos.acts.multimedia.audio.audiorecorder.MainAbility",
"icon": "$media:icon",
"description": "$string:mainability_description",
"label": "$string:app_name",
"label": "$string:entry_MainAbility",
"type": "page",
"launchType": "standard"
}
......@@ -52,9 +53,9 @@
"name": "default",
"window": {
"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 @@
* limitations under the License.
*/
import device from '@system.device';
export default {
onCreate() {
console.info('AceApplication onCreate');
......
......@@ -2,8 +2,45 @@
flex-direction: column;
justify-content: center;
align-items: center;
width: 100%;
height: 100%;
}
.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 @@
* limitations under the License.
*/
import file from '@system.file'
import app from '@system.app'
import {Core, ExpectExtend} from 'deccjsunit/index'
const injectRef = Object.getPrototypeOf(global) || global
injectRef.regeneratorRuntime = require('@babel/runtime/regenerator')
import device from '@system.device'
import router from '@system.router'
import {Core, Constant, ExpectExtend, ReportExtend, InstrumentLog} from 'deccjsunit/index'
export default {
data: {
......@@ -32,14 +32,25 @@ export default {
const expectExtend = new ExpectExtend({
'id': 'extend'
})
const reportExtend = new ReportExtend(file)
const instrumentLog = new InstrumentLog({
'id': 'report',
'version': '1.0.3'
})
core.addService('expect', expectExtend)
core.addService('report', reportExtend)
core.addService('report', instrumentLog)
core.init()
core.subscribeEvent('spec', instrumentLog)
core.subscribeEvent('suite', instrumentLog)
core.subscribeEvent('task', instrumentLog)
const configService = core.getDefaultService('config')
configService.setConfig(this)
require('../../test/List.test')
require('../../../test/List.test')
core.execute()
},
onReady() {
},
}
\ No newline at end of file
}
{
"string": [
{
"name": "app_name",
"value": "MyApplication"
"name": "entry_MainAbility",
"value": "entry_MainAbility"
},
{
"name": "mainability_description",
"value": "JS_Phone_Empty Feature Ability"
"value": "JS_Empty Ability"
}
]
}
\ No newline at end of file
{
"kits": [
{
"push": [
"ActsMediaCppStandardTest->/data/local/tmp/ActsMediaCppStandardTest"
],
"type": "PushKit"
}
],
"description": "Configuration for ActsMediaCppStandardTest Tests",
"driver": {
"native-test-timeout": "120000",
"native-test-timeout": "4800000",
"type": "CppTest",
"module-name": "ActsMediaCppStandardTest",
"runtime-hint": "1s",
"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.
先完成此消息的编辑!
想要评论请 注册