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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/request.js

Issue 1456553002: Support 'URLSearchParams' as the body of a Request (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@URLSearchParams
Patch Set: Feedback Created 5 years, 1 month 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/core.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/request.js
diff --git a/third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/request.js b/third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/request.js
index 9cd67290e28792a24144c8bca5219acfa0316bcd..fa988b277025184dbf7e5985522a3d5bd6f6175f 100644
--- a/third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/request.js
+++ b/third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/request.js
@@ -595,6 +595,15 @@ async_test(function(t) {
'Creating a Request with FormData body should success.');
})
.then(function() {
+ var params = new URLSearchParams();
+ params.append('sample string', '1234567890');
+ request = new Request(URL, {method: 'POST', body: params});
+ return request.text();
+ })
+ .then(function(result) {
+ assert_equals(result, "sample+string=1234567890");
+ })
+ .then(function() {
t.done();
})
.catch(unreached_rejection(t));
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/core.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698