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

Unified Diff: chrome/browser/resources/settings/basic_page/basic_page.js

Issue 2855253003: MD Settings: Eliminate SettingsSubpageBrowsertest. (Closed)
Patch Set: Resolve conflicts. Created 3 years, 7 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/basic_page/basic_page.js
diff --git a/chrome/browser/resources/settings/basic_page/basic_page.js b/chrome/browser/resources/settings/basic_page/basic_page.js
index d360e891f428705bfcc79d468745f7fb91989688..4dbc652525c9ec5af7622477447287ca144818ec 100644
--- a/chrome/browser/resources/settings/basic_page/basic_page.js
+++ b/chrome/browser/resources/settings/basic_page/basic_page.js
@@ -9,7 +9,7 @@
Polymer({
is: 'settings-basic-page',
- behaviors: [SettingsPageVisibility, MainPageBehavior],
+ behaviors: [MainPageBehavior],
properties: {
/** Preferences state. */
@@ -24,7 +24,10 @@ Polymer({
* Dictionary defining page visibility.
* @type {!GuestModePageVisibility}
*/
- pageVisibility: Object,
+ pageVisibility: {
+ type: Object,
+ value: function() { return {}; },
+ },
advancedToggleExpanded: {
type: Boolean,
@@ -101,6 +104,15 @@ Polymer({
MainPageBehaviorImpl.currentRouteChanged.call(this, newRoute, oldRoute);
},
+ /**
+ * @param {boolean|undefined} visibility
+ * @return {boolean}
+ * @private
+ */
+ showPage_: function(visibility) {
+ return visibility !== false;
+ },
+
/**
* Queues a task to search the basic sections, then another for the advanced
* sections.
@@ -157,7 +169,7 @@ Polymer({
shouldShowAndroidApps_: function() {
var visibility = /** @type {boolean|undefined} */ (
this.get('pageVisibility.androidApps'));
- return this.showAndroidApps && this.showPage(visibility);
+ return this.showAndroidApps && this.showPage_(visibility);
},
/**

Powered by Google App Engine
This is Rietveld 408576698