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

Side by Side Diff: chrome/test/data/webui/test_api.js

Issue 11664011: Add a mechanism to ignore certain elements for accessibility audit on a per-test basis. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 12 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 | Annotate | Revision Log
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 * @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 870 matching lines...) Expand 10 before | Expand all | Expand 10 after
881 throw new Error(helper.getCallMessage(message)); 881 throw new Error(helper.getCallMessage(message));
882 } 882 }
883 883
884 /** 884 /**
885 * Run an accessibility audit on the current page state. 885 * Run an accessibility audit on the current page state.
886 * @type {Function} 886 * @type {Function}
887 * @return {boolean} Whether there were any errors or warnings 887 * @return {boolean} Whether there were any errors or warnings
888 * @private 888 * @private
889 */ 889 */
890 function runAccessibilityAudit(a11yErrors, a11yWarnings) { 890 function runAccessibilityAudit(a11yErrors, a11yWarnings) {
891 var auditResults = axs.Audit.run(); 891 var auditResults = axs.Audit.run(this.auditConfig);
892 for (var i = 0; i < auditResults.length; i++) { 892 for (var i = 0; i < auditResults.length; i++) {
893 var auditResult = auditResults[i]; 893 var auditResult = auditResults[i];
894 if (auditResult.result == axs.constants.AuditResult.FAIL) { 894 if (auditResult.result == axs.constants.AuditResult.FAIL) {
895 var auditRule = auditResult.rule; 895 var auditRule = auditResult.rule;
896 // TODO(aboxhall): more useful error messages (sadly non-trivial) 896 // TODO(aboxhall): more useful error messages (sadly non-trivial)
897 if (auditRule.severity == axs.constants.Severity.Severe) 897 if (auditRule.severity == axs.constants.Severity.Severe)
898 a11yErrors.push(accessibilityErrorMessage(auditRule, auditResult)); 898 a11yErrors.push(accessibilityErrorMessage(auditRule, auditResult));
899 else 899 else
900 a11yWarnings.push(accessibilityErrorMessage(auditRule, auditResult)); 900 a11yWarnings.push(accessibilityErrorMessage(auditRule, auditResult));
901 } 901 }
(...skipping 696 matching lines...) Expand 10 before | Expand all | Expand 10 after
1598 exports.TEST = TEST; 1598 exports.TEST = TEST;
1599 exports.TEST_F = TEST_F; 1599 exports.TEST_F = TEST_F;
1600 exports.RUNTIME_TEST_F = TEST_F; 1600 exports.RUNTIME_TEST_F = TEST_F;
1601 exports.GEN = GEN; 1601 exports.GEN = GEN;
1602 exports.GEN_INCLUDE = GEN_INCLUDE; 1602 exports.GEN_INCLUDE = GEN_INCLUDE;
1603 exports.WhenTestDone = WhenTestDone; 1603 exports.WhenTestDone = WhenTestDone;
1604 1604
1605 // Import the Mock4JS helpers. 1605 // Import the Mock4JS helpers.
1606 Mock4JS.addMockSupport(exports); 1606 Mock4JS.addMockSupport(exports);
1607 })(this); 1607 })(this);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698