Chromium Code Reviews| 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 6de0d2a1b4936d21bdb2bdb307d7945a97f488e9..60aa4f1228438396aeb944d75ec29c6ba6e8f04d 100644 |
| --- a/chrome/test/data/webui/md_history/md_history_browsertest.js |
| +++ b/chrome/test/data/webui/md_history/md_history_browsertest.js |
| @@ -109,3 +109,38 @@ TEST_F('MaterialHistoryDeletionDisabledTest', 'HistorySupervisedUserTest', |
| md_history.history_supervised_user_test.registerTests(); |
| mocha.run(); |
| }); |
| + |
| +function MaterialHistoryWithQueryParamTest() {} |
| + |
| +MaterialHistoryWithQueryParamTest.prototype = { |
| + __proto__: MaterialHistoryBrowserTest.prototype, |
| + |
| + browsePreload: 'chrome://history?q=query', |
| + |
| + /** @override */ |
| + setUp: function() { |
| + PolymerTest.prototype.setUp.call(this); |
| + |
| + suiteSetup(function() { |
| + // This message handler needs to be registered before the test since the |
| + // query can happen immediately after the element is upgraded. However, |
| + // since there may be a delay as well, the test might check the global var |
| + // too early as well. In this case the test will have overtaken the |
| + // callback. |
| + registerMessageCallback('queryHistory', this, function (info) { |
| + window.historyQueryInfo = info; |
| + }); |
| + |
| + // Wait for the top-level app element to be upgraded. |
| + return waitForUpgrade($('history-app')).then(function() { |
|
tsergeant
2016/07/19 07:06:54
You can still get rid of the then() clause here.
calamity
2016/07/20 04:59:07
Oops, Done.
|
| + upgraded = true; |
| + }); |
| + }); |
| + }, |
| +}; |
| + |
| +TEST_F('MaterialHistoryWithQueryParamTest', 'RoutingTestWithQueryParam', |
| + function() { |
| + md_history.history_routing_test_with_query_param.registerTests(); |
| + mocha.run(); |
| +}); |