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

Unified Diff: chrome/test/data/webui/md_history/test_util.js

Issue 2481693002: [MD History] Make forward/backward work in grouped mode. (Closed)
Patch Set: rebase Created 4 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/test/data/webui/md_history/history_toolbar_test.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/webui/md_history/test_util.js
diff --git a/chrome/test/data/webui/md_history/test_util.js b/chrome/test/data/webui/md_history/test_util.js
index 85eb24d8266801b35fbaa4c63b273417b3318cc3..bded27db2d98a3e45b438a9dfc25b8ec2cad45d2 100644
--- a/chrome/test/data/webui/md_history/test_util.js
+++ b/chrome/test/data/webui/md_history/test_util.js
@@ -9,8 +9,12 @@
*/
function replaceBody(element) {
var body = document.body;
- var currentBody =
- body.querySelector('history-app') || body.querySelector('.test-body');
+ var app = body.querySelector('history-app');
+ // Clear the query on the app, if it exists. This clears any query in the URL.
+ if (app)
+ app.set('queryState_.searchTerm', '');
+
+ var currentBody = app || body.querySelector('.test-body');
body.removeChild(currentBody);
element.classList.add('test-body');
« no previous file with comments | « chrome/test/data/webui/md_history/history_toolbar_test.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698