未验证 提交 0f8ed2e9 编写于 作者: O openharmony_ci 提交者: Gitee

!5166 元能力用例修改

Merge pull request !5166 from chengxingzhen/monthly_20220816
......@@ -17,9 +17,12 @@ group("actssupportfunction") {
testonly = true
if (is_standard_system) {
deps = [
"actsonandoffscreentest:ActsOnAndOffScreenTest",
"actssupportfunctiontest:ActsSupportFunctionTest",
"faonandoffscreen:FaOnAndOffScreen",
"fasupportfunction:fasupportfunction",
"fasupportfunctionthree:fasupportfunctionthree",
"stageonandoffscreen:StageOnAndOffScreen",
"stagesupportfunction:StageSupportFunction",
]
}
......
{
"app": {
"bundleName": "com.example.actsonandoffscreentest",
"vendor": "huawei",
"versionCode": 1000000,
"versionName": "1.0.0",
"debug": false,
"icon": "$media:app_icon",
"label": "$string:app_name",
"description" : "$string:app_name",
"distributedNotificationEnabled": true,
"keepAlive" : true,
"singleUser": true,
"minAPIVersion": 9,
"targetAPIVersion": 9,
"car": {
"apiCompatibleVersion": 9,
"singleUser": false
}
}
}
# Copyright (c) 2022 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import("//test/xts/tools/build/suite.gni")
ohos_js_hap_suite("ActsOnAndOffScreenTest") {
hap_profile = "entry/src/main/module.json"
deps = [
":actsonandoffscreentest_js_assets",
":actsonandoffscreentest_resources",
]
ets2abc = true
certificate_profile = "signature/openharmony_sx.p7b"
hap_name = "ActsOnAndOffScreenTest"
subsystem_name = "ability"
part_name = "ability_runtime"
}
ohos_app_scope("actsonandoffscreentest_app_profile") {
app_profile = "AppScope/app.json"
sources = [ "AppScope/resources" ]
}
ohos_js_assets("actsonandoffscreentest_js_assets") {
source_dir = "entry/src/main/ets"
}
ohos_resources("actsonandoffscreentest_resources") {
sources = [ "entry/src/main/resources" ]
deps = [ ":actsonandoffscreentest_app_profile" ]
hap_profile = "entry/src/main/module.json"
}
{
"description": "Configuration for aceceshi Tests",
"driver": {
"type": "OHJSUnitTest",
"test-timeout": "600000",
"bundle-name": "com.example.actsonandoffscreentest",
"module-name": "entry",
"shell-timeout": "600000",
"testcase-timeout":"30000"
},
"kits": [
{
"test-file-name": [
"ActsOnAndOffScreenTest.hap",
"FaOnAndOffScreen.hap",
"StageOnAndOffScreen.hap"
],
"type": "AppInstallKit",
"cleanup-apps": true
}
]
}
/*
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import AbilityStage from "@ohos.application.AbilityStage";
var TAG0 = 'ActsOnAndOffScreenTest:MyAbilityStage:';
export default class MyAbilityStage extends AbilityStage {
onCreate() {
console.log(TAG0 + "onCreate")
}
}
\ No newline at end of file
/*
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import Ability from '@ohos.application.Ability';
import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry';
import { Hypium } from '@ohos/hypium';
import testsuite from '../test/List.test';
var TAG1 = 'ActsOnAndOffScreenTest:MainAbility:';
export default class MainAbility extends Ability {
onCreate(want, launchParam) {
console.log(TAG1 + 'onCreate');
globalThis.abilityTestContext = this.context;
globalThis.abilityWant = want;
globalThis.abilityWant.parameters.timeout = 15000;
var abilityDelegator: any
abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator()
var abilityDelegatorArguments: any
abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments()
console.log('start run testcase!!!')
Hypium.hypiumTest(abilityDelegator, abilityDelegatorArguments, testsuite)
}
onDestroy() {
console.log(TAG1 + 'onDestroy');
}
onWindowStageCreate(windowStage) {
console.log(TAG1 + 'onWindowStageCreate');
windowStage.loadContent("pages/index", (err, data) => {
if (err.code) {
console.log(TAG1 + 'Failed to load the content. Cause:' + JSON.stringify(err));
return;
}
console.log(TAG1 + 'Succeeded in loading the content. Data: ' + JSON.stringify(data));
});
}
onWindowStageDestroy() {
console.log(TAG1 + 'onWindowStageDestroy');
}
onForeground() {
console.log(TAG1 + 'onForeground');
}
onBackground() {
console.log(TAG1 + 'onBackground');
}
};
/*
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import TestRunner from '@ohos.application.testRunner';
import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry';
var abilityDelegator = undefined
var abilityDelegatorArguments = undefined
var TAG = "ActsOnAndOffScreenTest == "
function translateParamsToString(parameters) {
const keySet = new Set([
'-s class', '-s notClass', '-s suite', '-s it',
'-s level', '-s testType', '-s size', '-s timeout'
])
let targetParams = '';
for (const key in parameters) {
if (keySet.has(key)) {
targetParams = `${targetParams} ${key} ${parameters[key]}`
}
}
return targetParams.trim()
}
async function onAbilityCreateCallback() {
console.log(TAG + "onAbilityCreateCallback");
}
async function addAbilityMonitorCallback(err: any) {
console.log(TAG + "addAbilityMonitorCallback : " + JSON.stringify(err))
}
export default class OpenHarmonyTestRunner implements TestRunner {
constructor() {
}
onPrepare() {
console.log(TAG + "OpenHarmonyTestRunner OnPrepare ")
}
async onRun() {
console.log(TAG + 'OpenHarmonyTestRunner onRun run')
abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments()
abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator()
globalThis.abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator()
var MainAbilityName = 'MainAbility'
let lMonitor = {
abilityName: MainAbilityName,
onAbilityCreate: onAbilityCreateCallback,
};
abilityDelegator.addAbilityMonitor(lMonitor, addAbilityMonitorCallback)
var cmd = 'aa start -d 0 -a MainAbility' + ' -b ' + abilityDelegatorArguments.bundleName
cmd += ' '+translateParamsToString(abilityDelegatorArguments.parameters)
console.log(TAG + 'cmd : '+cmd)
abilityDelegator.executeShellCommand(cmd,
(err: any, d: any) => {
console.log(TAG + 'executeShellCommand : err : ' + JSON.stringify(err));
console.log(TAG + 'executeShellCommand : data : ' + d.stdResult);
console.log(TAG + 'executeShellCommand : data : ' + d.exitCode);
})
console.log(TAG + 'OpenHarmonyTestRunner onRun end')
}
};
\ No newline at end of file
/*
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
@Entry
@Component
struct Index {
aboutToAppear() {
console.log('ActsOnAndOffScreenTest MainAbility index aboutToAppear')
}
@State message: string = 'Hello World ActsOnAndOffScreenTest 1'
build() {
Row() {
Column() {
Text(this.message)
.fontSize(50)
.fontWeight(FontWeight.Bold)
}
.width('100%')
}
.height('100%')
}
}
\ No newline at end of file
/*
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import onAndOffScreenTest from './OnAndOffScreenTest.test';
export default function testsuite() {
onAndOffScreenTest();
}
\ No newline at end of file
{
"module": {
"name": "entry",
"type": "entry",
"srcEntrance": "./ets/Application/MyAbilityStage.ts",
"description": "$string:entry_desc",
"mainElement": "MainAbility",
"deviceTypes": [
"phone"
],
"deliveryWithInstall": true,
"installationFree": false,
"pages": "$profile:main_pages",
"uiSyntax": "ets",
"abilities": [
{
"name": "MainAbility",
"srcEntrance": "./ets/MainAbility/MainAbility.ts",
"description": "$string:MainAbility_desc",
"icon": "$media:icon",
"label": "$string:MainAbility_label",
"startWindowIcon": "$media:icon",
"startWindowBackground": "$color:white",
"visible": true,
"skills": [
{
"entities": [
"entity.system.home"
],
"actions": [
"action.system.home"
]
}
]
}
]
}
}
\ No newline at end of file
{
"color": [
{
"name": "white",
"value": "#FFFFFF"
}
]
}
\ No newline at end of file
{
"string": [
{
"name": "entry_desc",
"value": "description"
},
{
"name": "MainAbility_desc",
"value": "description"
},
{
"name": "MainAbility_label",
"value": "ActsOnAndOffScreenTest"
}
]
}
\ No newline at end of file
......@@ -22,7 +22,7 @@ export default function FaSetDisplayOrientationTest() {
describe('FaSetDisplayOrientationTest', function () {
let TAG = "";
let TAG1 = "SUB_AA_OpenHarmony == ";
let TAG1 = "SUB_AA_OpenHarmony == FaSetDisplayOrientationTest : ";
let sleepTimeOne = 1000;
let sleepTimeTwo = 2000;
let abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator();
......@@ -67,12 +67,12 @@ export default function FaSetDisplayOrientationTest() {
})
/*
* @tc.number : SUB_AA_OpenHarmony_DisplayOrientation_0200
* @tc.number : SUB_AA_OpenHarmony_DisplayOrientation_0500
* @tc.name : Verify getDisplayOrientation and setDisplayOrientation interfaces
* @tc.desc : Set the horizontal and vertical screen status of ability to UNSPECIFIED.
*/
it('SUB_AA_OpenHarmony_DisplayOrientation_0200', 0, async function (done) {
TAG = 'SUB_AA_OpenHarmony_DisplayOrientation_0200 == ';
it('SUB_AA_OpenHarmony_DisplayOrientation_0500', 0, async function (done) {
TAG = 'SUB_AA_OpenHarmony_DisplayOrientation_0500 == ';
console.log(TAG + "begin");
let displayOrientationBefore = undefined;
......@@ -131,12 +131,12 @@ export default function FaSetDisplayOrientationTest() {
})
/*
* @tc.number : SUB_AA_OpenHarmony_DisplayOrientation_0300
* @tc.number : SUB_AA_OpenHarmony_DisplayOrientation_0600
* @tc.name : Verify getDisplayOrientation and setDisplayOrientation interfaces
* @tc.desc : Set the horizontal and vertical screen status of ability to LANDSCAPE.
*/
it('SUB_AA_OpenHarmony_DisplayOrientation_0300', 0, async function (done) {
TAG = 'SUB_AA_OpenHarmony_DisplayOrientation_0300 == ';
it('SUB_AA_OpenHarmony_DisplayOrientation_0600', 0, async function (done) {
TAG = 'SUB_AA_OpenHarmony_DisplayOrientation_0600 == ';
console.log(TAG + "begin");
let displayOrientationBefore = undefined;
......@@ -198,12 +198,12 @@ export default function FaSetDisplayOrientationTest() {
})
/*
* @tc.number : SUB_AA_OpenHarmony_DisplayOrientation_0400
* @tc.number : SUB_AA_OpenHarmony_DisplayOrientation_0700
* @tc.name : Verify getDisplayOrientation and setDisplayOrientation interfaces
* @tc.desc : Set the horizontal and vertical screen status of ability to PORTRAIT.
*/
it('SUB_AA_OpenHarmony_DisplayOrientation_0400', 0, async function (done) {
TAG = 'SUB_AA_OpenHarmony_DisplayOrientation_0400 == ';
it('SUB_AA_OpenHarmony_DisplayOrientation_0700', 0, async function (done) {
TAG = 'SUB_AA_OpenHarmony_DisplayOrientation_0700 == ';
console.log(TAG + "begin");
let displayOrientationBefore = undefined;
......@@ -265,13 +265,13 @@ export default function FaSetDisplayOrientationTest() {
})
/*
* @tc.number : SUB_AA_OpenHarmony_DisplayOrientation_0500
* @tc.number : SUB_AA_OpenHarmony_DisplayOrientation_0800
* @tc.name : Verify getDisplayOrientation and setDisplayOrientation interfaces
* @tc.desc : The same applies to setting ability1 to LANDSCAPE, and ability1 starts ability2 and sets the status
of ability2 to FOLLOW_RECENT.
*/
it('SUB_AA_OpenHarmony_DisplayOrientation_0500', 0, async function (done) {
TAG = 'SUB_AA_OpenHarmony_DisplayOrientation_0500 == ';
it('SUB_AA_OpenHarmony_DisplayOrientation_0800', 0, async function (done) {
TAG = 'SUB_AA_OpenHarmony_DisplayOrientation_0800 == ';
console.log(TAG + "begin");
let displayOrientationBefore1 = undefined;
......@@ -349,13 +349,13 @@ export default function FaSetDisplayOrientationTest() {
})
/*
* @tc.number : SUB_AA_OpenHarmony_DisplayOrientation_0600
* @tc.number : SUB_AA_OpenHarmony_DisplayOrientation_0900
* @tc.name : Verify getDisplayOrientation and setDisplayOrientation interfaces
* @tc.desc : The same applies to setting ability1 to PORTRAIT, and ability1 starts ability2 and sets the status
of ability2 to FOLLOW_RECENT.
*/
it('SUB_AA_OpenHarmony_DisplayOrientation_0600', 0, async function (done) {
TAG = 'SUB_AA_OpenHarmony_DisplayOrientation_0600 == ';
it('SUB_AA_OpenHarmony_DisplayOrientation_0900', 0, async function (done) {
TAG = 'SUB_AA_OpenHarmony_DisplayOrientation_0900 == ';
console.log(TAG + "begin");
let displayOrientationBefore1 = undefined;
......@@ -433,13 +433,13 @@ export default function FaSetDisplayOrientationTest() {
})
/*
* @tc.number : SUB_AA_OpenHarmony_DisplayOrientation_0700
* @tc.number : SUB_AA_OpenHarmony_DisplayOrientation_1000
* @tc.name : Verify getDisplayOrientation and setDisplayOrientation interfaces
* @tc.desc : Different haps set ability1 to LANDSCAPE, and ability1 starts ability2 and sets the status of
ability2 to FOLLOW_RECENT.
*/
it('SUB_AA_OpenHarmony_DisplayOrientation_0700', 0, async function (done) {
TAG = 'SUB_AA_OpenHarmony_DisplayOrientation_0700 == ';
it('SUB_AA_OpenHarmony_DisplayOrientation_1000', 0, async function (done) {
TAG = 'SUB_AA_OpenHarmony_DisplayOrientation_1000 == ';
console.log(TAG + "begin");
let displayOrientationBefore1 = undefined;
......@@ -517,13 +517,13 @@ export default function FaSetDisplayOrientationTest() {
})
/*
* @tc.number : SUB_AA_OpenHarmony_DisplayOrientation_0800
* @tc.number : SUB_AA_OpenHarmony_DisplayOrientation_1100
* @tc.name : Verify getDisplayOrientation and setDisplayOrientation interfaces
* @tc.desc : Different haps set ability1 to PORTRAIT, and ability1 starts ability2 and sets the status of
ability2 to FOLLOW_RECENT.
*/
it('SUB_AA_OpenHarmony_DisplayOrientation_0800', 0, async function (done) {
TAG = 'SUB_AA_OpenHarmony_DisplayOrientation_0800 == ';
it('SUB_AA_OpenHarmony_DisplayOrientation_1100', 0, async function (done) {
TAG = 'SUB_AA_OpenHarmony_DisplayOrientation_1100 == ';
console.log(TAG + "begin");
let displayOrientationBefore1 = undefined;
......@@ -601,13 +601,13 @@ export default function FaSetDisplayOrientationTest() {
})
/*
* @tc.number : SUB_AA_OpenHarmony_DisplayOrientation_0900
* @tc.number : SUB_AA_OpenHarmony_DisplayOrientation_1200
* @tc.name : Verify getDisplayOrientation and setDisplayOrientation interfaces
* @tc.desc : Different applications set ability1 to LANDSCAPE, and ability1 starts ability2 and sets the status
of ability2 to FOLLOW_RECENT.
*/
it('SUB_AA_OpenHarmony_DisplayOrientation_0900', 0, async function (done) {
TAG = 'SUB_AA_OpenHarmony_DisplayOrientation_0900 == ';
it('SUB_AA_OpenHarmony_DisplayOrientation_1200', 0, async function (done) {
TAG = 'SUB_AA_OpenHarmony_DisplayOrientation_1200 == ';
console.log(TAG + "begin");
let displayOrientationBefore1 = undefined;
......@@ -685,13 +685,13 @@ export default function FaSetDisplayOrientationTest() {
})
/*
* @tc.number : SUB_AA_OpenHarmony_DisplayOrientation_1000
* @tc.number : SUB_AA_OpenHarmony_DisplayOrientation_1300
* @tc.name : Verify getDisplayOrientation and setDisplayOrientation interfaces
* @tc.desc : Different applications set ability1 to PORTRAIT, and ability1 starts ability2 and sets the status
of ability2 to FOLLOW_RECENT.
*/
it('SUB_AA_OpenHarmony_DisplayOrientation_1000', 0, async function (done) {
TAG = 'SUB_AA_OpenHarmony_DisplayOrientation_1000 == ';
it('SUB_AA_OpenHarmony_DisplayOrientation_1300', 0, async function (done) {
TAG = 'SUB_AA_OpenHarmony_DisplayOrientation_1300 == ';
console.log(TAG + "begin");
let displayOrientationBefore1 = undefined;
......@@ -773,12 +773,12 @@ export default function FaSetDisplayOrientationTest() {
})
/*
* @tc.number : SUB_AA_OpenHarmony_DisplayOrientation_1100
* @tc.number : SUB_AA_OpenHarmony_DisplayOrientation_1400
* @tc.name : Verify setDisplayOrientation interfaces
* @tc.desc : SetDisplayOrientation input parameter is undefined.
*/
it('SUB_AA_OpenHarmony_DisplayOrientation_1100', 0, async function (done) {
TAG = 'SUB_AA_OpenHarmony_DisplayOrientation_1100 == ';
it('SUB_AA_OpenHarmony_DisplayOrientation_1400', 0, async function (done) {
TAG = 'SUB_AA_OpenHarmony_DisplayOrientation_1400 == ';
console.log(TAG + "begin");
let status1 = undefined;
......@@ -837,12 +837,12 @@ export default function FaSetDisplayOrientationTest() {
})
/*
* @tc.number : SUB_AA_OpenHarmony_DisplayOrientation_1200
* @tc.number : SUB_AA_OpenHarmony_DisplayOrientation_1500
* @tc.name : Verify setDisplayOrientation interfaces
* @tc.desc : SetDisplayOrientation input parameter is -1.
*/
it('SUB_AA_OpenHarmony_DisplayOrientation_1200', 0, async function (done) {
TAG = 'SUB_AA_OpenHarmony_DisplayOrientation_1200 == ';
it('SUB_AA_OpenHarmony_DisplayOrientation_1500', 0, async function (done) {
TAG = 'SUB_AA_OpenHarmony_DisplayOrientation_1500 == ';
console.log(TAG + "begin");
let status1 = undefined;
......@@ -901,12 +901,12 @@ export default function FaSetDisplayOrientationTest() {
})
/*
* @tc.number : SUB_AA_OpenHarmony_DisplayOrientation_1300
* @tc.number : SUB_AA_OpenHarmony_DisplayOrientation_1600
* @tc.name : Verify setDisplayOrientation interfaces
* @tc.desc : SetDisplayOrientation input parameter is a nonexistent enumeration value.
*/
it('SUB_AA_OpenHarmony_DisplayOrientation_1300', 0, async function (done) {
TAG = 'SUB_AA_OpenHarmony_DisplayOrientation_1300 == ';
it('SUB_AA_OpenHarmony_DisplayOrientation_1600', 0, async function (done) {
TAG = 'SUB_AA_OpenHarmony_DisplayOrientation_1600 == ';
console.log(TAG + "begin");
let status1 = undefined;
......@@ -965,12 +965,12 @@ export default function FaSetDisplayOrientationTest() {
})
/*
* @tc.number : SUB_AA_OpenHarmony_DisplayOrientation_1400
* @tc.number : SUB_AA_OpenHarmony_DisplayOrientation_1700
* @tc.name : Verify setDisplayOrientation interfaces
* @tc.desc : SetDisplayOrientation input parameter is a value of string type.
*/
it('SUB_AA_OpenHarmony_DisplayOrientation_1400', 0, async function (done) {
TAG = 'SUB_AA_OpenHarmony_DisplayOrientation_1400 == ';
it('SUB_AA_OpenHarmony_DisplayOrientation_1700', 0, async function (done) {
TAG = 'SUB_AA_OpenHarmony_DisplayOrientation_1700 == ';
console.log(TAG + "begin");
let status1 = undefined;
......@@ -1029,12 +1029,12 @@ export default function FaSetDisplayOrientationTest() {
})
/*
* @tc.number : SUB_AA_OpenHarmony_DisplayOrientation_1500
* @tc.number : SUB_AA_OpenHarmony_DisplayOrientation_1800
* @tc.name : Verify setDisplayOrientation interfaces
* @tc.desc : SetDisplayOrientation input parameter is of type array.
*/
it('SUB_AA_OpenHarmony_DisplayOrientation_1500', 0, async function (done) {
TAG = 'SUB_AA_OpenHarmony_DisplayOrientation_1500 == ';
it('SUB_AA_OpenHarmony_DisplayOrientation_1800', 0, async function (done) {
TAG = 'SUB_AA_OpenHarmony_DisplayOrientation_1800 == ';
console.log(TAG + "begin");
let status1 = undefined;
......@@ -1093,12 +1093,12 @@ export default function FaSetDisplayOrientationTest() {
})
/*
* @tc.number : SUB_AA_OpenHarmony_DisplayOrientation_1600
* @tc.number : SUB_AA_OpenHarmony_DisplayOrientation_1900
* @tc.name : Verify setDisplayOrientation interfaces
* @tc.desc : SetDisplayOrientation input parameter is of type json.
*/
it('SUB_AA_OpenHarmony_DisplayOrientation_1600', 0, async function (done) {
TAG = 'SUB_AA_OpenHarmony_DisplayOrientation_1600 == ';
it('SUB_AA_OpenHarmony_DisplayOrientation_1900', 0, async function (done) {
TAG = 'SUB_AA_OpenHarmony_DisplayOrientation_1900 == ';
console.log(TAG + "begin");
let status1 = undefined;
......
......@@ -22,7 +22,7 @@ export default function FaShowOnLockTest() {
describe('FaShowOnLockTest', function () {
let TAG = "";
let TAG1 = "SUB_AA_OpenHarmony == ";
let TAG1 = "SUB_AA_OpenHarmony == FaShowOnLockTest : ";
let sleepTimeOne = 1000;
let sleepTimeTwo = 2000;
let abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator();
......
# Copyright (c) 2022 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import("//test/xts/tools/build/suite.gni")
ohos_hap_assist_suite("FaOnAndOffScreen") {
hap_name = "FaOnAndOffScreen"
hap_profile = "./entry/src/main/config.json"
testonly = true
deps = [
":faonandoffscreen_resources",
":faonandoffscreen_ts_assets",
]
ets2abc = true
certificate_profile = "signature/openharmony_sx.p7b"
subsystem_name = "ability"
part_name = "ability_runtime"
}
ohos_js_assets("faonandoffscreen_ts_assets") {
source_dir = "./entry/src/main/ets/MainAbility"
}
ohos_resources("faonandoffscreen_resources") {
sources = [ "./entry/src/main/resources" ]
hap_profile = "./entry/src/main/config.json"
}
{
"app": {
"bundleName": "ohos.acts.aafwk.test.faonandoffscreen",
"vendor": "huawei",
"version": {
"code": 1000000,
"name": "1.0.0"
},
"apiVersion": {
"compatible": 9,
"target": 9
}
},
"deviceConfig": {},
"module": {
"package": "ohos.acts.aafwk.test.faonandoffscreen",
"name": ".entry",
"mainAbility": ".MainAbility",
"deviceType": [
"phone"
],
"distro": {
"deliveryWithInstall": true,
"moduleName": "entry",
"moduleType": "entry",
"installationFree": false
},
"abilities": [
{
"skills": [
{
"entities": [
"entity.system.home"
],
"actions": [
"action.system.home"
]
}
],
"orientation": "unspecified",
"formsEnabled": false,
"name": ".MainAbility",
"srcLanguage": "ets",
"srcPath": "MainAbility",
"icon": "$media:icon",
"description": "$string:MainAbility_desc",
"label": "$string:MainAbility_label",
"type": "page",
"visible": true,
"launchType": "singleton"
}
],
"js": [
{
"mode": {
"syntax": "ets",
"type": "pageAbility"
},
"pages": [
"pages/index"
],
"name": ".MainAbility",
"window": {
"designWidth": 720,
"autoDesignWidth": false
}
}
]
}
}
\ No newline at end of file
/*
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import ability_featureAbility from '@ohos.ability.featureAbility';
import commonEvent from '@ohos.commonEvent';
var TAG1 = "Fa:FaOnAndOffScreen:MainAbility:";
var listPush1 = "FaOnAndOffScreen_MainAbility_";
var lifeList = [];
export default {
onCreate() {
console.log(TAG1 + 'onCreate');
lifeList.push('onCreate');
},
onDestroy() {
console.log(TAG1 + 'onDestroy');
},
onActive() {
console.log(TAG1 + 'onActive');
lifeList.push('onActive');
commonEvent.publish(listPush1 + "onActive", (err) => {
console.log(TAG1 + listPush1 + "onActive");
});
},
onInactive() {
console.log(TAG1 + 'onInactive');
lifeList.push('onInactive');
},
onShow() {
console.log(TAG1 + 'onShow');
lifeList.push('onShow');
let options = {
parameters: {
lifeList: lifeList
}
}
commonEvent.publish(listPush1 + "onShow", options, (err) => {
console.log(TAG1 + listPush1 + "onShow");
});
},
onHide() {
console.log(TAG1 + 'onHide');
lifeList.push('onHide');
let options = {
parameters: {
lifeList: lifeList
}
}
commonEvent.publish(listPush1 + "onHide", options, (err) => {
console.log(TAG1 + listPush1 + "onHide");
});
},
onNewWant(want) {
console.log(TAG1 + 'onNewWant');
}
}
\ No newline at end of file
/*
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
@Entry
@Component
struct Index {
@State message: string = 'Hello World FaOnAndOffScreen 1'
build() {
Row() {
Column() {
Text(this.message)
.fontSize(50)
.fontWeight(FontWeight.Bold)
Row() {
Button() {
Text('FaOnAndOffScreen_MainAbility1')
.fontSize(20)
.fontWeight(FontWeight.Bold)
}.type(ButtonType.Capsule)
.margin({
top: 20
})
.backgroundColor('#0D9FFB')
.width('30%')
.height('5%')
.onClick(()=>{
})
}
}
.width('100%')
}
.height('100%')
}
}
\ No newline at end of file
{
"color": [
{
"name": "white",
"value": "#FFFFFF"
}
]
}
\ No newline at end of file
{
"string": [
{
"name": "entry_desc",
"value": "description"
},
{
"name": "MainAbility_desc",
"value": "description"
},
{
"name": "MainAbility_label",
"value": "FaOnAndOffScreen"
}
]
}
\ No newline at end of file
{
"app": {
"bundleName": "ohos.acts.aafwk.test.stageonandoffscreen",
"vendor": "huawei",
"versionCode": 1000000,
"versionName": "1.0.0",
"icon": "$media:app_icon",
"label": "$string:app_name",
"distributedNotificationEnabled": true,
"debug": false,
"description" : "$string:app_name",
"keepAlive" : true,
"singleUser": true,
"minAPIVersion": 9,
"targetAPIVersion": 9,
"car": {
"apiCompatibleVersion": 9,
"singleUser": false
}
}
}
{
"string": [
{
"name": "app_name",
"value": "actsfstageonandoffscreen"
}
]
}
# Copyright (c) 2022 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import("//test/xts/tools/build/suite.gni")
ohos_hap_assist_suite("StageOnAndOffScreen") {
hap_name = "StageOnAndOffScreen"
hap_profile = "entry/src/main/module.json"
testonly = true
deps = [
":stageonandoffscreen_js_assets",
":stageonandoffscreen_resources",
]
ets2abc = true
certificate_profile = "signature/openharmony_sx.p7b"
subsystem_name = "ability"
part_name = "ability_runtime"
}
ohos_app_scope("stageonandoffscreen_app_profile") {
app_profile = "AppScope/app.json"
sources = [ "AppScope/resources" ]
}
ohos_js_assets("stageonandoffscreen_js_assets") {
source_dir = "entry/src/main/ets"
}
ohos_resources("stageonandoffscreen_resources") {
sources = [ "entry/src/main/resources" ]
deps = [ ":stageonandoffscreen_app_profile" ]
hap_profile = "entry/src/main/module.json"
}
/*
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import AbilityStage from "@ohos.application.AbilityStage";
var TAG0 = 'StageOnAndOffScreen:AbilityStage:';
export default class MyAbilityStage extends AbilityStage {
onCreate() {
console.log(TAG0 + "onCreate")
}
}
\ No newline at end of file
/*
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import Ability from '@ohos.application.Ability';
import commonEvent from '@ohos.commonEvent';
var TAG1 = 'StageOnAndOffScreen:MainAbility:';
var listPush1 = "StageOnAndOffScreen_MainAbility_";
var lifeList = [];
export default class MainAbility extends Ability {
onCreate(want, launchParam) {
console.log(TAG1 + 'onCreate');
lifeList.push('onCreate');
}
onDestroy() {
console.log(TAG1 + 'onDestroy');
}
onWindowStageCreate(windowStage) {
console.log(TAG1 + 'onWindowStageCreate');
windowStage.loadContent("pages/index", (err, data) => {
if (err.code) {
console.log(TAG1 + 'Failed to load the content. Cause:' + JSON.stringify(err));
return;
}
console.log(TAG1 + 'Succeeded in loading the content. Data: ' + JSON.stringify(data));
});
}
onWindowStageDestroy() {
console.log(TAG1 + 'onWindowStageDestroy');
}
onForeground() {
console.log(TAG1 + 'onForeground');
lifeList.push('onForeground');
let options = {
parameters: {
lifeList: lifeList
}
}
commonEvent.publish(listPush1 + "onForeground", options, (err) => {
console.log(TAG1 + listPush1 + "onForeground");
});
}
onBackground() {
console.log(TAG1 + 'onBackground');
lifeList.push('onBackground');
let options = {
parameters: {
lifeList: lifeList
}
}
commonEvent.publish(listPush1 + "onBackground", options, (err) => {
console.log(TAG1 + listPush1 + "onBackground");
});
}
};
/*
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import Ability from '@ohos.application.Ability';
import commonEvent from '@ohos.commonEvent';
var TAG2 = 'StageOnAndOffScreen:MainAbility2:';
var listPush2 = "StageOnAndOffScreen_MainAbility2_";
export default class MainAbility2 extends Ability {
onCreate(want, launchParam) {
console.log(TAG2 + 'onCreate');
commonEvent.publish(listPush2 + "onCreate", (err) => {
console.log(TAG2 + listPush2 + "onCreate");
});
}
onDestroy() {
console.log(TAG2 + 'onDestroy');
commonEvent.publish(listPush2 + "onDestroy", (err) => {
console.log(TAG2 + listPush2 + "onDestroy");
});
}
onWindowStageCreate(windowStage) {
console.log(TAG2 + 'onWindowStageCreate');
commonEvent.publish(listPush2 + "onWindowStageCreate", (err) => {
console.log(TAG2 + listPush2 + "onWindowStageCreate");
});
windowStage.loadContent("pages/second", (err, data) => {
if (err.code) {
console.log(TAG2 + 'Failed to load the content. Cause:' + JSON.stringify(err));
return;
}
console.log(TAG2 + 'Succeeded in loading the content. Data: ' + JSON.stringify(data));
});
}
onWindowStageDestroy() {
console.log(TAG2 + 'onWindowStageDestroy');
commonEvent.publish(listPush2 + "onWindowStageDestroy", (err) => {
console.log(TAG2 + listPush2 + "onWindowStageDestroy");
});
}
onForeground() {
console.log(TAG2 + 'onForeground');
commonEvent.publish(listPush2 + "onForeground", (err) => {
console.log(TAG2 + listPush2 + "onForeground");
});
setTimeout(async () => {
let wantNum = {
bundleName: "ohos.acts.aafwk.test.stageonandoffscreen",
abilityName: "MainAbility3"
}
this.context.startAbility(wantNum).then((data) => {
console.log(TAG2 + "startAbility data = " + JSON.stringify(data));
}).catch((error) => {
console.log(TAG2 + "startAbility error = " + JSON.stringify(error));
})
}, 1000);
}
onBackground() {
console.log(TAG2 + 'onBackground');
commonEvent.publish(listPush2 + "onBackground", (err) => {
console.log(TAG2 + listPush2 + "onBackground");
});
}
};
/*
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import Ability from '@ohos.application.Ability';
import commonEvent from '@ohos.commonEvent';
var TAG3 = 'StageOnAndOffScreen:MainAbility3:';
var listPush3 = "StageOnAndOffScreen_MainAbility3_";
export default class MainAbility3 extends Ability {
onCreate(want, launchParam) {
console.log(TAG3 + 'onCreate');
}
onDestroy() {
console.log(TAG3 + 'onDestroy');
}
onWindowStageCreate(windowStage) {
console.log(TAG3 + 'onWindowStageCreate');
windowStage.loadContent("pages/third", (err, data) => {
if (err.code) {
console.log(TAG3 + 'Failed to load the content. Cause:' + JSON.stringify(err));
return;
}
console.log(TAG3 + 'Succeeded in loading the content. Data: ' + JSON.stringify(data));
});
}
onWindowStageDestroy() {
console.log(TAG3 + 'onWindowStageDestroy');
}
onForeground() {
console.log(TAG3 + 'onForeground');
commonEvent.publish(listPush3 + "onForeground", (err) => {
console.log(TAG3 + listPush3 + "onForeground");
});
}
onBackground() {
console.log(TAG3 + 'onBackground');
commonEvent.publish(listPush3 + "onBackground", (err) => {
console.log(TAG3 + listPush3 + "onBackground");
});
}
};
/*
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
@Entry
@Component
struct Index {
@State message: string = 'Hello World StageOnAndOffScreen 1'
build() {
Row() {
Column() {
Text(this.message)
.fontSize(50)
.fontWeight(FontWeight.Bold)
Row() {
Button() {
Text('StageOnAndOffScreen_MainAbility1')
.fontSize(20)
.fontWeight(FontWeight.Bold)
}.type(ButtonType.Capsule)
.margin({
top: 20
})
.backgroundColor('#0D9FFB')
.width('30%')
.height('5%')
.onClick(()=>{
})
}
}
.width('100%')
}
.height('100%')
}
}
\ No newline at end of file
/*
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
@Entry
@Component
struct Second {
@State message: string = 'Hello World StageOnAndOffScreen 2'
build() {
Row() {
Column() {
Text(this.message)
.fontSize(50)
.fontWeight(FontWeight.Bold)
Row() {
Button() {
Text('StageOnAndOffScreen_MainAbility2')
.fontSize(20)
.fontWeight(FontWeight.Bold)
}.type(ButtonType.Capsule)
.margin({
top: 20
})
.backgroundColor('#0D9FFB')
.width('30%')
.height('5%')
.onClick(()=>{
})
}
}
.width('100%')
}
.height('100%')
}
}
\ No newline at end of file
/*
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
@Entry
@Component
struct Third {
@State message: string = 'Hello World StageOnAndOffScreen 3'
build() {
Row() {
Column() {
Text(this.message)
.fontSize(50)
.fontWeight(FontWeight.Bold)
Row() {
Button() {
Text('StageOnAndOffScreen_MainAbility3')
.fontSize(20)
.fontWeight(FontWeight.Bold)
}.type(ButtonType.Capsule)
.margin({
top: 20
})
.backgroundColor('#0D9FFB')
.width('30%')
.height('5%')
.onClick(()=>{
})
}
}
.width('100%')
}
.height('100%')
}
}
\ No newline at end of file
{
"module": {
"name": "entry",
"type": "entry",
"srcEntrance": "./ets/Application/MyAbilityStage.ts",
"description": "$string:entry_desc",
"mainElement": "MainAbility",
"deviceTypes": [
"phone"
],
"deliveryWithInstall": true,
"installationFree": false,
"pages": "$profile:main_pages",
"uiSyntax": "ets",
"abilities": [
{
"name": "MainAbility",
"srcEntrance": "./ets/MainAbility/MainAbility.ts",
"description": "$string:MainAbility_desc",
"icon": "$media:icon",
"label": "$string:MainAbility_label",
"startWindowIcon": "$media:icon",
"startWindowBackground": "$color:white",
"visible": true,
"launchType": "singleton",
"skills": [
{
"entities": [
"entity.system.home"
],
"actions": [
"action.system.home"
]
}
]
},
{
"name": "MainAbility2",
"srcEntrance": "./ets/MainAbility2/MainAbility2.ts",
"description": "$string:MainAbility2_desc",
"icon": "$media:icon",
"label": "$string:MainAbility2_label",
"startWindowIcon": "$media:icon",
"startWindowBackground": "$color:white",
"visible": true,
"launchType": "singleton"
},
{
"name": "MainAbility3",
"srcEntrance": "./ets/MainAbility3/MainAbility3.ts",
"description": "$string:MainAbility3_desc",
"icon": "$media:icon",
"label": "$string:MainAbility3_label",
"startWindowIcon": "$media:icon",
"startWindowBackground": "$color:white",
"visible": true,
"launchType": "singleton"
}
]
}
}
\ No newline at end of file
{
"color": [
{
"name": "white",
"value": "#FFFFFF"
}
]
}
\ No newline at end of file
{
"string": [
{
"name": "entry_desc",
"value": "description"
},
{
"name": "MainAbility_desc",
"value": "description"
},
{
"name": "MainAbility_label",
"value": "StageOnAndOffScreen"
},
{
"name": "MainAbility2_desc",
"value": "description"
},
{
"name": "MainAbility2_label",
"value": "label"
},
{
"name": "MainAbility3_desc",
"value": "description"
},
{
"name": "MainAbility3_label",
"value": "label"
}
]
}
\ No newline at end of file
......@@ -16,12 +16,12 @@ import Ability from '@ohos.application.Ability'
import commonEvent from '@ohos.commonEvent'
async function onShowProcess() {
var abilityWant = globalThis.abilityWant;
var abilityWant = globalThis.abilityWant2;
var commonEventPublishData = {
parameters: {
displayId: globalThis.abilityWant.parameters['ohos.aafwk.param.displayId'],
windowMode: globalThis.abilityWant.parameters['ohos.aafwk.param.windowMode'],
displayId: abilityWant.parameters['ohos.aafwk.param.displayId'],
windowMode: abilityWant.parameters['ohos.aafwk.param.windowMode'],
}
};
......@@ -29,7 +29,7 @@ async function onShowProcess() {
commonEvent.publish("ACTS_TerminateSelf_CommonEvent", commonEventPublishData, () => {
console.log('============>querytestsecond success==========>>')
globalThis.abilityContext.terminateSelf();
globalThis.abilityContext2.terminateSelf();
});
}
......@@ -38,8 +38,8 @@ export default class MainAbility extends Ability {
onCreate(want, launchParam) {
// Ability is creating, initialize resources for this ability
console.log("MainAbility2 onCreate")
globalThis.abilityWant = want;
console.log("AbilityMultiInstanceAppA abilityWant = " + JSON.stringify( globalThis.abilityWant));
globalThis.abilityWant2 = want;
console.log("AbilityMultiInstanceAppA abilityWant = " + JSON.stringify( globalThis.abilityWant2));
}
onDestroy() {
......@@ -50,7 +50,7 @@ export default class MainAbility extends Ability {
onWindowStageCreate(windowStage) {
// Main window is created, set main page for this ability
console.log("MainAbility2 onWindowStageCreate")
globalThis.abilityContext = this.context
globalThis.abilityContext2 = this.context
windowStage.setUIContent(this.context, "MainAbility/pages/second/second", null)
}
......
......@@ -38,7 +38,7 @@ export default class ServiceAbility extends ServiceExtension {
abilityName: 'com.example.startabilityforresult.MainAbility2'
},
{
windowMode: 2,
windowMode: 0,
displayId: 10,
}).then(() => {
console.log("====>end startAbility====>success!")
......
......@@ -225,7 +225,7 @@ export default function abilityTest() {
if (data.event == "ACTS_TerminateSelf_CommonEvent") {
clearTimeout(id);
expect(data.parameters['displayId']).assertEqual(10);
expect(data.parameters['windowMode']).assertEqual(2);
expect(data.parameters['windowMode']).assertEqual(0);
commonEvent.unsubscribe(subscriber, unSubscribeCallback)
expect(data.event).assertEqual("ACTS_TerminateSelf_CommonEvent");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册