[common][humanactivity][DPTTIZEN-2993, fix tc issue] 85/167485/3
authorzy123.yuan <zy123.yuan@samsung.com>
Thu, 18 Jan 2018 02:52:29 +0000 (10:52 +0800)
committerzy123.yuan <zy123.yuan@samsung.com>
Thu, 18 Jan 2018 02:59:41 +0000 (10:59 +0800)
Change-Id: I61d9c3bd7a0a8df780280b8aea24a4c7f6d4682e

common/tct-humanactivitymonitor-tizen-tests/humanactivitymonitor/GestureData_x_attribute.html
common/tct-humanactivitymonitor-tizen-tests/humanactivitymonitor/GestureData_y_attribute.html
common/tct-humanactivitymonitor-tizen-tests/humanactivitymonitor/GestureRecognitionCallback_onsuccess.html
common/tct-humanactivitymonitor-tizen-tests/humanactivitymonitor/HumanActivityMonitorManager_addGestureRecognitionListener_errorCallback_TypeMismatch.html
common/tct-humanactivitymonitor-tizen-tests/humanactivitymonitor/HumanActivityMonitorManager_removeGestureRecognitionListener.html
common/tct-humanactivitymonitor-tizen-tests/tests.xml

index 8c89e9fe78422b2ff455a6a9c5a9414e1cc5fc10..63d3b251e1a98b1826769ec7c119028859bd4ac9 100755 (executable)
@@ -33,25 +33,30 @@ Authors:
 //==== SPEC_URL TBD
 //==== PRIORITY P1
 //==== EXECUTION_TYPE manual
-//==== STEP Click Run button, and then tilt device
+//==== STEP Click Run button, and then pick up device
 //==== EXPECT Pass should be shown in the page
 //==== TEST_CRITERIA AE AT ARO
 
 setup({timeout: 90000});
 
-var t = async_test(document.title, {timeout: 90000}), watchID = null, listener, gestureType = "GESTURE_TILT";
+var t = async_test(document.title, {timeout: 90000}), watchID = null, listener, gestureType = "GESTURE_PICK_UP", isSupported;
 
 t.step(function () {
     add_result_callback(function () {
         tizen.humanactivitymonitor.removeGestureRecognitionListener(watchID);
     });
 
-    listener = t.step_func(function (gestureData) {
-        check_readonly(gestureData, "x", gestureData.x, "number", gestureData.x + 1);
-        t.done();
-    });
+    isSupported = tizen.humanactivitymonitor.isGestureSupported(gestureType);
+    if(isSupported){
+        listener = t.step_func(function (gestureData) {
+            check_readonly(gestureData, "x", gestureData.x, "number", gestureData.x + 1);
+            t.done();
+        });
 
-    watchID = tizen.humanactivitymonitor.addGestureRecognitionListener(gestureType, listener);
+        watchID = tizen.humanactivitymonitor.addGestureRecognitionListener(gestureType, listener);
+    }else{
+        t.done();
+    }
 });
 </script>
 </body>
index c40828cb3fb577068a229eb903bf036bb377e66f..5f61f7849ec35dbd10a2bc651c25555aa5b61d87 100755 (executable)
@@ -33,25 +33,30 @@ Authors:
 //==== SPEC_URL TBD
 //==== PRIORITY P1
 //==== EXECUTION_TYPE manual
-//==== STEP Click Run button, and then tilt device
+//==== STEP Click Run button, and then pick up device
 //==== EXPECT Pass should be shown in the page
 //==== TEST_CRITERIA AE AT ARO
 
 setup({timeout: 90000});
 
-var t = async_test(document.title, {timeout: 90000}), watchID = null, listener, gestureType = "GESTURE_TILT";
+var t = async_test(document.title, {timeout: 90000}), watchID = null, listener, gestureType = "GESTURE_PICK_UP";
 
 t.step(function () {
     add_result_callback(function () {
         tizen.humanactivitymonitor.removeGestureRecognitionListener(watchID);
     });
 
-    listener = t.step_func(function (gestureData) {
-        check_readonly(gestureData, "y", gestureData.y, "number", gestureData.y + 1);
-        t.done();
-    });
+    isSupported = tizen.humanactivitymonitor.isGestureSupported(gestureType);
+    if(isSupported){
+        listener = t.step_func(function (gestureData) {
+            check_readonly(gestureData, "y", gestureData.y, "number", gestureData.y + 1);
+            t.done();
+        });
 
-    watchID = tizen.humanactivitymonitor.addGestureRecognitionListener(gestureType, listener);
+        watchID = tizen.humanactivitymonitor.addGestureRecognitionListener(gestureType, listener);
+    }else{
+        t.done();
+    }
 });
 </script>
 </body>
index 27eef73d676dda1ee1ee549540cdacaa7ae1ac29..a46004a1d9c2d8cc4575e0e8329162715a205e55 100644 (file)
@@ -51,7 +51,7 @@ t.step(function () {
         assert_not_equals(gestureData , null, "Argument should not be null.");
         check_readonly(gestureData, "type", gestureData.type, "string", gestureData.type + "1");
         check_readonly(gestureData, "event", gestureData.event, "string", gestureData.event + "1");
-        check_readonly(gestureData, "timestamp", gestureData.timestamp, "string", gestureData.timestamp + 1);
+        check_readonly(gestureData, "timestamp", gestureData.timestamp, "number", gestureData.timestamp + 1);
         t.done();
     });
 
index 085c8d1a5e3253b4a9375b70144907ff12ca4328..2a65153549734ea533aa01efaac4ee5ddf3f8d24 100755 (executable)
@@ -41,7 +41,7 @@ var t = async_test(document.title, {timeout: 30000}), gestureType = "GESTURE_PIC
     conversionTable, errorCallback, exceptionName, i;
 
 t.step(function () {
-    conversionTable = getTypeConversionExceptions("functionObject", false);
+    conversionTable = getTypeConversionExceptions("functionObject", true);
     for (i = 0; i < conversionTable.length; i++) {
         errorCallback = conversionTable[i][0];
         exceptionName = conversionTable[i][1];
index e083f497379ca8ec13c60ad6c91fd65da37fde4a..7681feee4ec7d5cf46fddc1b85f9914913a8f2f6 100755 (executable)
@@ -40,8 +40,8 @@ var t = async_test(document.title, {timeout: 90000}), returnedValue = null, watc
 
 t.step(function () {
     listener = t.step_func(function (data) {
-               returnedValue = tizen.humanactivitymonitor.removeGestureRecognitionListener(watchID);
-        assert_type(returnedValue, undefined, "Return value is not undefined");
+        returnedValue = tizen.humanactivitymonitor.removeGestureRecognitionListener(watchID);
+        assert_type(returnedValue, "undefined", "Return value is not undefined");
         t.done();
     });
 
index 2cbd061b62ef7d7958aeb24a40e60283506ba5ad..2d433712b3cb65946144bd05bc46d9bf5239e04e 100755 (executable)
         <description>
           <steps>
             <step order="1">
-              <step_desc>Click Run button, and then tilt device</step_desc>
+              <step_desc>Click Run button, and then pick up device</step_desc>
               <expected>Pass should be shown in the page</expected>
             </step>
           </steps>
         <description>
           <steps>
             <step order="1">
-              <step_desc>Click Run button, and then tilt device</step_desc>
+              <step_desc>Click Run button, and then pick up device</step_desc>
               <expected>Pass should be shown in the page</expected>
             </step>
           </steps>
         <description>
           <steps>
             <step order="1">
-              <step_desc>Click Run button, and then tilt device</step_desc>
+              <step_desc>Click Run button, and then pick up device</step_desc>
               <expected>Pass should be shown in the page</expected>
             </step>
           </steps>
         <description>
           <steps>
             <step order="1">
-              <step_desc>Click Run button, and then tilt device</step_desc>
+              <step_desc>Click Run button, and then pick up device</step_desc>
               <expected>Pass should be shown in the page</expected>
             </step>
           </steps>