tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

charset-2.html (1050B)


      1 <!DOCTYPE html>
      2 <meta charset="windows-1250">
      3 <title>CSS modules: UTF-8 decoding</title>
      4 <script src="/resources/testharness.js"></script>
      5 <script src="/resources/testharnessreport.js"></script>
      6 <div id=log></div>
      7 <script type="module">
      8  import styleSheet from "../serve-with-content-type.py?fn=css-module/resources/utf-8.css" with { type: "css"};
      9  test(() => {
     10    assert_equals(styleSheet.rules[0].style.content, "\"�湿�\"");
     11  }, "CSS module should be loaded as utf-8 even though document's encoding is windows-1250");
     12 </script>
     13 <script type="module">
     14  import styleSheet from "../serve-with-content-type.py?fn=css-module/resources/windows-1250.css&ct=text/css%3Bcharset=windows-1250" with { type: "css"};
     15  test(() => {
     16    assert_not_equals(styleSheet.rules[0].style.content, "\"�湿�\"",
     17                    'Should be decoded as UTF-8');
     18  }, "CSS module should be loaded as utf-8 even if it is encoded in windows-1250 and served with a windows-1250 charset response header, and this document's encoding is windows-1250");
     19 </script>