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

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

Issue 2350313003: MD Settings: Ensure all search results are visible when going back. (Closed)
Patch Set: Fix 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 b123dfcbcf0207bd6a970686a5b8509d23230458..e4af140ca7e78b8623cdce4d7a7150d961294335 100644
--- a/chrome/test/data/webui/settings/settings_main_test.js
+++ b/chrome/test/data/webui/settings/settings_main_test.js
@@ -145,6 +145,30 @@ cr.define('settings_main_page', function() {
return assertPageVisibilityAfterSearch('', '');
});
+ // Ensure that searching, then entering a subpage, then going back
+ // lands the user in a page where both basic and advanced sections are
+ // visible, because the page is still in search mode.
+ test('returning from subpage to search results', function() {
+ settings.navigateTo(settings.Route.BASIC);
+ Polymer.dom.flush();
+
+ searchManager.setMatchesFound(true);
+ return settingsMain.searchContents('Query1').then(function() {
+ // Simulate navigating into a subpage.
+ settings.navigateTo(settings.Route.SEARCH_ENGINES);
+ settingsMain.$$('settings-basic-page').fire('subpage-expand');
+ Polymer.dom.flush();
+
+ // Simulate clicking the left arrow to go back to the search results.
+ settingsMain.currentRouteChanged(settings.Route.BASIC);
+ Polymer.dom.flush();
+ assertEquals(
+ '', settingsMain.$$('settings-basic-page').style.display);
+ assertEquals(
+ '', settingsMain.$$('settings-advanced-page').style.display);
+ });
+ });
+
test('can collapse advanced on advanced section route', function() {
settings.navigateTo(settings.Route.PRIVACY);
Polymer.dom.flush();
« 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