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

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

Issue 136693013: [Hotword] Remove unneeded preferences. Cleaning up look of settings. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: wrong section name in test Created 6 years, 10 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
« no previous file with comments | « chrome/browser/ui/webui/options/browser_options_handler.cc ('k') | chrome/common/pref_names.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 * TestFixture for App Launcher's Settings App testing. 6 * TestFixture for App Launcher's Settings App testing.
7 * @extends {testing.Test} 7 * @extends {testing.Test}
8 * @constructor 8 * @constructor
9 */ 9 */
10 function SettingsAppWebUITest() {} 10 function SettingsAppWebUITest() {}
(...skipping 18 matching lines...) Expand all
29 var elem = $(elementId); 29 var elem = $(elementId);
30 return elem.offsetWidth > 0 || elem.offsetHeight > 0; 30 return elem.offsetWidth > 0 || elem.offsetHeight > 0;
31 } 31 }
32 assertTrue(OptionsPage.isSettingsApp()); 32 assertTrue(OptionsPage.isSettingsApp());
33 assertTrue(isVisible('sync-users-section')); 33 assertTrue(isVisible('sync-users-section'));
34 assertTrue(isVisible('sync-section')); 34 assertTrue(isVisible('sync-section'));
35 35
36 // Spot-check some regular settings items that should be hidden. 36 // Spot-check some regular settings items that should be hidden.
37 assertFalse(isVisible('change-home-page-section')); 37 assertFalse(isVisible('change-home-page-section'));
38 assertFalse(isVisible('default-search-engine')); 38 assertFalse(isVisible('default-search-engine'));
39 assertFalse(isVisible('hotword-settings-section')); 39 assertFalse(isVisible('hotword-search'));
40 assertFalse(isVisible('privacy-section')); 40 assertFalse(isVisible('privacy-section'));
41 assertFalse(isVisible('startup-section')); 41 assertFalse(isVisible('startup-section'));
42 }); 42 });
43 43
44 // Check functionality of LoadTimeData.overrideValues(), which the Settings App 44 // Check functionality of LoadTimeData.overrideValues(), which the Settings App
45 // uses. Do spot checks, so the test is not too fragile. Some of the content 45 // uses. Do spot checks, so the test is not too fragile. Some of the content
46 // strings rely on waiting for sync sign-in status, or platform-specifics. 46 // strings rely on waiting for sync sign-in status, or platform-specifics.
47 TEST_F('SettingsAppWebUITest', 'testStrings', function() { 47 TEST_F('SettingsAppWebUITest', 'testStrings', function() {
48 // Ensure we check against the override values. 48 // Ensure we check against the override values.
49 assertTrue(!!loadTimeData.getValue('settingsApp')); 49 assertTrue(!!loadTimeData.getValue('settingsApp'));
50 50
51 // Check a product-specific label, to ensure it uses "App Launcher", and not 51 // Check a product-specific label, to ensure it uses "App Launcher", and not
52 // Chrome / Chromium. 52 // Chrome / Chromium.
53 var languagesLabelElement = 53 var languagesLabelElement =
54 document.querySelector('[i18n-content="languageSectionLabel"]'); 54 document.querySelector('[i18n-content="languageSectionLabel"]');
55 assertNotEquals(-1, languagesLabelElement.innerHTML.indexOf('App Launcher')); 55 assertNotEquals(-1, languagesLabelElement.innerHTML.indexOf('App Launcher'));
56 }); 56 });
57 57
58 GEN('#endif // defined(ENABLE_SETTINGS_APP)'); 58 GEN('#endif // defined(ENABLE_SETTINGS_APP)');
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/options/browser_options_handler.cc ('k') | chrome/common/pref_names.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698