Index: LayoutTests/fast/forms/date-multiple-fields/date-clearbutton-preventdefault-mousecapture-status.html |
diff --git a/LayoutTests/fast/forms/date-multiple-fields/date-clearbutton-preventdefault-mousecapture-status.html b/LayoutTests/fast/forms/date-multiple-fields/date-clearbutton-preventdefault-mousecapture-status.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..5c6b07b3bb56c9d3a2452521a0bb40a4628bdc48 |
--- /dev/null |
+++ b/LayoutTests/fast/forms/date-multiple-fields/date-clearbutton-preventdefault-mousecapture-status.html |
@@ -0,0 +1,39 @@ |
+<!DOCTYPE> |
+<html> |
+<head> |
+<script src="../resources/common.js"></script> |
+<script src="../../../resources/js-test.js"></script> |
+</head> |
+<body> |
+ |
+<input id="input" type="date" style="font-family:ahem; font-size:16px;"> |
+<button id="js-btn-test" type="button"></button> |
+ |
+<script> |
+description('Tests, after clicking mouse on clearInputButton of date input type, will release mouse capture in case of preventdefault.'); |
+ |
+var input = document.getElementById('input'); |
+input.value = '2345-07-19'; |
+ |
+var btn = document.getElementById('js-btn-test'); |
+var output = ''; |
+ |
+btn.addEventListener('click', function () |
+{ |
+ output = 'Clicked'; |
+}); |
+ |
+document.addEventListener('mouseup', function (evt) |
+{ |
+ evt.preventDefault(); |
+}); |
+ |
+var clearButton = getElementByPseudoId(internals.oldestShadowRoot(input),'-webkit-clear-button'); |
+clickElement(clearButton); |
+shouldBeEqualToString('input.value', ''); |
+ |
+clickElement(btn); |
+shouldBeEqualToString('output', 'Clicked'); |
+</script> |
+</body> |
+</html> |