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

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: fix formatting 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
« no previous file with comments | « chrome/browser/resources/settings/settings_main/settings_main.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/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..d4d71ab81472536bc846e4f9b64c6aa91d00373f 100644
--- a/chrome/test/data/webui/settings/settings_main_test.js
+++ b/chrome/test/data/webui/settings/settings_main_test.js
@@ -42,7 +42,7 @@ cr.define('settings_main_page', function() {
return CrSettingsPrefs.initialized;
});
- suite('SearchTests', function() {
+ suite('MainPageTests', function() {
/** @type {?TestSearchManager} */
var searchManager = null;
@@ -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,32 @@ 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);
+ });
+
+ test('navigating to a basic page does not collapse advanced', function() {
+ settings.navigateTo(settings.Route.PRIVACY);
+ Polymer.dom.flush();
+
+ var advancedToggle = settingsMain.$$('#advancedToggle');
+ assertTrue(!!advancedToggle);
+
+ settings.navigateTo(settings.Route.PEOPLE);
+ Polymer.dom.flush();
+
+ assertTrue(settingsMain.showPages_.advanced);
+ });
});
}
« no previous file with comments | « chrome/browser/resources/settings/settings_main/settings_main.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698