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

Unified Diff: LayoutTests/http/tests/serviceworker/resources/fetch-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
Index: LayoutTests/http/tests/serviceworker/resources/fetch-worker.js
diff --git a/LayoutTests/http/tests/serviceworker/resources/fetch-worker.js b/LayoutTests/http/tests/serviceworker/resources/fetch-worker.js
index c9433e606eacaeb61fc1910b25fcfe2b809aeaca..a5f41bcf2840227ef283db32829882a187935cce 100644
--- a/LayoutTests/http/tests/serviceworker/resources/fetch-worker.js
+++ b/LayoutTests/http/tests/serviceworker/resources/fetch-worker.js
@@ -48,7 +48,7 @@ async_test(function(t) {
body: new Blob(['Test Blob'], {type: 'test/type'})
});
fetch(request)
- .then(function(response) { return response.body.asText(); })
+ .then(function(response) { return response.text(); })
.then(evalJsonp)
.then(function(result) {
assert_equals(result.method, 'POST');
@@ -62,7 +62,7 @@ async_test(function(t) {
var request = new Request('fetch-access-control.php',
{method: 'POST', body: 'Test String'});
fetch(request)
- .then(function(response) { return response.body.asText(); })
+ .then(function(response) { return response.text(); })
.then(evalJsonp)
.then(function(result) {
assert_equals(result.method, 'POST');
@@ -80,7 +80,7 @@ async_test(function(t) {
var request = new Request('fetch-access-control.php',
{method: 'POST', body: array.buffer});
fetch(request)
- .then(function(response) { return response.body.asText(); })
+ .then(function(response) { return response.text(); })
.then(evalJsonp)
.then(function(result) {
assert_equals(result.method, 'POST');
@@ -98,7 +98,7 @@ async_test(function(t) {
var request = new Request('fetch-access-control.php',
{method: 'POST', body: array});
fetch(request)
- .then(function(response) { return response.body.asText(); })
+ .then(function(response) { return response.text(); })
.then(evalJsonp)
.then(function(result) {
assert_equals(result.method, 'POST');
@@ -118,7 +118,7 @@ async_test(function(t) {
var request = new Request('fetch-access-control.php',
{method: 'POST', body: formData});
fetch(request)
- .then(function(response) { return response.body.asText(); })
+ .then(function(response) { return response.text(); })
.then(evalJsonp)
.then(function(result) {
assert_equals(result.method, 'POST');

Powered by Google App Engine
This is Rietveld 408576698