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

Unified Diff: LayoutTests/fast/forms/calendar-picker/date-picker-open-without-focus.html

Issue 1311013012: date/time inputs should not handle keyboard events if they aren't focused. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: update *-open-picker-with-f4-key.html Created 5 years, 3 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/calendar-picker/date-picker-open-without-focus.html
diff --git a/LayoutTests/fast/forms/calendar-picker/date-picker-open-without-focus.html b/LayoutTests/fast/forms/calendar-picker/date-picker-open-without-focus.html
new file mode 100644
index 0000000000000000000000000000000000000000..34de8b4167bcf822ab5491fae820ff961b556442
--- /dev/null
+++ b/LayoutTests/fast/forms/calendar-picker/date-picker-open-without-focus.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html>
+<body>
+<script src="../../../resources/js-test.js"></script>
+<script src="../resources/picker-common.js"></script>
+<div id="parent"><input type="date" id="input"></div>
+<script>
+description('Calender picker should not open when the owner element has no focus.');
+var input = document.getElementById('input');
+input.focus();
+input.remove();
+input.offsetTop;
+sendKey(input, "Down", false, true);
+if (window.internals.pagePopupWindow) {
+ testFailed('Popup was opened.');
+ finishJSTest();
+} else {
+ testPassed('Popup did not open.');
+ finishJSTest();
+}
+</script>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698