| Index: LayoutTests/fast/dynamic/hover-sibling-reattach.html
|
| diff --git a/LayoutTests/fast/dynamic/hover-sibling-reattach.html b/LayoutTests/fast/dynamic/hover-sibling-reattach.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..5b15f9a98f1beca48aa0b05a146ad301d3e59257
|
| --- /dev/null
|
| +++ b/LayoutTests/fast/dynamic/hover-sibling-reattach.html
|
| @@ -0,0 +1,53 @@
|
| +<!DOCTYPE html>
|
| +<script src="../../resources/js-test.js"></script>
|
| +<style>
|
| +#outer {
|
| + position: absolute;
|
| + left: 0;
|
| + top: 0
|
| +}
|
| +
|
| +#outer div {
|
| + width: 100px;
|
| + height: 100px
|
| +}
|
| +
|
| +#hover:hover + #test {
|
| + background-color: black
|
| +}
|
| +</style>
|
| +<div id="outer">
|
| + <div id="hover"></div>
|
| + <div id="test"></div>
|
| +</div>
|
| +<script>
|
| +description("Check that childrenAffectedByHover is intact after a re-attach.");
|
| +
|
| +function mouseOver(x, y) {
|
| + if (window.eventSender)
|
| + eventSender.mouseMoveTo(x, y);
|
| + document.body.offsetTop; // force style recalc
|
| +}
|
| +
|
| +var black = "rgb(0, 0, 0)";
|
| +var transparent = "rgba(0, 0, 0, 0)";
|
| +
|
| +var test = document.getElementById('test');
|
| +
|
| +shouldBe("getComputedStyle(test, '').backgroundColor", "transparent");
|
| +
|
| +// Hover #hover
|
| +mouseOver(50, 50);
|
| +shouldBe("getComputedStyle(test, '').backgroundColor", "black");
|
| +
|
| +// Hover body
|
| +mouseOver(0, 200);
|
| +shouldBe("getComputedStyle(test, '').backgroundColor", "transparent");
|
| +
|
| +// Force re-attach
|
| +document.getElementById("hover").style.display = "inline-block";
|
| +
|
| +// Hover #hover
|
| +mouseOver(50, 50);
|
| +shouldBe("getComputedStyle(test, '').backgroundColor", "black");
|
| +</script>
|
|
|