| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <title>Encoding API: Byte-order marks</title> | 2 <title>Encoding API: Byte-order marks</title> |
| 3 <script src="../../../resources/testharness.js"></script> | 3 <script src="/resources/testharness.js"></script> |
| 4 <script src="../../../resources/testharnessreport.js"></script> | 4 <script src="/resources/testharnessreport.js"></script> |
| 5 <script> | 5 <script> |
| 6 | 6 |
| 7 var testCases = [ | 7 var testCases = [ |
| 8 { | 8 { |
| 9 encoding: 'utf-8', | 9 encoding: 'utf-8', |
| 10 bom: [0xEF, 0xBB, 0xBF], | 10 bom: [0xEF, 0xBB, 0xBF], |
| 11 bytes: [0x7A, 0xC2, 0xA2, 0xE6, 0xB0, 0xB4, 0xF0, 0x9D, 0x84, 0x9E, 0xF4
, 0x8F, 0xBF, 0xBD] | 11 bytes: [0x7A, 0xC2, 0xA2, 0xE6, 0xB0, 0xB4, 0xF0, 0x9D, 0x84, 0x9E, 0xF4
, 0x8F, 0xBF, 0xBD] |
| 12 }, | 12 }, |
| 13 { | 13 { |
| 14 encoding: 'utf-16le', | 14 encoding: 'utf-16le', |
| (...skipping 24 matching lines...) Expand all Loading... |
| 39 return; | 39 return; |
| 40 | 40 |
| 41 assert_not_equals(decoder.decode(new Uint8Array(o.bom.concat(t.bytes
))), string, | 41 assert_not_equals(decoder.decode(new Uint8Array(o.bom.concat(t.bytes
))), string, |
| 42 'Mismatching BOM should not be ignored - treated a
s garbage bytes.'); | 42 'Mismatching BOM should not be ignored - treated a
s garbage bytes.'); |
| 43 }); | 43 }); |
| 44 | 44 |
| 45 }, 'Byte-order marks: ' + t.encoding); | 45 }, 'Byte-order marks: ' + t.encoding); |
| 46 }); | 46 }); |
| 47 | 47 |
| 48 </script> | 48 </script> |
| OLD | NEW |