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

Unified Diff: chrome/browser/resources/settings/settings_page/settings_page_visibility.js

Issue 2852433003: MD Settings: Elim SettingsSubpageBrowsertest and SettingsPageVisibility (Closed)
Patch Set: Rebase + fix settings_main_test.js Created 3 years, 8 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
Index: chrome/browser/resources/settings/settings_page/settings_page_visibility.js
diff --git a/chrome/browser/resources/settings/settings_page/settings_page_visibility.js b/chrome/browser/resources/settings/settings_page/settings_page_visibility.js
deleted file mode 100644
index 848d96f9c0ce1b7f5b5a8732b8feee05850aecd5..0000000000000000000000000000000000000000
--- a/chrome/browser/resources/settings/settings_page/settings_page_visibility.js
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2015 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
- * Behavior controlling the visibility of Settings pages.
- *
- * Example:
- * behaviors: [SettingsPageVisibility],
- */
-
-/**
- * Set this to true in tests before loading the page (e.g. in preLoad()) so that
- * pages do not initially get created. Set this to false BEFORE modifying
- * pageVisibility. NOTE: Changing this value after the DOM is loaded will not
- * trigger a visibility change, pageVisibility must be modified to trigger data
- * binding events.
- * @type {boolean}
- */
-var settingsHidePagesByDefaultForTest;
-
-/** @polymerBehavior */
-var SettingsPageVisibility = {
- properties: {
- /**
- * Dictionary defining page visibility. If not set for a page, visibility
- * will default to true, unless settingsHidePagesByDefaultForTest is set
- * in which case visibility defaults to false.
- * @type {Object<boolean>}
- */
- pageVisibility: {
- type: Object,
- value: function() { return {}; },
- },
- },
-
- /**
- * @param {boolean|undefined} visibility
- * @return {boolean}
- */
- showPage: function(visibility) {
- if (settingsHidePagesByDefaultForTest)
- return visibility === true;
- return visibility !== false;
- },
-};

Powered by Google App Engine
This is Rietveld 408576698