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 // Tests for requests context. | |
719 test(function() { | |
720 var request = new Request('http://localhost/', {method: 'POST', body: ''}); | |
721 assert_equals(request.context, '', | |
722 'Request.context should be empty string for synthetic Request object'); | |
hiroshige
2015/04/09 17:43:21
nit: please wrap to 80 columns, e.g.
shiva.jm
2015/04/10 09:27:10
Done.
| |
723 }, 'RequestContext of a synthetic Request object'); | |
724 | |
718 done(); | 725 done(); |
OLD | NEW |