Skip to content

Commit

Permalink
Bug 1622804 [wpt PR 22276] - [encoding] Tests for BOM detection., a=t…
Browse files Browse the repository at this point in the history
…estonly

Automatic update from web-platform-tests
Encoding: BOM detection

For whatwg/html#5359.
--

wpt-commits: 7d9b5a5facaf0b9d986e63e0a031983899d30c79
wpt-pr: 22276
  • Loading branch information
Andreu Botella authored and moz-wptsync-bot committed Mar 21, 2020
1 parent 7f74f84 commit 9cd33f0
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
17 changes: 17 additions & 0 deletions testing/web-platform/tests/encoding/bom-handling.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!-- starts with a UTF-8 BOM -->
<!doctype html>
<meta charset="windows-1252">
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<title>BOM handling</title>
<div id=log></div>
<script>

test(
() => {
assert_equals(document.characterSet.toLowerCase(), "utf-8");
},
"document.characterSet should match the BOM"
);

</script>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Content-Type: text/html; charset=windows-1252

0 comments on commit 9cd33f0

Please sign in to comment.