Chromium Code Reviews| 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> |