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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 115 MaterialHistoryWithQueryParamTest.prototype = { | 115 MaterialHistoryWithQueryParamTest.prototype = { |
| 116 __proto__: MaterialHistoryBrowserTest.prototype, | 116 __proto__: MaterialHistoryBrowserTest.prototype, |
| 117 | 117 |
| 118 browsePreload: 'chrome://history?q=query', | 118 browsePreload: 'chrome://history?q=query', |
| 119 | 119 |
| 120 /** @override */ | 120 /** @override */ |
| 121 setUp: function() { | 121 setUp: function() { |
| 122 PolymerTest.prototype.setUp.call(this); | 122 PolymerTest.prototype.setUp.call(this); |
| 123 | 123 |
| 124 suiteSetup(function() { | 124 suiteSetup(function() { |
| 125 var upgraded = false; | |
|
tsergeant
2016/07/22 03:21:17
You need to rebase, this line doesn't exist on mas
calamity
2016/07/27 05:22:07
Done.
| |
| 126 | |
| 127 // This message handler needs to be registered before the test since the | 125 // This message handler needs to be registered before the test since the |
| 128 // query can happen immediately after the element is upgraded. However, | 126 // 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 | 127 // 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 | 128 // too early as well. In this case the test will have overtaken the |
| 131 // callback. | 129 // callback. |
| 132 registerMessageCallback('queryHistory', this, function (info) { | 130 registerMessageCallback('queryHistory', this, function (info) { |
| 133 window.historyQueryInfo = info; | 131 window.historyQueryInfo = info; |
| 134 }); | 132 }); |
| 135 | 133 |
| 136 // Wait for the top-level app element to be upgraded. | 134 // Wait for the top-level app element to be upgraded. |
| 137 return waitForUpgrade($('history-app')).then(function() { | 135 return waitForUpgrade($('history-app')).then(function() { |
| 138 upgraded = true; | 136 upgraded = true; |
| 139 }); | 137 }); |
| 140 }); | 138 }); |
| 141 }, | 139 }, |
| 142 }; | 140 }; |
| 143 | 141 |
| 144 TEST_F('MaterialHistoryWithQueryParamTest', 'RoutingTestWithQueryParam', | 142 TEST_F('MaterialHistoryWithQueryParamTest', 'RoutingTestWithQueryParam', |
| 145 function() { | 143 function() { |
| 146 md_history.history_routing_test_with_query_param.registerTests(); | 144 md_history.history_routing_test_with_query_param.registerTests(); |
| 147 mocha.run(); | 145 mocha.run(); |
| 148 }); | 146 }); |
| OLD | NEW |