Commit 766b8b1a authored by mpearson's avatar mpearson Committed by Commit bot

Revert of Enable a11y audit for chrome://settings (patchset #10 id:170001 of...

Revert of Enable a11y audit for chrome://settings (patchset #10 id:170001 of https://codereview.chromium.org/646853004/)

Reason for revert:
Causes (timeout) failures in OptionsWebUIExtendedTest.CloseOverlayNoHistory on Windows 7.

Trouble started with this build.
https://build.chromium.org/p/chromium.win/builders/Win7%20Tests%20%28dbg%29%281%29/builds/32871

---

OptionsWebUIExtendedTest.CloseOverlayNoHistory (run #1):
[ RUN      ] OptionsWebUIExtendedTest.CloseOverlayNoHistory

OptionsWebUIExtendedTest.CloseOverlayNoHistory (run #2):
[ RUN      ] OptionsWebUIExtendedTest.CloseOverlayNoHistory
[1616:2160:1120/144446:WARNING:data_reduction_proxy_settings.cc(319)] SPDY proxy OFF at startup
[4804:2920:1120/144449:ERROR:singleton_hwnd.cc(43)] Cannot create windows on non-UI thread!
[4224:4604:1120/144455:ERROR:singleton_hwnd.cc(43)] Cannot create windows on non-UI thread!
[1616:2160:1120/144459:INFO:CONSOLE(1283)] "Running TestCase OptionsWebUIExtendedTest.CloseOverlayNoHistory", source: test_api.js (1283)

OptionsWebUIExtendedTest.CloseOverlayNoHistory (run #3):
[ RUN      ] OptionsWebUIExtendedTest.CloseOverlayNoHistory
[3656:3020:1120/144549:WARNING:data_reduction_proxy_settings.cc(319)] SPDY proxy OFF at startup
[3552:4476:1120/144552:ERROR:singleton_hwnd.cc(43)] Cannot create windows on non-UI thread!
[3836:4860:1120/144558:ERROR:singleton_hwnd.cc(43)] Cannot create windows on non-UI thread!
[3656:3020:1120/144602:INFO:CONSOLE(1283)] "Running TestCase OptionsWebUIExtendedTest.CloseOverlayNoHistory", source: test_api.js (1283)

OptionsWebUIExtendedTest.CloseOverlayNoHistory (run #4):
[ RUN      ] OptionsWebUIExtendedTest.CloseOverlayNoHistory
[3408:4740:1120/144634:WARNING:data_reduction_proxy_settings.cc(319)] SPDY proxy OFF at startup
[3136:3924:1120/144637:ERROR:singleton_hwnd.cc(43)] Cannot create windows on non-UI thread!
[4424:4988:1120/144643:ERROR:singleton_hwnd.cc(43)] Cannot create windows on non-UI thread!
[3408:4740:1120/144647:INFO:CONSOLE(1283)] "Running TestCase OptionsWebUIExtendedTest.CloseOverlayNoHistory", source: test_api.js (1283)

Original issue's description:
> Enable a11y audit for chrome://settings
>
> Enabled the tests and fixed failure. Failure was due to transition obscuring elements in the UI.
>
> Another failure was caused because there were no labels on the mic and camera drop downs.
>
> Another failure was that there was no captions for a video element. This is used to capture a profile picture in chrome OS, so there wouldn't be any captions. This element is ignored in the a11y audit.
>
> There was also an issue with the dispatching of events in the ensureTransitionEndEvent function that wouldn't allow the event to bubble.
>
> BUG=311866
>
> Committed: https://crrev.com/34a84c6d1269332cc3ae2b8a50af489230c885de
> Cr-Commit-Position: refs/heads/master@{#301266}
>
> Committed: https://crrev.com/ca8b4ecfeee16828955ffe5637749272a5989106
> Cr-Commit-Position: refs/heads/master@{#305078}

TBR=dbeam@chromium.org,hcarmona@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=311866

Review URL: https://codereview.chromium.org/745953002

Cr-Commit-Position: refs/heads/master@{#305112}
parent 548aa6b4
...@@ -441,16 +441,12 @@ ...@@ -441,16 +441,12 @@
</div> </div>
<div> <div>
<div class="media-device-control"> <div class="media-device-control">
<span id="media-select-mic-label" i18n-content="mediaSelectMicLabel"> <span i18n-content="mediaSelectMicLabel"></span>
</span> <select id="media-select-mic" class="weakrtl"></select>
<select id="media-select-mic" class="weakrtl"
aria-labelledby="media-select-mic-label"></select>
</div> </div>
<div class="media-device-control"> <div class="media-device-control">
<span id="media-select-camera-label" <span i18n-content="mediaSelectCameraLabel"></span>
i18n-content="mediaSelectCameraLabel"></span> <select id="media-select-camera" class="weakrtl"></select>
<select id="media-select-camera" class="weakrtl"
aria-labelledby="media-select-camera-label"></select>
</div> </div>
<div class="radio controlled-setting-with-label"> <div class="radio controlled-setting-with-label">
<label> <label>
......
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
GEN_INCLUDE(['options_browsertest_base.js']);
/** /**
* Returns the HTML element for the |field|. * Returns the HTML element for the |field|.
* @param {string} field The field name for the element. * @param {string} field The field name for the element.
...@@ -32,11 +30,10 @@ function getListSize(list) { ...@@ -32,11 +30,10 @@ function getListSize(list) {
function AutofillOptionsWebUITest() {} function AutofillOptionsWebUITest() {}
AutofillOptionsWebUITest.prototype = { AutofillOptionsWebUITest.prototype = {
__proto__: OptionsBrowsertestBase.prototype, __proto__: testing.Test.prototype,
/** /**
* Browse to autofill options. * Browse to autofill options.
* @override
*/ */
browsePreload: 'chrome://settings-frame/autofill', browsePreload: 'chrome://settings-frame/autofill',
}; };
...@@ -54,7 +51,7 @@ TEST_F('AutofillOptionsWebUITest', 'testOpenAutofillOptions', function() { ...@@ -54,7 +51,7 @@ TEST_F('AutofillOptionsWebUITest', 'testOpenAutofillOptions', function() {
function AutofillEditAddressWebUITest() {} function AutofillEditAddressWebUITest() {}
AutofillEditAddressWebUITest.prototype = { AutofillEditAddressWebUITest.prototype = {
__proto__: OptionsBrowsertestBase.prototype, __proto__: testing.Test.prototype,
/** @override */ /** @override */
browsePreload: 'chrome://settings-frame/autofillEditAddress', browsePreload: 'chrome://settings-frame/autofillEditAddress',
...@@ -73,10 +70,6 @@ TEST_F('AutofillEditAddressWebUITest', 'testInitialFormLayout', function() { ...@@ -73,10 +70,6 @@ TEST_F('AutofillEditAddressWebUITest', 'testInitialFormLayout', function() {
}); });
TEST_F('AutofillEditAddressWebUITest', 'testLoadAddress', function() { TEST_F('AutofillEditAddressWebUITest', 'testLoadAddress', function() {
// Disable a11y audit on Chrome OS and Mac OSX crbug.com/434502
if (cr.isChromeOS || cr.isMac)
this.disableAccessibilityChecks();
assertEquals(this.browsePreload, document.location.href); assertEquals(this.browsePreload, document.location.href);
var testAddress = { var testAddress = {
......
...@@ -2,12 +2,10 @@ ...@@ -2,12 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
GEN_INCLUDE(['chrome/browser/ui/webui/options/options_browsertest_base.js']);
function AccountsOptionsWebUITest() {} function AccountsOptionsWebUITest() {}
AccountsOptionsWebUITest.prototype = { AccountsOptionsWebUITest.prototype = {
__proto__: OptionsBrowsertestBase.prototype, __proto__: testing.Test.prototype,
/** /**
* Browse to accounts options. * Browse to accounts options.
......
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
GEN_INCLUDE(['chrome/browser/ui/webui/options/options_browsertest_base.js']);
GEN('#if defined(OS_CHROMEOS)'); GEN('#if defined(OS_CHROMEOS)');
/** /**
...@@ -14,7 +12,7 @@ GEN('#if defined(OS_CHROMEOS)'); ...@@ -14,7 +12,7 @@ GEN('#if defined(OS_CHROMEOS)');
function DateTimeOptionsWebUITest() {} function DateTimeOptionsWebUITest() {}
DateTimeOptionsWebUITest.prototype = { DateTimeOptionsWebUITest.prototype = {
__proto__: OptionsBrowsertestBase.prototype, __proto__: testing.Test.prototype,
/** /**
* Browse to date/time options. * Browse to date/time options.
......
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
GEN_INCLUDE(['options_browsertest_base.js']);
/** /**
* TestFixture for content options WebUI testing. * TestFixture for content options WebUI testing.
* @extends {testing.Test} * @extends {testing.Test}
...@@ -12,11 +10,10 @@ GEN_INCLUDE(['options_browsertest_base.js']); ...@@ -12,11 +10,10 @@ GEN_INCLUDE(['options_browsertest_base.js']);
function ContentOptionsWebUITest() {} function ContentOptionsWebUITest() {}
ContentOptionsWebUITest.prototype = { ContentOptionsWebUITest.prototype = {
__proto__: OptionsBrowsertestBase.prototype, __proto__: testing.Test.prototype,
/** /**
* Browse to content options. * Browse to content options.
* @override
*/ */
browsePreload: 'chrome://settings-frame/content', browsePreload: 'chrome://settings-frame/content',
}; };
......
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
GEN_INCLUDE(['options_browsertest_base.js']);
/** /**
* TestFixture for language options WebUI testing. * TestFixture for language options WebUI testing.
* @extends {testing.Test} * @extends {testing.Test}
...@@ -12,7 +10,7 @@ GEN_INCLUDE(['options_browsertest_base.js']); ...@@ -12,7 +10,7 @@ GEN_INCLUDE(['options_browsertest_base.js']);
function LanguageOptionsWebUITest() {} function LanguageOptionsWebUITest() {}
LanguageOptionsWebUITest.prototype = { LanguageOptionsWebUITest.prototype = {
__proto__: OptionsBrowsertestBase.prototype, __proto__: testing.Test.prototype,
/** @override */ /** @override */
browsePreload: 'chrome://settings-frame/languages', browsePreload: 'chrome://settings-frame/languages',
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
GEN_INCLUDE(['options_browsertest_base.js']);
GEN('#include "chrome/browser/ui/webui/options/options_browsertest.h"'); GEN('#include "chrome/browser/ui/webui/options/options_browsertest.h"');
/** @const */ var SUPERVISED_USERS_PREF = 'profile.managed_users'; /** @const */ var SUPERVISED_USERS_PREF = 'profile.managed_users';
...@@ -44,15 +43,24 @@ function waitForPopstate(afterFunction) { ...@@ -44,15 +43,24 @@ function waitForPopstate(afterFunction) {
function OptionsWebUITest() {} function OptionsWebUITest() {}
OptionsWebUITest.prototype = { OptionsWebUITest.prototype = {
__proto__: OptionsBrowsertestBase.prototype, __proto__: testing.Test.prototype,
/** @override */
accessibilityIssuesAreErrors: true,
/** @override */
setUp: function() {
// user-image-stream is a streaming video element used for capturing a
// user image during OOBE.
this.accessibilityAuditConfig.ignoreSelectors('videoWithoutCaptions',
'.user-image-stream');
},
/** /**
* Browse to the options page & call our preLoad(). * Browse to the options page & call our preLoad().
* @override
*/ */
browsePreload: 'chrome://settings-frame', browsePreload: 'chrome://settings-frame',
/** @override */
isAsync: true, isAsync: true,
/** /**
...@@ -81,27 +89,6 @@ OptionsWebUITest.prototype = { ...@@ -81,27 +89,6 @@ OptionsWebUITest.prototype = {
}, },
}; };
/**
* Wait for overlay-container-1 and overlay-container-2 to be hidden.
*/
function waitForOverlaysToHide() {
var overlay1 = $('overlay-container-1');
var overlay2 = $('overlay-container-2');
document.addEventListener('webkitTransitionEnd', function f(e) {
if ((e.target.id == overlay1.id || e.target.id == overlay2.id) &&
overlay1.hidden && overlay2.hidden) {
document.removeEventListener(f, 'webkitTransitionEnd');
testDone();
}
});
if (!overlay1.hidden)
ensureTransitionEndEvent(overlay1, 500);
if (!overlay2.hidden)
ensureTransitionEndEvent(overlay2, 500);
}
// Crashes on Mac only. See http://crbug.com/79181 // Crashes on Mac only. See http://crbug.com/79181
GEN('#if defined(OS_MACOSX)'); GEN('#if defined(OS_MACOSX)');
GEN('#define MAYBE_testSetBooleanPrefTriggers ' + GEN('#define MAYBE_testSetBooleanPrefTriggers ' +
...@@ -376,7 +363,10 @@ GEN('#endif'); // defined(OS_CHROMEOS) ...@@ -376,7 +363,10 @@ GEN('#endif'); // defined(OS_CHROMEOS)
function OptionsWebUIExtendedTest() {} function OptionsWebUIExtendedTest() {}
OptionsWebUIExtendedTest.prototype = { OptionsWebUIExtendedTest.prototype = {
__proto__: OptionsWebUITest.prototype, __proto__: testing.Test.prototype,
/** @override */
browsePreload: 'chrome://settings-frame',
/** @override */ /** @override */
typedefCppFixture: 'OptionsBrowserTest', typedefCppFixture: 'OptionsBrowserTest',
...@@ -386,6 +376,17 @@ OptionsWebUIExtendedTest.prototype = { ...@@ -386,6 +376,17 @@ OptionsWebUIExtendedTest.prototype = {
GEN(' ClearPref("' + SUPERVISED_USERS_PREF + '");'); GEN(' ClearPref("' + SUPERVISED_USERS_PREF + '");');
}, },
/** @override */
isAsync: true,
/** @override */
setUp: function() {
// user-image-stream is a streaming video element used for capturing a
// user image during OOBE.
this.accessibilityAuditConfig.ignoreSelectors('videoWithoutCaptions',
'.user-image-stream');
},
/** /**
* Asserts that two non-nested arrays are equal. The arrays must contain only * Asserts that two non-nested arrays are equal. The arrays must contain only
* plain data types, no nested arrays or other objects. * plain data types, no nested arrays or other objects.
...@@ -675,7 +676,7 @@ TEST_F('OptionsWebUIExtendedTest', 'CloseOverlay', function() { ...@@ -675,7 +676,7 @@ TEST_F('OptionsWebUIExtendedTest', 'CloseOverlay', function() {
self.verifyOpenPages_(['settings'], ''); self.verifyOpenPages_(['settings'], '');
self.verifyHistory_( self.verifyHistory_(
['', 'languages', 'addLanguage', 'languages', ''], ['', 'languages', 'addLanguage', 'languages', ''],
waitForOverlaysToHide); testDone);
}); });
}); });
}); });
...@@ -707,7 +708,7 @@ TEST_F('OptionsWebUIExtendedTest', 'CloseOverlayWithHashes', function() { ...@@ -707,7 +708,7 @@ TEST_F('OptionsWebUIExtendedTest', 'CloseOverlayWithHashes', function() {
this.verifyHistory_( this.verifyHistory_(
['', 'search#1', 'languages#2', 'addLanguage#3', 'languages#2', ['', 'search#1', 'languages#2', 'addLanguage#3', 'languages#2',
'search#1'], 'search#1'],
waitForOverlaysToHide); testDone);
}.bind(this)); }.bind(this));
}.bind(this)); }.bind(this));
}); });
...@@ -723,7 +724,7 @@ TEST_F('OptionsWebUIExtendedTest', 'CloseOverlayNoHistory', function() { ...@@ -723,7 +724,7 @@ TEST_F('OptionsWebUIExtendedTest', 'CloseOverlayNoHistory', function() {
// Close the overlay. // Close the overlay.
PageManager.closeOverlay(); PageManager.closeOverlay();
// Still no history changes. // Still no history changes.
this.verifyHistory_([''], waitForOverlaysToHide); this.verifyHistory_([''], testDone);
}.bind(this)); }.bind(this));
}); });
......
// Copyright (c) 2014 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.
/**
* @constructor
* @extends {testing.Test}
*/
function OptionsBrowsertestBase() {}
OptionsBrowsertestBase.prototype = {
__proto__: testing.Test.prototype,
/** @override */
runAccessibilityChecks: true,
/** @override */
accessibilityIssuesAreErrors: true,
/** @override */
setUp: function() {
// user-image-stream is a streaming video element used for capturing a
// user image during OOBE.
this.accessibilityAuditConfig.ignoreSelectors('videoWithoutCaptions',
'.user-image-stream');
},
};
...@@ -717,7 +717,6 @@ ...@@ -717,7 +717,6 @@
'browser/ui/webui/options/manage_profile_browsertest.js', 'browser/ui/webui/options/manage_profile_browsertest.js',
'browser/ui/webui/options/options_browsertest.cc', 'browser/ui/webui/options/options_browsertest.cc',
'browser/ui/webui/options/options_browsertest.js', 'browser/ui/webui/options/options_browsertest.js',
'browser/ui/webui/options/options_browsertest_base.js',
'browser/ui/webui/options/options_ui_browsertest.cc', 'browser/ui/webui/options/options_ui_browsertest.cc',
'browser/ui/webui/options/options_ui_browsertest.h', 'browser/ui/webui/options/options_ui_browsertest.h',
'browser/ui/webui/options/password_manager_browsertest.js', 'browser/ui/webui/options/password_manager_browsertest.js',
......
...@@ -383,7 +383,7 @@ function ensureTransitionEndEvent(el, timeOut) { ...@@ -383,7 +383,7 @@ function ensureTransitionEndEvent(el, timeOut) {
}); });
window.setTimeout(function() { window.setTimeout(function() {
if (!fired) if (!fired)
cr.dispatchSimpleEvent(el, 'webkitTransitionEnd', true); cr.dispatchSimpleEvent(el, 'webkitTransitionEnd');
}, timeOut); }, timeOut);
} }
......
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