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

Unified Diff: chrome/browser/resources/settings/search_engines_page/search_engines_page.js

Issue 2930953002: MD Settings: Sort "other" search engines alphabetically. (Closed)
Patch Set: Add test. Created 3 years, 6 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 | chrome/test/data/webui/settings/search_engines_page_test.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/settings/search_engines_page/search_engines_page.js
diff --git a/chrome/browser/resources/settings/search_engines_page/search_engines_page.js b/chrome/browser/resources/settings/search_engines_page/search_engines_page.js
index f5cccbd4cd4792b72c19f3e452c1b546feadbd82..526b22ab887e58ab56dec4531e8177bca7b00820 100644
--- a/chrome/browser/resources/settings/search_engines_page/search_engines_page.js
+++ b/chrome/browser/resources/settings/search_engines_page/search_engines_page.js
@@ -81,7 +81,13 @@ Polymer({
*/
enginesChanged_: function(searchEnginesInfo) {
this.defaultEngines = searchEnginesInfo['defaults'];
- this.otherEngines = searchEnginesInfo['others'];
+
+ // Sort |otherEngines| in alphabetical order.
+ this.otherEngines = searchEnginesInfo['others'].sort(function(a, b) {
+ return a.name.toLocaleLowerCase().localeCompare(
+ b.name.toLocaleLowerCase());
+ });
+
this.extensions = searchEnginesInfo['extensions'];
},
« no previous file with comments | « no previous file | chrome/test/data/webui/settings/search_engines_page_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698