提交 9e65c8df 编写于 作者: G gaoxi

case

Signed-off-by: Ngaoxi <gaoxi785@huawei.com>
上级 a194e903
......@@ -14,15 +14,15 @@
group("telephonyjstest") {
testonly = true
deps = [
"call_manager:call_manager",
"cellular_data:cellular_data",
# "call_manager:call_manager",
# "cellular_data:cellular_data",
"netmanager_base:netmanager_base",
"netmanager_http:ActsNetManagerHttpEtsTest",
"netmanager_socket:ActsNetManagerSocketEtsTest",
"network_search:network_search",
"observer:ActsObserverEtsTest",
"radiostatistic:ActsRadioStatisticEtsTest",
"sim:sim",
"sms_mms:sms_mms",
# "netmanager_http:ActsNetManagerHttpEtsTest",
# "netmanager_socket:ActsNetManagerSocketEtsTest",
# "network_search:network_search",
# "observer:ActsObserverEtsTest",
# "radiostatistic:ActsRadioStatisticEtsTest",
# "sim:sim",
# "sms_mms:sms_mms",
]
}
......@@ -23,10 +23,15 @@
it('Telephony_NETMANAGER_TestDNS_Test0100', 0, function(done){
netConnection.getDefaultNet().then(function(netHandle){
netHandle.getAddressesByName("www.baidu.com").then(function(addresses){
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();
......
......@@ -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();
......
......@@ -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": [
......
......@@ -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()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册