[mobile&tv][capability][TSIX-6594, fix wristup issue because of SPEC updated]
authorwei625.zhang <wei625.zhang@samsung.com>
Mon, 12 Oct 2020 06:22:19 +0000 (14:22 +0800)
committerwei625.zhang <wei625.zhang@samsung.com>
Mon, 12 Oct 2020 06:22:19 +0000 (14:22 +0800)
Change-Id: I85f24b645df4be21cae50ec13166400fe12e3c93
Signed-off-by: wei625.zhang <wei625.zhang@samsung.com>
mobile/tct-capability-tests/capability/unsupported_sensor_wristup.html
tv/tct-capability-tests/capability/unsupported_sensor_wristup.html

index 7eecd597935e613ce3ecbe789f072cdc065cc7c4..d0eaded9644a5687a145eece5c32f62561f54fa0 100755 (executable)
@@ -32,17 +32,26 @@ Authors:
     <div id="log"></div>
     <script>
     //==== PRIORITY P1
+var t = async_test(document.title), GestureRecognitionCallback;
 
-        test(function () {
+t.step(function () {
+    GestureRecognitionCallback = t.step_func(function () {
+    });
+    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");
+                    tizen.humanactivitymonitor.addGestureRecognitionListener("GESTURE_WRIST_UP", GestureRecognitionCallback);
                 });
             }
-        });
-
+        }
+    }
+    t.done();
+});
     </script>
   </body>
 </html>
\ No newline at end of file
index 7eecd597935e613ce3ecbe789f072cdc065cc7c4..d0eaded9644a5687a145eece5c32f62561f54fa0 100755 (executable)
@@ -32,17 +32,26 @@ Authors:
     <div id="log"></div>
     <script>
     //==== PRIORITY P1
+var t = async_test(document.title), GestureRecognitionCallback;
 
-        test(function () {
+t.step(function () {
+    GestureRecognitionCallback = t.step_func(function () {
+    });
+    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");
+                    tizen.humanactivitymonitor.addGestureRecognitionListener("GESTURE_WRIST_UP", GestureRecognitionCallback);
                 });
             }
-        });
-
+        }
+    }
+    t.done();
+});
     </script>
   </body>
 </html>
\ No newline at end of file