48 lines
1.3 KiB
HTML
48 lines
1.3 KiB
HTML
<meta charset="gb2312">
|
|
<body onload="testStylesheets()">
|
|
<script>
|
|
if (window.testRunner)
|
|
testRunner.dumpAsText();
|
|
</script>
|
|
|
|
<!--
|
|
This test uses the word "SUCCESS" spelled with Cyrillic letters "CCE",
|
|
making decoding problems visible.
|
|
-->
|
|
|
|
<ol>
|
|
<li>Script with charset:
|
|
<span id="testdiv1"></span>.
|
|
<li>Link rel=stylesheet with charset:
|
|
<span id="testdiv2"></span>
|
|
<li>Script without charset:
|
|
<span id="testdiv3"></span>
|
|
<li>Link rel=stylesheet without charset:
|
|
<span id="testdiv4"></span>
|
|
</ol>
|
|
|
|
<script type='text/javascript' src='this-does-not-need-to-exist.js'></script>
|
|
|
|
<script type='text/javascript' src='resources/preloaded-utf-8.js' charset='utf-8'></script>
|
|
|
|
<link rel='stylesheet' href='resources/preloaded-utf-8.css' charset='utf-8'>
|
|
|
|
<script charset="utf-8"></script>
|
|
|
|
<script type='text/javascript' src='resources/preloaded-gb2312.js'></script>
|
|
|
|
<link rel='stylesheet' charset='utf-8'>
|
|
|
|
<link rel='stylesheet' href='resources/preloaded-gb2312.css'>
|
|
|
|
<script>
|
|
function testStylesheets()
|
|
{
|
|
document.getElementById('testdiv2').innerText =
|
|
(/SU§³§³§¦SS/.test(document.styleSheets[0].cssRules[0].cssText)) ? "SUCCESS" : "FAILURE";
|
|
|
|
document.getElementById('testdiv4').innerText =
|
|
(/SU§³§³§¦SS/.test(document.styleSheets[1].cssRules[0].cssText)) ? "SUCCESS" : "FAILURE";
|
|
}
|
|
</script>
|