Chromium Code Reviews| Index: LayoutTests/http/tests/xmlhttprequest/xmlhttprequest-open-method-allowed.html |
| diff --git a/LayoutTests/http/tests/xmlhttprequest/xmlhttprequest-open-method-allowed.html b/LayoutTests/http/tests/xmlhttprequest/xmlhttprequest-open-method-allowed.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..ad13a8248e6693a6ff53c5c1d369413ab5d2b7f6 |
| --- /dev/null |
| +++ b/LayoutTests/http/tests/xmlhttprequest/xmlhttprequest-open-method-allowed.html |
| @@ -0,0 +1,39 @@ |
| +<!DOCTYPE html> |
| +<html> |
| + <head> |
| + <title>XMLHttpRequest: open() - allowed case in/sensitive methods test</title> |
| + </head> |
| + <body> |
| + <p>Valid methods per step-5 of http://xhr.spec.whatwg.org/#the-open()-method.</p> |
| + <div id="log"></div> |
| + <script type="text/javascript"> |
| + if (window.testRunner) |
|
sof
2014/06/19 06:19:50
I would have preferred if this (new) test used js-
maheshkk
2014/06/19 19:33:53
Done. However dumpAsText is still required though!
|
| + window.testRunner.dumpAsText(); |
| + |
| + function log(message) { |
| + document.getElementById("log").appendChild(document.createTextNode(message)); |
| + document.getElementById("log").appendChild(document.createElement("br")); |
| + } |
| + function method(method) { |
|
sof
2014/06/19 06:19:50
How about 'verb' (or methodName) as the argument n
maheshkk
2014/06/19 19:33:52
Ok sure. This code is mostly used as is per w3c-te
|
| + var client = new XMLHttpRequest(); |
| + client.open(method, "resources/request-method.php", false); |
|
sof
2014/06/19 06:19:49
You could run into test timeout problems here, syn
maheshkk
2014/06/19 19:33:52
Done.
|
| + client.send(null); |
| + log(client.getResponseHeader("x-custom-request-method")); |
| + } |
| + |
| + method("PUT") |
|
sof
2014/06/19 06:19:50
Add semicolons to these calls.
maheshkk
2014/06/19 19:33:52
Done.
|
| + method("Put") |
| + method("DELETE") |
| + method("DeLeTe") |
| + method("HEAD") |
| + method("hEAd") |
| + method("OPTIONS") |
| + method("OPtiOns") |
| + method("POST") |
| + method("post") |
| + method("GET") |
| + method("gEt") |
| + </script> |
| + </body> |
| +</html> |
| + |