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

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: style 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..ebcbea5347d1f431815a03f9171a3bdf32b49a54 100644
--- a/chrome/test/data/webui/settings/settings_main_test.js
+++ b/chrome/test/data/webui/settings/settings_main_test.js
@@ -197,22 +197,26 @@ cr.define('settings_main_page', function() {
* @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() {
+ settings.navigateTo(
+ settings.Route.BASIC); // Imitate clear search.
dpapad 2017/05/31 00:40:42 // Imitate clear search. settings.navigateTo(setti
scottchen 2017/05/31 18:25:28 Done.
+ 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 +225,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