summaryrefslogtreecommitdiffstats
path: root/LayoutTests/fast/encoding/css-link-charset.html
blob: 033f2cfdb35b2529fc2609475a22c75dd85dbcaa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1251">
    <link rel="stylesheet" type="text/css" href="css-link-charset.css" charset="utf-8">
</head>
<body onload="test()">
<p>Test to see if the charset property in a link works properly.</p>
<p id="result"></p>
<script>
function test() {
    if (window.layoutTestController)
        layoutTestController.dumpAsText();
    try {
        text = document.styleSheets[0].rules[0].style.cssText;
        if (text.match('.*SUÑÑÅSS.*'))
            result.innerHTML = "SUCCESS";
        else
            result.innerHTML = "FAILURE: " + text;
    } catch (ex) {
        result.innerHTML = "FAILURE: " + ex;
    }
}
</script>
</body>
</html>