1
0
Fork 0
firefox/testing/web-platform/tests/html/syntax/parsing-html-fragments/the-input-byte-stream-003.html
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

33 lines
2.6 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html lang="en" >
<head>
<title>UTF-16LE BOM</title>
<link rel='author' title='Richard Ishida' href='mailto:ishida@w3.org'>
<link rel='help' href='https://html.spec.whatwg.org/multipage/#the-input-byte-stream'>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<meta name='flags' content='http'>
<style type='text/css'>
.test div { width: 50px; }
</style>
<link rel="stylesheet" type="text/css" href="support/encodingtests-15.css">
</head>
<body>
<div class='test'><div id='box' class='ÜÀÚ'>&#xA0;</div></div>
<!-- Notes:
No encoding information is declared in the HTTP header or inside the document, other than in the BOM. The text of a class name in the test contains the following sequence of bytes: 0xC3 0x00 0x53 0x01 0xC3 0x00 0xAC 0x20 0xC3 0x00 0x61 0x01. The external, UTF-8-encoded stylesheet contains a selector with a sequence of characters that will only match the class name in the HTML if the page is read as UTF-16LE.
-->
<script>
test(function () {
assert_equals(document.getElementById('box').offsetWidth, 100);
}, 'A page with no encoding declarations, but with a UTF-16 little-endian BOM will be recognized as UTF-16.');
</script>
<div id="log"></div>
</body>
</html>