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

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: 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
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);
dschuyler 2017/01/17 23:33:38 Could this need a Polymer.dom.flush() or something
tommycli 2017/01/17 23:47:00 Ah, I don't think it actually needs the flush. How
+ assertEquals(0, page.scroller.scrollTop);
+ });
});
// Run all registered tests.

Powered by Google App Engine
This is Rietveld 408576698