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

Side by Side Diff: chrome/test/data/webui/cr_elements_browsertest.js

Issue 2025583002: MD WebUI: Improve tab focus behavior for toolbar search field (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Tweak comment Created 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | ui/webui/resources/cr_elements/cr_search_field/cr_search_field.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @fileoverview Suite of tests for shared cr elements. Currently: 6 * @fileoverview Suite of tests for shared cr elements. Currently:
7 * <cr-toolbar-search-field>. 7 * <cr-toolbar-search-field>.
8 */ 8 */
9 9
10 /** @const {string} Path to source root. */ 10 /** @const {string} Path to source root. */
(...skipping 18 matching lines...) Expand all
29 TEST_F('CrElementsBrowserTest', 'CrToolbarSearchFieldTest', function() { 29 TEST_F('CrElementsBrowserTest', 'CrToolbarSearchFieldTest', function() {
30 suite('cr-toolbar-search-field', function() { 30 suite('cr-toolbar-search-field', function() {
31 /** @type {?CrToolbarSearchFieldElement} */ 31 /** @type {?CrToolbarSearchFieldElement} */
32 var field; 32 var field;
33 /** @type {?MockSearchFieldDelegate} */ 33 /** @type {?MockSearchFieldDelegate} */
34 var delegate; 34 var delegate;
35 35
36 /** @param {string} term */ 36 /** @param {string} term */
37 function simulateSearch(term) { 37 function simulateSearch(term) {
38 field.$.searchInput.bindValue = term; 38 field.$.searchInput.bindValue = term;
39 field.onSearchTermSearch_(); 39 field.onSearchTermSearch();
40 } 40 }
41 41
42 /** 42 /**
43 * @constructor 43 * @constructor
44 * @implements {SearchFieldDelegate} 44 * @implements {SearchFieldDelegate}
45 */ 45 */
46 function MockSearchFieldDelegate() { 46 function MockSearchFieldDelegate() {
47 /** @type {!Array<string>} */ 47 /** @type {!Array<string>} */
48 this.searches = []; 48 this.searches = [];
49 } 49 }
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 MockInteractions.tap(field); 110 MockInteractions.tap(field);
111 simulateSearch('test'); 111 simulateSearch('test');
112 MockInteractions.blur(field.$.searchInput); 112 MockInteractions.blur(field.$.searchInput);
113 113
114 assertTrue(field.showingSearch); 114 assertTrue(field.showingSearch);
115 }); 115 });
116 }); 116 });
117 117
118 mocha.run(); 118 mocha.run();
119 }); 119 });
OLDNEW
« no previous file with comments | « no previous file | ui/webui/resources/cr_elements/cr_search_field/cr_search_field.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698