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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/send-entity-body-basic.html

Issue 2723583005: Support XMLHttpRequest.send(URLSearchParams) (Closed)
Patch Set: rebased upto r454567 Created 3 years, 10 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: 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>

Powered by Google App Engine
This is Rietveld 408576698