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

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

Issue 2053553002: MD History: Deselect items when clicking 'More from this site' (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Deselect when results come in Created 4 years, 6 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
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 e3ef70219d3fa93556560f42c6cca7b281157174..dc9f24b15abc2173d616325851fbcf709ae71309 100644
--- a/chrome/test/data/webui/md_history/history_list_test.js
+++ b/chrome/test/data/webui/md_history/history_list_test.js
@@ -161,6 +161,39 @@ cr.define('md_history.history_list_test', function() {
});
});
+ test('more from this site sends and sets correct data', function(done) {
+ app.queryingDisabled_ = false;
+ registerMessageCallback('queryHistory', this, function (info) {
+ assertEquals('example.com', info[0]);
+ flush().then(function() {
+ assertEquals(
+ 'example.com',
+ toolbar.$['main-toolbar'].getSearchField().getValue());
+ done();
+ });
+ });
+
+ element.$.sharedMenu.itemData = {domain: 'example.com'};
+ MockInteractions.tap(element.$.menuMoreButton);
+ });
+
+ test('changing search deselects items', function() {
+ app.historyResult(
+ createHistoryInfo('ex'),
+ [createHistoryEntry('2016-06-9', 'https://www.example.com')]);
+ return flush().then(function() {
+ var item = element.$$('history-item');
+ MockInteractions.tap(item.$.checkbox);
+
+ assertEquals(1, toolbar.count);
+
+ app.historyResult(
+ createHistoryInfo('ample'),
+ [createHistoryEntry('2016-06-9', 'https://www.example.com')]);
+ assertEquals(0, toolbar.count);
+ });
+ });
+
teardown(function() {
element.historyData_ = [];
element.searchedTerm = '';
« no previous file with comments | « chrome/browser/resources/md_history/history_list.js ('k') | chrome/test/data/webui/md_history/history_toolbar_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698