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

Unified Diff: LayoutTests/http/tests/local/serviceworker/resources/fetch-request-body-file-worker.js

Issue 555443002: [Fetch API] Put body members directly on Response/Request (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: incorporated yhirano's comment Created 6 years, 3 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
« no previous file with comments | « no previous file | LayoutTests/http/tests/serviceworker/fetch-access-control.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/http/tests/local/serviceworker/resources/fetch-request-body-file-worker.js
diff --git a/LayoutTests/http/tests/local/serviceworker/resources/fetch-request-body-file-worker.js b/LayoutTests/http/tests/local/serviceworker/resources/fetch-request-body-file-worker.js
index f2c027d32c2b447dd7252cb4837f85fbd382a124..b8ada9fae3e5d364008a5cbb9887012767811568 100644
--- a/LayoutTests/http/tests/local/serviceworker/resources/fetch-request-body-file-worker.js
+++ b/LayoutTests/http/tests/local/serviceworker/resources/fetch-request-body-file-worker.js
@@ -5,7 +5,7 @@ self.addEventListener('fetch', function(event) {
headers.push([key, value]);
});
if (event.request.url.indexOf('asText') != -1) {
- event.request.body.asText()
+ event.request.text()
.then(function(result) {
resolve(new Response(JSON.stringify({
method: event.request.method,
@@ -14,7 +14,7 @@ self.addEventListener('fetch', function(event) {
})));
})
} else if (event.request.url.indexOf('asBlob') != -1) {
- event.request.body.asBlob()
+ event.request.blob()
.then(function(result) {
resolve(new Response(JSON.stringify({
method: event.request.method,
« no previous file with comments | « no previous file | LayoutTests/http/tests/serviceworker/fetch-access-control.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698