Index: chrome/test/data/webui/md_history/md_history_browsertest.js |
diff --git a/chrome/test/data/webui/md_history/md_history_browsertest.js b/chrome/test/data/webui/md_history/md_history_browsertest.js |
index ee132c5ee98cec82084ab7b3565a29cfcd8cc50a..61777b5c0695f11a8334f024f6d30224209b204c 100644 |
--- a/chrome/test/data/webui/md_history/md_history_browsertest.js |
+++ b/chrome/test/data/webui/md_history/md_history_browsertest.js |
@@ -48,6 +48,16 @@ MaterialHistoryBrowserTest.prototype = { |
suiteSetup(function() { |
// Wait for the top-level app element to be upgraded. |
return waitForAppUpgrade() |
+ .then(function() { |
+ // <iron-list>#_maxPages controls the default number of "pages" of |
+ // "physical" (i.e. DOM) elements to render. Some of these tests |
+ // rely on rendering up to 3 "pages" of items, which was previously |
+ // the default, changeed to 2 for performance reasons. TODO(dbeam): |
+ // maybe trim down the number of items created in the tests? Or |
+ // don't touch <iron-list>'s physical items as much? |
+ Array.from(document.querySelectorAll('* /deep/ iron-list')).forEach( |
+ function(ironList) { ironList._maxPages = 3; }); |
+ }) |
.then(function() { return md_history.ensureLazyLoaded(); }) |
.then(function() { |
$('history-app').queryState_.queryingDisabled = true; |