summaryrefslogtreecommitdiffstats
path: root/LayoutTests/fast/encoding/css-cached-bom.html
blob: a6e75eb5c92e6833fdef54e32df5b16e8be7027d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<script>
if (window.layoutTestController) {
    layoutTestController.dumpAsText();
    layoutTestController.waitUntilDone();
}
function frameLoaded() {
    if (document.getElementById('f').contentDocument.styleSheets[0].cssRules[0].selectorText == "#success::before")
        document.getElementById('result').innerHTML = "SUCCESS";
    if (window.layoutTestController)
        layoutTestController.notifyDone();
}
</script>
<link rel=stylesheet href=resources/utf-16-little-endian.css>
<!-- This halts the parsing until stylesheet has been loaded -->
<script src=does_not_exists.js></script>
<div>Test that stylesheet with BOM is correctly parsed when loaded from cache. You should see word SUCCESS below.</div>
<!-- Load the stylesheet to a different frame. This will use a cached copy of the stylesheet. -->
<iframe id=f src=resources/css-cached-bom-frame.html></iframe>
<div id=result>FAIL</div>