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 7410b9b02a81c053268c2f0de948c34134293d46..a47172797218bcb470a2c00eccbc7c83ec2917a8 100644 |
--- a/chrome/test/data/webui/settings/basic_page_browsertest.js |
+++ b/chrome/test/data/webui/settings/basic_page_browsertest.js |
@@ -51,6 +51,24 @@ TEST_F('SettingsBasicPageBrowserTest', 'MAYBE_Load', function() { |
self.verifySubpagesHidden(section); |
} |
}); |
+ |
+ // This test checks for a regression that occurred with scrollToSection_ |
+ // failing to find its host element. |
+ test('scroll to section', function() { |
+ // Setting the page and section will cause a scrollToSection_. |
+ self.getPage('basic').currentRoute = { |
+ page: 'basic', |
+ section: 'onStartup', |
+ subpage: [], |
+ }; |
+ |
+ return new Promise(function(resolve, reject) { |
+ // This timeout should be longer than the one in main_page_behavior, |
Dan Beam
2016/05/31 21:27:20
can you just make scrollToSection_ return a Promis
dschuyler
2016/05/31 22:02:15
In the 'or something' category I made the check in
|
+ // scrollToSection_(). It may be removed if/when that timeout is |
+ // removed. |
+ setTimeout(resolve, 200); |
+ }); |
+ }); |
}); |
// Run all registered tests. |