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

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: 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 e1274db5547051c02fd5735c9891345cdc9501ec..f6c913babf426384bae2a4d68f7edf8b6bc45fb5 100644
--- a/chrome/test/data/webui/md_history/history_list_test.js
+++ b/chrome/test/data/webui/md_history/history_list_test.js
@@ -248,10 +248,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.opened);
+
+ app.set('queryState_.searchTerm', 'something else');
+ assertFalse(listContainer.$.dialog.opened);
+ });
+ });
+
teardown(function() {
element.historyData_ = [];
registerMessageCallback('removeVisits', this, undefined);
- registerMessageCallback('queryHistory', this, undefined);
+ registerMessageCallback('queryHistory', this, function() {});
tsergeant 2016/07/28 07:20:45 Why is this necessary? Should we be doing this eve
calamity 2016/08/01 02:46:11 The added test fails with cannot read property 'ap
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