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

Side by Side Diff: LayoutTests/http/tests/xmlhttprequest/xmlhttprequest-open-method-case-insensitive.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: Write async tests 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() - case-insensitive methods test</title>
5 <script src="../resources/testharness.js"></script>
6 <script src="../resources/testharnessreport.js"></script>
7 </head>
8 <body>
9 <p>non-standard method names should be returned as is per step-5 of http://x hr.spec.whatwg.org/#the-open()-method.</p>
10 <script type="text/javascript">
11 if (window.testRunner)
12 window.testRunner.dumpAsText();
tyoshino (SeeGerritForStatus) 2014/06/20 02:13:34 unnecessary
maheshkk 2014/06/20 04:53:19 Done.
13
14 function testMethod(methodName, lastTest) {
15 var client = new XMLHttpRequest();
16 client.open(methodName, "resources/request-method.php");
17 client.onreadystatechange = function(event) {
18 if (event.target.readyState == 4)
19 assert_equals(client.getResponseHeader("x-custom-request-method"), m ethodName);
20 }
21 client.send(null);
22 }
23
24 test(function() { testMethod("XUNICORN"); });
25 test(function() { testMethod("xUNIcorn"); });
26 test(function() { testMethod("chiCKEN"); });
27 test(function() { testMethod("PATCH"); });
28 test(function() { testMethod("patCH"); });
29 test(function() { testMethod("copy"); });
30 test(function() { testMethod("COpy"); });
31 test(function() { testMethod("inDEX"); });
32 test(function() { testMethod("movE"); });
33 </script>
34 </body>
35 </html>
36
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698