OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 /** | 5 /** |
6 * @fileoverview Test suite for the Material Design history page. | 6 * @fileoverview Test suite for the Material Design history page. |
7 */ | 7 */ |
8 | 8 |
9 var ROOT_PATH = '../../../../../'; | 9 var ROOT_PATH = '../../../../../'; |
10 | 10 |
(...skipping 30 matching lines...) Expand all Loading... |
41 'history_toolbar_test.js', | 41 'history_toolbar_test.js', |
42 ]), | 42 ]), |
43 | 43 |
44 /** @override */ | 44 /** @override */ |
45 setUp: function() { | 45 setUp: function() { |
46 PolymerTest.prototype.setUp.call(this); | 46 PolymerTest.prototype.setUp.call(this); |
47 | 47 |
48 suiteSetup(function() { | 48 suiteSetup(function() { |
49 // Wait for the top-level app element to be upgraded. | 49 // Wait for the top-level app element to be upgraded. |
50 return waitForAppUpgrade() | 50 return waitForAppUpgrade() |
| 51 .then(function() { |
| 52 // <iron-list>#_maxPages controls the default number of "pages" of |
| 53 // "physical" (i.e. DOM) elements to render. Some of these tests |
| 54 // rely on rendering up to 3 "pages" of items, which was previously |
| 55 // the default, changeed to 2 for performance reasons. TODO(dbeam): |
| 56 // maybe trim down the number of items created in the tests? Or |
| 57 // don't touch <iron-list>'s physical items as much? |
| 58 Array.from(document.querySelectorAll('* /deep/ iron-list')).forEach( |
| 59 function(ironList) { ironList._maxPages = 3; }); |
| 60 }) |
51 .then(function() { return md_history.ensureLazyLoaded(); }) | 61 .then(function() { return md_history.ensureLazyLoaded(); }) |
52 .then(function() { | 62 .then(function() { |
53 $('history-app').queryState_.queryingDisabled = true; | 63 $('history-app').queryState_.queryingDisabled = true; |
54 }); | 64 }); |
55 }); | 65 }); |
56 }, | 66 }, |
57 }; | 67 }; |
58 | 68 |
59 TEST_F('MaterialHistoryBrowserTest', 'BrowserServiceTest', function() { | 69 TEST_F('MaterialHistoryBrowserTest', 'BrowserServiceTest', function() { |
60 md_history.browser_service_test.registerTests(); | 70 md_history.browser_service_test.registerTests(); |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 }); | 165 }); |
156 }); | 166 }); |
157 }, | 167 }, |
158 }; | 168 }; |
159 | 169 |
160 TEST_F('MaterialHistoryWithQueryParamTest', 'RoutingTestWithQueryParam', | 170 TEST_F('MaterialHistoryWithQueryParamTest', 'RoutingTestWithQueryParam', |
161 function() { | 171 function() { |
162 md_history.history_routing_test_with_query_param.registerTests(); | 172 md_history.history_routing_test_with_query_param.registerTests(); |
163 mocha.run(); | 173 mocha.run(); |
164 }); | 174 }); |
OLD | NEW |