Chromium Code Reviews| Index: LayoutTests/http/tests/fetch/script-tests/request.js |
| diff --git a/LayoutTests/http/tests/fetch/script-tests/request.js b/LayoutTests/http/tests/fetch/script-tests/request.js |
| index 1f736874cf3220723030df931858383b83f64ee1..6b19b43bdfba5702d006c3df39418ec1b9d135ef 100644 |
| --- a/LayoutTests/http/tests/fetch/script-tests/request.js |
| +++ b/LayoutTests/http/tests/fetch/script-tests/request.js |
| @@ -715,4 +715,26 @@ promise_test(function(t) { |
| }); |
| }, 'Extract a MIME type (2)'); |
| + |
| +// Tests for requests context. |
| +promise_test(function(t) { |
| + var req = new Request('http://localhost/', |
| + {method: 'POST', body: ''}); |
| + return req.blob() |
|
jsbell
2015/04/06 17:04:15
Extracting the body of the request here should not
shiva.jm
2015/04/09 09:16:22
Done.
|
| + .then(function(blob) { |
| + assert_equals(req.context, ''); |
|
jsbell
2015/04/06 17:04:14
Please add a message to the assertion, e.g. "Reque
shiva.jm
2015/04/09 09:16:22
Done.
|
| + }); |
| + }, 'requests context'); |
|
jsbell
2015/04/06 17:04:14
Please give the test a more descriptive name, e.g.
shiva.jm
2015/04/09 09:16:22
Done.
|
| + |
| +promise_test(function(t) { |
|
jsbell
2015/04/06 17:04:14
What is this test verifying that's different than
shiva.jm
2015/04/09 09:16:22
Done.
|
| + var req = new Request('http://localhost/', |
| + {method: 'POST', |
| + body: new Blob([''], {type: 'Text/Plain'}), |
| + headers: [['Content-Type', 'Text/Html']]}); |
| + return req.blob() |
| + .then(function(blob) { |
| + assert_equals(req.context, ''); |
| + }); |
| + }, 'requests context'); |
| + |
| done(); |