[tv][capability][fix 1 tc issue] 59/135759/1
authoryuanzhongyuan <zy123.yuan@samsung.com>
Mon, 26 Jun 2017 08:31:50 +0000 (16:31 +0800)
committeryuanzhongyuan <zy123.yuan@samsung.com>
Mon, 26 Jun 2017 08:31:50 +0000 (16:31 +0800)
Change-Id: I0666575f253c79aad95dd3b9c3cc8e7eafafa013

tv/tct-capability-tests/capability/caps_displayresolution.html

index 227d4b357aeddec32f68b7772dd37604d0130b43..98ca4368009ae8a670f1a4810206738ddfc77526 100755 (executable)
@@ -49,42 +49,45 @@ Authors:
         //The Tizen reference implementation has only been validated with these two display resolutions
         var t = async_test(document.title);
         setup({timeout: 90000});
-        if (is_caps_supported_by_system_info("http://tizen.org/feature/screen.size.normal.480.800") ||
-            is_caps_supported_by_system_info("http://tizen.org/feature/screen.size.normal.720.1280") ||
-            is_caps_supported_by_system_info("http://tizen.org/feature/screen.size.normal.320.320") ||
-            is_caps_supported_by_system_info("http://tizen.org/feature/screen.size.normal.360.360") ||
-            is_caps_supported_by_system_info("http://tizen.org/feature/screen.size.normal.240.400") ||
-            is_caps_supported_by_system_info("http://tizen.org/feature/screen.size.normal.320.480") ||
-            is_caps_supported_by_system_info("http://tizen.org/feature/screen.size.normal.360.480") ||
-            is_caps_supported_by_system_info("http://tizen.org/feature/screen.size.normal.540.960") ||
-            is_caps_supported_by_system_info("http://tizen.org/feature/screen.size.normal.600.1024") ||
-            is_caps_supported_by_system_info("http://tizen.org/feature/screen.size.normal.1080.1920")) {
-            t.done();
-        } else {
-            try {
-                tizen.systeminfo.getPropertyValue("DISPLAY", getPropertyValueSuccess, getPropertyValueError);
-            } catch (err) {
+        t.step(function() {
+            if (is_caps_supported_by_system_info("http://tizen.org/feature/screen.size.normal.480.800") ||
+                is_caps_supported_by_system_info("http://tizen.org/feature/screen.size.normal.720.1280") ||
+                is_caps_supported_by_system_info("http://tizen.org/feature/screen.size.normal.320.320") ||
+                is_caps_supported_by_system_info("http://tizen.org/feature/screen.size.normal.360.360") ||
+                is_caps_supported_by_system_info("http://tizen.org/feature/screen.size.normal.240.400") ||
+                is_caps_supported_by_system_info("http://tizen.org/feature/screen.size.normal.320.480") ||
+                is_caps_supported_by_system_info("http://tizen.org/feature/screen.size.normal.360.480") ||
+                is_caps_supported_by_system_info("http://tizen.org/feature/screen.size.normal.540.960") ||
+                is_caps_supported_by_system_info("http://tizen.org/feature/screen.size.normal.600.1024") ||
+                is_caps_supported_by_system_info("http://tizen.org/feature/screen.size.normal.1080.1920") ||
+                is_caps_supported_by_system_info("http://tizen.org/feature/screen.size.normal.1920.1080")) {
+                t.done();
+            } else {
+                try {
+                    tizen.systeminfo.getPropertyValue("DISPLAY", getPropertyValueSuccess, getPropertyValueError);
+                } catch (err) {
+                    t.step(function () {
+                        assert_unreached("Error message: " + err.message);
+                    });
+                    t.done();
+                }
+            }
+
+            function getPropertyValueSuccess(property){
                 t.step(function () {
-                    assert_unreached("Error message: " + err.message);
+                    assert_greater_than_equal(property.resolutionWidth, 320, "Display width is less than minimum screen width.");
+                    assert_greater_than_equal(property.resolutionHeight, 360, "Display height is less than minimum screen height.");
                 });
                 t.done();
             }
-        }
-
-        function getPropertyValueSuccess(property){
-            t.step(function () {
-                assert_greater_than_equal(property.resolutionWidth, 320, "Display width is less than minimum screen width.");
-                assert_greater_than_equal(property.resolutionHeight, 360, "Display height is less than minimum screen height.");
-            });
-            t.done();
-        }
 
-        function getPropertyValueError(error){
-            t.step(function () {
-                assert_unreached("Error message: " + error.message);
-            });
-            t.done();
-        }
+            function getPropertyValueError(error){
+                t.step(function () {
+                    assert_unreached("Error message: " + error.message);
+                });
+                t.done();
+            }
+        });
     </script>
   </body>
 </html>