| OLD | NEW |
| (Empty) | |
| 1 <!DOCTYPE html> |
| 2 <script src="../../js/resources/js-test-pre.js"></script> |
| 3 <script> |
| 4 |
| 5 description("Edge cases around non-fatal errors at EOF"); |
| 6 |
| 7 shouldThrow("new TextDecoder('utf-8', {fatal: true}).decode(new Uint8Array([0xff
]))"); |
| 8 |
| 9 debug(""); |
| 10 debug("Should not throw or hang:"); |
| 11 evalAndLog("new TextDecoder('utf-8').decode(new Uint8Array([0xff]))"); |
| 12 |
| 13 debug(""); |
| 14 shouldThrow("new TextDecoder('utf-16', {fatal: true}).decode(new Uint8Array([0x0
0]))"); |
| 15 |
| 16 debug(""); |
| 17 debug("Should not throw or hang:"); |
| 18 evalAndLog("new TextDecoder('utf-16').decode(new Uint8Array([0x00]))"); |
| 19 |
| 20 debug(""); |
| 21 shouldThrow("new TextDecoder('utf-16be', {fatal: true}).decode(new Uint8Array([0
x00]))"); |
| 22 |
| 23 debug(""); |
| 24 debug("Should not throw or hang:"); |
| 25 evalAndLog("new TextDecoder('utf-16be').decode(new Uint8Array([0x00]));"); |
| 26 |
| 27 </script> |
| 28 <script src="../../js/resources/js-test-post.js"></script> |
| OLD | NEW |