summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/css/children-affected-by-style-sharing.html
blob: 9c38ecaa07952d47ef65889b5216c749cf6d580d (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
<!DOCTYPE html>
<script src="../../resources/js-test.js"></script>
<style>
    :focus { outline: none }
    li:focus span { background: green }
    li { list-style-type: none }
    li span { color: green }
</style>
<p>You should see a green rectangle below.</p>
<li>
    <div></div>
</li>
<li>
    <div>
        <span></span>
    </div>
</li>
<li tabIndex="1">
    <div>
        <span id="span">FAIL</span>
    </div>
</li>
<script>
    description("childrenOrSiblingsAffectedBy* disables style sharing");

    document.body.offsetTop;
    document.querySelectorAll("li")[2].focus();
    shouldBeEqualToString("getComputedStyle(span).backgroundColor", "rgb(0, 128, 0)");
</script>