Chromium Code Reviews| 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 var upgraded = false; | |
| 126 | |
| 127 // This message handler needs to be registered before the test since the | |
| 128 // query can happen immediately after the element is upgraded. However, | |
| 129 // since there may be a delay as well, the test might check the global var | |
| 130 // too early as well. In this case the test will have overtaken the | |
| 131 // callback. | |
| 132 registerMessageCallback('queryHistory', this, function (info) { | |
| 133 window.historyQueryInfo = info; | |
| 134 }); | |
| 135 | |
| 136 // Wait for the top-level app element to be upgraded. | |
| 137 return waitForUpgrade($('history-app')).then(function() { | |
|
tsergeant
2016/07/19 04:52:38
`upgraded` is no longer used, so you can just do `
calamity
2016/07/19 06:48:56
Done.
| |
| 138 upgraded = true; | |
| 139 }); | |
| 140 }); | |
| 141 }, | |
| 142 }; | |
| 143 | |
| 144 TEST_F('MaterialHistoryWithQueryParamTest', 'RoutingTestWithQueryParam', | |
| 145 function() { | |
| 146 md_history.history_routing_test_with_query_param.registerTests(); | |
| 147 mocha.run(); | |
| 148 }); | |
| OLD | NEW |