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

Unified Diff: LayoutTests/http/tests/serviceworker/resources/response-content-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 | « LayoutTests/http/tests/serviceworker/resources/request-worker.js ('k') | Source/modules/modules.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/http/tests/serviceworker/resources/response-content-worker.js
diff --git a/LayoutTests/http/tests/serviceworker/resources/response-content-worker.js b/LayoutTests/http/tests/serviceworker/resources/response-content-worker.js
index a2d5270a945077b2d6b94e80a5a7c860153b9396..1256207e91159f55aa341a61993d3abdf2ffc2b4 100644
--- a/LayoutTests/http/tests/serviceworker/resources/response-content-worker.js
+++ b/LayoutTests/http/tests/serviceworker/resources/response-content-worker.js
@@ -6,7 +6,7 @@ promise_test(function() {
response.headers.get('Content-Type'),
'text/plain;charset=UTF-8',
'A Response constructed with a string should have a Content-Type.');
- return response.body.asText()
+ return response.text()
.then(function(text) {
assert_equals(text, 'test string',
'Response body text should match the string on construction.');
@@ -20,7 +20,7 @@ promise_test(function() {
var response = new Response(buffer);
assert_false(response.headers.has('Content-Type'),
'A Response constructed with ArrayBuffer should not have a content type.');
- return response.body.asArrayBuffer()
+ return response.arrayBuffer()
.then(function(buffer) {
var resultIntView = new Int32Array(buffer);
assert_array_equals(
@@ -37,7 +37,7 @@ promise_test(function() {
assert_false(response.headers.has('Content-Type'),
'A Response constructed with ArrayBufferView ' +
'should not have a content type.');
- return response.body.asArrayBuffer()
+ return response.arrayBuffer()
.then(function(buffer) {
var resultIntView = new Int32Array(buffer);
assert_array_equals(
@@ -54,7 +54,7 @@ promise_test(function() {
assert_false(response.headers.has('Content-Type'),
'A Response constructed with ArrayBufferView ' +
'should not have a content type.');
- return response.body.asArrayBuffer()
+ return response.arrayBuffer()
.then(function(buffer) {
var resultIntView = new Int32Array(buffer);
assert_array_equals(
« no previous file with comments | « LayoutTests/http/tests/serviceworker/resources/request-worker.js ('k') | Source/modules/modules.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698