Index: third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/send-entity-body-basic.html |
diff --git a/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/send-entity-body-basic.html b/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/send-entity-body-basic.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..e176b3518f7195ef2bad9a1239b9b7f8095570d7 |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/send-entity-body-basic.html |
@@ -0,0 +1,30 @@ |
+<!doctype html> |
+<html> |
+ <head> |
+ <title>XMLHttpRequest: send() - data argument</title> |
+ <script src="/resources/testharness.js"></script> |
+ <script src="/resources/testharnessreport.js"></script> |
+ <link rel="help" href="https://xhr.spec.whatwg.org/#the-send()-method" data-tested-assertations="/following::ol/li[4]" /> |
+ </head> |
+ <body> |
+ <div id="log"></div> |
+ <script> |
+ // Taken from http://w3c-test.org/XMLHttpRequest/send-entity-body-basic.htm |
+ |
+ function request(input, output) { |
+ test(function() { |
+ var client = new XMLHttpRequest() |
+ client.open("POST", "resources/echo-content.php", false) |
+ client.send(input) |
+ assert_equals(client.responseText, output) |
+ }, document.title + " (" + output + ")") |
+ } |
+ request(1, "1") |
+ request(10000000, "10000000") |
+ request([2,2], "2,2") |
+ request(false, "false") |
+ request("A\0A", "A\0A") |
+ request(new URLSearchParams([[1, 2], [3, 4]]), "1=2&3=4") |
+ </script> |
+ </body> |
+</html> |