OLD | NEW |
(Empty) | |
| 1 <!doctype html> |
| 2 <html> |
| 3 <head> |
| 4 <meta charset="utf-8"> |
| 5 <title>Response: error static method</title> |
| 6 <meta name="help" href="https://fetch.spec.whatwg.org/#response"> |
| 7 <meta name="help" href="https://fetch.spec.whatwg.org/#concept-network-error
"> |
| 8 <meta name="author" title="Canon Research France" href="https://www.crf.cano
n.fr"> |
| 9 <script src="/resources/testharness.js"></script> |
| 10 <script src="/resources/testharnessreport.js"></script> |
| 11 </head> |
| 12 <body> |
| 13 <script> |
| 14 test(function() { |
| 15 var responseError = Response.error(); |
| 16 assert_equals(responseError.type, "error", "Network error response's typ
e is error"); |
| 17 assert_equals(responseError.status, 0, "Network error response's status
is 0"); |
| 18 assert_equals(responseError.statusText, "", "Network error response's st
atusText is empty"); |
| 19 assert_equals(responseError.body, null, "Network error response's body i
s null"); |
| 20 |
| 21 assert_true(responseError.headers.entries().next().done, "Headers should
be empty"); |
| 22 }, "Check response returned by static method error()"); |
| 23 </script> |
| 24 </body> |
| 25 </html> |
OLD | NEW |