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

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

Issue 2708993003: Fix issue where side nav wasn't updated every time the route changed. (Closed)
Patch Set: add tests Created 3 years, 10 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_menu/settings_menu.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_menu_test.js
diff --git a/chrome/test/data/webui/settings/settings_menu_test.js b/chrome/test/data/webui/settings/settings_menu_test.js
index 3f5d5e6f8b220d341500946bc69d414df26ac574..975292759f4e20bb16969d6f8eeaca3919964ad8 100644
--- a/chrome/test/data/webui/settings/settings_menu_test.js
+++ b/chrome/test/data/webui/settings/settings_menu_test.js
@@ -87,6 +87,30 @@ cr.define('settings_menu', function() {
var path = new window.URL(selector.selected).pathname;
assertEquals('/reset', path);
});
+
+ test('navigateToAnotherSection', function() {
+ var selector = settingsMenu.$.subMenu;
+ var path = new window.URL(selector.selected).pathname;
+ assertEquals('/reset', path);
+
+ settings.navigateTo(settings.Route.PEOPLE, '');
+ Polymer.dom.flush();
+
+ path = new window.URL(selector.selected).pathname;
+ assertEquals('/people', path);
+ });
+
+ test('navigateToBasic', function() {
+ var selector = settingsMenu.$.subMenu;
+ var path = new window.URL(selector.selected).pathname;
+ assertEquals('/reset', path);
+
+ settings.navigateTo(settings.Route.BASIC, '');
+ Polymer.dom.flush();
+
+ // BASIC has no sub page selected.
+ assertFalse(!!selector.selected);
+ });
});
}
« no previous file with comments | « chrome/browser/resources/settings/settings_menu/settings_menu.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698