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

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

Issue 541533002: Remove more label for= use. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix tests Created 6 years, 3 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 | « chrome/browser/resources/options/sync_section.html ('k') | no next file » | 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 * TestFixture for testing the formatting of settings pages. 6 * TestFixture for testing the formatting of settings pages.
7 * @extends {testing.Test} 7 * @extends {testing.Test}
8 * @constructor 8 * @constructor
9 */ 9 */
10 function SettingsFormatWebUITest() {} 10 function SettingsFormatWebUITest() {}
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 var element = elements[i]; 125 var element = elements[i];
126 if (!findAncestorByClass(element, element.type)) 126 if (!findAncestorByClass(element, element.type))
127 this.fail('MISSING_CHECK_WRAPPER', element, element.type); 127 this.fail('MISSING_CHECK_WRAPPER', element, element.type);
128 } 128 }
129 }); 129 });
130 130
131 /** 131 /**
132 * Each checkbox requires an id or pref property. 132 * Each checkbox requires an id or pref property.
133 */ 133 */
134 TEST_F('SettingsFormatWebUITest', 'CheckboxIdOrPrefCheck', function() { 134 TEST_F('SettingsFormatWebUITest', 'CheckboxIdOrPrefCheck', function() {
135 var query = 'input[type=checkbox]:not([pref]):not([id])'; 135 var query =
136 'input[type=checkbox]:not([pref]):not([id]):not(.spacer-checkbox)';
136 var elements = document.querySelectorAll(query); 137 var elements = document.querySelectorAll(query);
137 for (var i = 0; i < elements.length; i++) { 138 for (var i = 0; i < elements.length; i++) {
138 var element = elements[i]; 139 var element = elements[i];
139 if (!this.isExempt(element, SettingsFormatWebUITest.Filters['pref'])) 140 if (!this.isExempt(element, SettingsFormatWebUITest.Filters['pref']))
140 this.fail('MISSING_ID_OR_PREF', element); 141 this.fail('MISSING_ID_OR_PREF', element);
141 } 142 }
142 }); 143 });
143 144
144 /** 145 /**
145 * Each radio button requires name and value properties. 146 * Each radio button requires name and value properties.
146 */ 147 */
147 TEST_F('SettingsFormatWebUITest', 'RadioButtonNameValueCheck', function() { 148 TEST_F('SettingsFormatWebUITest', 'RadioButtonNameValueCheck', function() {
148 var elements = document.querySelectorAll('input[type=radio]'); 149 var elements = document.querySelectorAll('input[type=radio]');
149 for (var i = 0; i < elements.length; i++) { 150 for (var i = 0; i < elements.length; i++) {
150 var element = elements[i]; 151 var element = elements[i];
151 if (!element.name) 152 if (!element.name)
152 this.fail('MISSING_RADIO_BUTTON_NAME', element); 153 this.fail('MISSING_RADIO_BUTTON_NAME', element);
153 154
154 if (!element.getAttribute('value')) 155 if (!element.getAttribute('value'))
155 this.fail('MISSING_RADIO_BUTTON_VALUE', element); 156 this.fail('MISSING_RADIO_BUTTON_VALUE', element);
156 } 157 }
157 }); 158 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/options/sync_section.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698