summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/selectors/adjacent-selectors-with-subselector.html
blob: b69a117706648f4d91a7e3b387b65f52e032e535 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<!DOCTYPE html>
<script src="../../resources/js-test.js"></script>
<style>
.green + div.sibling + div {
  color: green;
}
</style>
<div>
  <div id="first"></div>
  <div class="sibling"></div>
  <div id="target">This text should be green.</div>
</div>
<script>
description("Test if direct adjacent selectors are counted correctly where combined with subselector.");

shouldBeEqualToString("getComputedStyle(target, null).color", "rgb(0, 0, 0)");
first.className = "green";
shouldBeEqualToString("getComputedStyle(target, null).color", "rgb(0, 128, 0)");
</script>