add testcase haps
Signed-off-by: shilei <shilei91@huawei.com> Change-Id: Id64d38a8b43e842188d6a31f1a1ed1ee54ec9927
@ -0,0 +1,20 @@
|
||||
/*
|
||||
* Copyright (c) 2023 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.
|
||||
*/
|
||||
|
||||
namespace OHOS {
|
||||
namespace AppExecFwk {
|
||||
void HapSo3() {}
|
||||
} // namespace AppExecFwk
|
||||
} // namespace OHOS
|
@ -0,0 +1,20 @@
|
||||
/*
|
||||
* Copyright (c) 2023 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.
|
||||
*/
|
||||
|
||||
namespace OHOS {
|
||||
namespace AppExecFwk {
|
||||
void HapSo4() {}
|
||||
} // namespace AppExecFwk
|
||||
} // namespace OHOS
|
@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Copyright (c) 2023 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 AbilityStage from "@ohos.app.ability.AbilityStage"
|
||||
|
||||
export default class MyAbilityStage extends AbilityStage {
|
||||
onCreate() {
|
||||
console.log("[Demo] MyAbilityStage onCreate")
|
||||
globalThis.stageOnCreateRun = 1;
|
||||
globalThis.stageContext = this.context;
|
||||
}
|
||||
}
|
@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Copyright (c) 2023 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 Ability from '@ohos.app.ability.UIAbility'
|
||||
|
||||
export default class MainAbility extends Ability {
|
||||
onCreate(want,launchParam){
|
||||
// Ability is creating, initialize resources for this ability
|
||||
console.log("[Demo] MainAbility onCreate")
|
||||
globalThis.abilityWant = want;
|
||||
}
|
||||
|
||||
onDestroy() {
|
||||
// Ability is destroying, release resources for this ability
|
||||
console.log("[Demo] MainAbility onDestroy")
|
||||
}
|
||||
|
||||
onWindowStageCreate(windowStage) {
|
||||
// Main window is created, set main page for this ability
|
||||
console.log("[Demo] MainAbility onWindowStageCreate")
|
||||
globalThis.abilityContext = this.context
|
||||
windowStage.setUIContent(this.context, "pages/index", null)
|
||||
}
|
||||
|
||||
onWindowStageDestroy() {
|
||||
//Main window is destroyed, release UI related resources
|
||||
console.log("[Demo] MainAbility onWindowStageDestroy")
|
||||
}
|
||||
|
||||
onForeground() {
|
||||
// Ability has brought to foreground
|
||||
console.log("[Demo] MainAbility onForeground")
|
||||
}
|
||||
|
||||
onBackground() {
|
||||
// Ability has back to background
|
||||
console.log("[Demo] MainAbility onBackground")
|
||||
}
|
||||
};
|
@ -0,0 +1,36 @@
|
||||
/*
|
||||
* Copyright (c) 2023 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 file from '@system.file';
|
||||
|
||||
import {Core, ExpectExtend, InstrumentLog, ReportExtend} from "deccjsunit/index.ets"
|
||||
import testsuite from "../../test/List.test.ets"
|
||||
|
||||
@Entry
|
||||
@Component
|
||||
struct Index {
|
||||
@State message: string = 'Default App Test'
|
||||
|
||||
build() {
|
||||
Row() {
|
||||
Column() {
|
||||
Text(this.message)
|
||||
.fontSize(50)
|
||||
.fontWeight(FontWeight.Bold)
|
||||
}
|
||||
.width('100%')
|
||||
}
|
||||
.height('100%')
|
||||
}
|
||||
}
|
@ -0,0 +1,40 @@
|
||||
{
|
||||
"module": {
|
||||
"installaitonFree": false,
|
||||
"mainElement": "MainAbility",
|
||||
"name": "feature10",
|
||||
"pages": "$profile:main_pages",
|
||||
"srcEntry": "./ets/Application/AbilityStage.ts",
|
||||
"type": "feature",
|
||||
"virtualMachine": "ark",
|
||||
"compressNativeLibs": true,
|
||||
"libIsolation": true,
|
||||
"deliveryWithInstall": true,
|
||||
"description": "$string:entry_desc",
|
||||
"descriptionId": 16777220,
|
||||
"deviceTypes": [
|
||||
"2in1",
|
||||
"default",
|
||||
"phone",
|
||||
"tablet"
|
||||
],
|
||||
"extensionAbilities": [
|
||||
{
|
||||
"name": "driverTest",
|
||||
"type": "driver",
|
||||
"visible": false,
|
||||
"srcEntrance": "./ets/Application/AbilityStage.ts",
|
||||
"description": "$string:entry_desc",
|
||||
"icon": "$media:icon",
|
||||
"label": "$string:MainAbility_label",
|
||||
"metadata": [
|
||||
{
|
||||
"name": "cupsFilter",
|
||||
"value": "/print_service/cups/datadir/model",
|
||||
"resource": "/resources/rawfile/main_pages.json"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
{
|
||||
"string": [
|
||||
{
|
||||
"name": "MainAbility_desc",
|
||||
"value": "i am an entry for phone"
|
||||
},
|
||||
{
|
||||
"name": "MainAbility_label",
|
||||
"value": "the phone entry ability"
|
||||
},
|
||||
{
|
||||
"name": "entry_desc",
|
||||
"value": "ActsContextTest"
|
||||
}
|
||||
]
|
||||
}
|
After Width: | Height: | Size: 6.6 KiB |
After Width: | Height: | Size: 6.6 KiB |
@ -0,0 +1 @@
|
||||
{"src" :["pages/index"]}
|
@ -0,0 +1 @@
|
||||
{"src" :["pages/index"]}
|
@ -0,0 +1,20 @@
|
||||
/*
|
||||
* Copyright (c) 2023 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.
|
||||
*/
|
||||
|
||||
namespace OHOS {
|
||||
namespace AppExecFwk {
|
||||
void HapSo3() {}
|
||||
} // namespace AppExecFwk
|
||||
} // namespace OHOS
|
@ -0,0 +1,20 @@
|
||||
/*
|
||||
* Copyright (c) 2023 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.
|
||||
*/
|
||||
|
||||
namespace OHOS {
|
||||
namespace AppExecFwk {
|
||||
void HapSo4() {}
|
||||
} // namespace AppExecFwk
|
||||
} // namespace OHOS
|
@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Copyright (c) 2023 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 AbilityStage from "@ohos.app.ability.AbilityStage"
|
||||
|
||||
export default class MyAbilityStage extends AbilityStage {
|
||||
onCreate() {
|
||||
console.log("[Demo] MyAbilityStage onCreate")
|
||||
globalThis.stageOnCreateRun = 1;
|
||||
globalThis.stageContext = this.context;
|
||||
}
|
||||
}
|
@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Copyright (c) 2023 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 Ability from '@ohos.app.ability.UIAbility'
|
||||
|
||||
export default class MainAbility extends Ability {
|
||||
onCreate(want,launchParam){
|
||||
// Ability is creating, initialize resources for this ability
|
||||
console.log("[Demo] MainAbility onCreate")
|
||||
globalThis.abilityWant = want;
|
||||
}
|
||||
|
||||
onDestroy() {
|
||||
// Ability is destroying, release resources for this ability
|
||||
console.log("[Demo] MainAbility onDestroy")
|
||||
}
|
||||
|
||||
onWindowStageCreate(windowStage) {
|
||||
// Main window is created, set main page for this ability
|
||||
console.log("[Demo] MainAbility onWindowStageCreate")
|
||||
globalThis.abilityContext = this.context
|
||||
windowStage.setUIContent(this.context, "pages/index", null)
|
||||
}
|
||||
|
||||
onWindowStageDestroy() {
|
||||
//Main window is destroyed, release UI related resources
|
||||
console.log("[Demo] MainAbility onWindowStageDestroy")
|
||||
}
|
||||
|
||||
onForeground() {
|
||||
// Ability has brought to foreground
|
||||
console.log("[Demo] MainAbility onForeground")
|
||||
}
|
||||
|
||||
onBackground() {
|
||||
// Ability has back to background
|
||||
console.log("[Demo] MainAbility onBackground")
|
||||
}
|
||||
};
|
@ -0,0 +1,36 @@
|
||||
/*
|
||||
* Copyright (c) 2023 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 file from '@system.file';
|
||||
|
||||
import {Core, ExpectExtend, InstrumentLog, ReportExtend} from "deccjsunit/index.ets"
|
||||
import testsuite from "../../test/List.test.ets"
|
||||
|
||||
@Entry
|
||||
@Component
|
||||
struct Index {
|
||||
@State message: string = 'Default App Test'
|
||||
|
||||
build() {
|
||||
Row() {
|
||||
Column() {
|
||||
Text(this.message)
|
||||
.fontSize(50)
|
||||
.fontWeight(FontWeight.Bold)
|
||||
}
|
||||
.width('100%')
|
||||
}
|
||||
.height('100%')
|
||||
}
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
{
|
||||
"module": {
|
||||
"installaitonFree": false,
|
||||
"mainElement": "MainAbility",
|
||||
"name": "feature7",
|
||||
"pages": "$profile:main_pages",
|
||||
"srcEntry": "./ets/Application/AbilityStage.ts",
|
||||
"type": "feature",
|
||||
"virtualMachine": "ark",
|
||||
"compressNativeLibs": true,
|
||||
"libIsolation": true,
|
||||
"deliveryWithInstall": true,
|
||||
"description": "$string:entry_desc",
|
||||
"descriptionId": 16777220,
|
||||
"deviceTypes": [
|
||||
"2in1",
|
||||
"default",
|
||||
"phone",
|
||||
"tablet"
|
||||
],
|
||||
"extensionAbilities": [
|
||||
{
|
||||
"name": "driverTest",
|
||||
"type": "driver",
|
||||
"visible": false,
|
||||
"srcEntrance": "./ets/Application/AbilityStage.ts",
|
||||
"description": "$string:entry_desc",
|
||||
"icon": "$media:icon",
|
||||
"label": "$string:MainAbility_label"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
{
|
||||
"string": [
|
||||
{
|
||||
"name": "MainAbility_desc",
|
||||
"value": "i am an entry for phone"
|
||||
},
|
||||
{
|
||||
"name": "MainAbility_label",
|
||||
"value": "the phone entry ability"
|
||||
},
|
||||
{
|
||||
"name": "entry_desc",
|
||||
"value": "ActsContextTest"
|
||||
}
|
||||
]
|
||||
}
|
After Width: | Height: | Size: 6.6 KiB |
After Width: | Height: | Size: 6.6 KiB |
@ -0,0 +1 @@
|
||||
{"src" :["pages/index"]}
|
@ -0,0 +1 @@
|
||||
{"src" :["pages/index"]}
|
@ -0,0 +1,20 @@
|
||||
/*
|
||||
* Copyright (c) 2023 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.
|
||||
*/
|
||||
|
||||
namespace OHOS {
|
||||
namespace AppExecFwk {
|
||||
void HapSo3() {}
|
||||
} // namespace AppExecFwk
|
||||
} // namespace OHOS
|
@ -0,0 +1,20 @@
|
||||
/*
|
||||
* Copyright (c) 2023 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.
|
||||
*/
|
||||
|
||||
namespace OHOS {
|
||||
namespace AppExecFwk {
|
||||
void HapSo4() {}
|
||||
} // namespace AppExecFwk
|
||||
} // namespace OHOS
|
@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Copyright (c) 2023 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 AbilityStage from "@ohos.app.ability.AbilityStage"
|
||||
|
||||
export default class MyAbilityStage extends AbilityStage {
|
||||
onCreate() {
|
||||
console.log("[Demo] MyAbilityStage onCreate")
|
||||
globalThis.stageOnCreateRun = 1;
|
||||
globalThis.stageContext = this.context;
|
||||
}
|
||||
}
|
@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Copyright (c) 2023 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 Ability from '@ohos.app.ability.UIAbility'
|
||||
|
||||
export default class MainAbility extends Ability {
|
||||
onCreate(want,launchParam){
|
||||
// Ability is creating, initialize resources for this ability
|
||||
console.log("[Demo] MainAbility onCreate")
|
||||
globalThis.abilityWant = want;
|
||||
}
|
||||
|
||||
onDestroy() {
|
||||
// Ability is destroying, release resources for this ability
|
||||
console.log("[Demo] MainAbility onDestroy")
|
||||
}
|
||||
|
||||
onWindowStageCreate(windowStage) {
|
||||
// Main window is created, set main page for this ability
|
||||
console.log("[Demo] MainAbility onWindowStageCreate")
|
||||
globalThis.abilityContext = this.context
|
||||
windowStage.setUIContent(this.context, "pages/index", null)
|
||||
}
|
||||
|
||||
onWindowStageDestroy() {
|
||||
//Main window is destroyed, release UI related resources
|
||||
console.log("[Demo] MainAbility onWindowStageDestroy")
|
||||
}
|
||||
|
||||
onForeground() {
|
||||
// Ability has brought to foreground
|
||||
console.log("[Demo] MainAbility onForeground")
|
||||
}
|
||||
|
||||
onBackground() {
|
||||
// Ability has back to background
|
||||
console.log("[Demo] MainAbility onBackground")
|
||||
}
|
||||
};
|
@ -0,0 +1,36 @@
|
||||
/*
|
||||
* Copyright (c) 2023 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 file from '@system.file';
|
||||
|
||||
import {Core, ExpectExtend, InstrumentLog, ReportExtend} from "deccjsunit/index.ets"
|
||||
import testsuite from "../../test/List.test.ets"
|
||||
|
||||
@Entry
|
||||
@Component
|
||||
struct Index {
|
||||
@State message: string = 'Default App Test'
|
||||
|
||||
build() {
|
||||
Row() {
|
||||
Column() {
|
||||
Text(this.message)
|
||||
.fontSize(50)
|
||||
.fontWeight(FontWeight.Bold)
|
||||
}
|
||||
.width('100%')
|
||||
}
|
||||
.height('100%')
|
||||
}
|
||||
}
|
@ -0,0 +1,40 @@
|
||||
{
|
||||
"module": {
|
||||
"installaitonFree": false,
|
||||
"mainElement": "MainAbility",
|
||||
"name": "feature8",
|
||||
"pages": "$profile:main_pages",
|
||||
"srcEntry": "./ets/Application/AbilityStage.ts",
|
||||
"type": "feature",
|
||||
"virtualMachine": "ark",
|
||||
"compressNativeLibs": true,
|
||||
"libIsolation": true,
|
||||
"deliveryWithInstall": true,
|
||||
"description": "$string:entry_desc",
|
||||
"descriptionId": 16777220,
|
||||
"deviceTypes": [
|
||||
"2in1",
|
||||
"default",
|
||||
"phone",
|
||||
"tablet"
|
||||
],
|
||||
"extensionAbilities": [
|
||||
{
|
||||
"name": "driverTest",
|
||||
"type": "driver",
|
||||
"visible": false,
|
||||
"srcEntrance": "./ets/Application/AbilityStage.ts",
|
||||
"description": "$string:entry_desc",
|
||||
"icon": "$media:icon",
|
||||
"label": "$string:MainAbility_label",
|
||||
"metadata": [
|
||||
{
|
||||
"name": "demo1",
|
||||
"value": "",
|
||||
"resource": "$profile:main_pages"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
{
|
||||
"string": [
|
||||
{
|
||||
"name": "MainAbility_desc",
|
||||
"value": "i am an entry for phone"
|
||||
},
|
||||
{
|
||||
"name": "MainAbility_label",
|
||||
"value": "the phone entry ability"
|
||||
},
|
||||
{
|
||||
"name": "entry_desc",
|
||||
"value": "ActsContextTest"
|
||||
}
|
||||
]
|
||||
}
|
After Width: | Height: | Size: 6.6 KiB |
After Width: | Height: | Size: 6.6 KiB |
@ -0,0 +1 @@
|
||||
{"src" :["pages/index"]}
|
@ -0,0 +1 @@
|
||||
{"src" :["pages/index"]}
|
@ -0,0 +1,20 @@
|
||||
/*
|
||||
* Copyright (c) 2023 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.
|
||||
*/
|
||||
|
||||
namespace OHOS {
|
||||
namespace AppExecFwk {
|
||||
void HapSo3() {}
|
||||
} // namespace AppExecFwk
|
||||
} // namespace OHOS
|
@ -0,0 +1,20 @@
|
||||
/*
|
||||
* Copyright (c) 2023 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.
|
||||
*/
|
||||
|
||||
namespace OHOS {
|
||||
namespace AppExecFwk {
|
||||
void HapSo4() {}
|
||||
} // namespace AppExecFwk
|
||||
} // namespace OHOS
|
@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Copyright (c) 2023 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 AbilityStage from "@ohos.app.ability.AbilityStage"
|
||||
|
||||
export default class MyAbilityStage extends AbilityStage {
|
||||
onCreate() {
|
||||
console.log("[Demo] MyAbilityStage onCreate")
|
||||
globalThis.stageOnCreateRun = 1;
|
||||
globalThis.stageContext = this.context;
|
||||
}
|
||||
}
|
@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Copyright (c) 2023 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 Ability from '@ohos.app.ability.UIAbility'
|
||||
|
||||
export default class MainAbility extends Ability {
|
||||
onCreate(want,launchParam){
|
||||
// Ability is creating, initialize resources for this ability
|
||||
console.log("[Demo] MainAbility onCreate")
|
||||
globalThis.abilityWant = want;
|
||||
}
|
||||
|
||||
onDestroy() {
|
||||
// Ability is destroying, release resources for this ability
|
||||
console.log("[Demo] MainAbility onDestroy")
|
||||
}
|
||||
|
||||
onWindowStageCreate(windowStage) {
|
||||
// Main window is created, set main page for this ability
|
||||
console.log("[Demo] MainAbility onWindowStageCreate")
|
||||
globalThis.abilityContext = this.context
|
||||
windowStage.setUIContent(this.context, "pages/index", null)
|
||||
}
|
||||
|
||||
onWindowStageDestroy() {
|
||||
//Main window is destroyed, release UI related resources
|
||||
console.log("[Demo] MainAbility onWindowStageDestroy")
|
||||
}
|
||||
|
||||
onForeground() {
|
||||
// Ability has brought to foreground
|
||||
console.log("[Demo] MainAbility onForeground")
|
||||
}
|
||||
|
||||
onBackground() {
|
||||
// Ability has back to background
|
||||
console.log("[Demo] MainAbility onBackground")
|
||||
}
|
||||
};
|
@ -0,0 +1,36 @@
|
||||
/*
|
||||
* Copyright (c) 2023 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 file from '@system.file';
|
||||
|
||||
import {Core, ExpectExtend, InstrumentLog, ReportExtend} from "deccjsunit/index.ets"
|
||||
import testsuite from "../../test/List.test.ets"
|
||||
|
||||
@Entry
|
||||
@Component
|
||||
struct Index {
|
||||
@State message: string = 'Default App Test'
|
||||
|
||||
build() {
|
||||
Row() {
|
||||
Column() {
|
||||
Text(this.message)
|
||||
.fontSize(50)
|
||||
.fontWeight(FontWeight.Bold)
|
||||
}
|
||||
.width('100%')
|
||||
}
|
||||
.height('100%')
|
||||
}
|
||||
}
|
@ -0,0 +1,40 @@
|
||||
{
|
||||
"module": {
|
||||
"installaitonFree": false,
|
||||
"mainElement": "MainAbility",
|
||||
"name": "feature9",
|
||||
"pages": "$profile:main_pages",
|
||||
"srcEntry": "./ets/Application/AbilityStage.ts",
|
||||
"type": "feature",
|
||||
"virtualMachine": "ark",
|
||||
"compressNativeLibs": true,
|
||||
"libIsolation": true,
|
||||
"deliveryWithInstall": true,
|
||||
"description": "$string:entry_desc",
|
||||
"descriptionId": 16777220,
|
||||
"deviceTypes": [
|
||||
"2in1",
|
||||
"default",
|
||||
"phone",
|
||||
"tablet"
|
||||
],
|
||||
"extensionAbilities": [
|
||||
{
|
||||
"name": "driverTest",
|
||||
"type": "driver",
|
||||
"visible": false,
|
||||
"srcEntrance": "./ets/Application/AbilityStage.ts",
|
||||
"description": "$string:entry_desc",
|
||||
"icon": "$media:icon",
|
||||
"label": "$string:MainAbility_label",
|
||||
"metadata": [
|
||||
{
|
||||
"name": "cupsFilter",
|
||||
"value": "/print_service/cups/datadir/model",
|
||||
"resource": "/resources/rawfile/backend.ppd"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
{
|
||||
"string": [
|
||||
{
|
||||
"name": "MainAbility_desc",
|
||||
"value": "i am an entry for phone"
|
||||
},
|
||||
{
|
||||
"name": "MainAbility_label",
|
||||
"value": "the phone entry ability"
|
||||
},
|
||||
{
|
||||
"name": "entry_desc",
|
||||
"value": "ActsContextTest"
|
||||
}
|
||||
]
|
||||
}
|
After Width: | Height: | Size: 6.6 KiB |
After Width: | Height: | Size: 6.6 KiB |
@ -0,0 +1 @@
|
||||
{"src" :["pages/index"]}
|
@ -0,0 +1 @@
|
||||
{"src" :["pages/index"]}
|