| 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("Non-UTF encodings supported only for decode, not encode"); | 6 description("Non-UTF encodings supported only for decode, not encode"); |
| 7 | 7 |
| 8 encodings_table.forEach(function(section) { | 8 encodings_table.forEach(function(section) { |
| 9 section.encodings.forEach(function(encoding) { | 9 section.encodings.forEach(function(encoding) { |
| 10 if (encoding.name === "replacement") | 10 if (encoding.name === "replacement") |
| 11 return; | 11 return; |
| 12 if (utf_encodings.indexOf(encoding.name) !== -1) { | 12 if (utf_encodings.indexOf(encoding.name) !== -1) { |
| 13 shouldBeEqualToString("new TextDecoder(" + JSON.stringify(encoding.n
ame) + ").encoding", encoding.name); | 13 shouldBeEqualToString("new TextDecoder(" + JSON.stringify(encoding.n
ame) + ").encoding", encoding.name); |
| 14 shouldBeEqualToString("new TextEncoder(" + JSON.stringify(encoding.n
ame) + ").encoding", encoding.name); | 14 shouldBeEqualToString("new TextEncoder(" + JSON.stringify(encoding.n
ame) + ").encoding", encoding.name); |
| 15 } else { | 15 } else { |
| 16 shouldBeEqualToString("new TextDecoder(" + JSON.stringify(encoding.n
ame) + ").encoding", encoding.name); | 16 shouldBeEqualToString("new TextDecoder(" + JSON.stringify(encoding.n
ame) + ").encoding", encoding.name); |
| 17 shouldThrow("new TextEncoder(" + JSON.stringify(encoding.name) + ").
encoding"); | 17 shouldThrow("new TextEncoder(" + JSON.stringify(encoding.name) + ").
encoding"); |
| 18 } | 18 } |
| 19 }); | 19 }); |
| 20 }); | 20 }); |
| 21 | 21 |
| 22 </script> | 22 </script> |
| 23 <script src="../../js/resources/js-test-post.js"></script> | |
| OLD | NEW |