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

Unified Diff: ui/webui/resources/cr_elements/cr_search_field/cr_search_field_behavior.js

Issue 2017523002: MD WebUI: Add tests for cr-toolbar-search-field (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review comments Created 4 years, 7 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 | « chrome/test/data/webui/cr_elements_browsertest.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/webui/resources/cr_elements/cr_search_field/cr_search_field_behavior.js
diff --git a/ui/webui/resources/cr_elements/cr_search_field/cr_search_field_behavior.js b/ui/webui/resources/cr_elements/cr_search_field/cr_search_field_behavior.js
index 7e3b8bf8f74478645a69f5905f40214dcc6460c6..b56c32974c1928bd89ac5110101c4336e434023f 100644
--- a/ui/webui/resources/cr_elements/cr_search_field/cr_search_field_behavior.js
+++ b/ui/webui/resources/cr_elements/cr_search_field/cr_search_field_behavior.js
@@ -63,25 +63,14 @@ var CrSearchFieldBehavior = {
this.delegate_ = delegate;
},
- /** @return {!Promise<boolean>} */
showAndFocus: function() {
this.showingSearch = true;
- return this.focus_();
+ this.focus_();
},
- /**
- * @return {!Promise<boolean>}
- * @private
- */
+ /** @private */
focus_: function() {
- return new Promise(function(resolve) {
- this.async(function() {
- if (this.showingSearch) {
- this.$.searchInput.focus();
- }
- resolve(this.showingSearch);
- });
- }.bind(this));
+ this.$.searchInput.focus();
},
/** @private */
« no previous file with comments | « chrome/test/data/webui/cr_elements_browsertest.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698