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

Unified Diff: LayoutTests/fast/forms/resources/picker-common.js

Issue 892083003: Revert Implement <select> Popup Menu using PagePopup (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 11 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/resources/picker-common.js
diff --git a/LayoutTests/fast/forms/resources/picker-common.js b/LayoutTests/fast/forms/resources/picker-common.js
index f3733a05f9dad6fde9afd7326537b759f2795959..0a20ef231c5d5a32e95adcb13a10f11f955cb73b 100644
--- a/LayoutTests/fast/forms/resources/picker-common.js
+++ b/LayoutTests/fast/forms/resources/picker-common.js
@@ -19,18 +19,14 @@ function sendKey(input, keyName, ctrlKey, altKey) {
input.dispatchEvent(event);
}
-function openPicker(element, callback) {
+function openPicker(input, callback) {
window.moveTo();
- element.offsetTop; // Force to lay out
- if (element.tagName === "SELECT") {
- sendKey(element, "Down", false, true);
- } else if (element.tagName === "INPUT") {
- if (element.type === "color") {
- element.focus();
- eventSender.keyDown(" ");
- } else {
- sendKey(element, "Down", false, true);
- }
+ input.offsetTop; // Force to lay out
+ if (input.type === "color") {
+ input.focus();
+ eventSender.keyDown(" ");
+ } else {
+ sendKey(input, "Down", false, true);
}
popupWindow = window.internals.pagePopupWindow;
if (typeof callback === "function") {
« no previous file with comments | « LayoutTests/TestExpectations ('k') | LayoutTests/fast/forms/select/menulist-popup-open-hide-using-keyboard.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698