Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(25)

Side by Side Diff: LayoutTests/http/tests/xmlhttprequest/xmlhttprequest-open-method-allowed.html

Issue 347653003: XMLHttpRequest must build a request using the given method as-is for non-standard types (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <title>XMLHttpRequest: open() - allowed case in/sensitive methods test</titl e>
5 </head>
6 <body>
7 <p>Valid methods per step-5 of http://xhr.spec.whatwg.org/#the-open()-method .</p>
8 <div id="log"></div>
9 <script type="text/javascript">
10 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!
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 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
18 var client = new XMLHttpRequest();
19 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.
20 client.send(null);
21 log(client.getResponseHeader("x-custom-request-method"));
22 }
23
24 method("PUT")
sof 2014/06/19 06:19:50 Add semicolons to these calls.
maheshkk 2014/06/19 19:33:52 Done.
25 method("Put")
26 method("DELETE")
27 method("DeLeTe")
28 method("HEAD")
29 method("hEAd")
30 method("OPTIONS")
31 method("OPtiOns")
32 method("POST")
33 method("post")
34 method("GET")
35 method("gEt")
36 </script>
37 </body>
38 </html>
39
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698