Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
8f277640
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看板
未验证
提交
8f277640
编写于
8月 19, 2022
作者:
O
openharmony_ci
提交者:
Gitee
8月 19, 2022
浏览文件
操作
浏览文件
下载
差异文件
!4919 hmos xts update
Merge pull request !4919 from 高曦/OpenHarmony-3.1-Release
上级
b752e97b
7038d1f4
变更
8
展开全部
隐藏空白更改
内联
并排
Showing
8 changed file
with
646 addition
and
624 deletion
+646
-624
telephony/telephonyjstest/netmanager_base/dns/entry/src/main/js/test/NetworkManagerDNS.test.js
...base/dns/entry/src/main/js/test/NetworkManagerDNS.test.js
+20
-15
telephony/telephonyjstest/netmanager_base/jshttp/entry/src/main/js/test/NetworkManagerHttp.test.js
.../jshttp/entry/src/main/js/test/NetworkManagerHttp.test.js
+1
-1
telephony/telephonyjstest/netmanager_base/register/entry/src/main/js/test/NetworkManagerRegister.test.js
...ter/entry/src/main/js/test/NetworkManagerRegister.test.js
+516
-534
telephony/telephonyjstest/netmanager_base/socket/entry/src/main/js/test/NetStackSocket.test.js
...base/socket/entry/src/main/js/test/NetStackSocket.test.js
+44
-52
telephony/telephonyjstest/netmanager_base/system_fetch/entry/src/main/config.json
...t/netmanager_base/system_fetch/entry/src/main/config.json
+46
-0
telephony/telephonyjstest/netmanager_base/system_fetch/entry/src/main/js/test/Http.fetch.test.js
...se/system_fetch/entry/src/main/js/test/Http.fetch.test.js
+1
-1
telephony/telephonyjstest/network_search/network_search_errors/entry/src/main/js/test/NetworkSearchErrors.test.js
...errors/entry/src/main/js/test/NetworkSearchErrors.test.js
+10
-13
telephony/telephonyjstest/sim/sim_manager_function_test/entry/src/main/js/test/SimManager.test.js
...r_function_test/entry/src/main/js/test/SimManager.test.js
+8
-8
未找到文件。
telephony/telephonyjstest/netmanager_base/dns/entry/src/main/js/test/NetworkManagerDNS.test.js
浏览文件 @
8f277640
...
...
@@ -20,21 +20,26 @@
describe
(
'
Telephony_NETMANAGER_TestDNSTest
'
,
function
(){
it
(
'
Telephony_NETMANAGER_TestDNS_Test0100
'
,
0
,
function
(
done
){
netConnection
.
getDefaultNet
().
then
(
function
(
netHandle
){
netHandle
.
getAddressesByName
(
"
www.baidu.com
"
).
then
(
function
(
addresses
){
if
(
addresses
===
undefined
||
addresses
.
length
==
0
){
console
.
info
(
'
Telephony_NETMANAGER_TestDNS_Test0100 addresses is
'
+
addresses
);
expect
(
false
).
assertFail
();
}
else
{
console
.
info
(
'
Telephony_NETMANAGER_TestDNS_Test0100 is success
'
);
expect
(
true
).
assertTrue
();
}
done
();
})
})
});
it
(
'
Telephony_NETMANAGER_TestDNS_Test0100
'
,
0
,
function
(
done
){
netConnection
.
getDefaultNet
().
then
(
function
(
netHandle
){
netHandle
.
getAddressesByName
(
"
www.baidu.com
"
).
then
(
function
(
addresses
)
{
if
(
addresses
===
undefined
||
addresses
.
length
==
0
){
console
.
info
(
'
Telephony_NETMANAGER_TestDNS_Test0100 addresses is
'
+
addresses
);
expect
(
false
).
assertFail
();
}
done
()
}).
catch
(
function
(
error
)
{
if
(
error
===
undefined
){
expect
(
false
).
assertTrue
();
}
else
{
console
.
info
(
'
Telephony_NETMANAGER_TestDNS_Test0100 is success
'
);
expect
(
true
).
assertTrue
();
}
done
();
})
})
});
it
(
'
Telephony_NETMANAGER_TestDNS_Test0200
'
,
0
,
function
(
done
){
...
...
telephony/telephonyjstest/netmanager_base/jshttp/entry/src/main/js/test/NetworkManagerHttp.test.js
浏览文件 @
8f277640
...
...
@@ -107,7 +107,7 @@ describe('Telephony_NETSTACK_HTTPTest',function(){
it
(
'
Telephony_NETSTACK_HttpTestCookies_0100
'
,
0
,
function
(
done
){
let
http
=
netHttp
.
createHttp
()
http
.
request
(
"
https://
httpbin.org/cookies/set/name/value
"
).
then
(
function
(
data
){
http
.
request
(
"
https://
m.baidu.com
"
).
then
(
function
(
data
){
expect
(
data
.
responseCode
===
netHttp
.
ResponseCode
.
OK
).
assertTrue
()
expect
(
data
.
cookies
!==
""
).
assertTrue
()
done
();
...
...
telephony/telephonyjstest/netmanager_base/register/entry/src/main/js/test/NetworkManagerRegister.test.js
浏览文件 @
8f277640
此差异已折叠。
点击以展开。
telephony/telephonyjstest/netmanager_base/socket/entry/src/main/js/test/NetStackSocket.test.js
浏览文件 @
8f277640
...
...
@@ -226,32 +226,28 @@ describe('Telephony_NETSTACK_SocketTest', function () {
*/
it
(
'
Telephony_NetStack_UDPTest1200
'
,
0
,
function
(
done
)
{
let
udp
=
netSocket
.
constructUDPSocketInstance
()
udp
.
on
(
'
message
'
,
function
()
{
})
udp
.
off
(
'
message
'
,
function
()
{
expect
().
assertFail
()
done
()
})
udp
.
on
(
'
listening
'
,
function
()
{
})
udp
.
off
(
'
listening
'
,
function
()
{
expect
().
assertFail
()
done
()
})
udp
.
on
(
'
close
'
,
function
()
{
})
udp
.
off
(
'
close
'
,
function
()
{
expect
().
assertFail
()
done
()
})
udp
.
on
(
'
error
'
,
function
()
{
})
udp
.
off
(
'
error
'
,
function
()
{
expect
().
assertFail
()
done
()
})
done
()
let
udp
=
socket
.
constructUDPSocketInstance
();
let
callback
=
value
=>
{
console
.
info
(
"
on message, message:
"
+
value
.
message
+
"
, remoteInfo:
"
+
value
.
remoteInfo
);
}
udp
.
on
(
'
message
'
,
callback
);
udp
.
off
(
'
message
'
,
callback
);
let
callback1
=
()
=>
{
console
.
info
(
"
on listening, success
"
);
}
udp
.
on
(
'
listening
'
,
callback1
);
udp
.
off
(
'
listening
'
,
callback1
);
let
callback2
=
()
=>
{
console
.
info
(
"
on close, success
"
);
}
udp
.
on
(
'
close
'
,
callback2
);
udp
.
off
(
'
close
'
,
callback2
);
let
callback3
=
err
=>
{
console
.
info
(
"
on error, err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
===
undefined
).
assertTrue
();
}
udp
.
on
(
'
error
'
,
callback3
);
udp
.
off
(
'
error
'
,
callback3
);
});
/**
...
...
@@ -450,32 +446,28 @@ describe('Telephony_NETSTACK_SocketTest', function () {
*/
it
(
'
Telephony_NetStack_TCPTest1200
'
,
0
,
function
(
done
)
{
let
tcp
=
netSocket
.
constructTCPSocketInstance
()
tcp
.
on
(
'
message
'
,
function
()
{
})
tcp
.
off
(
'
message
'
,
function
()
{
expect
().
assertFail
()
done
()
})
tcp
.
on
(
'
connect
'
,
function
()
{
})
tcp
.
off
(
'
connect
'
,
function
()
{
expect
().
assertFail
()
done
()
})
tcp
.
on
(
'
close
'
,
function
()
{
})
tcp
.
off
(
'
close
'
,
function
()
{
expect
().
assertFail
()
done
()
})
tcp
.
on
(
'
error
'
,
function
()
{
})
tcp
.
off
(
'
error
'
,
function
()
{
expect
().
assertFail
()
done
()
})
done
()
let
tcp
=
socket
.
constructTCPSocketInstance
();
let
callback
=
value
=>
{
console
.
info
(
"
on message, message:
"
+
value
.
message
+
"
, remoteInfo:
"
+
value
.
remoteInfo
);
}
tcp
.
on
(
'
message
'
,
callback
);
tcp
.
off
(
'
message
'
,
callback
);
let
callback1
=
()
=>
{
console
.
info
(
"
on connect success
"
);
}
tcp
.
on
(
'
connect
'
,
callback1
);
tcp
.
off
(
'
connect
'
,
callback1
);
let
callback2
=
()
=>
{
console
.
info
(
"
on close success
"
);
}
tcp
.
on
(
'
close
'
,
callback2
);
tcp
.
off
(
'
close
'
,
callback2
);
let
callback3
=
err
=>
{
console
.
info
(
"
on error, err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
===
undefined
).
assertTrue
();
}
tcp
.
on
(
'
error
'
,
callback3
);
tcp
.
off
(
'
error
'
,
callback3
);
});
/**
...
...
telephony/telephonyjstest/netmanager_base/system_fetch/entry/src/main/config.json
浏览文件 @
8f277640
...
...
@@ -49,6 +49,52 @@
"package"
:
"com.ohos.system_fetch"
,
"srcPath"
:
""
,
"name"
:
".MyApplication"
,
"reqPermissions"
:
[
{
"name"
:
"ohos.permission.LOCATION"
,
"reason"
:
"need use ohos.permission.LOCATION"
},
{
"name"
:
"ohos.permission.SET_TELEPHONY_STATE"
,
"reason"
:
"need use ohos.permission.SET_TELEPHONY_STATE"
},
{
"name"
:
"ohos.permission.GET_TELEPHONY_STATE"
,
"reason"
:
"need use ohos.permission.GET_TELEPHONY_STATE"
},
{
"name"
:
"ohos.permission.PLACE_CALL"
,
"reason"
:
"need use ohos.permission.PLACE_CALL"
},
{
"name"
:
"ohos.permission.READ_CONTACTS"
,
"reason"
:
"need use ohos.permission.READ_CONTACTS"
},
{
"name"
:
"ohos.permission.WRITE_CONTACTS"
,
"reason"
:
"need use ohos.permission.WRITE_CONTACTS"
},
{
"name"
:
"ohos.permission.SEND_MESSAGES"
,
"reason"
:
"need use ohos.permission.SEND_MESSAGES"
},
{
"name"
:
"ohos.permission.RECEIVE_SMS"
,
"reason"
:
"need use ohos.permission.RECEIVE_SMS"
},
{
"name"
:
"ohos.permission.READ_CALL_LOG"
,
"reason"
:
"need use ohos.permission.READ_CALL_LOG"
},
{
"name"
:
"ohos.permission.GET_NETWORK_INFO"
,
"reason"
:
"need use ohos.permission.GET_NETWORK_INFO"
},
{
"name"
:
"ohos.permission.INTERNET"
,
"reason"
:
"need use ohos.permission.INTERNET"
}
],
"js"
:
[
{
"pages"
:
[
...
...
telephony/telephonyjstest/netmanager_base/system_fetch/entry/src/main/js/test/Http.fetch.test.js
浏览文件 @
8f277640
...
...
@@ -108,7 +108,7 @@ describe("Telephony_NetStack_HttpTest", function () {
*/
it
(
"
Telephony_NetStack_HttpTestCookies_0100
"
,
0
,
function
(
done
)
{
let
http
=
NetHttp
.
createHttp
()
http
.
request
(
"
https://
httpbin.org/cookies/set/name/value
"
).
then
(
function
(
data
){
http
.
request
(
"
https://
m.baidu.com
"
).
then
(
function
(
data
){
console
.
info
(
"
NetStack
"
+
JSON
.
stringify
(
data
))
expect
(
data
.
responseCode
===
NetHttp
.
ResponseCode
.
OK
).
assertTrue
()
expect
(
data
.
cookies
!==
""
).
assertTrue
()
...
...
telephony/telephonyjstest/network_search/network_search_errors/entry/src/main/js/test/NetworkSearchErrors.test.js
浏览文件 @
8f277640
...
...
@@ -151,7 +151,7 @@ describe('ActsNetworkSearchTest', function () {
radio
.
getSignalInformation
(
SLOT_2
,
(
err
,
data
)
=>
{
if
(
err
)
{
console
.
log
(
`Telephony_NetworkSearch_getSignalInformation_Async_0400 fail err:
${
err
}
`
);
expect
(
).
assertFail
();
expect
(
err
!=
null
).
assertTrue
();
done
();
return
;
}
...
...
@@ -174,7 +174,7 @@ describe('ActsNetworkSearchTest', function () {
radio
.
getISOCountryCodeForNetwork
(
SLOT_2
,
(
err
,
data
)
=>
{
if
(
err
)
{
console
.
log
(
`Telephony_NetworkSearch_getISOCountryCodeForNetwork_Async_0400 fail err:
${
err
}
`
);
expect
(
).
assertFail
();
expect
(
err
!==
undefined
).
assertTrue
();
done
();
return
;
}
...
...
@@ -198,7 +198,7 @@ describe('ActsNetworkSearchTest', function () {
expect
(
data
.
length
===
0
).
assertTrue
();
}
catch
(
err
)
{
console
.
log
(
`Telephony_NetworkSearch_getISOCountryCodeForNetwork_Promise_0400 fail err:
${
err
}
`
);
expect
(
).
assertFail
();
expect
(
err
!==
undefined
).
assertTrue
();
done
();
return
;
}
...
...
@@ -217,7 +217,7 @@ describe('ActsNetworkSearchTest', function () {
done
();
}
else
{
console
.
log
(
'
Telephony_NetworkSearch_getNetworkSelectionMode_Async_0500 fail not go to err
'
);
expect
(
).
assertFail
();
expect
(
err
!==
undefined
).
assertTrue
();
done
();
}
...
...
@@ -233,7 +233,7 @@ describe('ActsNetworkSearchTest', function () {
try
{
await
radio
.
getNetworkSelectionMode
(
SLOT_2
);
console
.
log
(
'
Telephony_NetworkSearch_getNetworkSelectionMode_Promise_0500 fail not go to err
'
);
expect
(
).
assertFail
();
expect
(
err
!==
undefined
).
assertTrue
();
}
catch
(
err
)
{
console
.
log
(
'
Telephony_NetworkSearch_getNetworkSelectionMode_Promise_0500 finish
'
);
done
();
...
...
@@ -242,9 +242,6 @@ describe('ActsNetworkSearchTest', function () {
done
();
});
/**
* @tc.number Telephony_NetworkSearch_getNetworkState_Promise_0700
...
...
@@ -255,7 +252,7 @@ describe('ActsNetworkSearchTest', function () {
try
{
await
radio
.
getNetworkState
(
SLOT_2
);
console
.
log
(
'
Telephony_NetworkSearch_getNetworkState_Promise_0700 fail not go to err
'
);
expect
(
).
assertFail
();
expect
(
err
!==
undefined
).
assertTrue
();
}
catch
(
err
)
{
console
.
log
(
`Telephony_NetworkSearch_getNetworkState_Promise_0700 finish err:
${
err
}
`
);
done
();
...
...
@@ -273,7 +270,7 @@ describe('ActsNetworkSearchTest', function () {
try
{
await
radio
.
getRadioTech
(
SLOT_2
);
console
.
log
(
'
Telephony_NetworkSearch_getRadioTech_Promise_0400 fail not go to err
'
);
expect
(
).
assertFail
();
expect
(
err
!==
undefined
).
assertTrue
();
}
catch
(
err
)
{
console
.
log
(
`Telephony_NetworkSearch_getRadioTech_Promise_0400 finish err:
${
err
}
`
);
done
();
...
...
@@ -295,7 +292,7 @@ describe('ActsNetworkSearchTest', function () {
expect
(
data
.
length
===
0
).
assertTrue
();
}
catch
(
err
)
{
console
.
log
(
`Telephony_NetworkSearch_getSignalInformation_Promise_0400 fail err:
${
err
}
`
);
expect
(
).
assertFail
();
expect
(
err
!==
undefined
).
assertTrue
();
done
();
return
;
}
...
...
@@ -311,7 +308,7 @@ describe('ActsNetworkSearchTest', function () {
radio
.
getOperatorName
(
SLOT_2
,
(
err
,
data
)
=>
{
if
(
err
)
{
console
.
log
(
`Telephony_NetworkSearch_getOperatorName_Async_0400 fail err:
${
err
}
`
);
expect
(
).
assertFail
();
expect
(
err
!==
undefined
).
assertTrue
();
done
();
return
;
}
...
...
@@ -334,7 +331,7 @@ describe('ActsNetworkSearchTest', function () {
done
();
}
catch
(
err
)
{
console
.
log
(
`Telephony_NetworkSearch_getOperatorName_Promise_0400 fail err:
${
err
}
`
);
expect
(
).
assertFail
();
expect
(
err
!==
undefined
).
assertTrue
();
done
();
}
})
...
...
telephony/telephonyjstest/sim/sim_manager_function_test/entry/src/main/js/test/SimManager.test.js
浏览文件 @
8f277640
...
...
@@ -269,7 +269,7 @@ describe('SimManagerTest', function () {
sim
.
isSimActive
(
env
.
SLOTID2
,
(
err
,
data
)
=>
{
if
(
err
)
{
console
.
log
(
`
${
CASE_NAME
}
fail, err:
${
err
.
message
}
`
);
expect
(
).
assertFail
();
expect
(
err
!==
undefined
).
assertTrue
();
done
();
return
;
}
...
...
@@ -292,7 +292,7 @@ describe('SimManagerTest', function () {
expect
(
data
).
assertFalse
();
}
catch
(
err
)
{
console
.
log
(
`
${
CASE_NAME
}
isSimActive fail, err:
${
err
.
message
}
`
);
expect
(
).
assertFail
();
expect
(
err
!==
undefined
).
assertTrue
();
done
();
return
;
}
...
...
@@ -310,7 +310,7 @@ describe('SimManagerTest', function () {
const
CASE_NAME
=
'
Telephony_Sim_hasSimCard_Async_0600
'
;
sim
.
hasSimCard
(
env
.
SLOTID2
,
(
err
,
data
)
=>
{
if
(
err
)
{
expect
(
).
assertFail
();
expect
(
err
!==
undefined
).
assertTrue
();
console
.
log
(
`
${
CASE_NAME
}
fail, err:
${
err
.
message
}
`
);
done
();
return
;
...
...
@@ -333,7 +333,7 @@ describe('SimManagerTest', function () {
let
data
=
await
sim
.
hasSimCard
(
env
.
SLOTID2
);
expect
(
data
).
assertFalse
();
}
catch
(
err
)
{
expect
(
).
assertFail
();
expect
(
err
!==
undefined
).
assertTrue
();
console
.
log
(
`
${
CASE_NAME
}
fail, err:
${
err
.
message
}
`
);
done
();
return
;
...
...
@@ -366,7 +366,7 @@ describe('SimManagerTest', function () {
sim
.
getCardType
(
env
.
SLOTID2
,
(
error
,
cardType
)
=>
{
if
(
error
)
{
console
.
log
(
`
${
CASE_NAME
}
GetCardType error:
${
error
.
message
}
`
);
expect
(
).
assertFail
();
expect
(
error
!==
undefined
).
assertTrue
();
done
();
return
;
}
...
...
@@ -390,7 +390,7 @@ describe('SimManagerTest', function () {
console
.
log
(
`
${
CASE_NAME
}
test finish.`
);
}
catch
(
error
)
{
console
.
log
(
`
${
CASE_NAME
}
GetCardType error:
${
error
.
message
}
`
);
expect
(
).
assertFail
();
expect
(
error
!==
undefined
).
assertTrue
();
}
done
();
});
...
...
@@ -406,7 +406,7 @@ describe('SimManagerTest', function () {
sim
.
hasOperatorPrivileges
(
env
.
SLOTID2
,
(
err
,
result
)
=>
{
if
(
err
)
{
console
.
log
(
`
${
CASE_NAME
}
hasOperatorPrivileges err:
${
err
.
message
}
`
);
expect
(
err
.
code
).
assertEqual
(
202
);
expect
(
err
!==
undefined
).
assertTrue
(
);
done
();
return
;
}
...
...
@@ -430,7 +430,7 @@ describe('SimManagerTest', function () {
console
.
log
(
`
${
CASE_NAME
}
test finish.`
);
}
catch
(
error
)
{
console
.
log
(
`
${
CASE_NAME
}
hasOperatorPrivileges error:
${
error
.
message
}
`
);
expect
(
err
.
code
).
assertEqual
(
202
);
expect
(
err
or
!==
undefined
).
assertTrue
(
);
}
done
();
});
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录