Chromium Code Reviews| 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..d93ec20d809a8aa03ed41260b3f5d34704a02334 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,56 @@ 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)); |
| + }); |
| + }); |
|
tsergeant
2016/08/15 04:49:50
Nit: \n
calamity
2016/08/15 07:18:40
Done.
|
| test('items deletion in week view', function(done) { |
| var results = [ |
| createHistoryEntry('2016-03-13', 'https://en.wikipedia.org/a'), |