Index: chrome/browser/resources/settings/settings_main/settings_main.js |
diff --git a/chrome/browser/resources/settings/settings_main/settings_main.js b/chrome/browser/resources/settings/settings_main/settings_main.js |
index 27a07401995eb905a2e33c392078ebbdb7222b34..5c7f6c77c0e7def93f8f4f0ff5277116cebdefd3 100644 |
--- a/chrome/browser/resources/settings/settings_main/settings_main.js |
+++ b/chrome/browser/resources/settings/settings_main/settings_main.js |
@@ -92,7 +92,7 @@ Polymer({ |
attached: function() { |
document.addEventListener('toggle-advanced-page', function(e) { |
this.advancedToggleExpanded_ = e.detail; |
- this.currentRouteChanged(settings.getCurrentRoute()); |
+ this.updatePagesShown_(); |
}.bind(this)); |
var currentRoute = settings.getCurrentRoute(); |
@@ -152,6 +152,8 @@ Polymer({ |
if (!newRoute.isSubpage()) |
this.hasExpandedSection_ = false; |
+ this.advancedToggleExpanded_ = settings.Route.ADVANCED.contains(newRoute); |
dschuyler
2016/09/01 23:36:00
This looks like it may collapse advanced if the
ur
tommycli
2016/09/02 00:36:21
Done. And added a test
|
+ |
this.updatePagesShown_(); |
}, |
@@ -177,15 +179,10 @@ Polymer({ |
about: false, |
basic: settings.Route.BASIC.contains(currentRoute) || |
!this.hasExpandedSection_, |
- advanced: settings.Route.ADVANCED.contains(currentRoute) || |
- (!this.hasExpandedSection_ && this.advancedToggleExpanded_), |
+ advanced: this.advancedToggleExpanded_ || |
+ (settings.Route.ADVANCED.contains(currentRoute) && |
+ this.hasExpandedSection_), |
}; |
- |
- if (this.showPages_.advanced) { |
- assert(!this.pageVisibility || |
- this.pageVisibility.advancedSettings !== false); |
- this.advancedToggleExpanded_ = true; |
- } |
} |
// Wait for any other changes prior to calculating the overflow padding. |