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

Side by Side Diff: chrome/test/data/webui/net_internals/net_internals_test.js

Issue 21944004: Enable the accessibility audit for chrome://net-internals (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 4 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
« no previous file with comments | « chrome/browser/resources/net_internals/top_bar_view.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 * @fileoverview The way these tests work is as follows: 6 * @fileoverview The way these tests work is as follows:
7 * C++ in net_internals_ui_browsertest.cc does any necessary setup, and then 7 * C++ in net_internals_ui_browsertest.cc does any necessary setup, and then
8 * calls the entry point for a test with RunJavascriptTest. The called 8 * calls the entry point for a test with RunJavascriptTest. The called
9 * function can then use the assert/expect functions defined in test_api.js. 9 * function can then use the assert/expect functions defined in test_api.js.
10 * All callbacks from the browser are wrapped in such a way that they can 10 * All callbacks from the browser are wrapped in such a way that they can
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 */ 49 */
50 typedefCppFixture: 'NetInternalsTest', 50 typedefCppFixture: 'NetInternalsTest',
51 51
52 /** @inheritDoc */ 52 /** @inheritDoc */
53 browsePreload: 'chrome://net-internals/', 53 browsePreload: 'chrome://net-internals/',
54 54
55 /** @inheritDoc */ 55 /** @inheritDoc */
56 isAsync: true, 56 isAsync: true,
57 57
58 setUp: function() { 58 setUp: function() {
59 // Enforce accessibility auditing, but suppress some false positives.
60 this.accessibilityIssuesAreErrors = true;
61 // False positive because a unicode character is used to draw a square.
62 // If it was actual text it'd be too low-contrast, but a square is fine.
63 this.accessibilityAuditConfig().ignoreSelectors(
64 'lowContrastElements', '#timeline-view-selection-ul label');
65 // Suppress this error; the black-on-gray button is readable.
66 this.accessibilityAuditConfig().ignoreSelectors(
67 'lowContrastElements', '#export-view-save-log-file');
68 // False positive because the background color highlights and then
69 // fades out with a transition when there's an error.
70 this.accessibilityAuditConfig().ignoreSelectors(
71 'lowContrastElements', '#hsts-view-query-output span');
72 // False positives for unknown reason.
73 this.accessibilityAuditConfig().ignoreSelectors(
74 'focusableElementNotVisibleAndNotAriaHidden',
75 '#hsts-view-tab-content *');
76
59 // Wrap g_browser.receive around a test function so that assert and expect 77 // Wrap g_browser.receive around a test function so that assert and expect
60 // functions can be called from observers. 78 // functions can be called from observers.
61 g_browser.receive = 79 g_browser.receive =
62 this.continueTest(WhenTestDone.EXPECT, 80 this.continueTest(WhenTestDone.EXPECT,
63 BrowserBridge.prototype.receive.bind(g_browser)); 81 BrowserBridge.prototype.receive.bind(g_browser));
64 82
65 g_browser.setPollInterval(TESTING_POLL_INTERVAL_MS); 83 g_browser.setPollInterval(TESTING_POLL_INTERVAL_MS);
66 84
67 var runTest = this.deferRunTest(WhenTestDone.EXPECT); 85 var runTest = this.deferRunTest(WhenTestDone.EXPECT);
68 86
(...skipping 635 matching lines...) Expand 10 before | Expand all | Expand 10 after
704 ]; 722 ];
705 723
706 for (var i = 0; i < allIds.length; ++i) { 724 for (var i = 0; i < allIds.length; ++i) {
707 var curId = allIds[i]; 725 var curId = allIds[i];
708 expectEquals(nodeId == curId, NetInternalsTest.nodeIsVisible($(curId))); 726 expectEquals(nodeId == curId, NetInternalsTest.nodeIsVisible($(curId)));
709 } 727 }
710 }; 728 };
711 729
712 return NetInternalsTest; 730 return NetInternalsTest;
713 })(); 731 })();
OLDNEW
« no previous file with comments | « chrome/browser/resources/net_internals/top_bar_view.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698