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

Side by Side Diff: chrome/browser/ui/webui/options/language_options_browsertest.js

Issue 646853004: Enable a11y audit for chrome://settings (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git/+/master
Patch Set: Apply Feedback pt2 Created 6 years 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 GEN_INCLUDE(['options_browsertest_base.js']);
6
5 /** 7 /**
6 * TestFixture for language options WebUI testing. 8 * TestFixture for language options WebUI testing.
7 * @extends {testing.Test} 9 * @extends {testing.Test}
8 * @constructor 10 * @constructor
9 */ 11 */
10 function LanguageOptionsWebUITest() {} 12 function LanguageOptionsWebUITest() {}
11 13
12 LanguageOptionsWebUITest.prototype = { 14 LanguageOptionsWebUITest.prototype = {
13 __proto__: testing.Test.prototype, 15 __proto__: OptionsBrowsertestBase.prototype,
14 16
15 /** @override */ 17 /** @override */
16 browsePreload: 'chrome://settings-frame/languages', 18 browsePreload: 'chrome://settings-frame/languages',
17 }; 19 };
18 20
19 // Test opening language options has correct location. 21 // Test opening language options has correct location.
20 TEST_F('LanguageOptionsWebUITest', 'testOpenLanguageOptions', function() { 22 TEST_F('LanguageOptionsWebUITest', 'testOpenLanguageOptions', function() {
21 assertEquals(this.browsePreload, document.location.href); 23 assertEquals(this.browsePreload, document.location.href);
22 }); 24 });
23 25
24 GEN('#if defined(OS_WIN) || defined(OS_CHROMEOS)'); 26 GEN('#if defined(OS_WIN) || defined(OS_CHROMEOS)');
25 // Test reselecting the same language as the current UI locale. This should show 27 // Test reselecting the same language as the current UI locale. This should show
26 // a "Chrome is displayed in this language" message rather than a restart banner 28 // a "Chrome is displayed in this language" message rather than a restart banner
27 // or a [ Display Chrome in this language ] button. 29 // or a [ Display Chrome in this language ] button.
28 TEST_F('LanguageOptionsWebUITest', 'reselectUILocale', function() { 30 TEST_F('LanguageOptionsWebUITest', 'reselectUILocale', function() {
29 var currentLang = loadTimeData.getString('currentUiLanguageCode'); 31 var currentLang = loadTimeData.getString('currentUiLanguageCode');
30 $('language-options-list').selectLanguageByCode(currentLang); 32 $('language-options-list').selectLanguageByCode(currentLang);
31 LanguageOptions.uiLanguageSaved(currentLang); 33 LanguageOptions.uiLanguageSaved(currentLang);
32 34
33 expectTrue($('language-options-ui-language-button').hidden); 35 expectTrue($('language-options-ui-language-button').hidden);
34 expectFalse($('language-options-ui-language-message').hidden); 36 expectFalse($('language-options-ui-language-message').hidden);
35 expectTrue($('language-options-ui-notification-bar').hidden); 37 expectTrue($('language-options-ui-notification-bar').hidden);
36 }); 38 });
37 GEN('#endif'); // defined(OS_WIN) || defined(OS_CHROMEOS) 39 GEN('#endif'); // defined(OS_WIN) || defined(OS_CHROMEOS)
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/options/content_options_browsertest.js ('k') | chrome/browser/ui/webui/options/options_browsertest.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698