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

Unified 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: update review comments and rebase 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 side-by-side diff with in-line comments
Download patch
Index: LayoutTests/http/tests/xmlhttprequest/xmlhttprequest-open-method-case-insensitive.html
diff --git a/LayoutTests/http/tests/xmlhttprequest/xmlhttprequest-open-method-case-insensitive.html b/LayoutTests/http/tests/xmlhttprequest/xmlhttprequest-open-method-case-insensitive.html
new file mode 100644
index 0000000000000000000000000000000000000000..42dae808465ef53a6ba83268d92daaef723d65a7
--- /dev/null
+++ b/LayoutTests/http/tests/xmlhttprequest/xmlhttprequest-open-method-case-insensitive.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>XMLHttpRequest: open() - case-insensitive methods test</title>
+ <script src="../resources/testharness.js"></script>
+ <script src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <p>non-standard method names should be returned as is per step-5 of http://xhr.spec.whatwg.org/#the-open()-method.</p>
+ <script type="text/javascript">
+ function testMethod(methodName, lastTest) {
+ var client = new XMLHttpRequest();
+ client.open(methodName, "resources/echo-request-method.php");
+ client.onreadystatechange = function(event) {
+ if (event.target.readyState == 4)
+ assert_equals(client.getResponseHeader("x-custom-request-method"), methodName);
+ }
+ client.send(null);
+ }
+
+ test(function() { testMethod("XUNICORN"); });
+ test(function() { testMethod("xUNIcorn"); });
+ test(function() { testMethod("chiCKEN"); });
+ test(function() { testMethod("PATCH"); });
+ test(function() { testMethod("patCH"); });
+ test(function() { testMethod("copy"); });
+ test(function() { testMethod("COpy"); });
+ test(function() { testMethod("inDEX"); });
+ test(function() { testMethod("movE"); });
+ </script>
+ </body>
+</html>
+

Powered by Google App Engine
This is Rietveld 408576698