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 src="resources/shared.js"></script> | 3 <script src="resources/shared.js"></script> |
4 <script> | 4 <script> |
5 | 5 |
6 description("Sanity check the Encoding API's handling of UTF encodings."); | 6 description("Sanity check the Encoding API's handling of UTF encodings."); |
7 | 7 |
8 BATCH_SIZE = 0x1000; // Convert in batches spanning this made code points. | 8 BATCH_SIZE = 0x1000; // Convert in batches spanning this made code points. |
9 SKIP_SIZE = 0x77; // For efficiency, don't test every code point. | 9 SKIP_SIZE = 0x77; // For efficiency, don't test every code point. |
10 quiet = true; // Don't log every matching range. | 10 quiet = true; // Don't log every matching range. |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 str = makeBatch(i); | 87 str = makeBatch(i); |
88 encoded = encode_utf8(str); | 88 encoded = encode_utf8(str); |
89 expected = decode_utf8(encoded); | 89 expected = decode_utf8(encoded); |
90 actual = new TextDecoder('UTF-8').decode(new Uint8Array(encoded)); | 90 actual = new TextDecoder('UTF-8').decode(new Uint8Array(encoded)); |
91 shouldBe("actual", "expected", quiet); | 91 shouldBe("actual", "expected", quiet); |
92 } | 92 } |
93 debug("no output means all ranges matched"); | 93 debug("no output means all ranges matched"); |
94 debug(""); | 94 debug(""); |
95 | 95 |
96 </script> | 96 </script> |
97 <script src="../../js/resources/js-test-post.js"></script> | |
OLD | NEW |