3 <title>CSS modules: UTF-
8 decoding
</title>
4 <script src=
"/resources/testharness.js"></script>
5 <script src=
"/resources/testharnessreport.js"></script>
7 <script type=
"module" onerror=
"unreachable()">
8 import styleSheet from
"../serve-with-content-type.py?fn=css-module/resources/utf-8.css&ct=text/css%3Bcharset=utf-8" assert { type:
"css"};
10 assert_equals(styleSheet.rules[
0].style.content,
"\"śćążź\
"");
11 },
"CSS module should be loaded as utf-8 when charset=utf8 is specified");
13 <script type=
"module" onerror=
"unreachable()">
14 import styleSheet from
"../serve-with-content-type.py?fn=css-module/resources/utf-8.css&ct=text/css%3Bcharset=shift-jis" assert { type:
"css"};
16 assert_equals(styleSheet.rules[
0].style.content,
"\"śćążź\
"");
17 },
"CSS module should be loaded as utf-8 when charset=shift-jis is specified");
19 <script type=
"module" onerror=
"unreachable()">
20 import styleSheet from
"../serve-with-content-type.py?fn=css-module/resources/utf-8.css&ct=text/css%3Bcharset=windows-1252" assert { type:
"css"};
22 assert_equals(styleSheet.rules[
0].style.content,
"\"śćążź\
"");
23 },
"CSS module should be loaded as utf-8 when charset=windows-1252 is specified");
25 <script type=
"module" onerror=
"unreachable()">
26 import styleSheet from
"../serve-with-content-type.py?fn=css-module/resources/utf-8.css&ct=text/css%3Bcharset=utf-7" assert { type:
"css"};;
28 assert_equals(styleSheet.rules[
0].style.content,
"\"śćążź\
"");
29 },
"CSS module should be loaded as utf-8 when charset=utf-7 is specified");
31 <script type=
"module" onerror=
"unreachable()">
32 import styleSheet from
"../serve-with-content-type.py?fn=css-module/resources/windows-1250.css&ct=text/css%3Bcharset=windows-1250" assert { type:
"css"};
34 assert_not_equals(styleSheet.rules[
0].style.content,
"\"śćążź\
"",
35 'Should be decoded as UTF-
8');
36 },
"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");