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

Unified Diff: chrome/browser/ui/webui/options/options_browsertest.js

Issue 745953002: Revert of Enable a11y audit for chrome://settings (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git/+/master
Patch Set: Created 6 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/webui/options/options_browsertest.js
diff --git a/chrome/browser/ui/webui/options/options_browsertest.js b/chrome/browser/ui/webui/options/options_browsertest.js
index 015f2749202a97224487ad94f9f2f93f8c17e597..a8c6b5898cef1ac1a894fc1a54c5504ba063df71 100644
--- a/chrome/browser/ui/webui/options/options_browsertest.js
+++ b/chrome/browser/ui/webui/options/options_browsertest.js
@@ -2,7 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-GEN_INCLUDE(['options_browsertest_base.js']);
GEN('#include "chrome/browser/ui/webui/options/options_browsertest.h"');
/** @const */ var SUPERVISED_USERS_PREF = 'profile.managed_users';
@@ -44,15 +43,24 @@
function OptionsWebUITest() {}
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().
- * @override
*/
browsePreload: 'chrome://settings-frame',
- /** @override */
isAsync: true,
/**
@@ -80,27 +88,6 @@
this.mockHandler.stubs().coreOptionsUserMetricsAction(ANYTHING);
},
};
-
-/**
- * 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
GEN('#if defined(OS_MACOSX)');
@@ -376,7 +363,10 @@
function OptionsWebUIExtendedTest() {}
OptionsWebUIExtendedTest.prototype = {
- __proto__: OptionsWebUITest.prototype,
+ __proto__: testing.Test.prototype,
+
+ /** @override */
+ browsePreload: 'chrome://settings-frame',
/** @override */
typedefCppFixture: 'OptionsBrowserTest',
@@ -384,6 +374,17 @@
testGenPreamble: function() {
// Start with no supervised users managed by this profile.
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');
},
/**
@@ -675,7 +676,7 @@
self.verifyOpenPages_(['settings'], '');
self.verifyHistory_(
['', 'languages', 'addLanguage', 'languages', ''],
- waitForOverlaysToHide);
+ testDone);
});
});
});
@@ -707,7 +708,7 @@
this.verifyHistory_(
['', 'search#1', 'languages#2', 'addLanguage#3', 'languages#2',
'search#1'],
- waitForOverlaysToHide);
+ testDone);
}.bind(this));
}.bind(this));
});
@@ -723,7 +724,7 @@
// Close the overlay.
PageManager.closeOverlay();
// Still no history changes.
- this.verifyHistory_([''], waitForOverlaysToHide);
+ this.verifyHistory_([''], testDone);
}.bind(this));
});

Powered by Google App Engine
This is Rietveld 408576698