[common][namespace][DPTTIZEN-3189, replace of deprecated method getCapabilities] 98/230598/2
authorqunfang.lin <qunfang.lin@samsung.com>
Mon, 13 Apr 2020 20:17:33 +0000 (04:17 +0800)
committerQunfang Lin <qunfang.lin@samsung.com>
Mon, 13 Apr 2020 03:16:33 +0000 (03:16 +0000)
add: 0, modify: 6, delete: 0

Change-Id: Idbef80a547d16ba995f24ec78167177915369990
Signed-off-by: qunfang.lin <qunfang.lin@samsung.com>
common/tct-namespace-tizen-tests/namespace/Bluetooth_BluetoothManagerObject.html
common/tct-namespace-tizen-tests/namespace/Callhistory_CallHistoryObject.html
common/tct-namespace-tizen-tests/namespace/NFC_NFCManagerObject.html
common/tct-namespace-tizen-tests/namespace/NetworkBearerSelection_NetworkBearerSelectionObject.html
common/tct-namespace-tizen-tests/namespace/Push_PushManagerObject.html
common/tct-namespace-tizen-tests/namespace/SecureElement_SEServiceManagerObject.html

index 2c81d93cdb6e31ade0a932244bd816284a4a16b4..53c898b8fed95b30e99716dec6f27fdc021077ab 100755 (executable)
@@ -37,11 +37,9 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 
 test(function () {
-    var deviceCapabilities= tizen.systeminfo.getCapabilities();
+    var bluetooth = tizen.systeminfo.getCapability("http://tizen.org/feature/network.bluetooth");
 
-    assert_own_property(deviceCapabilities, "bluetooth", "deviceCapabilities");
-
-    if (deviceCapabilities.bluetooth) {
+    if (bluetooth) {
         assert_type(tizen.bluetooth, "object", "tizen.bluetooth object must exist");
         assert_not_equals(tizen.bluetooth, null, "tizen.bluetooth");
     } else {
index d8403b2727b687bf45f6d0816e96d60981dc3ab8..5edea17422c6855b7c5e998187f3f43a2edfcef5 100755 (executable)
@@ -37,11 +37,9 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/callhistory.html
 
 test(function () {
-    var deviceCapabilities= tizen.systeminfo.getCapabilities();
+    var telephony = tizen.systeminfo.getCapability("http://tizen.org/feature/network.telephony");
 
-    assert_own_property(deviceCapabilities, "telephony", "deviceCapabilities");
-
-    if (deviceCapabilities.telephony) {
+    if (telephony) {
         assert_type(tizen.callhistory, "object", "tizen.callhistory object must exist");
         assert_not_equals(tizen.callhistory, null, "tizen.callhistory");
     } else {
index 24f015c4f7e5c290c6a8cf6de1a7e636ed08a90f..6d8d413e53e0f9b8878d70c08862938e9cd9529b 100755 (executable)
@@ -37,11 +37,9 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/nfc.html
 
 test(function () {
-    var deviceCapabilities= tizen.systeminfo.getCapabilities();
+    var nfc = tizen.systeminfo.getCapability("http://tizen.org/feature/network.nfc");
 
-    assert_own_property(deviceCapabilities, "nfc", "deviceCapabilities");
-
-    if (deviceCapabilities.nfc) {
+    if (nfc) {
         assert_type(tizen.nfc, "object", "tizen.nfc object must exist");
         assert_not_equals(tizen.nfc, null, "tizen.nfc");
     } else {
index d7c46030a08dcf520f68ca37998ade77e2c40595..7cfa407564ffb132850d3f2ab6b61e46ef8f1876 100755 (executable)
@@ -37,11 +37,9 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/networkbearerselection.html
 
 test(function () {
-    var deviceCapabilities= tizen.systeminfo.getCapabilities();
+    var telephony = tizen.systeminfo.getCapability("http://tizen.org/feature/network.telephony");
 
-    assert_own_property(deviceCapabilities, "telephony", "deviceCapabilities");
-
-    if (deviceCapabilities.telephony) {
+    if (telephony) {
         assert_type(tizen.networkbearerselection, "object", "tizen.networkbearerselection object must exist");
         assert_not_equals(tizen.networkbearerselection, null, "tizen.networkbearerselection");
     } else {
index 58c76448f061725775ff4956750c74205346cb3d..7d887c9e3f749f983441c6d96697f4c0f1ce2282 100755 (executable)
@@ -37,11 +37,9 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/push.html
 
 test(function () {
-    var deviceCapabilities= tizen.systeminfo.getCapabilities();
+    var push = tizen.systeminfo.getCapability("http://tizen.org/feature/network.push");
 
-    assert_own_property(deviceCapabilities, "push", "deviceCapabilities");
-
-    if (deviceCapabilities.push) {
+    if (push) {
         assert_type(tizen.push, "object", "tizen.push object must exist");
         assert_not_equals(tizen.push, null, "tizen.push");
     } else {
index 69c27ad1494ca8df7445c9474fca18f91651c392..e192dea53f1ba7776b0c89b351418d738e3203b2 100755 (executable)
@@ -37,11 +37,9 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/se.html
 
 test(function () {
-    var deviceCapabilities= tizen.systeminfo.getCapabilities();
+    var secureElement = tizen.systeminfo.getCapability("http://tizen.org/feature/network.secure_element");
 
-    assert_own_property(deviceCapabilities, "secureElement", "deviceCapabilities");
-
-    if (deviceCapabilities.secureElement) {
+    if (secureElement) {
         assert_type(tizen.seService, "object", "tizen.seService object must exist");
         assert_not_equals(tizen.seService, null, "tizen.seService");
     } else {