OLD | NEW |
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 21 matching lines...) Expand all Loading... |
32 MISSING_RADIO_BUTTON_NAME: 'Radio button $1 is missing the name property', | 32 MISSING_RADIO_BUTTON_NAME: 'Radio button $1 is missing the name property', |
33 MISSING_RADIO_BUTTON_VALUE: 'Radio button $1 is missing the value property', | 33 MISSING_RADIO_BUTTON_VALUE: 'Radio button $1 is missing the value property', |
34 }; | 34 }; |
35 | 35 |
36 SettingsFormatWebUITest.prototype = { | 36 SettingsFormatWebUITest.prototype = { |
37 __proto__: testing.Test.prototype, | 37 __proto__: testing.Test.prototype, |
38 | 38 |
39 /** | 39 /** |
40 * Navigate to browser settings. | 40 * Navigate to browser settings. |
41 */ | 41 */ |
42 browsePreload: 'chrome://settings-frame/settings', | 42 browsePreload: 'chrome://settings-frame/', |
43 | 43 |
44 /** | 44 /** |
45 * List of errors generated during a test. Used instead of expect* functions | 45 * List of errors generated during a test. Used instead of expect* functions |
46 * to suppress verbosity. The implementation of errorsToMessage in the | 46 * to suppress verbosity. The implementation of errorsToMessage in the |
47 * testing API generates a call stack for each error produced which greatly | 47 * testing API generates a call stack for each error produced which greatly |
48 * reduces readability. | 48 * reduces readability. |
49 * @type {Array.<string>} | 49 * @type {Array.<string>} |
50 */ | 50 */ |
51 errors: null, | 51 errors: null, |
52 | 52 |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 var elements = document.querySelectorAll('input[type=radio]'); | 148 var elements = document.querySelectorAll('input[type=radio]'); |
149 for (var i = 0; i < elements.length; i++) { | 149 for (var i = 0; i < elements.length; i++) { |
150 var element = elements[i]; | 150 var element = elements[i]; |
151 if (!element.name) | 151 if (!element.name) |
152 this.fail('MISSING_RADIO_BUTTON_NAME', element); | 152 this.fail('MISSING_RADIO_BUTTON_NAME', element); |
153 | 153 |
154 if (!element.getAttribute('value')) | 154 if (!element.getAttribute('value')) |
155 this.fail('MISSING_RADIO_BUTTON_VALUE', element); | 155 this.fail('MISSING_RADIO_BUTTON_VALUE', element); |
156 } | 156 } |
157 }); | 157 }); |
OLD | NEW |