Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(202)

Side by Side Diff: chrome/test/data/webui/md_history/md_history_browsertest.js

Issue 2068613002: [MD History] Add URL parameter for search. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@routing
Patch Set: rebase Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 we send a message to the test to keep
131 // things going.
tsergeant 2016/07/19 03:32:20 oh BOY I -think- you can simplify this a bit by h
calamity 2016/07/19 04:35:33 That does seem to work! I tested by strategically
132 registerMessageCallback('queryHistory', this, function (info) {
133 console.log(info);
tsergeant 2016/07/19 03:32:20 Delete this log
calamity 2016/07/19 04:35:33 Done.
134 if (upgraded) {
135 chrome.send('historyQueried', info);
136 return;
137 }
138
139 window.historyQueryInfo = info;
140 });
141
142 // Wait for the top-level app element to be upgraded.
143 return waitForUpgrade($('history-app')).then(function() {
144 upgraded = true;
145 });
146 });
147 },
148 };
149
150 TEST_F('MaterialHistoryWithQueryParamTest', 'RoutingTestWithQueryParam',
151 function() {
152 md_history.history_routing_test_with_query_param.registerTests();
153 mocha.run();
154 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698