OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <meta charset="utf-8"> | 2 <meta charset="utf-8"> |
3 <title>respond-with-response-body-with-invalid-chunk</title> | 3 <title>respond-with-response-body-with-invalid-chunk</title> |
4 <body></body> | 4 <body></body> |
5 <script> | 5 <script> |
| 6 'use strict'; |
| 7 |
6 fetch('body-stream-with-invalid-chunk').then(resp => { | 8 fetch('body-stream-with-invalid-chunk').then(resp => { |
7 const reader = resp.body.getReader(); | 9 const reader = resp.body.getReader(); |
8 return reader.read().then( | 10 return reader.read().then( |
9 () => parent.done('FAIL: read() should be rejected'), | 11 () => parent.done('FAIL: read() should be rejected'), |
10 () => parent.done('PASS')); | 12 () => parent.done('PASS')); |
11 }).catch(e => parent.done('FAIL: ' + e)); | 13 }).catch(e => parent.done('FAIL: ' + e)); |
12 </script> | 14 </script> |
OLD | NEW |