Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
9b13d6a9
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看板
未验证
提交
9b13d6a9
编写于
10月 27, 2022
作者:
O
openharmony_ci
提交者:
Gitee
10月 27, 2022
浏览文件
操作
浏览文件
下载
差异文件
!6144 元能力补充导出类接口覆盖 回合monthly
Merge pull request !6144 from yangzk/cherry-pick-1666766217
上级
8bdee9b3
138132bf
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
81 addition
and
2 deletion
+81
-2
ability/ability_runtime/apicover/apicoverhaptest/entry/src/main/ets/test/ApiCoverAbility.test.ets
...rhaptest/entry/src/main/ets/test/ApiCoverAbility.test.ets
+16
-2
ability/ability_runtime/apicover/formmodule/entry/src/main/ets/FormAbility/FormAbility.ts
.../formmodule/entry/src/main/ets/FormAbility/FormAbility.ts
+3
-0
notification/ans_standard/actsNotificationWantAgentTest/src/main/js/test/ActsNotificationWantAgentNewTest.js
...Test/src/main/js/test/ActsNotificationWantAgentNewTest.js
+62
-0
未找到文件。
ability/ability_runtime/apicover/apicoverhaptest/entry/src/main/ets/test/ApiCoverAbility.test.ets
浏览文件 @
9b13d6a9
...
...
@@ -26,6 +26,7 @@ import applicationContext from '@ohos.application.context'
import
commonEvent
from
'@ohos.commonEvent'
;
import
ability
from
'@ohos.ability.ability'
;
import
abilityDelegatorRegistry
from
'@ohos.app.ability.abilityDelegatorRegistry'
;
import
common
from
'@ohos.app.ability.common'
;
var
EXTENSION_INFO_ERR
=
16000001
var
INNER_ERROR
=
16000050
...
...
@@ -312,8 +313,21 @@ export default function ApiCoverTest() {
*/
it
(
'SUB_AA_ABILITY_Extension_API_012'
,
0
,
async
function
(
done
)
{
try
{
globalThis
.
abilityContext
.
getApplicationContext
()
.
killProcessesBySelf
();
globalThis
.
abilityContext
.
getApplicationContext
()
.
killProcessesBySelf
((
err
,
data
)
=>
{
let
info
:
appManager
.
ProcessRunningInfo
;
let
stageContext
:
common
.
AbilityStageContext
=
globalThis
.
stageContext
;
let
abilityContext
:
common
.
AbilityContext
=
globalThis
.
abilityContext
;
let
appContext
:
common
.
ApplicationContext
=
abilityContext
.
getApplicationContext
();
let
baseContext
:
common
.
BaseContext
=
stageContext
;
let
context
:
common
.
Context
=
stageContext
;
let
el1
=
common
.
AreaMode
.
EL1
;
let
el2
=
common
.
AreaMode
.
EL2
;
let
eventHub
:
common
.
EventHub
=
context
.
eventHub
;
let
permissionRequestResult
:
common
.
PermissionRequestResult
;
let
abilityResult
:
common
.
AbilityResult
;
let
connectOptions
:
common
.
ConnectOptions
;
appContext
.
killProcessesBySelf
();
appContext
.
killProcessesBySelf
((
err
,
data
)
=>
{
console
.
log
(
`killProcessesBySelf, err: ${JSON.stringify(err)}, data: ${JSON.stringify(data)}`
);
})
let
abilityDelegator
:
abilityDelegatorRegistry
.
AbilityDelegator
;
...
...
ability/ability_runtime/apicover/formmodule/entry/src/main/ets/FormAbility/FormAbility.ts
浏览文件 @
9b13d6a9
import
FormExtensionAbility
from
'
@ohos.app.form.FormExtensionAbility
'
;
import
formBindingData
from
'
@ohos.app.form.formBindingData
'
;
import
formInfo
from
'
@ohos.app.form.formInfo
'
;
import
common
from
'
@ohos.app.ability.common
'
;
export
default
class
FormModuleAbility
extends
FormExtensionAbility
{
onAddForm
(
want
)
{
// Called to return a FormBindingData object.
console
.
info
(
"
FormAbility onAddForm
"
)
globalThis
.
abilityContext
=
this
.
context
;
let
formExtensionAbilities
:
common
.
FormExtensionContext
=
this
.
context
;
let
extensionAbilities
:
common
.
ExtensionContext
=
this
.
context
;
let
formData
=
{
};
return
formBindingData
.
createFormBindingData
(
formData
);
...
...
notification/ans_standard/actsNotificationWantAgentTest/src/main/js/test/ActsNotificationWantAgentNewTest.js
浏览文件 @
9b13d6a9
...
...
@@ -918,6 +918,68 @@ export default function ActsNotificationWantAgentNewTest() {
})
console
.
info
(
`
${
TAG
}
SUB_NOTIFICATION_ANS_GET_WANT_AGENT_NEW_TEST_3100 END`
)
})
/*
* @tc.number : SUB_NOTIFICATION_ANS_GET_WANT_AGENT_NEW_TEST_3200
* @tc.name : function trigger(agent: WantAgent, triggerInfo: TriggerInfo, callback?: Callback<CompleteData>): void
* @tc.desc : Triggers a WantAgent
*/
it
(
'
SUB_NOTIFICATION_ANS_GET_WANT_AGENT_NEW_TEST_3200
'
,
0
,
async
function
(
done
)
{
console
.
info
(
`
${
TAG
}
SUB_NOTIFICATION_ANS_GET_WANT_AGENT_NEW_TEST_3200 START`
)
WantAgentInfo
.
operationType
=
wantAgent
.
OperationType
.
START_ABILITY
WantAgentInfo
.
wantAgentFlags
=
wantAgent
.
WantAgentFlags
.
UPDATE_PRESENT_FLAG
wantAgent
.
getWantAgent
(
WantAgentInfo
,
(
err
,
data
)
=>
{
if
(
err
.
code
)
{
console
.
info
(
`
${
TAG
}
getWantAgent AsyncCallback err:
${
err
.
code
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
else
{
WantAgent
=
data
console
.
info
(
`
${
TAG
}
getWantAgent AsyncCallback success:
${
JSON
.
stringify
(
data
)}
`
)
let
triggerInfo
=
{
code
:
0
,
want
:
{
deviceId
:
"
deviceId
"
,
bundleName
:
"
com.example.actsnotificationwantagent
"
,
abilityName
:
"
com.example.actsnotificationwantagent.MainAbility
"
,
action
:
"
action1
"
,
entities
:
[
"
entity1
"
],
type
:
"
MIMETYPE
"
,
uri
:
"
key={true,true,false}
"
,
parameters
:
{
myKey0
:
2222
,
myKey1
:
[
1
,
2
,
3
],
myKey2
:
"
[1, 2, 3]
"
,
myKey3
:
"
notification
"
,
myKey4
:
[
false
,
true
,
false
],
myKey5
:
[
"
ANS
"
,
"
WANT
"
,
"
AGENT
"
],
myKey6
:
true
,
}
},
permission
:
''
,
extraInfo
:
{
test
:
'
this is a test value
'
}
}
wantAgent
.
trigger
(
WantAgent
,
triggerInfo
,
(
err
,
data
)
=>
{
console
.
info
(
`
${
TAG
}
trigger Callback success:
${
JSON
.
stringify
(
data
)}
`
)
expect
(
err
.
code
).
assertEqual
(
0
)
expect
(
typeof
(
data
.
wantAgent
)).
assertEqual
(
'
object
'
)
expect
(
data
.
finalCode
).
assertEqual
(
0
)
expect
(
data
.
finalData
).
assertEqual
(
''
)
expect
(
typeof
(
data
.
extraInfo
)).
assertEqual
(
'
object
'
)
expect
(
data
.
want
.
deviceId
).
assertEqual
(
'
deviceId
'
)
expect
(
data
.
want
.
bundleName
).
assertEqual
(
'
com.example.actsnotificationwantagent
'
)
expect
(
data
.
want
.
abilityName
).
assertEqual
(
'
com.example.actsnotificationwantagent.MainAbility
'
)
done
()
})
}
})
console
.
info
(
`
${
TAG
}
SUB_NOTIFICATION_ANS_GET_WANT_AGENT_NEW_TEST_3200 END`
)
})
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_ANS_WANT_AGENT_NEW_TEST END
'
)
})
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录