OLD | NEW |
---|---|
1 if (self.importScripts) { | 1 if (self.importScripts) { |
2 importScripts('../resources/fetch-test-helpers.js'); | 2 importScripts('../resources/fetch-test-helpers.js'); |
3 } | 3 } |
4 | 4 |
5 var URL = 'https://www.example.com/test.html'; | 5 var URL = 'https://www.example.com/test.html'; |
6 | 6 |
7 function size(headers) { | 7 function size(headers) { |
8 var count = 0; | 8 var count = 0; |
9 for (var header of headers) { | 9 for (var header of headers) { |
10 ++count; | 10 ++count; |
(...skipping 697 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
708 body: new Blob([''], {type: 'Text/Plain'}), | 708 body: new Blob([''], {type: 'Text/Plain'}), |
709 headers: [['Content-Type', 'Text/Html']]}); | 709 headers: [['Content-Type', 'Text/Html']]}); |
710 req.body.cancel(); | 710 req.body.cancel(); |
711 return req.blob() | 711 return req.blob() |
712 .then(function(blob) { | 712 .then(function(blob) { |
713 assert_equals(blob.type, 'text/html'); | 713 assert_equals(blob.type, 'text/html'); |
714 assert_equals(req.headers.get('Content-Type'), 'Text/Html'); | 714 assert_equals(req.headers.get('Content-Type'), 'Text/Html'); |
715 }); | 715 }); |
716 }, 'Extract a MIME type (2)'); | 716 }, 'Extract a MIME type (2)'); |
717 | 717 |
718 | |
719 // Tests for requests context. | |
720 promise_test(function(t) { | |
721 var req = new Request('http://localhost/', | |
722 {method: 'POST', body: ''}); | |
723 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.
| |
724 .then(function(blob) { | |
725 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.
| |
726 }); | |
727 }, '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.
| |
728 | |
729 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.
| |
730 var req = new Request('http://localhost/', | |
731 {method: 'POST', | |
732 body: new Blob([''], {type: 'Text/Plain'}), | |
733 headers: [['Content-Type', 'Text/Html']]}); | |
734 return req.blob() | |
735 .then(function(blob) { | |
736 assert_equals(req.context, ''); | |
737 }); | |
738 }, 'requests context'); | |
739 | |
718 done(); | 740 done(); |
OLD | NEW |