Index: third_party/WebKit/LayoutTests/fast/css/pseudo-hover-active-display-none.html |
diff --git a/third_party/WebKit/LayoutTests/fast/css/pseudo-hover-active-display-none.html b/third_party/WebKit/LayoutTests/fast/css/pseudo-hover-active-display-none.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..09c7d24a93bff5be8f83edd0715077cfcd130bab |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/fast/css/pseudo-hover-active-display-none.html |
@@ -0,0 +1,33 @@ |
+<!DOCTYPE html> |
+<input type="submit" id="sub1"/> |
+<input type="submit" id="sub2"/> |
+<style> |
+#sub1:active { |
+ display: none; |
+} |
+#sub2:hover { |
+ display: none; |
+} |
+</style> |
+<script> |
+if (window.eventSender) { |
+ // Tests if the display style is applied and restored properly when display:none is set on active state |
+ var b1 = document.getElementById("sub1"); |
+ var startX = b1.offsetLeft + b1.offsetWidth/2; |
+ var startY = b1.offsetTop + b1.offsetHeight/2; |
+ var endX = startX + b1.offsetWidth; |
+ var endY = startY + b1.offsetHeight; |
+ eventSender.dragMode = true; |
+ eventSender.mouseMoveTo(startX, startY); |
+ eventSender.mouseDown(); |
+ eventSender.mouseMoveTo(endX, endY); |
+ eventSender.mouseUp(); |
+ |
+ // Tests if the display style is applied and restored properly when display:none is set on hover state |
+ var b2 = document.getElementById("sub2"); |
+ var x = b2.offsetLeft + b2.offsetWidth/2; |
+ var y = b2.offsetTop + b2.offsetHeight/2; |
+ eventSender.mouseMoveTo(x, y); |
+ eventSender.mouseMoveTo(x + b2.offsetWidth, y + b2.offsetHeight); |
+} |
+</script> |