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

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

Issue 2532833002: Reflect method restriction removal from Fetch API on data URL (Closed)
Patch Set: Rebase Created 4 years 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/LayoutTests/http/tests/fetch/script-tests/thorough/scheme-data.js » ('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/fetch.js
diff --git a/third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/fetch.js b/third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/fetch.js
index 07e5306eb5ecb75ed038d0dde3ca252877e306c0..9f21bbea19043875c96caef71d36c086d86a7ffe 100644
--- a/third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/fetch.js
+++ b/third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/fetch.js
@@ -37,6 +37,25 @@ promise_test(function(t) {
}, 'fetch data: URL');
promise_test(function(t) {
+ return fetch('data:,Foobar',
+ {
+ method: 'POST',
+ body: 'Test'
+ })
+ .then(function(response) {
+ assert_equals(response.status, 200);
+ assert_equals(response.statusText, 'OK');
+ assert_equals(response.headers.get('Content-Type'),
+ 'text/plain;charset=US-ASCII');
+ assert_equals(size(response.headers), 1);
+ return response.text();
+ })
+ .then(function(text) {
+ assert_equals(text, 'Foobar');
+ });
+ }, 'fetch data: URL with the POST method');
+
+promise_test(function(t) {
return fetch('data:text/html;charset=utf-8;base64,5paH5a2X')
.then(function(response) {
assert_equals(response.status, 200);
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/thorough/scheme-data.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698