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

Unified Diff: LayoutTests/fast/forms/select/menulist-popup-open-hide-using-keyboard.html

Issue 368023003: Popup open and hide using Alt+KeyDown (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: "Build fix" Created 6 years, 5 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
« no previous file with comments | « no previous file | LayoutTests/fast/forms/select/menulist-popup-open-hide-using-keyboard-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/forms/select/menulist-popup-open-hide-using-keyboard.html
diff --git a/LayoutTests/fast/forms/select/menulist-popup-open-hide-using-keyboard.html b/LayoutTests/fast/forms/select/menulist-popup-open-hide-using-keyboard.html
new file mode 100644
index 0000000000000000000000000000000000000000..9f2ebd16e6e1fdc367b383a97a0c07fcc9b004e7
--- /dev/null
+++ b/LayoutTests/fast/forms/select/menulist-popup-open-hide-using-keyboard.html
@@ -0,0 +1,66 @@
+<html>
+<head>
+<script src="../../../resources/js-test.js"></script>
+</head>
+<body>
+<select id="select">
+<option value="one">One</option>
+<option value="two">Two</option>
+</select>
+<script>
+function test()
+{
+ description('Test for opening select popup and closing.');
+
+ popup = document.getElementById('select');
+
+ debug('These tests run specfically for Linux and Windows');
+
+ debug('Test opening and closing of popup using alt and down arrow key');
+ popup.focus();
+ eventSender.keyDown('downArrow', ['altKey']);
+ shouldBeTrue('internals.isSelectPopupVisible(popup)');
+ eventSender.keyDown('downArrow', ['altKey']);
+ shouldBeFalse('internals.isSelectPopupVisible(popup)');
+
+ debug('Test opening and closing of popup using alt and up arrow key');
+ popup.focus();
+ eventSender.keyDown('upArrow', ['altKey']);
+ shouldBeTrue('internals.isSelectPopupVisible(popup)');
+ eventSender.keyDown('upArrow', ['altKey']);
+ shouldBeFalse('internals.isSelectPopupVisible(popup)');
+ popup.blur();
+
+ debug('Test opening of popup using F4');
+ popup.focus();
+ eventSender.keyDown('F4');
+ shouldBeTrue('internals.isSelectPopupVisible(popup)');
+ popup.blur();
+
+ debug('Test opening of popup using enter key');
+ popup.focus();
+ eventSender.keyDown('\r', []);
+ shouldBeTrue('internals.isSelectPopupVisible(popup)');
+ popup.blur();
+
+ debug('Works for all platforms');
+
+ debug('Test opening of popup using space key');
+ popup.focus();
+ eventSender.keyDown(' ');
+ shouldBeTrue('internals.isSelectPopupVisible(popup)');
+ popup.blur();
+
+ debug('Works for only mac');
+
+ debug('Test opening of popup using up key');
+ popup.focus();
+ eventSender.keyDown('upArrow');
+ shouldBeTrue('internals.isSelectPopupVisible(popup)');
+ popup.blur();
+
+}
+test();
+</script>
+</body>
+</html>
« no previous file with comments | « no previous file | LayoutTests/fast/forms/select/menulist-popup-open-hide-using-keyboard-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698