4 <title>XMLHttpRequest: open() - case-insensitive methods test
</title>
5 <script src=
"../resources/testharness.js"></script>
6 <script src=
"../resources/testharnessreport.js"></script>
9 <p>non-standard method names should be returned as is per step-
5 of http://xhr.spec.whatwg.org/#the-open()-method.
</p>
10 <script type=
"text/javascript">
11 function testMethod(methodName
, lastTest
) {
12 var client
= new XMLHttpRequest();
13 client
.open(methodName
, "resources/echo-request-method.php");
14 client
.onreadystatechange = function(event
) {
15 if (event
.target
.readyState
== 4)
16 assert_equals(client
.getResponseHeader("x-custom-request-method"), methodName
);
21 test(function() { testMethod("XUNICORN"); });
22 test(function() { testMethod("xUNIcorn"); });
23 test(function() { testMethod("chiCKEN"); });
24 test(function() { testMethod("PATCH"); });
25 test(function() { testMethod("patCH"); });
26 test(function() { testMethod("copy"); });
27 test(function() { testMethod("COpy"); });
28 test(function() { testMethod("inDEX"); });
29 test(function() { testMethod("movE"); });