Update the test result of resize-observer/eventloop.html.
[WebKit-https.git] / LayoutTests / imported / w3c / web-platform-tests / encoding / unsupported-encodings.html
1 <!DOCTYPE html>
2 <title>Encoding API: unsupported encodings</title>
3 <script src="/resources/testharness.js"></script>
4 <script src="/resources/testharnessreport.js"></script>
5 <script src="resources/decoding-helpers.js"></script>
6 <script>
7
8 // Attempting to decode '<' as UTF-7 (+AD4) ends up as '+AD4'.
9 ['UTF-7', 'utf-7'].forEach(label => {
10   decode_test(label, '+AD4', 'U+002B/U+0041/U+0044/U+0034',
11               `${label} should not be supported`);
12 });
13
14 // UTF-32 will be detected as UTF-16LE if leading BOM, or windows-1252 otherwise.
15 ['UTF-32', 'utf-32', 'UTF-32LE', 'utf-32le'].forEach(label => {
16   decode_test(label,
17               '%FF%FE%00%00%41%00%00%00%42%00%00%00',
18               'U+0000/U+0041/U+0000/U+0042/U+0000',
19               `${label} with BOM should decode as UTF-16LE`);
20
21   decode_test(label,
22               '%41%00%00%00%42%00%00%00',
23               'U+0041/U+0000/U+0000/U+0000/U+0042/U+0000/U+0000/U+0000',
24               `${label} with no BOM should decode as windows-1252`);;
25 });
26 ['UTF-32be', 'utf-32be'].forEach(label => {
27   decode_test(label,
28             '%00%00%00%41%00%00%00%42',
29             'U+0000/U+0000/U+0000/U+0041/U+0000/U+0000/U+0000/U+0042',
30             `${label} with no BOM should decode as windows-1252`);
31
32   decode_test(label,
33               '%00%00%FE%FF%00%00%00%41%00%00%00%42',
34               'U+0000/U+0000/U+00FE/U+00FF/U+0000/U+0000/U+0000/U+0041/U+0000/U+0000/U+0000/U+0042',
35               `${label} with BOM should decode as windows-1252`);
36 });
37 </script>