| 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 f8dd8e83067e2f04fb1cbbd42cf0b6f078f5f308..9d410ddc88ce3e827a6c33142ce52a6175501ad5 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
|
| @@ -322,10 +322,9 @@ test(function() {
|
| assert_false(req.bodyUsed,
|
| 'Request should not be flagged as used if it has not been ' +
|
| 'consumed.');
|
| - // See https://crbug.com/501195.
|
| var req2 = new Request(req);
|
| - assert_true(req.bodyUsed,
|
| - 'Request should be flagged as used if it does not have' +
|
| + assert_false(req.bodyUsed,
|
| + 'Request should not be flagged as used if it does not have' +
|
| 'body.');
|
| assert_false(req2.bodyUsed,
|
| 'Request should not be flagged as used if it has not been ' +
|
| @@ -475,6 +474,8 @@ promise_test(function() {
|
| body: new Blob(['Test Blob'], {type: 'test/type'})
|
| });
|
| var req2 = req.clone();
|
| + assert_false(req.bodyUsed);
|
| + assert_false(req2.bodyUsed);
|
| // Change headers and of original request.
|
| req.headers.set('Content-Language', 'en');
|
| assert_equals(req2.headers.get('Content-Language'), 'ja',
|
| @@ -486,13 +487,6 @@ promise_test(function() {
|
| return req2.text();
|
| }).then(function(text) {
|
| assert_equals(text, 'Test Blob', 'Cloned request body should match.');
|
| - return Promise.all([req.text(), req2.text()]);
|
| - }).then(function(texts) {
|
| - assert_equals(texts[0], '', 'The body is consumed.');
|
| - assert_equals(texts[1], '', 'The body is consumed.');
|
| - return req.clone().text();
|
| - }).then(function(text) {
|
| - assert_equals(text, '', 'The body was consumed before cloned.');
|
| });
|
| }, 'Test clone behavior with loading content from Request.');
|
|
|
| @@ -649,9 +643,6 @@ promise_test(function(t) {
|
| .then(function(blob) {
|
| assert_equals(blob.type, 'text/plain');
|
| assert_equals(req.headers.get('Content-Type'), 'text/plain');
|
| - return new Request(req).blob();
|
| - }).then(function(blob) {
|
| - assert_equals(blob.type, 'text/plain');
|
| });
|
| }, 'MIME type for Blob with non-empty type');
|
|
|
| @@ -719,17 +710,4 @@ promise_test(function(t) {
|
| });
|
| }, 'Extract a MIME type (1)');
|
|
|
| -promise_test(function(t) {
|
| - var req = new Request('http://localhost/', {method: 'POST', body: 'hello'});
|
| - return req.text().then(function(text) {
|
| - assert_equals(text, 'hello');
|
| - var req2 = new Request(req);
|
| - assert_true(req.bodyUsed);
|
| - assert_false(req2.bodyUsed);
|
| - return req2.text();
|
| - }).then(function(text) {
|
| - assert_equals(text, '');
|
| - });
|
| - }, 'Consume and pass');
|
| -
|
| done();
|
|
|