[common][capability][fix tc issue] 39/132339/1
authormengli.zhang <mengli.zhang@samsung.com>
Fri, 2 Jun 2017 21:50:32 +0000 (17:50 -0400)
committermengli.zhang <mengli.zhang@samsung.com>
Fri, 2 Jun 2017 21:50:43 +0000 (17:50 -0400)
Change-Id: I0a6671d7d818df0018fb80101ab7a65731c5102e
Signed-off-by: mengli.zhang <mengli.zhang@samsung.com>
wearable/tct-capability-tests/capability/unsupported_sensor_accelerometer.html
wearable/tct-capability-tests/capability/unsupported_sensor_barometer.html
wearable/tct-capability-tests/capability/unsupported_sensor_heartratemonitor.html
wearable/tct-capability-tests/capability/unsupported_sensor_magnetometer.html
wearable/tct-capability-tests/capability/unsupported_sensor_pedometer.html
wearable/tct-capability-tests/capability/unsupported_sensor_photometer.html
wearable/tct-capability-tests/capability/unsupported_sensor_proximity.html
wearable/tct-capability-tests/capability/unsupported_sensor_ultraviolet.html
wearable/tct-capability-tests/capability/unsupported_sensor_wristup.html

index 729831f2a5379c80503f91a5b445d79ab2925f9a..753cafd7dd14d9975d29e76332ba8c1b6909bccb 100755 (executable)
@@ -32,10 +32,21 @@ Authors:
     <div id="log"></div>
     <script>
     //==== PRIORITY P1
-
         test(function () {
-            check_unsupported("http://tizen.org/feature/sensor.accelerometer", tizen.sensorservice);
-        }, document.title);
+            if (tizen.systeminfo.getCapability("http://tizen.org/feature/profile") != "TV"){
+                if(tizen.sensorservice === undefined){
+                    assert_false(false, "unsupported sensor");
+                } else{
+                    if (is_caps_supported_by_system_info("http://tizen.org/feature/sensor.accelerometer") === false) {
+                        assert_throws({
+                            name: "NotSupportedError"
+                        }, function () {
+                            tizen.sensorservice.getDefaultSensor("PRESSURE");
+                        });
+                    }
+                }
+            }
+        });
     </script>
   </body>
-</html>
\ No newline at end of file
+</html>
index 1d3db4280fa3b2c63238b4e534de48a3e712a90d..7415d19663fc9840e6b83048c3097c8cccc6a419 100755 (executable)
@@ -49,4 +49,4 @@ Authors:
         });
     </script>
   </body>
-</html>
\ No newline at end of file
+</html>
index b064f9d35683f06c686adf6c128440e19e60a9e0..a778c8b97a706b6c52c345ef8790e81585d9d52e 100755 (executable)
@@ -33,9 +33,20 @@ Authors:
     <script>
     //==== PRIORITY P1
         test(function () {
-            check_unsupported("http://tizen.org/feature/sensor.heart_rate_monitor", tizen.sensorservice);
-        }, document.title);
-
+            if (tizen.systeminfo.getCapability("http://tizen.org/feature/profile") != "TV"){
+                if(tizen.sensorservice === undefined){
+                    assert_false(false, "unsupported sensor");
+                } else{
+                    if (is_caps_supported_by_system_info("http://tizen.org/feature/sensor.heart_rate_monitor") === false) {
+                        assert_throws({
+                            name: "NotSupportedError"
+                        }, function () {
+                            tizen.sensorservice.getDefaultSensor("PRESSURE");
+                        });
+                    }
+                }
+            }
+        });
     </script>
   </body>
-</html>
\ No newline at end of file
+</html>
index f2063b82d8b57d055540128bc24e45dca91fedca..fc93b54ead5ccb8760e34caf3f24419714dcc9fd 100755 (executable)
@@ -32,11 +32,21 @@ Authors:
     <div id="log"></div>
     <script>
     //==== PRIORITY P1
-
         test(function () {
-            check_unsupported("http://tizen.org/feature/sensor.magnetometer", tizen.sensorservice);
-        }, document.title);
-
+            if (tizen.systeminfo.getCapability("http://tizen.org/feature/profile") != "TV"){
+                if(tizen.sensorservice === undefined){
+                    assert_false(false, "unsupported sensor");
+                } else{
+                    if (is_caps_supported_by_system_info("http://tizen.org/feature/sensor.magnetometer") === false) {
+                        assert_throws({
+                            name: "NotSupportedError"
+                        }, function () {
+                            tizen.sensorservice.getDefaultSensor("PRESSURE");
+                        });
+                    }
+                }
+            }
+        });
     </script>
   </body>
-</html>
\ No newline at end of file
+</html>
index ddccf1990df5d326c274cd88959804fb516ad90c..1fdcd27de8702de65a7a563cff0ce70a37ed14f3 100755 (executable)
@@ -32,17 +32,21 @@ Authors:
     <div id="log"></div>
     <script>
     //==== PRIORITY P1
-
         test(function () {
-            if (is_caps_supported_by_system_info("http://tizen.org/feature/sensor.pedometer") === false) {
-                assert_throws({
-                    name: "NotSupportedError"
-                }, function () {
-                    tizen.humanactivitymonitor.start("PEDOMETER");
-                });
+            if (tizen.systeminfo.getCapability("http://tizen.org/feature/profile") != "TV"){
+                if(tizen.sensorservice === undefined){
+                    assert_false(false, "unsupported sensor");
+                } else{
+                    if (is_caps_supported_by_system_info("http://tizen.org/feature/sensor.pedometer") === false) {
+                        assert_throws({
+                            name: "NotSupportedError"
+                        }, function () {
+                            tizen.humanactivitymonitor.start("PEDOMETER");
+                        });
+                    }
+                }
             }
         });
-
     </script>
   </body>
-</html>
\ No newline at end of file
+</html>
index 9c2e53ac2e799eaf8f0a71d2cc6ef9d2c5d6d201..2249772065180ba06cfae712bbea331714845fd5 100755 (executable)
@@ -32,11 +32,21 @@ Authors:
     <div id="log"></div>
     <script>
     //==== PRIORITY P1
-
         test(function () {
-            check_unsupported("http://tizen.org/feature/sensor.photometer", tizen.sensorservice);
-        }, document.title);
-
+            if (tizen.systeminfo.getCapability("http://tizen.org/feature/profile") != "TV"){
+                if(tizen.sensorservice === undefined){
+                    assert_false(false, "unsupported sensor");
+                } else{
+                    if (is_caps_supported_by_system_info("http://tizen.org/feature/sensor.photometer") === false) {
+                        assert_throws({
+                            name: "NotSupportedError"
+                        }, function () {
+                            tizen.sensorservice.getDefaultSensor("LIGHT");
+                        });
+                    }
+                }
+            }
+        });
     </script>
   </body>
-</html>
\ No newline at end of file
+</html>
index 21b7069581cb485b71af02f7e235496313e27839..28ec686c3d005d8a59c539918ce98d2c224aa3a9 100755 (executable)
@@ -32,11 +32,21 @@ Authors:
     <div id="log"></div>
     <script>
     //==== PRIORITY P1
-
         test(function () {
-            check_unsupported("http://tizen.org/feature/sensor.proximity", tizen.sensorservice);
-        }, document.title);
-
+            if (tizen.systeminfo.getCapability("http://tizen.org/feature/profile") != "TV"){
+                if(tizen.sensorservice === undefined){
+                    assert_false(false, "unsupported sensor");
+                } else{
+                    if (is_caps_supported_by_system_info("http://tizen.org/feature/sensor.proximity") === false) {
+                        assert_throws({
+                            name: "NotSupportedError"
+                        }, function () {
+                            tizen.sensorservice.getDefaultSensor("PROXIMITY");
+                        });
+                    }
+                }
+            }
+        });
     </script>
   </body>
-</html>
\ No newline at end of file
+</html>
index 223586ef7fcfd6d30275cabd8fdd43849ac3538b..653a359c81d6de4f42f2a6398000eb0d8abc11ad 100755 (executable)
@@ -32,11 +32,21 @@ Authors:
     <div id="log"></div>
     <script>
     //==== PRIORITY P1
-
         test(function () {
-            check_unsupported("http://tizen.org/feature/sensor.ultraviolet", tizen.sensorservice);
-        }, document.title);
-
+            if (tizen.systeminfo.getCapability("http://tizen.org/feature/profile") != "TV"){
+                if(tizen.sensorservice === undefined){
+                    assert_false(false, "unsupported sensor");
+                } else{
+                    if (is_caps_supported_by_system_info("http://tizen.org/feature/sensor.ultraviolet") === false) {
+                        assert_throws({
+                            name: "NotSupportedError"
+                        }, function () {
+                            tizen.sensorservice.getDefaultSensor("PRESSURE");
+                        });
+                    }
+                }
+            }
+        });
     </script>
   </body>
-</html>
\ No newline at end of file
+</html>
index 7eecd597935e613ce3ecbe789f072cdc065cc7c4..b21b9c5c6fdc8968397ccc6831569a1b9df839cc 100755 (executable)
@@ -32,17 +32,21 @@ Authors:
     <div id="log"></div>
     <script>
     //==== PRIORITY P1
-
         test(function () {
-            if (is_caps_supported_by_system_info("http://tizen.org/feature/sensor.wrist_up") === false) {
-                assert_throws({
-                    name: "NotSupportedError"
-                }, function () {
-                    tizen.humanactivitymonitor.start("WRIST_UP");
-                });
+            if (tizen.systeminfo.getCapability("http://tizen.org/feature/profile") != "TV"){
+                if(tizen.sensorservice === undefined){
+                    assert_false(false, "unsupported sensor");
+                } else{
+                    if (is_caps_supported_by_system_info("http://tizen.org/feature/sensor.wrist_up") === false) {
+                        assert_throws({
+                            name: "NotSupportedError"
+                        }, function () {
+                            tizen.humanactivitymonitor.start("WRIST_UP");
+                        });
+                    }
+                }
             }
         });
-
     </script>
   </body>
-</html>
\ No newline at end of file
+</html>