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

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

Issue 2643533003: MD History: Use one-way binding for history query state. (Closed)
Patch Set: Remove wrapper function Created 3 years, 11 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 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 b09085d595daf778326bc299c7fc8f2fb187bfd8..7e781fc28ee783b258b5a067f7083cf18951f49a 100644
--- a/chrome/test/data/webui/md_history/test_util.js
+++ b/chrome/test/data/webui/md_history/test_util.js
@@ -10,13 +10,13 @@
function replaceBody(element) {
var body = document.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);
+ // Clear any query in the URL.
+ window.history.replaceState({}, '', '/');
+
element.classList.add('test-body');
body.appendChild(element);
}
« 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