[common][bluetooth][TWDAPI-267, Support advertising arrays of Service data] 42/244942/4
authorzhaofeng <feng.zhao@samsung.com>
Mon, 28 Sep 2020 07:10:00 +0000 (15:10 +0800)
committerzhaofeng <feng.zhao@samsung.com>
Wed, 28 Oct 2020 09:17:45 +0000 (17:17 +0800)
Change-Id: Ic024a95443e944854b4a2c3f5b8d8b580980dc62
Signed-off-by: zhaofeng <feng.zhao@samsung.com>
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEAdvertiseData_serviceData_attribute.html [deleted file]
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEAdvertiseData_servicesData_attribute.html [new file with mode: 0755]
common/tct-bluetooth-tizen-tests/tests.full.xml
common/tct-bluetooth-tizen-tests/tests.xml

diff --git a/common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEAdvertiseData_serviceData_attribute.html b/common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEAdvertiseData_serviceData_attribute.html
deleted file mode 100755 (executable)
index b2c11e8..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Xiaoyan Qian <xy.qian@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEAdvertiseData_serviceData_attribute</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEAdvertiseData_serviceData_attribute
-//==== LABEL Check if BluetoothLEAdvertiseData have serviceData attribute with proper type and is writeable
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothLEAdvertiseData:serviceData A
-//==== SPEC_URL TBD
-//==== PRIORITY P1
-//==== TEST_CRITERIA AE AT ADV ASG
-
-test(function () {
-var adapter, BbLEScanSuccessCallback, BbLEScanErrorCallback, advertiseDataInit, advertiseData,
-    device = null, battery_svc_uuid_16 = "180f", heart_rate_svc_uuid_16 = "180d", mock_serviceData;
-    advertiseDataInit = {
-        includeName: true,
-        includeTxPowerLevel: true,
-        uuids: [battery_svc_uuid_16],
-        solicitationuuids: [heart_rate_svc_uuid_16]
-    };
-    mock_serviceData = new tizen.BluetoothLEServiceData("c500-11e5", "0x1811");
-    advertiseData = new tizen.BluetoothLEAdvertiseData(advertiseDataInit);
-    assert_own_property(advertiseData, "serviceData", "advertiseData does not own serviceData property");
-    assert_equals(advertiseData.serviceData, null, "serviceData should be null by default");
-    advertiseData.serviceData = mock_serviceData;
-    assert_equals(advertiseData.serviceData.uuid, mock_serviceData.uuid, "serviceData should be updated");
-    assert_equals(advertiseData.serviceData.data, mock_serviceData.data, "serviceData should be updated");
-}, document.title);
-
-</script>
-</body>
-</html>
diff --git a/common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEAdvertiseData_servicesData_attribute.html b/common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEAdvertiseData_servicesData_attribute.html
new file mode 100755 (executable)
index 0000000..827d460
--- /dev/null
@@ -0,0 +1,61 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2015 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (the License);
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Authors:
+        Feng Zhao <feng.zhao@samsung.com>
+
+-->
+<html>
+<head>
+<title>BluetoothLEAdvertiseData_servicesData_attribute</title>
+<meta charset="utf-8"/>
+<script src="support/unitcommon.js"></script>
+</head>
+<body>
+<div id="log"></div>
+<script>
+//==== TEST: BluetoothLEAdvertiseData_servicesData_attribute
+//==== LABEL Check if BluetoothLEAdvertiseData have servicesData attribute with proper type and is writeable
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothLEAdvertiseData:servicesData A
+//==== SPEC_URL TBD
+//==== PRIORITY P1
+//==== TEST_CRITERIA AE AT ADV ASG
+
+test(function () {
+    var adapter, BbLEScanSuccessCallback, BbLEScanErrorCallback, advertiseDataInit, advertiseData,
+    device = null, battery_svc_uuid_16 = "180f", heart_rate_svc_uuid_16 = "180d", mock_serviceData;
+    advertiseDataInit = {
+        includeName: true,
+        includeTxPowerLevel: true,
+        uuids: [battery_svc_uuid_16],
+        solicitationuuids: [heart_rate_svc_uuid_16]
+    };
+
+    advertiseData = new tizen.BluetoothLEAdvertiseData(advertiseDataInit);
+    assert_own_property(advertiseData, "servicesData", "advertiseData does not own servicesData property");
+    assert_equals(advertiseData.servicesData, null, "servicesData should be null by default");
+
+    var firstService = new tizen.BluetoothLEServiceData("11e5", "0x1811");
+    var secondService = new tizen.BluetoothLEServiceData("a5e8", "0x1815");
+    advertiseData.servicesData = [firstService, secondService];
+
+    assert_equals(advertiseData.servicesData[0].uuid, firstService.uuid, "servicesData should be updated");
+    assert_equals(advertiseData.servicesData[1].data, secondService.data, "servicesData should be updated");
+}, document.title);
+
+</script>
+</body>
+</html>
index 5588d020701af735b4eb82f7f91ed9df6734c20d..1fb34b68c2cd32a90e86aa7de4c4507803d89bc4 100755 (executable)
           </spec>
         </specs>
       </testcase>
+      <testcase purpose="Check if BluetoothLEAdvertiseData have servicesData attribute with proper type and is writeable" component="TizenAPI/Communication/Bluetooth" execution_type="auto" id="BluetoothLEAdvertiseData_servicesData_attribute">
+        <description>
+          <pre_condition>The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.</pre_condition>
+          <test_script_entry>/opt/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEAdvertiseData_servicesData_attribute.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion interface="BluetoothLEDevice" element_type="attribute" element_name="rssi" specification="Bluetooth" section="Communication" category="Tizen Device API Specifications"/>
+            <spec_url>https://docs.tizen.org/application/web/api/6.0/device_api/mobile/tizen/bluetooth.html</spec_url>
+            <spec_statement>TBD</spec_statement>
+          </spec>
+        </specs>
+      </testcase>
     </set>
   </suite>
 </test_definition>
index 0cf3e34e41d758bb472f0d71f722bce588e6c34a..8251c498bd642c45d43780f046218e6ae2cdc81b 100755 (executable)
@@ -1763,10 +1763,10 @@ The bluetooth of the remote/test device MUST be turned on and discoverable from
           <test_script_entry>/opt/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEAdvertiseData_manufacturerData_attribute.html</test_script_entry>
         </description>
       </testcase>
-      <testcase purpose="Check if BluetoothLEAdvertiseData have serviceData attribute with proper type and is writeable" component="TizenAPI/Communication/Bluetooth" execution_type="auto" id="BluetoothLEAdvertiseData_serviceData_attribute">
+      <testcase purpose="Check if BluetoothLEAdvertiseData have servicesData attribute with proper type and is writeable" component="TizenAPI/Communication/Bluetooth" execution_type="auto" id="BluetoothLEAdvertiseData_servicesData_attribute">
         <description>
           <pre_condition>The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.</pre_condition>
-          <test_script_entry>/opt/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEAdvertiseData_serviceData_attribute.html</test_script_entry>
+          <test_script_entry>/opt/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEAdvertiseData_servicesData_attribute.html</test_script_entry>
         </description>
       </testcase>
       <testcase purpose="Check if interface BluetoothLEConnectChangeCallback exists,it should not" component="TizenAPI/Communication/Bluetooth" execution_type="auto" id="BluetoothLEConnectChangeCallback_notexist">
@@ -3578,10 +3578,10 @@ The bluetooth of the remote/test device MUST be turned on and discoverable from
           <test_script_entry>/opt/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEAdvertiseData_manufacturerData_attribute.html</test_script_entry>
         </description>
       </testcase>
-      <testcase purpose="Check if BluetoothLEAdvertiseData have serviceData attribute with proper type and is writeable" component="TizenAPI/Communication/Bluetooth" execution_type="auto" id="BluetoothLEAdvertiseData_serviceData_attribute">
+      <testcase purpose="Check if BluetoothLEAdvertiseData have servicesData attribute with proper type and is writeable" component="TizenAPI/Communication/Bluetooth" execution_type="auto" id="BluetoothLEAdvertiseData_servicesData_attribute">
         <description>
           <pre_condition>The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.</pre_condition>
-          <test_script_entry>/opt/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEAdvertiseData_serviceData_attribute.html</test_script_entry>
+          <test_script_entry>/opt/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEAdvertiseData_servicesData_attribute.html</test_script_entry>
         </description>
       </testcase>
       <testcase purpose="Check if interface BluetoothLEConnectChangeCallback exists,it should not" component="TizenAPI/Communication/Bluetooth" execution_type="auto" id="BluetoothLEConnectChangeCallback_notexist">
@@ -5312,10 +5312,10 @@ The bluetooth of the remote/test device MUST be turned on and discoverable from
           <test_script_entry>/opt/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEAdvertiseData_manufacturerData_attribute.html</test_script_entry>
         </description>
       </testcase>
-      <testcase purpose="Check if BluetoothLEAdvertiseData have serviceData attribute with proper type and is writeable" component="TizenAPI/Communication/Bluetooth" execution_type="auto" id="BluetoothLEAdvertiseData_serviceData_attribute">
+      <testcase purpose="Check if BluetoothLEAdvertiseData have servicesData attribute with proper type and is writeable" component="TizenAPI/Communication/Bluetooth" execution_type="auto" id="BluetoothLEAdvertiseData_servicesData_attribute">
         <description>
           <pre_condition>The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.</pre_condition>
-          <test_script_entry>/opt/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEAdvertiseData_serviceData_attribute.html</test_script_entry>
+          <test_script_entry>/opt/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEAdvertiseData_servicesData_attribute.html</test_script_entry>
         </description>
       </testcase>
       <testcase purpose="Check if interface BluetoothLEConnectChangeCallback exists,it should not" component="TizenAPI/Communication/Bluetooth" execution_type="auto" id="BluetoothLEConnectChangeCallback_notexist">