[common][geoallow][update 1 tc to set 90s timeout] 40/144640/1
authorwei.ji <wei.ji@samsung.com>
Thu, 17 Aug 2017 09:26:41 +0000 (17:26 +0800)
committerwei.ji <wei.ji@samsung.com>
Thu, 17 Aug 2017 09:26:50 +0000 (17:26 +0800)
- TNEXT-1508 tct-geoallow-w3c-tests failed on testhub system

Change-Id: I7e7af4efbe71c3fc2b35e493dec86af2f4027c91
Signed-off-by: wei.ji <wei.ji@samsung.com>
common/tct-geoallow-w3c-tests/geoallow/Coordinates_accuracy.html

index c96616eb2e4e046bf710dfb3f80ff0e3e4629e34..dbe02f3a42e5c09f7f895ddfc585ff99b01da2d7 100755 (executable)
@@ -28,6 +28,7 @@ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 Authors:
         Jin,Weihu <weihux.jin@intel.com>
         Liu,Xin <xinx.liu@intel.com>
+        Wei Ji <wei.ji@samsung.com>
 
 -->
 
@@ -45,30 +46,25 @@ Authors:
     <script>
     //==== PRIORITY P2
 
-      var t =async_test(document.title);
-      setup({timeout: 60000});
-      try {
-        window.navigator.geolocation.getCurrentPosition(expectedsuccessCallback, unexpectederrorCallback);
-      } catch (error) {
-        t.step(function () {
-          assert_unreached("Error message: { " + error.message + " }");
-        });
-        t.done();
-      }
-      function expectedsuccessCallback (position) {
-        var coords = position.coords;
-        var accuracy = coords.accuracy;
-        t.step(function () {
-          assert_true(coords != null && accuracy != null, "the attribute accuracy of interface Coordinates is comparison");
-        });
-        t.done();
-      }
-      function unexpectederrorCallback (error) {
-        t.step(function () {
-          assert_unreached("Error message: { " + error.message + " }");
-        });
+setup({timeout: 90000});
+
+var t = async_test(document.title, {timeout: 90000}), coords, accuracy, expectedsuccessCallback, unexpectederrorCallback;
+
+t.step(function () {
+    expectedsuccessCallback = t.step_func(function (position) {
+        coords = position.coords;
+        accuracy = coords.accuracy;
+        assert_true(coords != null && accuracy != null, "the attribute accuracy of interface Coordinates is comparison");
         t.done();
-      }
+    });
+
+    unexpectederrorCallback = t.step_func(function (error) {
+        assert_unreached("getCurrentPosition() error callback invoked: " + error.message);
+    });
+
+    window.navigator.geolocation.getCurrentPosition(expectedsuccessCallback, unexpectederrorCallback);
+});
+
     </script>
   </body>
 </html>