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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 testGenPreamble: function() { | 102 testGenPreamble: function() { |
103 GEN(' SetDeleteAllowed(false);'); | 103 GEN(' SetDeleteAllowed(false);'); |
104 } | 104 } |
105 }; | 105 }; |
106 | 106 |
107 TEST_F('MaterialHistoryDeletionDisabledTest', 'HistorySupervisedUserTest', | 107 TEST_F('MaterialHistoryDeletionDisabledTest', 'HistorySupervisedUserTest', |
108 function() { | 108 function() { |
109 md_history.history_supervised_user_test.registerTests(); | 109 md_history.history_supervised_user_test.registerTests(); |
110 mocha.run(); | 110 mocha.run(); |
111 }); | 111 }); |
| 112 |
| 113 function MaterialHistoryWithQueryParamTest() {} |
| 114 |
| 115 MaterialHistoryWithQueryParamTest.prototype = { |
| 116 __proto__: MaterialHistoryBrowserTest.prototype, |
| 117 |
| 118 browsePreload: 'chrome://history?q=query', |
| 119 |
| 120 /** @override */ |
| 121 setUp: function() { |
| 122 PolymerTest.prototype.setUp.call(this); |
| 123 |
| 124 suiteSetup(function() { |
| 125 // This message handler needs to be registered before the test since the |
| 126 // query can happen immediately after the element is upgraded. However, |
| 127 // since there may be a delay as well, the test might check the global var |
| 128 // too early as well. In this case the test will have overtaken the |
| 129 // callback. |
| 130 registerMessageCallback('queryHistory', this, function (info) { |
| 131 window.historyQueryInfo = info; |
| 132 }); |
| 133 |
| 134 // Wait for the top-level app element to be upgraded. |
| 135 return waitForUpgrade($('history-app')); |
| 136 }); |
| 137 }, |
| 138 }; |
| 139 |
| 140 TEST_F('MaterialHistoryWithQueryParamTest', 'RoutingTestWithQueryParam', |
| 141 function() { |
| 142 md_history.history_routing_test_with_query_param.registerTests(); |
| 143 mocha.run(); |
| 144 }); |
OLD | NEW |