| 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 * @fileoverview Library providing basic test framework functionality. | 6 * @fileoverview Library providing basic test framework functionality. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 /** | 9 /** |
| 10 * Namespace for |Test|. | 10 * Namespace for |Test|. |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 | 135 |
| 136 /** | 136 /** |
| 137 * Returns the configuration for the accessibility audit, creating it | 137 * Returns the configuration for the accessibility audit, creating it |
| 138 * on-demand. | 138 * on-demand. |
| 139 * @return {axs.AuditConfiguration} | 139 * @return {axs.AuditConfiguration} |
| 140 */ | 140 */ |
| 141 accessibilityAuditConfig: function() { | 141 accessibilityAuditConfig: function() { |
| 142 if (!this.accessibilityAuditConfig_) { | 142 if (!this.accessibilityAuditConfig_) { |
| 143 this.accessibilityAuditConfig_ = new axs.AuditConfiguration(); | 143 this.accessibilityAuditConfig_ = new axs.AuditConfiguration(); |
| 144 | 144 |
| 145 // The "elements with meaningful background image" accessibility | 145 this.accessibilityAuditConfig_.auditRulesToIgnore = [ |
| 146 // audit (AX_IMAGE_01) does not apply, since Chrome doesn't | 146 // The "elements with meaningful background image" accessibility |
| 147 // disable background images in high-contrast mode like some | 147 // audit (AX_IMAGE_01) does not apply, since Chrome doesn't |
| 148 // browsers do. | 148 // disable background images in high-contrast mode like some |
| 149 this.accessibilityAuditConfig_.ignoreSelectors( | 149 // browsers do. |
| 150 "elementsWithMeaningfulBackgroundImage", "*"); | 150 "elementsWithMeaningfulBackgroundImage", |
| 151 |
| 152 // Most WebUI pages are inside an IFrame, so the "web page should |
| 153 // have a title that describes topic or purpose" test (AX_TITLE_01) |
| 154 // generally does not apply. |
| 155 "pageWithoutTitle" |
| 156 ]; |
| 151 } | 157 } |
| 152 return this.accessibilityAuditConfig_; | 158 return this.accessibilityAuditConfig_; |
| 153 }, | 159 }, |
| 154 | 160 |
| 155 /** | 161 /** |
| 156 * Whether to treat accessibility issues (errors or warnings) as test | 162 * Whether to treat accessibility issues (errors or warnings) as test |
| 157 * failures. If true, any accessibility issues will cause the test to fail. | 163 * failures. If true, any accessibility issues will cause the test to fail. |
| 158 * If false, accessibility issues will cause a console.warn. | 164 * If false, accessibility issues will cause a console.warn. |
| 159 * Off by default to begin with; as we add the ability to suppress false | 165 * Off by default to begin with; as we add the ability to suppress false |
| 160 * positives, we will transition this to true. | 166 * positives, we will transition this to true. |
| (...skipping 1549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1710 exports.TEST = TEST; | 1716 exports.TEST = TEST; |
| 1711 exports.TEST_F = TEST_F; | 1717 exports.TEST_F = TEST_F; |
| 1712 exports.RUNTIME_TEST_F = TEST_F; | 1718 exports.RUNTIME_TEST_F = TEST_F; |
| 1713 exports.GEN = GEN; | 1719 exports.GEN = GEN; |
| 1714 exports.GEN_INCLUDE = GEN_INCLUDE; | 1720 exports.GEN_INCLUDE = GEN_INCLUDE; |
| 1715 exports.WhenTestDone = WhenTestDone; | 1721 exports.WhenTestDone = WhenTestDone; |
| 1716 | 1722 |
| 1717 // Import the Mock4JS helpers. | 1723 // Import the Mock4JS helpers. |
| 1718 Mock4JS.addMockSupport(exports); | 1724 Mock4JS.addMockSupport(exports); |
| 1719 })(this); | 1725 })(this); |
| OLD | NEW |