OLD | NEW |
(Empty) | |
| 1 <!doctype html> |
| 2 <script src="/js-test-resources/js-test.js"></script> |
| 3 <script> |
| 4 window.jsTestIsAsync = true; |
| 5 description('XMLHttpRequest.setRequestHeader() with control octets ' + |
| 6 'rejected by RFC 7230 should show a deprecation message.'); |
| 7 // https://crbug.com/455099 |
| 8 |
| 9 var xhr = new XMLHttpRequest; |
| 10 xhr.open("GET", "../resources/print-headers.cgi"); |
| 11 |
| 12 // '\x01' is invalid in RFC 7230 and thus deprecation warning should be shown. |
| 13 xhr.setRequestHeader('test1', 'a\x01b'); |
| 14 |
| 15 xhr.onload = function() { |
| 16 // This expectation must be updated once we update header value checks. |
| 17 shouldNotBe('xhr.responseText.match(/HTTP_TEST1: a\\x01b\\r?\\n/)', |
| 18 'null'); |
| 19 finishJSTest(); |
| 20 }; |
| 21 xhr.onerror = function() { |
| 22 testFailed(); |
| 23 finishJSTest(); |
| 24 }; |
| 25 xhr.send(); |
| 26 </script> |
OLD | NEW |