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

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

Issue 2825203003: MD Settings: Remove subpage animation when landing directly on it. (Closed)
Patch Set: nits Created 3 years, 7 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_ui/settings_ui.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 4db5a623f7638a687c4a426d183fde36dbf80999..590af525b4e5dbbf6c5142de4488f1b7461c181f 100644
--- a/chrome/test/data/webui/settings/settings_main_test.js
+++ b/chrome/test/data/webui/settings/settings_main_test.js
@@ -193,26 +193,29 @@ cr.define('settings_main_page', function() {
/**
* Asserts the visibility of the basic and advanced pages after exiting
* search mode.
- * @param {string} Expected 'display' value for the basic page.
* @param {string} Expected 'display' value for the advanced page.
* @return {!Promise}
*/
- function assertPageVisibilityAfterSearch(
- expectedBasic, expectedAdvanced) {
+ function assertAdvancedVisibilityAfterSearch(expectedAdvanced) {
searchManager.setMatchesFound(true);
- return settingsMain.searchContents('Query1').then(function() {
- searchManager.setMatchesFound(false);
- return settingsMain.searchContents('');
- }).then(function() {
- return assertPageVisibility(expectedBasic, expectedAdvanced);
- });
+ return settingsMain.searchContents('Query1')
+ .then(function() {
+ searchManager.setMatchesFound(false);
+ return settingsMain.searchContents('');
+ })
+ .then(function() {
+ // Imitate behavior of clearing search.
+ settings.navigateTo(settings.Route.BASIC);
+ Polymer.dom.flush();
+ return assertPageVisibility('block', expectedAdvanced);
+ });
}
test('exiting search mode, advanced collapsed', function() {
// Simulating searching while the advanced page is collapsed.
settingsMain.currentRouteChanged(settings.Route.BASIC);
Polymer.dom.flush();
- return assertPageVisibilityAfterSearch('block', 'none');
+ return assertAdvancedVisibilityAfterSearch('none');
});
// Ensure that clearing the search results restores both "basic" and
@@ -221,7 +224,7 @@ cr.define('settings_main_page', function() {
test('exiting search mode, advanced expanded', function() {
settings.navigateTo(settings.Route.SITE_SETTINGS);
Polymer.dom.flush();
- return assertPageVisibilityAfterSearch('block', 'block');
+ return assertAdvancedVisibilityAfterSearch('block');
});
// Ensure that searching, then entering a subpage, then going back
« no previous file with comments | « chrome/browser/resources/settings/settings_ui/settings_ui.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698