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

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

Issue 2627403003: MD Settings: Scroll to top when navigating to About page. (Closed)
Patch Set: fix Created 3 years, 11 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_page/main_page_behavior.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/basic_page_browsertest.js
diff --git a/chrome/test/data/webui/settings/basic_page_browsertest.js b/chrome/test/data/webui/settings/basic_page_browsertest.js
index 0286fa3a462f2586aa771f7ed45b985fa296fe3d..de32ad463934edc5a7c04aee0508c3dac3309c12 100644
--- a/chrome/test/data/webui/settings/basic_page_browsertest.js
+++ b/chrome/test/data/webui/settings/basic_page_browsertest.js
@@ -164,6 +164,18 @@ TEST_F('SettingsBasicPageBrowserTest', 'MAYBE_Load', function() {
});
});
});
+
+ test('scroll to top before navigating to about', function() {
+ var page = self.getPage('basic');
+ // Set the viewport small to force the scrollbar to appear on ABOUT.
+ Polymer.dom().querySelector('settings-ui').style.height = '200px';
+
+ settings.navigateTo(settings.Route.ON_STARTUP);
+ assertNotEquals(0, page.scroller.scrollTop);
+
+ settings.navigateTo(settings.Route.ABOUT);
+ assertEquals(0, page.scroller.scrollTop);
+ });
});
// Run all registered tests.
« no previous file with comments | « chrome/browser/resources/settings/settings_page/main_page_behavior.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698