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..c49bfdb2bd03a5f7904032eb512f9e03aa501af6 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,40 @@ 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() { |
+ var upgraded = false; |
+ |
+ // 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 04:52:38
`upgraded` is no longer used, so you can just do `
calamity
2016/07/19 06:48:56
Done.
|
+ upgraded = true; |
+ }); |
+ }); |
+ }, |
+}; |
+ |
+TEST_F('MaterialHistoryWithQueryParamTest', 'RoutingTestWithQueryParam', |
+ function() { |
+ md_history.history_routing_test_with_query_param.registerTests(); |
+ mocha.run(); |
+}); |