提交 78414361 编写于 作者: J jiyong

add stage

Signed-off-by: Njiyong <jiyong@huawei.com>
上级 a6c98c12
/**
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import AbilityStage from "@ohos.application.AbilityStage" import AbilityStage from "@ohos.application.AbilityStage"
export default class MyAbilityStage extends AbilityStage { export default class MyAbilityStage extends AbilityStage {
...@@ -7,4 +21,4 @@ export default class MyAbilityStage extends AbilityStage { ...@@ -7,4 +21,4 @@ export default class MyAbilityStage extends AbilityStage {
globalThis.stageContext = this.context; globalThis.stageContext = this.context;
globalThis.lifeCycleList = []; globalThis.lifeCycleList = [];
} }
} }
\ No newline at end of file
/**
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import Ability from '@ohos.application.Ability' import Ability from '@ohos.application.Ability'
export default class MainAbility extends Ability { export default class MainAbility extends Ability {
......
/**
* 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.
*/
export default { export default {
onCreate() { onCreate() {
console.info('Application onCreate') console.info('Application onCreate')
...@@ -5,4 +19,4 @@ export default { ...@@ -5,4 +19,4 @@ export default {
onDestroy() { onDestroy() {
console.info('Application onDestroy') console.info('Application onDestroy')
}, },
} }
\ No newline at end of file
/**
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import file from '@system.file'; import file from '@system.file';
import {Core, ExpectExtend, InstrumentLog, ReportExtend} from "deccjsunit/index.ets" import {Core, ExpectExtend, InstrumentLog, ReportExtend} from "deccjsunit/index.ets"
...@@ -49,4 +63,4 @@ struct Index { ...@@ -49,4 +63,4 @@ struct Index {
.width('100%') .width('100%')
.height('100%') .height('100%')
} }
} }
\ No newline at end of file
/**
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import router from '@system.router'; import router from '@system.router';
@Entry @Entry
...@@ -26,4 +40,4 @@ struct Second { ...@@ -26,4 +40,4 @@ struct Second {
.width('100%') .width('100%')
.height('100%') .height('100%')
} }
} }
\ No newline at end of file
/**
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import ServiceExtension from "@ohos.application.ServiceExtension" import ServiceExtension from "@ohos.application.ServiceExtension"
export default class MyServiceAbility extends ServiceExtension { export default class MyServiceAbility extends ServiceExtension {
......
/**
* 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.
*/
export default { export default {
onStart() { onStart() {
console.info('ServiceAbility onStart'); console.info('ServiceAbility onStart');
...@@ -8,4 +22,4 @@ export default { ...@@ -8,4 +22,4 @@ export default {
onCommand(want, startId) { onCommand(want, startId) {
console.info('ServiceAbility onCommand'); console.info('ServiceAbility onCommand');
} }
}; };
\ No newline at end of file
/**
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import ServiceExtension from "@ohos.application.ServiceExtension" import ServiceExtension from "@ohos.application.ServiceExtension"
export default class MyServiceAbility extends ServiceExtension { export default class MyServiceAbility extends ServiceExtension {
......
/**
* 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.
*/
export default { export default {
onStart() { onStart() {
console.info('ServiceAbility onStart'); console.info('ServiceAbility onStart');
...@@ -8,4 +22,4 @@ export default { ...@@ -8,4 +22,4 @@ export default {
onCommand(want, startId) { onCommand(want, startId) {
console.info('ServiceAbility onCommand'); console.info('ServiceAbility onCommand');
} }
}; };
\ No newline at end of file
/**
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index" import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index"
export default function ExtensionTest(abilityContext) { export default function ExtensionTest(abilityContext) {
...@@ -896,4 +910,4 @@ export default function ExtensionTest(abilityContext) { ...@@ -896,4 +910,4 @@ export default function ExtensionTest(abilityContext) {
} }
}) })
} }
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册