Fixed TTS-1943 by adding user agent string test to behavior
authorLi, Hao <haox.li@intel.com>
Thu, 29 Aug 2013 04:27:29 +0000 (12:27 +0800)
committerwanmingx.lin <wanmingx.lin@intel.com>
Thu, 29 Aug 2013 05:46:49 +0000 (13:46 +0800)
Signed-off-by: Li, Hao <haox.li@intel.com>
tests.full.xml
tests.xml
tests/UserAgentString/index.html [new file with mode: 0755]

index f8f231bf7bef971c6b2475b993fe70ec8ab0276a..d43cbfb5ae28b553ae3b0f11da69694cc3e87c35 100644 (file)
         <test_script_entry test_script_expected_result="0"></test_script_entry>
       </description>
       </testcase>
+      <testcase purpose="User Agent String Test" type="functional_positive" status="approved" component="behavior" execution_type="manual" priority="P0" id="UserAgentString">
+      <description>
+        <pre_condition />
+        <post_condition />
+        <steps>
+          <step order="1">
+            <step_desc>0</step_desc>
+            <expected>0</expected>
+          </step>
+        </steps>
+        <test_script_entry test_script_expected_result="0"></test_script_entry>
+      </description>
+      </testcase>
   </set>
 </suite>
 </test_definition>
index b5e4829e0b14c4a6dfc65d771890a1d5c43812cc..2ff82a2093e4158180e0a7444358c60296f199e4 100644 (file)
--- a/tests.xml
+++ b/tests.xml
         <test_script_entry test_script_expected_result="0" />
       </description>
       </testcase>
+      <testcase execution_type="manual" id="UserAgentString" purpose="User Agent String Test">
+      <description>
+        <pre_condition />
+        <steps>
+          <step order="1">
+            <step_desc>0</step_desc>
+            <expected>0</expected>
+          </step>
+        </steps>
+        <test_script_entry test_script_expected_result="0" />
+      </description>
+      </testcase>
   </set>
 </suite>
-</test_definition>
\ No newline at end of file
+</test_definition>
diff --git a/tests/UserAgentString/index.html b/tests/UserAgentString/index.html
new file mode 100755 (executable)
index 0000000..dd31958
--- /dev/null
@@ -0,0 +1,93 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2013 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+  of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+  this list of conditions and the following disclaimer in the documentation
+  and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+  may be used to endorse or promote products derived from this work without
+  specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+        Li, Hao <haox.li@intel.com>
+
+-->
+<html>
+    <head>
+        <meta charset="utf-8" />
+        <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, width=device-width" />
+        <link rel="stylesheet" type="text/css" href="../../css/jquery.mobile.css" />
+        <script src="../../js/thirdparty/jquery.js"></script>
+        <script src="../../js/thirdparty/jquery.mobile.js"></script>
+        <script src="../../js/tests.js"></script>
+        <script>
+            $(document).ready(function(){
+                jQuery("#user-agent-string").text(navigator.userAgent);
+            });
+        </script>
+        <style type="text/css">
+            .d{
+                border: 1px solid #000;
+                width:100%;
+                height:200px;
+                padding: 20px 5px;
+            }
+            .d li{
+                margin: 10px 5px;
+
+            }
+            #user-agent-string {
+               list-style : none;
+            }
+        </style>
+    </head>
+    <body>
+        <div data-role="header">
+          <h1 id="main_page_title"></h1>
+        </div>
+        <div>
+          <div class="d">
+            <ul>
+              <li>User-Agent:</li>
+              <li id="user-agent-string">Failed to get user agent string</li>
+            </ul>
+          </div>
+        </div>
+        <div data-role="footer" data-position="fixed">
+        </div>
+        <div data-role="popup" id="popup_info">
+          <font style="font-size:85%">
+            <p>Test Purpose: </p>
+            <p>Verifies the user agent string follow correct format.</p>
+            <p>Expected Result: </p>
+            <p>The user agent string reported by the Web View MUST follow this format:</p>
+            <p>Mozilla/5.0 (Linux; Tizen PLATFORM_VER; MODEL) AppleWebKit/APPLE_WEBKIT_VER (KHTML, like Gecko) APP_NAME/APP_VER Mobile Safari/APPLE_WEBKIT_VER</p>
+            <ul>
+                <li>The value of the PLATFORM_VER string MUST be the platform version of the device.</li>
+                <li>The value of the MODEL string SHOULD be the same as the name of the device.</li>
+                <li>The value of the APPLE_WEBKIT_VER string MUST be "537.3".</li>
+                <li>The value of the APP_NAME string SHOULD be the same as the name of the application.</li>
+                <li>The value of the APP_VER string SHOULD be the same as the version of the application.</li>
+                <li>Device implementations MAY omit the word “Mobile” from the user agent string.</li>
+            </ul>
+          </font>
+        </div>
+    </body>
+</html>