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

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

Issue 2239623002: [MD History] Add shift-selection to the history lists. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@reshadow
Patch Set: rebase, fix closure compile Created 4 years, 4 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_grouped_list_test.js
diff --git a/chrome/test/data/webui/md_history/history_grouped_list_test.js b/chrome/test/data/webui/md_history/history_grouped_list_test.js
index 931f42729b826111127f01a410078569427f691f..dff86e3a384afa007e4468046ea4e597e3e5c39e 100644
--- a/chrome/test/data/webui/md_history/history_grouped_list_test.js
+++ b/chrome/test/data/webui/md_history/history_grouped_list_test.js
@@ -150,6 +150,57 @@ cr.define('md_history.history_grouped_list_test', function() {
});
});
+ test('shift selection in week view', function() {
+ var results = [
+ createHistoryEntry('2016-03-13', 'https://en.wikipedia.org/a'),
+ createHistoryEntry('2016-03-13', 'https://en.wikipedia.org/b'),
+ createHistoryEntry('2016-03-13', 'https://en.wikipedia.org/c'),
+ createHistoryEntry('2016-03-13', 'https://en.wikipedia.org/d'),
+ createHistoryEntry('2016-03-13', 'https://www.youtube.com/a'),
+ createHistoryEntry('2016-03-13', 'https://www.youtube.com/b'),
+ createHistoryEntry('2016-03-11', 'https://en.wikipedia.org'),
+ createHistoryEntry('2016-03-10', 'https://www.youtube.com')
+ ];
+ app.set('queryState_.range', HistoryRange.WEEK);
+ app.historyResult(createHistoryInfo(), results);
+
+ return waitForEvent(groupedList, 'dom-change', function() {
+ return polymerSelectAll(
+ groupedList, '.dropdown-indicator').length == 4;
+ }).then(function() {
+ polymerSelectAll(groupedList, '.dropdown-indicator').
+ forEach(MockInteractions.tap);
+
+ return flush();
+ }).then(function() {
+ var items = polymerSelectAll(groupedList, 'history-item');
+
+ MockInteractions.tap(items[0].$.checkbox);
+ assertDeepEquals(
+ [true, false, false, false],
+ groupedList.groupedHistoryData_[0].domains[0].visits.map(
+ i => i.selected));
+
+ // Shift-select to the third item.
+ shiftClick(items[2].$.checkbox);
+ assertDeepEquals(
+ [true, true, true, false],
+ groupedList.groupedHistoryData_[0].domains[0].visits.map(
+ i => i.selected));
+
+ // Shift-selecting to another domain selects as per usual.
+ shiftClick(items[5].$.checkbox);
+ assertDeepEquals(
+ [true, true, true, false],
+ groupedList.groupedHistoryData_[0].domains[0].visits.map(
+ i => i.selected));
+ assertDeepEquals(
+ [false, true],
+ groupedList.groupedHistoryData_[0].domains[1].visits.map(
+ i => i.selected));
+ });
+ });
+
test('items deletion in week view', function(done) {
var results = [
createHistoryEntry('2016-03-13', 'https://en.wikipedia.org/a'),
« no previous file with comments | « chrome/browser/resources/md_history/list_container.js ('k') | chrome/test/data/webui/md_history/history_list_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698