mitz@apple.com | 9e8a865 | 2007-11-07 18:52:09 +0000 | [diff] [blame] | 1 | <style> |
| 2 | .bar { width: 100px; height: 100px; background-color: red; } |
| 3 | .foo:hover .bar { background-color: green; } |
| 4 | </style> |
| 5 | <div class="foo" id="target"> |
| 6 | <div class="bar"></div> |
| 7 | </div> |
mitz@apple.com | d71bc71 | 2011-04-25 22:57:35 +0000 | [diff] [blame] | 8 | <div id="result">This test runs in DumpRenderTree</div> |
mitz@apple.com | 9e8a865 | 2007-11-07 18:52:09 +0000 | [diff] [blame] | 9 | <script> |
| 10 | document.body.offsetLeft; |
| 11 | document.getElementById("target").style.left = "0"; |
| 12 | if (window.eventSender) { |
| 13 | eventSender.mouseMoveTo(200, 50); |
| 14 | eventSender.mouseMoveTo(210, 50); |
rniwa@webkit.org | 38608af | 2012-06-19 07:23:13 +0000 | [diff] [blame] | 15 | testRunner.dumpAsText(); |
mitz@apple.com | d71bc71 | 2011-04-25 22:57:35 +0000 | [diff] [blame] | 16 | document.getElementById("result").innerText = getComputedStyle(document.getElementById("target").firstElementChild).backgroundColor === "rgb(0, 128, 0)" ? "PASS" : "FAIL"; |
mitz@apple.com | 9e8a865 | 2007-11-07 18:52:09 +0000 | [diff] [blame] | 17 | } |
| 18 | </script> |