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

Side by Side Diff: LayoutTests/fast/forms/suggestion-picker/resources/suggestion-picker-common.js

Issue 14120003: Move LayoutTests from platform/chromium/... to generic location (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 function valueForEntry(element) { 1 function valueForEntry(element) {
2 if (!element) 2 if (!element)
3 return null; 3 return null;
4 var value = element.dataset.value; 4 var value = element.dataset.value;
5 if (typeof value === "string") 5 if (typeof value === "string")
6 return value; 6 return value;
7 var action = element.dataset.action; 7 var action = element.dataset.action;
8 if (typeof action === "string") 8 if (typeof action === "string")
9 return "@" + action; 9 return "@" + action;
10 return null; 10 return null;
11 } 11 }
12 12
13 function highlightedEntry() { 13 function highlightedEntry() {
14 return valueForEntry(popupWindow.document.activeElement); 14 return valueForEntry(popupWindow.document.activeElement);
15 } 15 }
16 16
17 function entryValues() { 17 function entryValues() {
18 var elements = popupWindow.document.getElementsByClassName("suggestion-list- entry"); 18 var elements = popupWindow.document.getElementsByClassName("suggestion-list- entry");
19 var values = []; 19 var values = [];
20 for (var i = 0; i < elements.length; ++i) 20 for (var i = 0; i < elements.length; ++i)
21 values.push(valueForEntry(elements[i])); 21 values.push(valueForEntry(elements[i]));
22 return values; 22 return values;
23 } 23 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698