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

Side by Side Diff: chrome/browser/ui/webui/options/autofill_options_browsertest.js

Issue 683813004: Fewer focusable items in chrome://settings/searchEngines (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add comment about weird behavior in autofill_options_browsertest.js Created 6 years, 1 month 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 | « chrome/browser/resources/options_test_resources.grd ('k') | chrome/browser_tests.isolate » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 * Returns the HTML element for the |field|. 6 * Returns the HTML element for the |field|.
7 * @param {string} field The field name for the element. 7 * @param {string} field The field name for the element.
8 * @return {HTMLElement} The HTML element. 8 * @return {HTMLElement} The HTML element.
9 */ 9 */
10 function getField(field) { 10 function getField(field) {
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 assertEquals(this.browsePreload, document.location.href); 188 assertEquals(this.browsePreload, document.location.href);
189 189
190 var phoneList = getField('phone'); 190 var phoneList = getField('phone');
191 expectEquals(0, phoneList.validationRequests_); 191 expectEquals(0, phoneList.validationRequests_);
192 phoneList.doneValidating().then(function() { 192 phoneList.doneValidating().then(function() {
193 phoneList.focus(); 193 phoneList.focus();
194 var input = phoneList.querySelector('input'); 194 var input = phoneList.querySelector('input');
195 input.focus(); 195 input.focus();
196 document.execCommand('insertText', false, '111-222-333'); 196 document.execCommand('insertText', false, '111-222-333');
197 assertEquals('111-222-333', input.value); 197 assertEquals('111-222-333', input.value);
198 input.blur(); 198 // TODO(bondd, dbeam): The way that focus/blur interact with the testing
199 // system is rather confusing. The next line was originally
200 // input.blur();
201 // but the test would time out when run as a single test locally (i.e.
202 // --gtest_filter=<test_name>), and complete successfully when other tests
203 // were run first (e.g. by the trybot, or locally with a wider
204 // gtest_filter). Changing the line to
205 // phoneList.blur();
206 // makes the result more deterministic when the test is run by itself.
207 //
208 // phoneList.blur() calls cr.ui.List.handleElementBlur_, which triggers
209 // InlineEditableItemList.handleListFocusChange_, which sends the
210 // 'commitedit' event.
211 phoneList.blur();
199 phoneList.doneValidating().then(testDone); 212 phoneList.doneValidating().then(testDone);
200 }); 213 });
201 }); 214 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/options_test_resources.grd ('k') | chrome/browser_tests.isolate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698