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

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

Issue 1447693002: [a11y] Bring accessibility-audit up to date: v2.10.0 release. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix the rest of the ChromeOS tests. File crbugs and update existing ones. Created 5 years 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
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 GEN_INCLUDE(['options_browsertest_base.js']); 5 GEN_INCLUDE(['options_browsertest_base.js']);
6 6
7 /** 7 /**
8 * Returns the HTML element for the |field|. 8 * Returns the HTML element for the |field|.
9 * @param {string} field The field name for the element. 9 * @param {string} field The field name for the element.
10 * @return {HTMLElement} The HTML element. 10 * @return {HTMLElement} The HTML element.
(...skipping 21 matching lines...) Expand all
32 function AutofillOptionsWebUITest() {} 32 function AutofillOptionsWebUITest() {}
33 33
34 AutofillOptionsWebUITest.prototype = { 34 AutofillOptionsWebUITest.prototype = {
35 __proto__: OptionsBrowsertestBase.prototype, 35 __proto__: OptionsBrowsertestBase.prototype,
36 36
37 /** 37 /**
38 * Browse to autofill options. 38 * Browse to autofill options.
39 * @override 39 * @override
40 */ 40 */
41 browsePreload: 'chrome://settings-frame/autofill', 41 browsePreload: 'chrome://settings-frame/autofill',
42
43 /** @override */
44 setUp: function() {
45 OptionsBrowsertestBase.prototype.setUp.call(this);
46 },
Dan Beam 2015/11/24 23:24:26 this is the same as... this not existing at all
apacible 2015/11/25 19:13:53 Removed here and below.
42 }; 47 };
43 48
44 // Test opening the autofill options has correct location. 49 // Test opening the autofill options has correct location.
45 TEST_F('AutofillOptionsWebUITest', 'testOpenAutofillOptions', function() { 50 TEST_F('AutofillOptionsWebUITest', 'testOpenAutofillOptions', function() {
46 assertEquals(this.browsePreload, document.location.href); 51 assertEquals(this.browsePreload, document.location.href);
47 }); 52 });
48 53
49 /** 54 /**
50 * TestFixture for autofill edit address overlay WebUI testing. 55 * TestFixture for autofill edit address overlay WebUI testing.
51 * @extends {testing.Test} 56 * @extends {testing.Test}
52 * @constructor 57 * @constructor
53 */ 58 */
54 function AutofillEditAddressWebUITest() {} 59 function AutofillEditAddressWebUITest() {}
55 60
56 AutofillEditAddressWebUITest.prototype = { 61 AutofillEditAddressWebUITest.prototype = {
57 __proto__: OptionsBrowsertestBase.prototype, 62 __proto__: OptionsBrowsertestBase.prototype,
58 63
59 /** @override */ 64 /** @override */
60 browsePreload: 'chrome://settings-frame/autofillEditAddress', 65 browsePreload: 'chrome://settings-frame/autofillEditAddress',
66
67 /** @override */
68 setUp: function() {
69 OptionsBrowsertestBase.prototype.setUp.call(this);
70 },
61 }; 71 };
62 72
63 TEST_F('AutofillEditAddressWebUITest', 'testInitialFormLayout', function() { 73 TEST_F('AutofillEditAddressWebUITest', 'testInitialFormLayout', function() {
64 assertEquals(this.browsePreload, document.location.href); 74 assertEquals(this.browsePreload, document.location.href);
65 75
66 var fields = ['country', 'phone', 'email', 'fullName', 'city']; 76 var fields = ['country', 'phone', 'email', 'fullName', 'city'];
67 for (field in fields) { 77 for (field in fields) {
68 assertEquals('', getField(fields[field]).value, 'Field: ' + fields[field]); 78 assertEquals('', getField(fields[field]).value, 'Field: ' + fields[field]);
69 } 79 }
70 80
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 components: [[{field: 'state'}]] 167 components: [[{field: 'state'}]]
158 }); 168 });
159 assertEquals(null, getField('city')); 169 assertEquals(null, getField('city'));
160 170
161 AutofillEditAddressOverlay.loadAddressComponents({ 171 AutofillEditAddressOverlay.loadAddressComponents({
162 languageCode: 'en', 172 languageCode: 'en',
163 components: [[{field: 'city'}]] 173 components: [[{field: 'city'}]]
164 }); 174 });
165 assertEquals('New York', getField('city').value); 175 assertEquals('New York', getField('city').value);
166 }); 176 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698