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

Side by Side Diff: LayoutTests/platform/chromium/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
(Empty)
1 function valueForEntry(element) {
2 if (!element)
3 return null;
4 var value = element.dataset.value;
5 if (typeof value === "string")
6 return value;
7 var action = element.dataset.action;
8 if (typeof action === "string")
9 return "@" + action;
10 return null;
11 }
12
13 function highlightedEntry() {
14 return valueForEntry(popupWindow.document.activeElement);
15 }
16
17 function entryValues() {
18 var elements = popupWindow.document.getElementsByClassName("suggestion-list- entry");
19 var values = [];
20 for (var i = 0; i < elements.length; ++i)
21 values.push(valueForEntry(elements[i]));
22 return values;
23 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698