Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
36d67b8e
X
Xts Acts
项目概览
OpenHarmony
/
Xts Acts
1 年多 前同步成功
通知
9
Star
22
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
X
Xts Acts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
36d67b8e
编写于
7月 07, 2023
作者:
X
xinking129
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
addforresulttest
Signed-off-by:
N
xinking129
<
xinxin13@huawei.com
>
上级
4d19d83f
变更
25
隐藏空白更改
内联
并排
Showing
25 changed file
with
350 addition
and
16 deletion
+350
-16
ability/ability_runtime/actsforresult/forresulttest/entry/src/main/ets/UIExtensionAbility/UIExtAbility.ts
...est/entry/src/main/ets/UIExtensionAbility/UIExtAbility.ts
+14
-0
ability/ability_runtime/actsforresult/forresulttest/entry/src/main/ets/calledability/CalledAbility.ts
...ulttest/entry/src/main/ets/calledability/CalledAbility.ts
+14
-0
ability/ability_runtime/actsforresult/forresulttest/entry/src/main/ets/entryability/EntryAbility.ts
...esulttest/entry/src/main/ets/entryability/EntryAbility.ts
+14
-0
ability/ability_runtime/actsforresult/forresulttest/entry/src/main/ets/pages/Index.ets
...orresult/forresulttest/entry/src/main/ets/pages/Index.ets
+14
-0
ability/ability_runtime/actsforresult/forresulttest/entry/src/main/ets/pages/Page.ets
...forresult/forresulttest/entry/src/main/ets/pages/Page.ets
+14
-0
ability/ability_runtime/actsforresult/forresulttest/entry/src/main/ets/pages/PageTwo.ets
...result/forresulttest/entry/src/main/ets/pages/PageTwo.ets
+14
-0
ability/ability_runtime/actsforresult/forresulttestnopermission/entry/src/main/ets/UIExtensionAbility/UIExtAbility.ts
...ion/entry/src/main/ets/UIExtensionAbility/UIExtAbility.ts
+14
-0
ability/ability_runtime/actsforresult/forresulttestnopermission/entry/src/main/ets/calledability/CalledAbility.ts
...mission/entry/src/main/ets/calledability/CalledAbility.ts
+14
-0
ability/ability_runtime/actsforresult/forresulttestnopermission/entry/src/main/ets/entryability/EntryAbility.ts
...ermission/entry/src/main/ets/entryability/EntryAbility.ts
+14
-0
ability/ability_runtime/actsforresult/forresulttestnopermission/entry/src/main/ets/pages/Index.ets
...resulttestnopermission/entry/src/main/ets/pages/Index.ets
+14
-0
ability/ability_runtime/actsforresult/forresulttestnopermission/entry/src/main/ets/pages/Page.ets
...rresulttestnopermission/entry/src/main/ets/pages/Page.ets
+14
-0
ability/ability_runtime/actsforresult/forresulttestnopermission/entry/src/main/ets/pages/PageTwo.ets
...sulttestnopermission/entry/src/main/ets/pages/PageTwo.ets
+14
-0
ability/ability_runtime/actsforresult/main/entry/src/main/ets/UIExtensionAbility/UIExtAbility.ts
...ain/entry/src/main/ets/UIExtensionAbility/UIExtAbility.ts
+14
-0
ability/ability_runtime/actsforresult/main/entry/src/main/ets/calledability/CalledAbility.ts
...lt/main/entry/src/main/ets/calledability/CalledAbility.ts
+14
-0
ability/ability_runtime/actsforresult/main/entry/src/main/ets/entryability/EntryAbility.ts
...sult/main/entry/src/main/ets/entryability/EntryAbility.ts
+14
-0
ability/ability_runtime/actsforresult/main/entry/src/main/ets/otherability/OtherAbility.ts
...sult/main/entry/src/main/ets/otherability/OtherAbility.ts
+14
-0
ability/ability_runtime/actsforresult/main/entry/src/main/ets/pages/Index.ets
...ime/actsforresult/main/entry/src/main/ets/pages/Index.ets
+14
-0
ability/ability_runtime/actsforresult/main/entry/src/main/ets/pages/IndexTwo.ets
.../actsforresult/main/entry/src/main/ets/pages/IndexTwo.ets
+14
-0
ability/ability_runtime/actsforresult/main/entry/src/main/ets/pages/Page.ets
...time/actsforresult/main/entry/src/main/ets/pages/Page.ets
+14
-0
ability/ability_runtime/actsforresult/main/entry/src/main/ets/pages/PageTwo.ets
...e/actsforresult/main/entry/src/main/ets/pages/PageTwo.ets
+14
-0
ability/ability_runtime/actsforresult/maintest/entry/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts
...st/entry/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts
+14
-0
ability/ability_runtime/actsforresult/maintest/entry/src/main/ets/test/Ability.test.ets
...rresult/maintest/entry/src/main/ets/test/Ability.test.ets
+14
-16
ability/ability_runtime/actsforresult/maintest/entry/src/main/ets/test/List.test.ets
...sforresult/maintest/entry/src/main/ets/test/List.test.ets
+14
-0
ability/ability_runtime/actsforresult/maintest/entry/src/main/ets/testability/TestAbility.ets
...t/maintest/entry/src/main/ets/testability/TestAbility.ets
+14
-0
ability/ability_runtime/actsforresult/maintest/entry/src/main/ets/testability/pages/Index.ets
...t/maintest/entry/src/main/ets/testability/pages/Index.ets
+14
-0
未找到文件。
ability/ability_runtime/actsforresult/forresulttest/entry/src/main/ets/UIExtensionAbility/UIExtAbility.ts
浏览文件 @
36d67b8e
/*
* 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
UIExtensionAbility
from
'
@ohos.app.ability.UIExtensionAbility
'
import
UIExtensionAbility
from
'
@ohos.app.ability.UIExtensionAbility
'
import
wantConstant
from
'
@ohos.app.ability.wantConstant
'
;
import
wantConstant
from
'
@ohos.app.ability.wantConstant
'
;
import
commonEvent
from
'
@ohos.commonEventManager
'
import
commonEvent
from
'
@ohos.commonEventManager
'
...
...
ability/ability_runtime/actsforresult/forresulttest/entry/src/main/ets/calledability/CalledAbility.ts
浏览文件 @
36d67b8e
/*
* 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
UIAbility
from
'
@ohos.app.ability.UIAbility
'
;
import
UIAbility
from
'
@ohos.app.ability.UIAbility
'
;
import
hilog
from
'
@ohos.hilog
'
;
import
hilog
from
'
@ohos.hilog
'
;
import
window
from
'
@ohos.window
'
;
import
window
from
'
@ohos.window
'
;
...
...
ability/ability_runtime/actsforresult/forresulttest/entry/src/main/ets/entryability/EntryAbility.ts
浏览文件 @
36d67b8e
/*
* 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
UIAbility
from
'
@ohos.app.ability.UIAbility
'
;
import
UIAbility
from
'
@ohos.app.ability.UIAbility
'
;
import
hilog
from
'
@ohos.hilog
'
;
import
hilog
from
'
@ohos.hilog
'
;
import
window
from
'
@ohos.window
'
;
import
window
from
'
@ohos.window
'
;
...
...
ability/ability_runtime/actsforresult/forresulttest/entry/src/main/ets/pages/Index.ets
浏览文件 @
36d67b8e
/*
* 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 Want from '@ohos.app.ability.Want';
import Want from '@ohos.app.ability.Want';
@Entry
@Entry
...
...
ability/ability_runtime/actsforresult/forresulttest/entry/src/main/ets/pages/Page.ets
浏览文件 @
36d67b8e
/*
* 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 Want from '@ohos.app.ability.Want';
import Want from '@ohos.app.ability.Want';
import UIExtensionContentSession from '@ohos.app.ability.UIExtensionContentSession';
import UIExtensionContentSession from '@ohos.app.ability.UIExtensionContentSession';
...
...
ability/ability_runtime/actsforresult/forresulttest/entry/src/main/ets/pages/PageTwo.ets
浏览文件 @
36d67b8e
/*
* 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.
*/
@Entry
@Entry
@Component
@Component
struct PageTwo {
struct PageTwo {
...
...
ability/ability_runtime/actsforresult/forresulttestnopermission/entry/src/main/ets/UIExtensionAbility/UIExtAbility.ts
浏览文件 @
36d67b8e
/*
* 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
UIExtensionAbility
from
'
@ohos.app.ability.UIExtensionAbility
'
import
UIExtensionAbility
from
'
@ohos.app.ability.UIExtensionAbility
'
import
wantConstant
from
'
@ohos.app.ability.wantConstant
'
;
import
wantConstant
from
'
@ohos.app.ability.wantConstant
'
;
import
commonEvent
from
'
@ohos.commonEventManager
'
import
commonEvent
from
'
@ohos.commonEventManager
'
...
...
ability/ability_runtime/actsforresult/forresulttestnopermission/entry/src/main/ets/calledability/CalledAbility.ts
浏览文件 @
36d67b8e
/*
* 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
UIAbility
from
'
@ohos.app.ability.UIAbility
'
;
import
UIAbility
from
'
@ohos.app.ability.UIAbility
'
;
import
hilog
from
'
@ohos.hilog
'
;
import
hilog
from
'
@ohos.hilog
'
;
import
window
from
'
@ohos.window
'
;
import
window
from
'
@ohos.window
'
;
...
...
ability/ability_runtime/actsforresult/forresulttestnopermission/entry/src/main/ets/entryability/EntryAbility.ts
浏览文件 @
36d67b8e
/*
* 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
UIAbility
from
'
@ohos.app.ability.UIAbility
'
;
import
UIAbility
from
'
@ohos.app.ability.UIAbility
'
;
import
hilog
from
'
@ohos.hilog
'
;
import
hilog
from
'
@ohos.hilog
'
;
import
window
from
'
@ohos.window
'
;
import
window
from
'
@ohos.window
'
;
...
...
ability/ability_runtime/actsforresult/forresulttestnopermission/entry/src/main/ets/pages/Index.ets
浏览文件 @
36d67b8e
/*
* 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 Want from '@ohos.app.ability.Want';
import Want from '@ohos.app.ability.Want';
@Entry
@Entry
...
...
ability/ability_runtime/actsforresult/forresulttestnopermission/entry/src/main/ets/pages/Page.ets
浏览文件 @
36d67b8e
/*
* 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 Want from '@ohos.app.ability.Want';
import Want from '@ohos.app.ability.Want';
import UIExtensionContentSession from '@ohos.app.ability.UIExtensionContentSession';
import UIExtensionContentSession from '@ohos.app.ability.UIExtensionContentSession';
...
...
ability/ability_runtime/actsforresult/forresulttestnopermission/entry/src/main/ets/pages/PageTwo.ets
浏览文件 @
36d67b8e
/*
* 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.
*/
@Entry
@Entry
@Component
@Component
struct PageTwo {
struct PageTwo {
...
...
ability/ability_runtime/actsforresult/main/entry/src/main/ets/UIExtensionAbility/UIExtAbility.ts
浏览文件 @
36d67b8e
/*
* 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
UIExtensionAbility
from
'
@ohos.app.ability.UIExtensionAbility
'
import
UIExtensionAbility
from
'
@ohos.app.ability.UIExtensionAbility
'
import
wantConstant
from
'
@ohos.app.ability.wantConstant
'
;
import
wantConstant
from
'
@ohos.app.ability.wantConstant
'
;
import
commonEvent
from
'
@ohos.commonEventManager
'
import
commonEvent
from
'
@ohos.commonEventManager
'
...
...
ability/ability_runtime/actsforresult/main/entry/src/main/ets/calledability/CalledAbility.ts
浏览文件 @
36d67b8e
/*
* 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
UIAbility
from
'
@ohos.app.ability.UIAbility
'
;
import
UIAbility
from
'
@ohos.app.ability.UIAbility
'
;
import
hilog
from
'
@ohos.hilog
'
;
import
hilog
from
'
@ohos.hilog
'
;
import
window
from
'
@ohos.window
'
;
import
window
from
'
@ohos.window
'
;
...
...
ability/ability_runtime/actsforresult/main/entry/src/main/ets/entryability/EntryAbility.ts
浏览文件 @
36d67b8e
/*
* 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
UIAbility
from
'
@ohos.app.ability.UIAbility
'
;
import
UIAbility
from
'
@ohos.app.ability.UIAbility
'
;
import
hilog
from
'
@ohos.hilog
'
;
import
hilog
from
'
@ohos.hilog
'
;
import
window
from
'
@ohos.window
'
;
import
window
from
'
@ohos.window
'
;
...
...
ability/ability_runtime/actsforresult/main/entry/src/main/ets/otherability/OtherAbility.ts
浏览文件 @
36d67b8e
/*
* 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
UIAbility
from
'
@ohos.app.ability.UIAbility
'
;
import
UIAbility
from
'
@ohos.app.ability.UIAbility
'
;
import
hilog
from
'
@ohos.hilog
'
;
import
hilog
from
'
@ohos.hilog
'
;
import
window
from
'
@ohos.window
'
;
import
window
from
'
@ohos.window
'
;
...
...
ability/ability_runtime/actsforresult/main/entry/src/main/ets/pages/Index.ets
浏览文件 @
36d67b8e
/*
* 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 Want from '@ohos.app.ability.Want';
import Want from '@ohos.app.ability.Want';
@Entry
@Entry
...
...
ability/ability_runtime/actsforresult/main/entry/src/main/ets/pages/IndexTwo.ets
浏览文件 @
36d67b8e
/*
* 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.
*/
@Entry
@Entry
@Component
@Component
struct IndexTwo {
struct IndexTwo {
...
...
ability/ability_runtime/actsforresult/main/entry/src/main/ets/pages/Page.ets
浏览文件 @
36d67b8e
/*
* 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 Want from '@ohos.app.ability.Want';
import Want from '@ohos.app.ability.Want';
import UIExtensionContentSession from '@ohos.app.ability.UIExtensionContentSession';
import UIExtensionContentSession from '@ohos.app.ability.UIExtensionContentSession';
...
...
ability/ability_runtime/actsforresult/main/entry/src/main/ets/pages/PageTwo.ets
浏览文件 @
36d67b8e
/*
* 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.
*/
@Entry
@Entry
@Component
@Component
struct PageTwo {
struct PageTwo {
...
...
ability/ability_runtime/actsforresult/maintest/entry/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts
浏览文件 @
36d67b8e
/*
* 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
hilog
from
'
@ohos.hilog
'
;
import
hilog
from
'
@ohos.hilog
'
;
import
TestRunner
from
'
@ohos.application.testRunner
'
;
import
TestRunner
from
'
@ohos.application.testRunner
'
;
import
AbilityDelegatorRegistry
from
'
@ohos.app.ability.abilityDelegatorRegistry
'
;
import
AbilityDelegatorRegistry
from
'
@ohos.app.ability.abilityDelegatorRegistry
'
;
...
...
ability/ability_runtime/actsforresult/maintest/entry/src/main/ets/test/Ability.test.ets
浏览文件 @
36d67b8e
/*
* 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 hilog from '@ohos.hilog';
import hilog from '@ohos.hilog';
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'
import commonEvent from '@ohos.commonEventManager'
import commonEvent from '@ohos.commonEventManager'
import abilityDelegatorRegistry from '@ohos.app.ability.abilityDelegatorRegistry';
import abilityDelegatorRegistry from '@ohos.app.ability.abilityDelegatorRegistry';
import { Driver } from '@ohos.UiTest';
import { Driver } from '@ohos.UiTest';
let abilityDelegator = abilityDelegatorRegistry.getAbilityDelegator()
let abilityDelegator = abilityDelegatorRegistry.getAbilityDelegator()
var ACTS_CallFunction = {
var ACTS_CallFunction = {
events: ['ACTS_CALL_EVENT', 'ACTS_CALL_EVENT_ANOTHER']
events: ['ACTS_CALL_EVENT', 'ACTS_CALL_EVENT_ANOTHER']
...
@@ -85,7 +96,6 @@ export default function abilityTest() {
...
@@ -85,7 +96,6 @@ export default function abilityTest() {
},(err) => {
},(err) => {
console.info('====>startAbility err:' + JSON.stringify(err));
console.info('====>startAbility err:' + JSON.stringify(err));
})
})
})
})
function subscribeCallBack(err, data) {
function subscribeCallBack(err, data) {
...
@@ -108,7 +118,6 @@ export default function abilityTest() {
...
@@ -108,7 +118,6 @@ export default function abilityTest() {
done()
done()
})
})
}, 2000)
}, 2000)
// done()
}
}
})
})
...
@@ -164,7 +173,6 @@ export default function abilityTest() {
...
@@ -164,7 +173,6 @@ export default function abilityTest() {
done()
done()
})
})
}, 1000)
}, 1000)
// done()
}
}
})
})
...
@@ -400,17 +408,10 @@ export default function abilityTest() {
...
@@ -400,17 +408,10 @@ export default function abilityTest() {
function unSubscribeCallback() {
function unSubscribeCallback() {
console.info(`====>Promise_0200 unSubscribeCallback 'ACTS_CALL_EVENT'`)
console.info(`====>Promise_0200 unSubscribeCallback 'ACTS_CALL_EVENT'`)
// setTimeout(() => {
abilityDelegator.executeShellCommand('aa force-stop com.example.forresulttestsecond').then(result =>{
abilityDelegator.executeShellCommand('aa force-stop com.example.forresulttestsecond').then(result =>{
console.info('====>Promise_0200 unSubscribeCallback pkill ok' + JSON.stringify(result));
console.info('====>Promise_0200 unSubscribeCallback pkill ok' + JSON.stringify(result));
done()
done()
})
})
// .catch(err => {
// console.info('====>Promise_0200 unSubscribeCallback pkill ng' + JSON.stringify(err));
// done()
// })
// }, 2000)
// done()
}
}
})
})
...
@@ -450,7 +451,6 @@ export default function abilityTest() {
...
@@ -450,7 +451,6 @@ export default function abilityTest() {
console.info(`====>Promise_0300 subscribeCallBack 'ACTS_CALL_EVENT_ANOTHER' ${data}`)
console.info(`====>Promise_0300 subscribeCallBack 'ACTS_CALL_EVENT_ANOTHER' ${data}`)
expect(data.parameters.str).assertEqual('ACTION');
expect(data.parameters.str).assertEqual('ACTION');
expect(data.parameters.result).assertEqual(0);
expect(data.parameters.result).assertEqual(0);
}
}
globalThis.terminate()
globalThis.terminate()
abilityDelegator.executeShellCommand('aa force-stop com.example.forresulttestsecond').then(result =>{
abilityDelegator.executeShellCommand('aa force-stop com.example.forresulttestsecond').then(result =>{
...
@@ -498,7 +498,6 @@ export default function abilityTest() {
...
@@ -498,7 +498,6 @@ export default function abilityTest() {
console.info(`====>Promise_0400 subscribeCallBack all ${data.event}`)
console.info(`====>Promise_0400 subscribeCallBack all ${data.event}`)
if(data.event == 'ACTS_CALL_EVENT') {
if(data.event == 'ACTS_CALL_EVENT') {
console.info(`====>Promise_0400 subscribeCallBack 'ACTS_CALL_EVENT' ${data}`)
console.info(`====>Promise_0400 subscribeCallBack 'ACTS_CALL_EVENT' ${data}`)
// expect(data.parameters.str).assertEqual('ACTION');
expect(data.parameters.result).assertEqual(-1);
expect(data.parameters.result).assertEqual(-1);
commonEvent.unsubscribe(subscriber, unSubscribeCallback)
commonEvent.unsubscribe(subscriber, unSubscribeCallback)
}
}
...
@@ -535,7 +534,6 @@ export default function abilityTest() {
...
@@ -535,7 +534,6 @@ export default function abilityTest() {
console.info(`====>Promise_0500 subscribeCallBack all ${data.event}`)
console.info(`====>Promise_0500 subscribeCallBack all ${data.event}`)
if(data.event == 'ACTS_CALL_EVENT') {
if(data.event == 'ACTS_CALL_EVENT') {
console.info(`====>Promise_0500 subscribeCallBack 'ACTS_CALL_EVENT' ${data}`)
console.info(`====>Promise_0500 subscribeCallBack 'ACTS_CALL_EVENT' ${data}`)
// expect(data.parameters.str).assertEqual('ACTION');
expect(data.parameters.result != 0).assertTrue();
expect(data.parameters.result != 0).assertTrue();
commonEvent.unsubscribe(subscriber, unSubscribeCallback)
commonEvent.unsubscribe(subscriber, unSubscribeCallback)
}
}
...
...
ability/ability_runtime/actsforresult/maintest/entry/src/main/ets/test/List.test.ets
浏览文件 @
36d67b8e
/*
* 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 abilityTest from './Ability.test'
import abilityTest from './Ability.test'
export default function testsuite() {
export default function testsuite() {
...
...
ability/ability_runtime/actsforresult/maintest/entry/src/main/ets/testability/TestAbility.ets
浏览文件 @
36d67b8e
/*
* 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 UIAbility from '@ohos.app.ability.UIAbility';
import UIAbility from '@ohos.app.ability.UIAbility';
import AbilityDelegatorRegistry from '@ohos.app.ability.abilityDelegatorRegistry';
import AbilityDelegatorRegistry from '@ohos.app.ability.abilityDelegatorRegistry';
import hilog from '@ohos.hilog';
import hilog from '@ohos.hilog';
...
...
ability/ability_runtime/actsforresult/maintest/entry/src/main/ets/testability/pages/Index.ets
浏览文件 @
36d67b8e
/*
* 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 hilog from '@ohos.hilog';
import hilog from '@ohos.hilog';
@Entry
@Entry
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录