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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/send-entity-body-charset.html

Issue 2723583005: Support XMLHttpRequest.send(URLSearchParams) (Closed)
Patch Set: rebased upto r454567 Created 3 years, 9 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: send() - data argument</title>
5 <script src="/resources/testharness.js"></script>
6 <script src="/resources/testharnessreport.js"></script>
7 <link rel="help" href="https://xhr.spec.whatwg.org/#the-send()-method" data- tested-assertations="/following::ol/li[4]" />
8 </head>
9 <body>
10 <div id="log"></div>
11 <script>
12 function requestCharset(input, charset, contentType) {
13 test(function() {
14 var client = new XMLHttpRequest();
15 client.open("POST", "print-content-type.cgi", false);
16 if (contentType)
17 client.setRequestHeader("Content-Type", contentType);
18 client.send(input);
19 assert_true(client.responseText.indexOf("charset=" + charset) >= 0);
20 }, document.title + " (" + input + " requested with charset=" + charset + ")")
21 }
22 requestCharset(1, "UTF-8");
23 requestCharset(1, "UTF-8", "application/javascript;charset=us-ascii");
24 requestCharset(new URLSearchParams([[1, 2], [3, 4]]), "UTF-8");
25 requestCharset(new URLSearchParams([[1, 2], [3, 4]]), "UTF-8", "text/javas cript;charset=us-ascii");
26 </script>
27 </body>
28 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698