--- /dev/null
+<!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:
+ Fan,Weiwei <weiwix.fan@intel.com>
+ Xu,Yuhan <yuhanx.xu@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>CORS Test: cors_XMLHttpRequest_add_max_age</title>
+ <link rel="author" title="Intel" href="http://www.intel.com" />
+ <link rel="help" href="http://www.w3.org/TR/2012/WD-cors-20120403" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="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" />
+ <script src="./support/path.js"></script>
+ <script src="../resources/testharness.js"></script>
+ <script src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <script>
+ var t = async_test(document.title, {timeout:2000});
+ var client = new XMLHttpRequest();
+ var url = otherDomain + "/opt/tct-cors-w3c-tests/cors/support/cors_credential_false.php";
+ var ok = 200; // The code indicate success
+ var maxAge = "30000";
+
+ try {
+ //Preflight Request
+ client.open('GET', url, true);
+ client.withCredentials = false;
+ client.onreadystatechange = t.step_func(function () {
+ if (client.readyState == 4) {
+ assert_equals(client.status, ok, "the status code");
+ assert_equals(client.getResponseHeader("Access-Control-Max-Age"), maxAge, "the response header max age");
+ t.done();
+ }
+ });
+ client.onerror = t.step_func(function () {
+ assert_unreached("corss origin request failed");
+ t.done();
+ });
+ client.send();
+ } catch (ex) {
+ t.step(function () {
+ assert_unreached("throw an exception" + ex);
+ });
+ t.done();
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!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:
+ Fan,Weiwei <weiwix.fan@intel.com>
+ Xu,Yuhan <yuhanx.xu@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>CORS Test: cors_XMLHttpRequest_allow_credentials_true</title>
+ <link rel="author" title="Intel" href="http://www.intel.com" />
+ <link rel="help" href="http://www.w3.org/TR/2012/WD-cors-20120403" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="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" />
+ <script src="./support/path.js"></script>
+ <script src="../resources/testharness.js"></script>
+ <script src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <script>
+ var t = async_test(document.title, {timeout:2000});
+ var client = new XMLHttpRequest();
+ var url = otherDomain + "/opt/tct-cors-w3c-tests/cors/support/cors_credential_true.php";
+ var ok = 200; // The code indicate success
+
+ try {
+ client.open('GET', url, true);
+ client.withCredentials = true; // Credentials flag is true
+ client.onreadystatechange = t.step_func(function () {
+ if (client.readyState == 4) {
+ assert_equals(client.status, ok, "the status code");
+ assert_equals(client.getResponseHeader("Access-Control-Allow-Credentials"), "true", "the allow Credentials");
+ t.done();
+ }
+ });
+ client.onerror = t.step_func(function () {
+ assert_unreached("corss origin request failed");
+ t.done();
+ });
+ client.send();
+ } catch (ex) {
+ t.step(function () {
+ assert_unreached("throw an exception" + ex);
+ });
+ t.done();
+ }
+ </script>
+ </body>
+</html>
<!DOCTYPE html>
<!--
-Copyright (c) 2012 Intel Corporation.
+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:
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Authors:
- Fan, Weiwei <weiwix.fan@intel.com>
+ Fan,Weiwei <weiwix.fan@intel.com>
+ Xu,Yuhan <yuhanx.xu@intel.com>
-->
<link rel="help" href="http://www.w3.org/TR/2012/WD-cors-20120403" />
<meta name="flags" content="" />
<meta name="assert" content="Check if example of using XMLHttpRequest a client-side Web application can corss origin share the resource" />
+ <script src="./support/path.js"></script>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
- <script type="text/javascript" src="./support/path.js"></script>
</head>
<body>
<div id="log"></div>
- <script type="text/javascript">
- var t = async_test(document.title);
+ <script>
+ var t = async_test(document.title, {timeout:2000});
var client = new XMLHttpRequest();
var url = otherDomain + "/opt/tct-cors-w3c-tests/cors/support/cors_credential_false.php";
var ok = 200; // The code indicate success
client.open('GET', url, true);
- client.onreadystatechange = t.step_func(function () {
+ client.onreadystatechange = t.step_func(function () {
if (client.readyState == 4) {
- assert_equals(client.status, ok, "the statu code");
+ assert_equals(client.status, ok, "the status code");
assert_equals(client.responseText, "HelloWorld", "the response text");
t.done();
- }
+ }
});
client.onerror = t.step_func(function () {
assert_unreached("the request has failed");
--- /dev/null
+<!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:
+ Fan,Weiwei <weiwix.fan@intel.com>
+ Xu,Yuhan <yuhanx.xu@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>CORS Test: cors_XMLHttpRequest_credentials_false_origin</title>
+ <link rel="author" title="Intel" href="http://www.intel.com" />
+ <link rel="help" href="http://www.w3.org/TR/2012/WD-cors-20120403" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="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" />
+ <script src="./support/path.js"></script>
+ <script src="../resources/testharness.js"></script>
+ <script src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <script>
+ var t = async_test(document.title, {timeout:2000});
+ var client = new XMLHttpRequest();
+ var url = otherDomain + "/opt/tct-cors-w3c-tests/cors/support/cors_allow_origin_asterisk.php";
+ var ok = 200; // The code indicate success
+
+ try {
+ client.open('GET', url, true);
+ client.withCredentials = false;
+ client.onreadystatechange = t.step_func(function () {
+ if (client.readyState == 4) {
+ assert_equals(client.status, ok, "the status code");
+ assert_equals(client.getResponseHeader("Access-Control-Allow-Origin"), "*", "the allow origin");
+ t.done();
+ }
+ });
+ client.onerror = t.step_func(function () {
+ assert_unreached("corss origin request failed");
+ t.done();
+ });
+ client.send();
+ } catch (ex) {
+ t.step(function () {
+ assert_unreached("throw an exception" + ex);
+ });
+ t.done();
+ }
+ </script>
+ </body>
+</html>
<!DOCTYPE html>
<!--
-Copyright (c) 2012 Intel Corporation.
+Copyright (c) 2013 Intel Corporation.
-Redistribution and use in source and binary forms, with or without modification,
+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
+* 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
+* 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
+* 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.
-
+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:
Fan,Weiwei <weiwix.fan@intel.com>
+ Xu,Yuhan <yuhanx.xu@intel.com>
-->
<link rel="help" href="http://www.w3.org/TR/2012/WD-cors-20120403" />
<meta name="flags" content="" />
<meta name="assert" content="Check if the XMLHttpRequest supports CORS when the request method is get" />
+ <script src="./support/path.js"></script>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
- <script type="text/javascript" src="./support/path.js"></script>
</head>
<body>
<div id="log"></div>
- <script type="text/javascript">
+ <script>
var t = async_test(document.title, { timeout: 3000 });
var url = otherDomain + "/opt/tct-cors-w3c-tests/cors/support/cors_echo.php?message=test";
--- /dev/null
+<!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:
+ Fan,Weiwei <weiwix.fan@intel.com>
+ Xu,Yuhan <yuhanx.xu@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>CORS Test: cors_XMLHttpRequest_getResponseHeader_not_null</title>
+ <link rel="author" title="Intel" href="http://www.intel.com" />
+ <link rel="help" href="http://www.w3.org/TR/2012/WD-cors-20120403" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="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" />
+ <script src="./support/path.js"></script>
+ <script src="../resources/testharness.js"></script>
+ <script src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <script>
+ var t = async_test(document.title, {timeout:2000});
+ var client = new XMLHttpRequest();
+ var url = otherDomain + "/opt/tct-cors-w3c-tests/cors/support/cors_credential_false.php";
+ var ok = 200; // The code indicate success
+
+ client.open('GET', url, true);
+ client.onreadystatechange = t.step_func(function(){
+ if (client.readyState == 4) {
+ assert_equals(client.status, ok, "the status code");
+ assert_not_equals(client.getResponseHeader("Server"), null);
+ t.done();
+ }
+ });
+ client.onerror = t.step_func(function () {
+ assert_unreached("the request has failed");
+ t.done();
+ });
+ client.send();
+ </script>
+ </body>
+</html>
--- /dev/null
+<!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:
+ Fan,Weiwei <weiwix.fan@intel.com>
+ Xu,Yuhan <yuhanx.xu@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>CORS Test: cors_XMLHttpRequest_getResponseHeader_null</title>
+ <link rel="author" title="Intel" href="http://www.intel.com" />
+ <link rel="help" href="http://www.w3.org/TR/2012/WD-cors-20120403" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="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" />
+ <script src="./support/path.js"></script>
+ <script src="../resources/testharness.js"></script>
+ <script src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <script>
+ var t = async_test(document.title, {timeout:2000});
+ var client = new XMLHttpRequest();
+ var url = otherDomain + "/opt/tct-cors-w3c-tests/cors/support/cors_credential_false.php";
+ var ok = 200; // The code indicate success
+
+ client.open('GET', url, true);
+ client.onreadystatechange = t.step_func(function(){
+ if (client.readyState == 4) {
+ assert_equals(client.status, ok, "the status code");
+ assert_equals(client.getResponseHeader("Date"), null);
+ t.done();
+ }
+ });
+ client.onerror = t.step_func(function () {
+ assert_unreached("the request has failed");
+ t.done();
+ });
+ client.send();
+ </script>
+ </body>
+</html>
+
--- /dev/null
+<!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:
+ Fan,Weiwei <weiwix.fan@intel.com>
+ Xu,Yuhan <yuhanx.xu@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>CORS Test: cors_XMLHttpRequest_get_true</title>
+ <link rel="author" title="Intel" href="http://www.intel.com" />
+ <link rel="help" href="http://www.w3.org/TR/2012/WD-cors-20120403" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if the XMLHttpRequest supports CORS when the request method is get and async flag is true"/>
+ <script src="./support/path.js"></script>
+ <script src="../resources/testharness.js"></script>
+ <script src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <script>
+ var t = async_test(document.title, { timeout: 3000 });
+
+ var url = otherDomain + "/opt/tct-cors-w3c-tests/cors/support/cors_echo.php?message=test";
+ var xhr = new XMLHttpRequest();
+ xhr.open('GET', url, true);
+ xhr.send(null);
+
+ xhr.onreadystatechange = t.step_func(function() {
+ if (xhr.readyState == 4) {
+ var text = xhr.responseText;
+ assert_equals(text, "test", "the XMLHttpRequest supports CORS when the request method is get and async flag is true");
+ t.done();
+ }
+ });
+ xhr.onerror = t.step_func(function(e) {
+ assert_unreached("the cors request has failed");
+ t.done();
+ });
+ </script>
+ </body>
+</html>
<!DOCTYPE html>
<!--
-Copyright (c) 2012 Intel Corporation.
+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:
Authors:
Fan,Weiwei <weiwix.fan@intel.com>
+ Xu,Yuhan <yuhanx.xu@intel.com>
-->
<link rel="help" href="http://www.w3.org/TR/2012/WD-cors-20120403" />
<meta name="flags" content="" />
<meta name="assert" content="Check if the XMLHttpRequest supports CORS when the request method is post" />
+ <script src="./support/path.js"></script>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
- <script type="text/javascript" src="./support/path.js"></script>
</head>
<body>
<div id="log"></div>
- <script type="text/javascript" >
+ <script>
var t = async_test(document.title, { timeout: 3000 });
var url = otherDomain + "/opt/tct-cors-w3c-tests/cors/support/cors_echo.php";
--- /dev/null
+<!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:
+ Fan,Weiwei <weiwix.fan@intel.com>
+ Xu,Yuhan <yuhanx.xu@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>CORS Test: cors_XMLHttpRequest_post</title>
+ <link rel="author" title="Intel" href="http://www.intel.com" />
+ <link rel="help" href="http://www.w3.org/TR/2012/WD-cors-20120403" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if the XMLHttpRequest supports CORS when the request method is post" />
+ <script src="./support/path.js"></script>
+ <script src="../resources/testharness.js"></script>
+ <script src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <script>
+ var t = async_test(document.title, { timeout: 3000 });
+
+ var url = otherDomain + "/opt/tct-cors-w3c-tests/cors/support/cors_echo.php";
+ var xhr = new XMLHttpRequest();
+ xhr.open('post', url, true);
+ xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
+ xhr.send("message=test");
+
+ xhr.onreadystatechange = t.step_func(function() {
+ if (xhr.readyState == 4) {
+ var text = xhr.responseText;
+ assert_equals(text, "test", "the XMLHttpRequest supports CORS when the request method is post and the sync flag is true");
+ t.done();
+ }
+ });
+ xhr.onerror = t.step_func(function(e) {
+ assert_unreached("the cors request has failed");
+ t.done();
+ });
+ </script>
+ </body>
+</html>
--- /dev/null
+The poster.png file comes from https://github.com/w3c/web-platform-tests
+without any modification.
+
+This file is copyright by W3C and/or the author listed in the test
+file. The tests are dual-licensed under the W3C Test Suite License:
+http://www.w3.org/Consortium/Legal/2008/04-testsuite-license
+and the BSD 3-clause License:
+http://www.w3.org/Consortium/Legal/2008/03-bsd-license
+under W3C's test suite licensing policy:
+http://www.w3.org/Consortium/Legal/2008/04-testsuite-copyright
+
+
--- /dev/null
+#!/bin/sh
+#
+#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:
+# Wang, Jing J <jing.j.wang@intel.com>
+
+echo "Server: Mongoose/1.3 (Linux)"
+echo "Access-Control-Allow-Origin: *"
+echo "Access-Control-Allow-Credentials: false"
+echo "Access-Control-Expose-Headers: Access-Control-Allow-Origin"
+echo "Cache-Control: no-cache"
+echo "Pragma: no-cache"
+echo "Content-Type: text/plain"
+echo
+echo -n "HelloWorld"
--- /dev/null
+#!/bin/sh
+#
+#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:
+# Wang, Jing J <jing.j.wang@intel.com>
+
+echo "Server: Mongoose/1.3 (Linux)"
+echo "Access-Control-Allow-Origin: $HTTP_ORIGIN"
+echo "Access-Control-Allow-Credentials: true"
+echo "Access-Control-Expose-Headers: Access-Control-Allow-Credentials"
+echo "Cache-Control: no-cache"
+echo "Pragma: no-cache"
+echo "Content-Type: text/plain"
+echo
+echo -n "HelloWorld"
--- /dev/null
+<?php
+/*
+Copyright (c) 2012 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:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+*/
+ header("Access-Control-Allow-Origin: *"); // Specify domains from which requests are allowed
+ header("Access-Control-Allow-Credentials: false");
+ header("Access-Control-Expose-Headers: Access-Control-Allow-Origin");
+ header('Cache-Control: no-cache');
+ header('Pragma: no-cache');
+ header('Content-Type: text/plain');
+ $str = "HelloWorld";
+ echo($str);
+?>
--- /dev/null
+<?php
+/*
+Copyright (c) 2012 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:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+*/
+ header("Access-Control-Allow-Origin: " . $_SERVER['HTTP_ORIGIN']); // Specify domains from which requests are allowed
+ header("Access-Control-Allow-Credentials: true");
+ header("Access-Control-Expose-Headers: Access-Control-Allow-Credentials");
+ header('Cache-Control: no-cache');
+ header('Pragma: no-cache');
+ header('Content-Type: text/plain');
+ $str = "HelloWorld";
+ echo($str);
+?>
</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="WebAPI/Security/Cross-Origin Resource Sharing" execution_type="auto" priority="P3" id="cors_XMLHttpRequest_add_max_age">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>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</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <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="WebAPI/Security/Cross-Origin Resource Sharing" execution_type="auto" priority="P3" id="cors_XMLHttpRequest_allow_credentials_true">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>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</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <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="WebAPI/Security/Cross-Origin Resource Sharing" execution_type="auto" priority="P3" id="cors_XMLHttpRequest_credentials_false_origin">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>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</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <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="WebAPI/Security/Cross-Origin Resource Sharing" execution_type="auto" priority="P3" id="cors_XMLHttpRequest_getResponseHeader_not_null">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>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</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <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="WebAPI/Security/Cross-Origin Resource Sharing" execution_type="auto" priority="P3" id="cors_XMLHttpRequest_getResponseHeader_null">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>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</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <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="WebAPI/Security/Cross-Origin Resource Sharing" execution_type="auto" priority="P3" id="cors_XMLHttpRequest_get_true">
+ <description>
+ <pre_condition/>
+ <post_condition/>
+ <steps>
+ <step order="1">
+ <step_desc>when the test content was set in "request.open('get','http://example.com/hello',true);request.send();request.onreadystatechange();" format, it is shown like you can see now on the computer</step_desc>
+ <expected>All test results are marked "PASS"</expected>
+ </step>
+ </steps>
+ <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="WebAPI/Security/Cross-Origin Resource Sharing" execution_type="auto" priority="P3" id="cors_XMLHttpRequest_post_true">
+ <description>
+ <pre_condition/>
+ <post_condition/>
+ <steps>
+ <step order="1">
+ <step_desc>when the test content was set in "request.open('post','http://unionplatform.com/xmlhttptest/echo.php'),true;request.send('message=test');request.onload();" format, it is shown like you can see now on the computer</step_desc>
+ <expected>All test results are marked "PASS"</expected>
+ </step>
+ </steps>
+ <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>