| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <script src="../../js/resources/js-test-pre.js"></script> | 2 <script src="../../js/resources/js-test-pre.js"></script> |
| 3 <script> | 3 <script> |
| 4 | 4 |
| 5 description("Test the Encoding API's handling of byte-order marks (BOMs)."); | 5 description("Test the Encoding API's handling of byte-order marks (BOMs)."); |
| 6 | 6 |
| 7 var utf8_bom = [0xEF, 0xBB, 0xBF]; | 7 var utf8_bom = [0xEF, 0xBB, 0xBF]; |
| 8 var utf8 = [0x7A, 0xC2, 0xA2, 0xE6, 0xB0, 0xB4, 0xF0, 0x9D, 0x84, 0x9E, 0xF4, 0x
8F, 0xBF, 0xBD]; | 8 var utf8 = [0x7A, 0xC2, 0xA2, 0xE6, 0xB0, 0xB4, 0xF0, 0x9D, 0x84, 0x9E, 0xF4, 0x
8F, 0xBF, 0xBD]; |
| 9 | 9 |
| 10 var utf16le_bom = [0xff, 0xfe]; | 10 var utf16le_bom = [0xff, 0xfe]; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 shouldNotBe("new TextDecoder('utf-8').decode(new Uint8Array(utf16le_bom.concat(u
tf8)))", JSON.stringify(string)); | 29 shouldNotBe("new TextDecoder('utf-8').decode(new Uint8Array(utf16le_bom.concat(u
tf8)))", JSON.stringify(string)); |
| 30 shouldNotBe("new TextDecoder('utf-8').decode(new Uint8Array(utf16be_bom.concat(u
tf8)))", JSON.stringify(string)); | 30 shouldNotBe("new TextDecoder('utf-8').decode(new Uint8Array(utf16be_bom.concat(u
tf8)))", JSON.stringify(string)); |
| 31 shouldNotBe("new TextDecoder('utf-16le').decode(new Uint8Array(utf8_bom.concat(u
tf16le)))", JSON.stringify(string)); | 31 shouldNotBe("new TextDecoder('utf-16le').decode(new Uint8Array(utf8_bom.concat(u
tf16le)))", JSON.stringify(string)); |
| 32 shouldNotBe("new TextDecoder('utf-16le').decode(new Uint8Array(utf16be_bom.conca
t(utf16le)))", JSON.stringify(string)); | 32 shouldNotBe("new TextDecoder('utf-16le').decode(new Uint8Array(utf16be_bom.conca
t(utf16le)))", JSON.stringify(string)); |
| 33 shouldNotBe("new TextDecoder('utf-16be').decode(new Uint8Array(utf8_bom.concat(u
tf16be)))", JSON.stringify(string)); | 33 shouldNotBe("new TextDecoder('utf-16be').decode(new Uint8Array(utf8_bom.concat(u
tf16be)))", JSON.stringify(string)); |
| 34 shouldNotBe("new TextDecoder('utf-16be').decode(new Uint8Array(utf16le_bom.conca
t(utf16be)))", JSON.stringify(string)); | 34 shouldNotBe("new TextDecoder('utf-16be').decode(new Uint8Array(utf16le_bom.conca
t(utf16be)))", JSON.stringify(string)); |
| 35 | 35 |
| 36 // FIXME: Add tests where the BOM is split across buffers. | 36 // FIXME: Add tests where the BOM is split across buffers. |
| 37 | 37 |
| 38 </script> | 38 </script> |
| 39 <script src="../../js/resources/js-test-post.js"></script> | |
| OLD | NEW |