Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!DOCTYPE html> | |
| 2 <html> | |
| 3 <head> | |
| 4 <title>XMLHttpRequest: open() - case-insensitive methods test</title> | |
| 5 </head> | |
| 6 <body> | |
| 7 <p>Not matching method names should be returned as is per step-5 of http://x hr.spec.whatwg.org/#the-open()-method.</p> | |
| 8 <div id="log"></div> | |
| 9 <script> | |
| 10 if (window.testRunner) | |
| 11 window.testRunner.dumpAsText(); | |
| 12 | |
| 13 function log(message) { | |
| 14 document.getElementById("log").appendChild(document.createTextNode(mes sage)); | |
| 15 document.getElementById("log").appendChild(document.createElement("br" )); | |
| 16 } | |
| 17 function method(method) { | |
|
sof
2014/06/19 06:19:50
method => verb
maheshkk
2014/06/19 19:33:53
Done.
| |
| 18 var client = new XMLHttpRequest() | |
|
sof
2014/06/19 06:19:50
Use ";" consistently
maheshkk
2014/06/19 19:33:53
Done.
| |
| 19 client.open(method, "resources/request-method.php", false) | |
| 20 client.send(null) | |
| 21 log(client.getResponseHeader("x-custom-request-method")) | |
| 22 } | |
| 23 | |
| 24 method("XUNICORN") | |
| 25 method("xUNIcorn") | |
| 26 method("chiCKEN") | |
| 27 method("PATCH") | |
| 28 method("patCH") | |
| 29 method("copy") | |
| 30 method("COpy") | |
| 31 method("inDEX") | |
| 32 method("movE") | |
| 33 </script> | |
| 34 </body> | |
| 35 </html> | |
| 36 | |
| OLD | NEW |