Commit bb756d1e authored by Findit's avatar Findit

Revert "DevTools: aXe core linting for main Elements tools"

This reverts commit cb019fe8.

Reason for revert:

Findit (https://goo.gl/kROfz5) identified CL at revision 652424 as the
culprit for flakes in the build cycles as shown on:
https://analysis.chromium.org/p/chromium/flake-portal/analysis/culprit?key=ag9zfmZpbmRpdC1mb3ItbWVyQwsSDEZsYWtlQ3VscHJpdCIxY2hyb21pdW0vY2IwMTlmZTgxYmFmNjM5MmQzZGY4ZjY0M2U1N2VmZmIzODNiNjFjOQw

Sample Failed Build: https://ci.chromium.org/buildbot/chromium.memory/WebKit%20Linux%20Trusty%20MSAN/14010

Sample Failed Step: webkit_layout_tests

Sample Flaky Test: http/tests/devtools/a11y-axe-core/elements/main-tool-test.js

Original change's description:
> DevTools: aXe core linting for main Elements tools
> 
> This change adds aXe Core linting to the following components of
> the main Elements tool:
> 
>  - DOM tree
>  - Breadcrumbs
>  - Styles pane
>  - Computed Styles pane
> 
> Change-Id: I247d9a4d4883db936f09c4d252a0558e63295edf
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1566689
> Commit-Queue: Robert Paveza <Rob.Paveza@microsoft.com>
> Reviewed-by: Joel Einbinder <einbinder@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#652424}

Change-Id: Ie703a128289530af6313a7c61f09216fd4e6bb7f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1574280
Cr-Commit-Position: refs/heads/master@{#652530}
parent 324657c3
......@@ -525,15 +525,6 @@ ElementsTestRunner.showEventListenersWidget = function() {
return UI.viewManager.showView('elements.eventListeners');
};
/**
* @return {Promise}
*/
ElementsTestRunner.showComputedStyles = function() {
UI.panels.elements.sidebarPaneView.tabbedPane().selectTab('Computed', true);
return ElementsTestRunner.computedStyleWidget().doUpdate();
};
ElementsTestRunner.expandAndDumpSelectedElementEventListeners = function(callback, force) {
ElementsTestRunner.expandAndDumpEventListeners(
ElementsTestRunner.eventListenersWidget()._eventListenersView, callback, force);
......
Running: testElementsDomTree
Tests accessibility in the DOM tree using the axe-core linter
aXe violations: []
Running: testElementsDomBreadcrumbs
Tests accessibility in the DOM breadcrumbs using the axe-core linter
aXe violations: []
Running: testElementsStylesPane
Tests accessibility of the Styles pane using the axe-core linter
aXe violations: []
Running: testElementsComputedStylesPane
Tests accessibility in the Computed Styles pane using the axe-core linter
aXe violations: []
// Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
(async function () {
// axe-core issue #1444 -- role="tree" requires children with role="treeitem",
// but it is reasonable to have trees with no leaves.
const NO_REQUIRED_CHILDREN_RULESET = {
'aria-required-children': {
enabled: false,
},
};
const DEFAULT_RULESET = { };
await TestRunner.loadModule('axe_core_test_runner');
await TestRunner.loadModule('elements_test_runner');
const tests = [
testElementsDomTree,
testElementsDomBreadcrumbs,
testElementsStylesPane,
testElementsComputedStylesPane,
];
async function testElementsDomTree(next) {
TestRunner.addResult('Tests accessibility in the DOM tree using the axe-core linter');
const view = 'elements';
await UI.viewManager.showView(view);
const widget = await UI.viewManager.view(view).widget();
const element = widget.element.querySelector('#elements-content');
await AxeCoreTestRunner.runValidation(element, NO_REQUIRED_CHILDREN_RULESET);
next();
}
async function testElementsDomBreadcrumbs(next) {
TestRunner.addResult('Tests accessibility in the DOM breadcrumbs using the axe-core linter');
const view = 'elements';
await UI.viewManager.showView(view);
const widget = await UI.viewManager.view(view).widget();
const element = widget.element.querySelector('#elements-crumbs');
await AxeCoreTestRunner.runValidation(element, DEFAULT_RULESET);
next();
}
async function testElementsStylesPane(next) {
TestRunner.addResult('Tests accessibility of the Styles pane using the axe-core linter');
await UI.viewManager.showView('elements');
const panel = self.runtime.sharedInstance(Elements.ElementsPanel);
const element = panel._stylesWidget.element;
await AxeCoreTestRunner.runValidation(element, NO_REQUIRED_CHILDREN_RULESET);
next();
}
async function testElementsComputedStylesPane(next) {
TestRunner.addResult('Tests accessibility in the Computed Styles pane using the axe-core linter');
await UI.viewManager.showView('elements');
await ElementsTestRunner.showComputedStyles();
const panel = self.runtime.sharedInstance(Elements.ElementsPanel);
const element = panel._computedStyleWidget.element;
await AxeCoreTestRunner.runValidation(element, DEFAULT_RULESET);
next();
}
TestRunner.runTestSuite(tests);
})();
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment