Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(74)

Unified Diff: LayoutTests/fast/forms/hover-on-moving-mouse-checkbox-to-parent-label.html

Issue 1064543002: Set hovered state of current Hovered node even if it is also common ancestor of oldHovered node and (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: LayoutTests/fast/forms/hover-on-moving-mouse-checkbox-to-parent-label.html
diff --git a/LayoutTests/fast/forms/hover-on-moving-mouse-checkbox-to-parent-label.html b/LayoutTests/fast/forms/hover-on-moving-mouse-checkbox-to-parent-label.html
new file mode 100644
index 0000000000000000000000000000000000000000..d13752c4f8c901ccf7e22ad543976d2e4ddffe31
--- /dev/null
+++ b/LayoutTests/fast/forms/hover-on-moving-mouse-checkbox-to-parent-label.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
tkent 2015/04/07 03:41:44 Please move this test to LayoutTests/fast/forms/la
+<html>
+<head>
+<script src="../../resources/js-test.js"></script>
+<script>
+function startTest() {
+ var label = document.getElementById("label");
+ var checkbox = document.getElementById("checkbox");
+
+ // Move mouse to checkbox.
+ if (window.eventSender)
+ eventSender.mouseMoveTo(23, 70 );
tkent 2015/04/07 03:41:44 Inconsistent indentation. This file uses 4-space
+ var resStr = window.getComputedStyle(checkbox, ':after').getPropertyValue('content');
tkent 2015/04/07 03:41:44 Please don't use :after for INPUT elements. It sh
+
+ // Move mouse to text after checkbox.
+ if (window.eventSender)
+ eventSender.mouseMoveTo(60, 75);
tkent 2015/04/07 03:41:44 Inconsistent indentation.
+ var resStrMoved = window.getComputedStyle(checkbox, ':after').getPropertyValue('content');
+
+ shouldBeEqualToString(resStr, "Hovering");
+ shouldBeEqualToString(resStrMoved, "Hovering");
+}
+
+</script>
+<style>
+div {
+ position:relative;
+ top:10px;
+ left:10px;
+}
+input[type=checkbox]:hover:after {
+ content: 'Hovering';
tkent 2015/04/07 03:41:45 Inconsistent indentation.
+ top: 2em;
+ position:relative;
+ background-color:red;
+}
+</style>
+<body onload="startTest()">
+<div>
+<label id="label"><input id="checkbox" type="checkbox"/> Test</label>
+</div>
+</body>
+</head>
+</html>

Powered by Google App Engine
This is Rietveld 408576698