Index: LayoutTests/fast/css/hover-leftmost-quirks.html |
diff --git a/LayoutTests/fast/css/hover-leftmost-quirks.html b/LayoutTests/fast/css/hover-leftmost-quirks.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..fa8dda1f78ed7ca43254eb68eb8ff08bceecb2ad |
--- /dev/null |
+++ b/LayoutTests/fast/css/hover-leftmost-quirks.html |
@@ -0,0 +1,34 @@ |
+<!-- quirks mode --> |
+<script src="../../resources/js-test.js"></script> |
+<style> |
+:hover#t1, |
+:hover.c2, |
+:hover[a3] { background-color: green } |
+</style> |
+<div id="t1">Green background when hovered</div> |
+<div id="t2" class="c2">Green background when hovered</div> |
+<div id="t3" a3>Green background when hovered</div> |
+<script> |
+description("Quirks mode - simple selectors right of :hover"); |
+ |
+function moveTo(element) { |
+ eventSender.mouseMoveTo(element.offsetLeft + 1, element.offsetTop + 1); |
+} |
+ |
+var transparent = "rgba(0, 0, 0, 0)"; |
+var green = "rgb(0, 128, 0)"; |
+ |
+shouldBeDefined("window.eventSender"); |
+ |
+shouldBe("getComputedStyle(t1).backgroundColor", "transparent"); |
+moveTo(t1); |
+shouldBe("getComputedStyle(t1).backgroundColor", "green"); |
+ |
+shouldBe("getComputedStyle(t2).backgroundColor", "transparent"); |
+moveTo(t2); |
+shouldBe("getComputedStyle(t2).backgroundColor", "green"); |
+ |
+shouldBe("getComputedStyle(t3).backgroundColor", "transparent"); |
+moveTo(t3); |
+shouldBe("getComputedStyle(t3).backgroundColor", "green"); |
+</script> |