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

Unified 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, 11 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/webui/settings/site_settings_page_browsertest.js
diff --git a/chrome/test/data/webui/settings/site_settings_page_browsertest.js b/chrome/test/data/webui/settings/site_settings_page_browsertest.js
new file mode 100644
index 0000000000000000000000000000000000000000..0b8256e20576223d11dd2861c873ae964fb31fa0
--- /dev/null
+++ b/chrome/test/data/webui/settings/site_settings_page_browsertest.js
@@ -0,0 +1,47 @@
+// Copyright 2017 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.
+
+/** @fileoverview Site settings page tests. */
+
+GEN_INCLUDE(['settings_page_browsertest.js']);
+/**
+ * @constructor
+ * @extends {SettingsPageBrowserTest}
+ */
+function SettingsSiteSettingsPageBrowserTest() {}
+
+SettingsSiteSettingsPageBrowserTest.prototype = {
+ __proto__: SettingsPageBrowserTest.prototype,
+};
+
+TEST_F('SettingsSiteSettingsPageBrowserTest', 'labels', function() {
+ suite('Site settings page', function() {
+ var ui;
+
+ suiteSetup(function() {
+ ui = assert(document.createElement('settings-site-settings-page'));
+ });
+
+ test('defaultSettingLabel_ tests', function() {
+ assertEquals('a', ui.defaultSettingLabel_(
+ settings.PermissionValues.ALLOW, 'a', 'b'));
+ assertEquals('b', ui.defaultSettingLabel_(
+ settings.PermissionValues.BLOCK, 'a', 'b'));
+ assertEquals('a', ui.defaultSettingLabel_(
+ settings.PermissionValues.ALLOW, 'a', 'b', 'c'));
+ assertEquals('b', ui.defaultSettingLabel_(
+ settings.PermissionValues.BLOCK, 'a', 'b', 'c'));
+ assertEquals('c', ui.defaultSettingLabel_(
+ settings.PermissionValues.SESSION_ONLY, 'a', 'b', 'c'));
+ assertEquals('c', ui.defaultSettingLabel_(
+ settings.PermissionValues.DEFAULT, 'a', 'b', 'c'));
+ assertEquals('c', ui.defaultSettingLabel_(
+ settings.PermissionValues.ASK, 'a', 'b', 'c'));
+ assertEquals('c', ui.defaultSettingLabel_(
+ settings.PermissionValues.DETECT_IMPORTANT_CONTENT, 'a', 'b', 'c'));
+ });
+ });
+
+ mocha.run();
+});
« 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