Fix TTS-2130 by updating TC to support mininum resolution in capability
authorLiu, Xin <xinx.liu@intel.com>
Tue, 5 Nov 2013 09:59:47 +0000 (17:59 +0800)
committerwanmingx.lin <wanmingx.lin@intel.com>
Wed, 6 Nov 2013 05:41:05 +0000 (13:41 +0800)
Signed-off-by: Liu, Xin <xinx.liu@intel.com>
tct-capability-tests/capability/caps_displayresolution.html
tct-capability-tests/tests.full.xml
tct-capability-tests/tests.xml

index 3106c275b9ad300844dce8353305259ef9a3ddee..586e7064189321046d85fea2b8f6a2046b4dae8a 100644 (file)
@@ -36,7 +36,7 @@ Authors:
     <link rel="author" title="Intel" href="http://www.intel.com"/>
     <link rel="help" href="https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/systeminfo.html"/>
     <meta name="flags" content=""/>
-    <meta name="assert" content="Check if the device supports a display resolution of 480x800 (WVGA) or 720x1280 (HD)"/>
+    <meta name="assert" content="Check if the device supports a display resolution of 480x800 (WVGA) or 720x1280 (HD), or a minimum resolution of 320x480 (HVGA)"/>
     <meta charset="utf-8"/>
     <script src="support/caps.js"></script>
   </head>
@@ -45,9 +45,35 @@ Authors:
     <script>
         //It is strongly recommended to use a display resolution of 480x800 (WVGA) or 720x1280 (HD) for a mobile device implementations.
         //The Tizen reference implementation has only been validated with these two display resolutions
-        test(function () {
-            assert_true(is_caps_supported_by_system_info("screenSize480_800") || is_caps_supported_by_system_info("screenSize720_1280"), "The Tizen reference implementation has only been validated with these two display resolutions(480x800 (WVGA) or 720x1280 (HD))");
-        }, document.title);
+        var t = async_test(document.title);
+        setup({timeout: 90000});
+        if (is_caps_supported_by_system_info("screenSize480_800") || is_caps_supported_by_system_info("screenSize720_1280")) {
+            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_greater_than_equal(property.resolutionWidth, 320, "Display width is less than minimum screen width.");
+                assert_greater_than_equal(property.resolutionHeight, 480, "Display height is less than minimum screen height.");
+            });
+            t.done();
+        }
+
+        function getPropertyValueError(error){
+            t.step(function () {
+                assert_unreached("Error message: " + error.message);
+            });
+            t.done();
+        }
     </script>
   </body>
-</html>
\ No newline at end of file
+</html>
index 2a671f0b392a64b731792f02b712ad2e8d3f06ed..4e3b8c64dfa42d2d9fa33f15743feec58664c3dc 100755 (executable)
           </spec>
         </specs>
       </testcase>
-      <testcase purpose="Check if the device supports a display resolution of 480x800 (WVGA) or 720x1280 (HD)." type="compliance" status="approved" component="TizenAPI/System/SystemInfo" execution_type="auto" priority="P1" id="caps_displayresolution">
+      <testcase purpose="Check if the device supports a display resolution of 480x800 (WVGA) or 720x1280 (HD), or a minimum resolution of 320x480 (HVGA)." type="compliance" status="approved" component="TizenAPI/System/SystemInfo" execution_type="auto" priority="P1" id="caps_displayresolution">
         <description>
           <pre_condition/>
           <post_condition/>
           <steps>
             <step order="1">
-              <step_desc>Check if the device supports a display resolution of 480x800 (WVGA) or 720x1280 (HD).</step_desc>
-              <expected>the device should support a display resolution of 480x800 (WVGA) or 720x1280 (HD).</expected>
+              <step_desc>Check if the device supports a display resolution of 480x800 (WVGA) or 720x1280 (HD), or a minimum resolution of 320x480 (HVGA).</step_desc>
+              <expected>Check if the device supports a display resolution of 480x800 (WVGA) or 720x1280 (HD), or a minimum resolution of 320x480 (HVGA).</expected>
             </step>
           </steps>
           <test_script_entry>/opt/tct-capability-tests/capability/caps_displayresolution.html</test_script_entry>
index ac08039230f8c1e2ea417a32235ad0e489bf5fe4..9f3028f6664ba2699f54745d347274aad9d42f49 100755 (executable)
@@ -33,7 +33,7 @@
           <test_script_entry>/opt/tct-capability-tests/capability/caps_networking.html</test_script_entry>
         </description>
         </testcase>
-      <testcase component="TizenAPI/System/SystemInfo" execution_type="auto" id="caps_displayresolution" purpose="Check if the device supports a display resolution of 480x800 (WVGA) or 720x1280 (HD).">
+      <testcase component="TizenAPI/System/SystemInfo" execution_type="auto" id="caps_displayresolution" purpose="Check if the device supports a display resolution of 480x800 (WVGA) or 720x1280 (HD), or a minimum resolution of 320x480 (HVGA).">
         <description>
           <test_script_entry>/opt/tct-capability-tests/capability/caps_displayresolution.html</test_script_entry>
         </description>
@@ -90,4 +90,4 @@
         </testcase>
     </set>
   </suite>
-</test_definition>
\ No newline at end of file
+</test_definition>