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

Unified Diff: chrome/test/data/webui/settings/settings_main_test.js

Issue 2307703002: MD Settings: Fix Advanced Toggle when on an Advanced section route. (Closed)
Patch Set: add test Created 4 years, 3 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/test/data/webui/settings/settings_main_test.js
diff --git a/chrome/test/data/webui/settings/settings_main_test.js b/chrome/test/data/webui/settings/settings_main_test.js
index efd6eab99a7fbfd339d2dc9ffe29b9d552b6fe3b..b9b357d5cfbc950065c0d2f5dca19776c271d1dd 100644
--- a/chrome/test/data/webui/settings/settings_main_test.js
+++ b/chrome/test/data/webui/settings/settings_main_test.js
@@ -50,6 +50,7 @@ cr.define('settings_main_page', function() {
var settingsMain = null;
setup(function() {
+ settings.navigateTo(settings.Route.BASIC);
searchManager = new TestSearchManager();
settings.setSearchManagerForTesting(searchManager);
PolymerTest.clearBody();
@@ -122,6 +123,19 @@ cr.define('settings_main_page', function() {
'none', settingsMain.$$('settings-advanced-page').style.display);
});
});
+
+ test('can collapse advanced on advanced section route', function() {
+ settings.navigateTo(settings.Route.PRIVACY);
+ Polymer.dom.flush();
+
+ var advancedToggle = settingsMain.$$('#advancedToggle');
+ assertTrue(!!advancedToggle);
+
+ MockInteractions.tap(advancedToggle);
+ Polymer.dom.flush();
+
+ assertFalse(settingsMain.showPages_.advanced);
+ });
});
}

Powered by Google App Engine
This is Rietveld 408576698