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

Side by Side Diff: chrome/test/data/webui/settings/site_settings_page_browsertest.js

Issue 2659833002: [MD settings] Data driven content setting subtext (Closed)
Patch Set: unit tests Created 3 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/test/data/webui/settings/category_default_setting_tests.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 /** @fileoverview Site settings page tests. */
6
7 GEN_INCLUDE(['settings_page_browsertest.js']);
8 /**
9 * @constructor
10 * @extends {SettingsPageBrowserTest}
11 */
12 function SettingsSiteSettingsPageBrowserTest() {}
13
14 SettingsSiteSettingsPageBrowserTest.prototype = {
15 __proto__: SettingsPageBrowserTest.prototype,
16 };
17
18 TEST_F('SettingsSiteSettingsPageBrowserTest', 'labels', function() {
19 suite('Site settings page', function() {
20 var ui;
21
22 suiteSetup(function() {
23 ui = assert(document.createElement('settings-site-settings-page'));
24 });
25
26 test('defaultSettingLabel_ tests', function() {
27 assertEquals('a', ui.defaultSettingLabel_(
28 settings.PermissionValues.ALLOW, 'a', 'b'));
29 assertEquals('b', ui.defaultSettingLabel_(
30 settings.PermissionValues.BLOCK, 'a', 'b'));
31 assertEquals('a', ui.defaultSettingLabel_(
32 settings.PermissionValues.ALLOW, 'a', 'b', 'c'));
33 assertEquals('b', ui.defaultSettingLabel_(
34 settings.PermissionValues.BLOCK, 'a', 'b', 'c'));
35 assertEquals('c', ui.defaultSettingLabel_(
36 settings.PermissionValues.SESSION_ONLY, 'a', 'b', 'c'));
37 assertEquals('c', ui.defaultSettingLabel_(
38 settings.PermissionValues.DEFAULT, 'a', 'b', 'c'));
39 assertEquals('c', ui.defaultSettingLabel_(
40 settings.PermissionValues.ASK, 'a', 'b', 'c'));
41 assertEquals('c', ui.defaultSettingLabel_(
42 settings.PermissionValues.DETECT_IMPORTANT_CONTENT, 'a', 'b', 'c'));
43 });
44 });
45
46 mocha.run();
47 });
OLDNEW
« no previous file with comments | « chrome/test/data/webui/settings/category_default_setting_tests.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698