Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
d54cd5c1
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看板
提交
d54cd5c1
编写于
9月 19, 2022
作者:
Z
zhijianwen
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
modify
Signed-off-by:
N
zhijianwen
<
zhijianwen@huawei.com
>
上级
33c7aaf4
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
31 addition
and
30 deletion
+31
-30
notification/ces_standard/subscribeandpublish/actssubscriberorderedtest/src/main/js/test/ActsSubscriber_test_ordered.js
...deredtest/src/main/js/test/ActsSubscriber_test_ordered.js
+28
-28
notification/ces_standard/subscribeandpublish/actssubscriberunordersystemtest/src/main/js/test/ActsSubscriber_test_unorder.js
...ystemtest/src/main/js/test/ActsSubscriber_test_unorder.js
+3
-2
未找到文件。
notification/ces_standard/subscribeandpublish/actssubscriberorderedtest/src/main/js/test/ActsSubscriber_test_ordered.js
浏览文件 @
d54cd5c1
...
...
@@ -12,7 +12,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import
Subscriber
from
'
@ohos.commonEvent
'
import
commonEvent
from
'
@ohos.commonEvent
'
import
{
describe
,
beforeAll
,
beforeEach
,
afterEach
,
afterAll
,
it
,
expect
}
from
'
@ohos/hypium
'
export
default
function
ActsSubscriberTestOrder
()
{
...
...
@@ -124,28 +124,28 @@ export default function ActsSubscriberTestOrder() {
})
}
Subscriber
.
createSubscriber
(
commonEvent
.
createSubscriber
(
commonEventSubscribeInfo1
).
then
((
data
)
=>
{
console
.
info
(
'
===============ActsSubscriberTestOrder_0100==========createSubscriber promise1
'
);
commonEventSubscriber0100
=
data
;
data
.
getSubscribeInfo
().
then
(()
=>
{
console
.
info
(
'
===============ActsSubscriberTestOrder_0100=========getSubscribeInfo promise1
'
);
Subscriber
.
subscribe
(
commonEventSubscriber0100
,
subscriberCallBack0100
);
commonEvent
.
subscribe
(
commonEventSubscriber0100
,
subscriberCallBack0100
);
});
})
Subscriber
.
createSubscriber
(
commonEvent
.
createSubscriber
(
commonEventSubscribeInfo2
).
then
((
data
)
=>
{
console
.
info
(
'
===============ActsSubscriberTestOrder_0100==========createSubscriber promise2
'
);
commonEventSubscriber0101
=
data
;
data
.
getSubscribeInfo
().
then
(()
=>
{
console
.
info
(
'
===============ActsSubscriberTestOrder_0100=========getSubscribeInfo promise2
'
);
Subscriber
.
subscribe
(
commonEventSubscriber0101
,
subscriberCallBack0101
);
commonEvent
.
subscribe
(
commonEventSubscriber0101
,
subscriberCallBack0101
);
setTimeout
(
function
(){
console
.
debug
(
'
===================ActsSubscriberTestOrder_0100 delay 100ms==================
'
);
Subscriber
.
publish
(
'
publish_event0100
'
,
commonEventPublishData
,
publishCallback
);
commonEvent
.
publish
(
'
publish_event0100
'
,
commonEventPublishData
,
publishCallback
);
},
100
);
});
})
...
...
@@ -222,36 +222,36 @@ export default function ActsSubscriberTestOrder() {
})
}
Subscriber
.
createSubscriber
(
commonEvent
.
createSubscriber
(
commonEventSubscribeInfo1
,
).
then
((
data
)
=>
{
console
.
info
(
'
===============ActsSubscriberTestOrder_0200==========createSubscriber promise1
'
);
commonEventSubscriber0200
=
data
;
data
.
getSubscribeInfo
().
then
(()
=>
{
console
.
info
(
'
===============ActsSubscriberTestOrder_0200=========getSubscribeInfo promise1
'
);
Subscriber
.
subscribe
(
commonEventSubscriber0200
,
subscriberCallBack0200
);
commonEvent
.
subscribe
(
commonEventSubscriber0200
,
subscriberCallBack0200
);
});
})
Subscriber
.
createSubscriber
(
commonEvent
.
createSubscriber
(
commonEventSubscribeInfo2
,
).
then
((
data
)
=>
{
console
.
info
(
'
===============ActsSubscriberTestOrder_0200==========createSubscriber promise2
'
);
commonEventSubscriber0201
=
data
;
data
.
getSubscribeInfo
().
then
(()
=>
{
console
.
info
(
'
===============ActsSubscriberTestOrder_0200=========getSubscribeInfo promise2
'
);
Subscriber
.
subscribe
(
commonEventSubscriber0201
,
subscriberCallBack0201
);
commonEvent
.
subscribe
(
commonEventSubscriber0201
,
subscriberCallBack0201
);
setTimeout
(
function
(){
console
.
debug
(
'
===================ActsSubscriberTestOrder_0200 delay 100ms==================
'
);
Subscriber
.
unsubscribe
(
commonEventSubscriber0200
,
unsubscribeCallback
);
commonEvent
.
unsubscribe
(
commonEventSubscriber0200
,
unsubscribeCallback
);
},
100
);
setTimeout
(
function
(){
console
.
debug
(
'
===================ActsSubscriberTestOrder_0200 delay 100ms==================
'
);
Subscriber
.
publish
(
'
publish_event0200
'
,
commonEventPublishData1
,
publishCallback
);
commonEvent
.
publish
(
'
publish_event0200
'
,
commonEventPublishData1
,
publishCallback
);
},
100
);
setTimeout
(
function
(){
console
.
debug
(
'
===================ActsSubscriberTestOrder_0200 delay 100ms==================
'
);
Subscriber
.
publish
(
'
publish_event0201
'
,
commonEventPublishData2
,
publishCallback
);
commonEvent
.
publish
(
'
publish_event0201
'
,
commonEventPublishData2
,
publishCallback
);
},
100
);
});
})
...
...
@@ -336,30 +336,30 @@ export default function ActsSubscriberTestOrder() {
})
}
Subscriber
.
createSubscriber
(
commonEvent
.
createSubscriber
(
commonEventSubscribeInfo1
,
).
then
((
data
)
=>
{
console
.
info
(
'
===============ActsSubscriberTestOrder_0300==========createSubscriber promise1
'
);
commonEventSubscriber0300
=
data
;
data
.
getSubscribeInfo
().
then
(()
=>
{
console
.
info
(
'
===============ActsSubscriberTestOrder_0300=========getSubscribeInfo promise1
'
);
Subscriber
.
subscribe
(
commonEventSubscriber0300
,
subscriberCallBack0300
);
commonEvent
.
subscribe
(
commonEventSubscriber0300
,
subscriberCallBack0300
);
});
})
Subscriber
.
createSubscriber
(
commonEvent
.
createSubscriber
(
commonEventSubscribeInfo2
,
).
then
((
data
)
=>
{
console
.
info
(
'
===============ActsSubscriberTestOrder_0300==========createSubscriber promise2
'
);
commonEventSubscriber0301
=
data
;
data
.
getSubscribeInfo
().
then
(()
=>
{
console
.
info
(
'
===============ActsSubscriberTestOrder_0300=========getSubscribeInfo promise2
'
);
Subscriber
.
subscribe
(
commonEventSubscriber0301
,
subscriberCallBack0301
);
commonEvent
.
subscribe
(
commonEventSubscriber0301
,
subscriberCallBack0301
);
let
numindex
=
0
;
for
(;
numindex
<
3
;
++
numindex
)
{
setTimeout
(
function
(){
console
.
debug
(
'
===================ActsSubscriberTestOrder_0300 delay 100ms==================
'
);
Subscriber
.
publish
(
'
publish_event0301
'
,
commonEventPublishData2
,
publishCallback
);
commonEvent
.
publish
(
'
publish_event0301
'
,
commonEventPublishData2
,
publishCallback
);
},
100
);
}
});
...
...
@@ -421,7 +421,7 @@ export default function ActsSubscriberTestOrder() {
expect
().
assertFail
();
}
Subscriber
.
createSubscriber
(
commonEvent
.
createSubscriber
(
commonEventSubscribeInfo1
).
then
((
data
)
=>
{
console
.
info
(
'
===============ActsSubscriberTestOrder_0400==========createSubscriber promise1
'
);
...
...
@@ -429,11 +429,11 @@ export default function ActsSubscriberTestOrder() {
data
.
getSubscribeInfo
().
then
((
data
)
=>
{
console
.
info
(
'
===============ActsSubscriberTestOrder_0400=========getSubscribeInfo promise1
'
);
expect
(
data
.
events
[
0
]).
assertEqual
(
'
publish_eventOrder0400
'
);
Subscriber
.
subscribe
(
commonEventSubscriber0400
,
subscriberCallBack0400
);
commonEvent
.
subscribe
(
commonEventSubscriber0400
,
subscriberCallBack0400
);
})
})
Subscriber
.
createSubscriber
(
commonEvent
.
createSubscriber
(
commonEventSubscribeInfo2
).
then
((
data
)
=>
{
console
.
info
(
'
===============ActsSubscriberTestOrder_0400==========createSubscriber promise2
'
);
...
...
@@ -441,10 +441,10 @@ export default function ActsSubscriberTestOrder() {
data
.
getSubscribeInfo
().
then
((
data
)
=>
{
console
.
info
(
'
===============ActsSubscriberTestOrder_0400=========getSubscribeInfo promise2
'
);
expect
(
data
.
events
[
0
]).
assertEqual
(
'
publish_eventOrder0400
'
);
Subscriber
.
subscribe
(
commonEventSubscriber0401
,
subscriberCallBack0401
);
commonEvent
.
subscribe
(
commonEventSubscriber0401
,
subscriberCallBack0401
);
setTimeout
(
function
(){
console
.
debug
(
'
===================ActsSubscriberTestOrder_0400 delay 100mss==================
'
);
Subscriber
.
publish
(
'
publish_eventOrder0400
'
,
commonEventPublishData
,
publishCallback
);
commonEvent
.
publish
(
'
publish_eventOrder0400
'
,
commonEventPublishData
,
publishCallback
);
},
100
);
})
})
...
...
@@ -509,7 +509,7 @@ export default function ActsSubscriberTestOrder() {
})
}
Subscriber
.
createSubscriber
(
commonEvent
.
createSubscriber
(
commonEventSubscribeInfo1
).
then
((
data
)
=>
{
console
.
info
(
'
===============ActsSubscriberTestOrder_0500==========createSubscriber promise1
'
);
...
...
@@ -517,11 +517,11 @@ export default function ActsSubscriberTestOrder() {
data
.
getSubscribeInfo
().
then
((
data
)
=>
{
console
.
info
(
'
===============ActsSubscriberTestOrder_0500==========getSubscribeInfo promise1
'
);
expect
(
data
.
events
[
0
]).
assertEqual
(
'
publish_event0500
'
);
Subscriber
.
subscribe
(
commonEventSubscriber0500
,
subscriberCallBack0500
);
commonEvent
.
subscribe
(
commonEventSubscriber0500
,
subscriberCallBack0500
);
})
})
Subscriber
.
createSubscriber
(
commonEvent
.
createSubscriber
(
commonEventSubscribeInfo2
).
then
((
data
)
=>
{
console
.
info
(
'
===============ActsSubscriberTestOrder_0500==========createSubscriber promise2
'
);
...
...
@@ -529,10 +529,10 @@ export default function ActsSubscriberTestOrder() {
data
.
getSubscribeInfo
().
then
((
data
)
=>
{
console
.
info
(
'
===============ActsSubscriberTestOrder_0500==========getSubscribeInfo promise2
'
);
expect
(
data
.
events
[
0
]).
assertEqual
(
'
publish_event0500
'
);
Subscriber
.
subscribe
(
commonEventSubscriber0501
,
subscriberCallBack0501
);
commonEvent
.
subscribe
(
commonEventSubscriber0501
,
subscriberCallBack0501
);
setTimeout
(
function
(){
console
.
debug
(
'
===================ActsSubscriberTestOrder_0500 delay 100ms==================
'
);
Subscriber
.
publish
(
'
publish_event0500
'
,
commonEventPublishData
,
publishCallback
);
commonEvent
.
publish
(
'
publish_event0500
'
,
commonEventPublishData
,
publishCallback
);
},
100
);
})
})
...
...
notification/ces_standard/subscribeandpublish/actssubscriberunordersystemtest/src/main/js/test/ActsSubscriber_test_unorder.js
浏览文件 @
d54cd5c1
...
...
@@ -159,7 +159,7 @@ export default function ActsSubscriberTestUnorderSystem() {
commonEvent
.
Support
.
COMMON_EVENT_NFC_ACTION_RF_FIELD_ON_DETECTED
,
commonEvent
.
Support
.
COMMON_EVENT_NFC_ACTION_RF_FIELD_OFF_DETECTED
,
commonEvent
.
Support
.
COMMON_EVENT_USER_ADDED
,
//
commonEvent.Support.COMMON_EVENT_USER_REMOVED,
commonEvent
.
Support
.
COMMON_EVENT_USER_REMOVED
,
commonEvent
.
Support
.
COMMON_EVENT_ABILITY_ADDED
,
commonEvent
.
Support
.
COMMON_EVENT_ABILITY_REMOVED
,
commonEvent
.
Support
.
COMMON_EVENT_ABILITY_UPDATED
,
...
...
@@ -176,7 +176,8 @@ export default function ActsSubscriberTestUnorderSystem() {
commonEvent
.
Support
.
COMMON_EVENT_VOLUME_BAD_REMOVAL
,
commonEvent
.
Support
.
COMMON_EVENT_VOLUME_EJECT
,
commonEvent
.
Support
.
COMMON_EVENT_SLOT_CHANGE
,
commonEvent
.
Support
.
COMMON_EVENT_SPN_INFO_CHANGED
commonEvent
.
Support
.
COMMON_EVENT_SPN_INFO_CHANGED
,
commonEvent
.
Support
.
COMMON_EVENT_QUICK_FIX_APPLY_RESULT
]
}
let
CommonEventSubscriber
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录