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

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

Issue 2186073003: [MD History] Close delete items dialog when a new query is initiated. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@open_tabs_new_window
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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/resources/md_history/list_container.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/history_list_test.js
diff --git a/chrome/test/data/webui/md_history/history_list_test.js b/chrome/test/data/webui/md_history/history_list_test.js
index f54c605f1a00aeb3628fbd09b6c57c54f5bc685c..cbcaa78d30e90f1adbc131099197b0566ad8ecfd 100644
--- a/chrome/test/data/webui/md_history/history_list_test.js
+++ b/chrome/test/data/webui/md_history/history_list_test.js
@@ -287,10 +287,29 @@ cr.define('md_history.history_list_test', function() {
});
});
+ test('delete dialog closed on url change', function() {
+ app.queryState_.queryingDisabled = false;
+ var listContainer = app.$.history;
+ app.historyResult(createHistoryInfo(), TEST_HISTORY_RESULTS);
+ app.historyResult(createHistoryInfo(), ADDITIONAL_RESULTS);
+ return flush().then(function() {
+ items = Polymer.dom(element.root).querySelectorAll('history-item');
+
+ MockInteractions.tap(items[2].$.checkbox);
+ MockInteractions.tap(app.$.toolbar.$$('#delete-button'));
+
+ // Confirmation dialog should appear.
+ assertTrue(listContainer.$.dialog.open);
+
+ app.set('queryState_.searchTerm', 'something else');
+ assertFalse(listContainer.$.dialog.open);
+ });
+ });
+
teardown(function() {
element.historyData_ = [];
registerMessageCallback('removeVisits', this, undefined);
- registerMessageCallback('queryHistory', this, undefined);
+ registerMessageCallback('queryHistory', this, function() {});
app.queryState_.queryingDisabled = true;
app.set('queryState_.searchTerm', '');
return flush();
« no previous file with comments | « chrome/browser/resources/md_history/list_container.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698