summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/images/style-access-during-imageChanged-style-freeze.html
blob: ab0c91563e8a7aee33e58f12455bd6d4cb550cff (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
26
27
28
29
30
<style>
    #target[foo] { color: green; }
</style>
<div id="container">
    <div>
        <img src="x-invalid:" alt="Some wide text">
        <div id="target">
            This should be green, with a wide broken image above.
        </div>
    </div>
</div>
<div id="result"></div>
<script>
    onload = function() {
        if (window.testRunner)
            testRunner.dumpAsText();

        document.body.offsetTop;
        var container = document.getElementById("container");
        container.style.display = "none";
        document.body.offsetTop;
        container.style.removeProperty("display");
        document.body.offsetTop;
        var target = document.getElementById("target");
        target.setAttribute("foo", "");
        document.body.offsetTop;
        var result = document.getElementById("result");
        result.innerText = getComputedStyle(target).color === "rgb(0, 128, 0)" ? "PASS" : "FAIL";
    }
</script>