[common][cors][modify tests.xml&tests.full.xml to add tizeniot profile] 32/251732/1
authorqunfang.lin <qunfang.lin@samsung.com>
Tue, 19 Jan 2021 02:55:04 +0000 (10:55 +0800)
committerqunfang.lin <qunfang.lin@samsung.com>
Tue, 19 Jan 2021 02:55:04 +0000 (10:55 +0800)
Change-Id: I50d055ece1c3a9ac9750b632d12042925c0a1f7f
Signed-off-by: qunfang.lin <qunfang.lin@samsung.com>
common/tct-cors-w3c-tests/tests.full.xml
common/tct-cors-w3c-tests/tests.xml

index 9ca7a034b7d9d03303f15cab9296b5c647e73f9a..a59cc3ea0329d5d406d5730d2501166f86bfd5b6 100755 (executable)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<?xml-stylesheet type="text/xsl"  href="./testcase.xsl"?>
+<?xml-stylesheet type="text/xsl" href="./testcase.xsl"?>
 <test_definition>
   <suite name="tct-cors-w3c-tests" category="W3C/HTML5 APIs">
     <set name="CORS_MOBILE" type="js">
         </specs>
       </testcase>
     </set>
+    <set name="CORS_IOT" type="js">
+      <capabilities>
+        <capability name="http://tizen.org/feature/profile"><value>COMMON</value></capability>
+      </capabilities>
+      <testcase purpose="Check that the XMLHttpRequest supports CORS if the request method is get" type="compliance" status="approved" component="W3C_HTML5 APIs/Security/Cross-Origin Resource Sharing" execution_type="auto" priority="P1" id="cors_XMLHttpRequest_get">
+        <description>
+          <test_script_entry timeout="6">http://127.0.0.1:8080/opt/tct-cors-w3c-tests/cors/cors_XMLHttpRequest_get.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion usage="true" interface="XMLHttpRequest" specification="Cross-Origin Resource Sharing" section="Security" category="Tizen W3C API Specifications" element_type="true" element_name=""/>
+            <spec_url>http://www.w3.org/TR/2012/WD-cors-20120403</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check that the XMLHttpRequest supports CORS if the request method is posted" type="compliance" status="approved" component="W3C_HTML5 APIs/Security/Cross-Origin Resource Sharing" execution_type="auto" priority="P1" id="cors_XMLHttpRequest_post">
+        <description>
+          <test_script_entry timeout="6">http://127.0.0.1:8080/opt/tct-cors-w3c-tests/cors/cors_XMLHttpRequest_post.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion usage="true" interface="XMLHttpRequest" specification="Cross-Origin Resource Sharing" section="Security" category="Tizen W3C API Specifications" element_type="true" element_name=""/>
+            <spec_url>http://www.w3.org/TR/2012/WD-cors-20120403</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if example of using XMLHttpRequest from a client-side Web application can cross origin share the resource" type="compliance" status="approved" component="W3C_HTML5 APIs/Security/Cross-Origin Resource Sharing" execution_type="auto" priority="P1" id="cors_XMLHttpRequest_base">
+        <description>
+          <test_script_entry>http://127.0.0.1:8080/opt/tct-cors-w3c-tests/cors/cors_XMLHttpRequest_base.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion usage="true" interface="XMLHttpRequest" specification="Cross-Origin Resource Sharing" section="Security" category="Tizen W3C API Specifications" element_type="true" element_name=""/>
+            <spec_url>http://www.w3.org/TR/2012/WD-cors-20120403</spec_url>
+            <spec_statement>Using XMLHttpRequest a client-side Web application on http://hello-world.example can access this resource as follows</spec_statement>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if optionally add a single Access-Control-Max-Age header with as value the amount of seconds the user agent is allowed to cache the result of the request" type="compliance" status="approved" component="W3C_HTML5 APIs/Security/Cross-Origin Resource Sharing" execution_type="auto" priority="P3" id="cors_XMLHttpRequest_add_max_age">
+        <description>
+          <test_script_entry>http://127.0.0.1:8080/opt/tct-cors-w3c-tests/cors/cors_XMLHttpRequest_add_max_age.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion usage="true" interface="XMLHttpRequest" specification="Cross-Origin Resource Sharing" section="Security" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-cors-20120403</spec_url>
+            <spec_statement>Optionally add a single Access-Control-Max-Age header with as value the amount of seconds the user agent is allowed to cache the result of the request</spec_statement>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the response uses the value of the Origin header as value, and adds a single Access-Control-Allow-Credentials header with the literal string 'true' as value when the resource supports credentials add a single Access-Control-Allow-Origin header" type="compliance" status="approved" component="W3C_HTML5 APIs/Security/Cross-Origin Resource Sharing" execution_type="auto" priority="P3" id="cors_XMLHttpRequest_allow_credentials_true">
+        <description>
+          <test_script_entry>http://127.0.0.1:8080/opt/tct-cors-w3c-tests/cors/cors_XMLHttpRequest_allow_credentials_true.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion usage="true" interface="XMLHttpRequest" specification="Cross-Origin Resource Sharing" section="Security" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-cors-20120403</spec_url>
+            <spec_statement>If the resource supports credentials add a single Access-Control-Allow-Origin header, with the value of the Origin header as value, and add a single Access-Control-Allow-Credentials header with the literal string "true" as value</spec_statement>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the response adds a single Access-Control-Allow-Origin header and literal string '*' as value when the resource does not supports credentials add a single Access-Control-Allow-Origin header" type="compliance" status="approved" component="W3C_HTML5 APIs/Security/Cross-Origin Resource Sharing" execution_type="auto" priority="P3" id="cors_XMLHttpRequest_credentials_false_origin">
+        <description>
+          <test_script_entry>http://127.0.0.1:8080/opt/tct-cors-w3c-tests/cors/cors_XMLHttpRequest_credentials_false_origin.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion usage="true" interface="XMLHttpRequest" specification="Cross-Origin Resource Sharing" section="Security" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-cors-20120403</spec_url>
+            <spec_statement>Otherwise, add a single Access-Control-Allow-Origin header, with either the value of the Origin header or the literal string "*" as value</spec_statement>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the getResponseHeader() method of XMLHttpRequest will return valid value when the field name is an ASCII case-insensitive match for one of the values of the Access-Control-Expose-Headers headers" type="compliance" status="approved" component="W3C_HTML5 APIs/Security/Cross-Origin Resource Sharing" execution_type="auto" priority="P3" id="cors_XMLHttpRequest_getResponseHeader_not_null">
+        <description>
+          <test_script_entry>http://127.0.0.1:8080/opt/tct-cors-w3c-tests/cors/cors_XMLHttpRequest_getResponseHeader_not_null.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion usage="true" interface="XMLHttpRequest" specification="Cross-Origin Resource Sharing" section="Security" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-cors-20120403</spec_url>
+            <spec_statement>User agents must filter out all response headers other than those that are a simple response header or of which the field name is an ASCII case-insensitive match for one of the values of the Access-Control-Expose-Headers headers (if any), before exposing response headers to APIs defined in CORS API specifications</spec_statement>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the getResponseHeader() method of XMLHttpRequest will return null when the field name does not match for one of the values of the Access-Control-Expose-Headers headers" type="compliance" status="approved" component="W3C_HTML5 APIs/Security/Cross-Origin Resource Sharing" execution_type="auto" priority="P3" id="cors_XMLHttpRequest_getResponseHeader_null">
+        <description>
+          <test_script_entry>http://127.0.0.1:8080/opt/tct-cors-w3c-tests/cors/cors_XMLHttpRequest_getResponseHeader_null.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion usage="true" interface="XMLHttpRequest" specification="Cross-Origin Resource Sharing" section="Security" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-cors-20120403</spec_url>
+            <spec_statement>User agents must filter out all response headers other than those that are a simple response header or of which the field name is an ASCII case-insensitive match for one of the values of the Access-Control-Expose-Headers headers (if any), before exposing response headers to APIs defined in CORS API specifications</spec_statement>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the XMLHttpRequest supports CORS when the request method is get and async flag is true" type="compliance" status="approved" component="W3C_HTML5 APIs/Security/Cross-Origin Resource Sharing" execution_type="auto" priority="P3" id="cors_XMLHttpRequest_get_true">
+        <description>
+          <test_script_entry timeout="6">http://127.0.0.1:8080/opt/tct-cors-w3c-tests/cors/cors_XMLHttpRequest_get_true.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion usage="true" interface="XMLHttpRequest" specification="Cross-Origin Resource Sharing" section="Security" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-cors-20120403</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if the XMLHttpRequest supports CORS when the request method is post and async flag is true" type="compliance" status="approved" component="W3C_HTML5 APIs/Security/Cross-Origin Resource Sharing" execution_type="auto" priority="P3" id="cors_XMLHttpRequest_post_true">
+        <description>
+          <test_script_entry timeout="6">http://127.0.0.1:8080/opt/tct-cors-w3c-tests/cors/cors_XMLHttpRequest_post_true.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion usage="true" interface="XMLHttpRequest" specification="Cross-Origin Resource Sharing" section="Security" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/WD-cors-20120403</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+    </set>
   </suite>
 </test_definition>
index 8ae0f1baa47b9bd70857e78aad0c2c334f7cf5ce..e49c776329c316f53225ee0f277d8c29f43f2e0d 100755 (executable)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-    <?xml-stylesheet type="text/xsl" href="./testcase.xsl"?>
+<?xml-stylesheet type="text/xsl" href="./testcase.xsl"?>
 <test_definition>
   <suite name="tct-cors-w3c-tests" category="W3C/HTML5 APIs">
     <set name="CORS_MOBILE" type="js">
         </description>
         </testcase>
     </set>
+    <set name="CORS_IOT" type="js">
+      <capabilities>
+        <capability name="http://tizen.org/feature/profile"><value>COMMON</value></capability>
+      </capabilities>
+      <testcase component="W3C_HTML5 APIs/Security/Cross-Origin Resource Sharing" execution_type="auto" id="cors_XMLHttpRequest_get" purpose="Check that the XMLHttpRequest supports CORS if the request method is get">
+        <description>
+          <test_script_entry timeout="6">/opt/tct-cors-w3c-tests/cors/cors_XMLHttpRequest_get.html</test_script_entry>
+        </description>
+        </testcase>
+      <testcase component="W3C_HTML5 APIs/Security/Cross-Origin Resource Sharing" execution_type="auto" id="cors_XMLHttpRequest_post" purpose="Check that the XMLHttpRequest supports CORS if the request method is posted">
+        <description>
+          <test_script_entry timeout="6">/opt/tct-cors-w3c-tests/cors/cors_XMLHttpRequest_post.html</test_script_entry>
+        </description>
+        </testcase>
+      <testcase component="W3C_HTML5 APIs/Security/Cross-Origin Resource Sharing" execution_type="auto" id="cors_XMLHttpRequest_base" purpose="Check if example of using XMLHttpRequest from a client-side Web application can cross origin share the resource">
+        <description>
+          <test_script_entry>/opt/tct-cors-w3c-tests/cors/cors_XMLHttpRequest_base.html</test_script_entry>
+        </description>
+        </testcase>
+      <testcase component="W3C_HTML5 APIs/Security/Cross-Origin Resource Sharing" execution_type="auto" id="cors_XMLHttpRequest_add_max_age" purpose="Check if optionally add a single Access-Control-Max-Age header with as value the amount of seconds the user agent is allowed to cache the result of the request">
+        <description>
+          <test_script_entry>/opt/tct-cors-w3c-tests/cors/cors_XMLHttpRequest_add_max_age.html</test_script_entry>
+        </description>
+        </testcase>
+      <testcase component="W3C_HTML5 APIs/Security/Cross-Origin Resource Sharing" execution_type="auto" id="cors_XMLHttpRequest_allow_credentials_true" purpose="Check if the response uses the value of the Origin header as value, and adds a single Access-Control-Allow-Credentials header with the literal string 'true' as value when the resource supports credentials add a single Access-Control-Allow-Origin header">
+        <description>
+          <test_script_entry>/opt/tct-cors-w3c-tests/cors/cors_XMLHttpRequest_allow_credentials_true.html</test_script_entry>
+        </description>
+        </testcase>
+      <testcase component="W3C_HTML5 APIs/Security/Cross-Origin Resource Sharing" execution_type="auto" id="cors_XMLHttpRequest_credentials_false_origin" purpose="Check if the response adds a single Access-Control-Allow-Origin header and literal string '*' as value when the resource does not supports credentials add a single Access-Control-Allow-Origin header">
+        <description>
+          <test_script_entry>/opt/tct-cors-w3c-tests/cors/cors_XMLHttpRequest_credentials_false_origin.html</test_script_entry>
+        </description>
+        </testcase>
+      <testcase component="W3C_HTML5 APIs/Security/Cross-Origin Resource Sharing" execution_type="auto" id="cors_XMLHttpRequest_getResponseHeader_not_null" purpose="Check if the getResponseHeader() method of XMLHttpRequest will return valid value when the field name is an ASCII case-insensitive match for one of the values of the Access-Control-Expose-Headers headers">
+        <description>
+          <test_script_entry>/opt/tct-cors-w3c-tests/cors/cors_XMLHttpRequest_getResponseHeader_not_null.html</test_script_entry>
+        </description>
+        </testcase>
+      <testcase component="W3C_HTML5 APIs/Security/Cross-Origin Resource Sharing" execution_type="auto" id="cors_XMLHttpRequest_getResponseHeader_null" purpose="Check if the getResponseHeader() method of XMLHttpRequest will return null when the field name does not match for one of the values of the Access-Control-Expose-Headers headers">
+        <description>
+          <test_script_entry>/opt/tct-cors-w3c-tests/cors/cors_XMLHttpRequest_getResponseHeader_null.html</test_script_entry>
+        </description>
+        </testcase>
+      <testcase component="W3C_HTML5 APIs/Security/Cross-Origin Resource Sharing" execution_type="auto" id="cors_XMLHttpRequest_get_true" purpose="Check if the XMLHttpRequest supports CORS when the request method is get and async flag is true">
+        <description>
+          <test_script_entry timeout="6">/opt/tct-cors-w3c-tests/cors/cors_XMLHttpRequest_get_true.html</test_script_entry>
+        </description>
+        </testcase>
+      <testcase component="W3C_HTML5 APIs/Security/Cross-Origin Resource Sharing" execution_type="auto" id="cors_XMLHttpRequest_post_true" purpose="Check if the XMLHttpRequest supports CORS when the request method is post and async flag is true">
+        <description>
+          <test_script_entry timeout="6">/opt/tct-cors-w3c-tests/cors/cors_XMLHttpRequest_post_true.html</test_script_entry>
+        </description>
+        </testcase>
+    </set>
   </suite>
 </test_definition>
\ No newline at end of file