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

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

Issue 2570253002: [MD History] Fix toolbar dates in grouped mode. (Closed)
Patch Set: rebase Created 3 years, 11 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/test/data/webui/history_browsertest.js ('k') | chrome/test/data/webui/md_history/test_util.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 a586aa851115563161f262bb00bb99073b9c0812..123aed9f2de839473b1abf479ea1e2134ed03dc5 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
@@ -78,8 +78,6 @@ suite('history-grouped-list', function() {
test('items grouped by domain', function() {
app.set('queryState_.range', HistoryRange.WEEK);
var info = createHistoryInfo();
- info.queryStartTime = 'Yesterday';
- info.queryEndTime = 'Now';
app.historyResult(info, SIMPLE_RESULTS);
return PolymerTest.flushTasks().then(function() {
var data = groupedList.groupedHistoryData_;
@@ -91,13 +89,27 @@ suite('history-grouped-list', function() {
assertEquals(2, data[0].domains[0].visits.length);
assertEquals(1, data[0].domains[1].visits.length);
assertEquals(1, data[0].domains[2].visits.length);
-
- // Ensure the toolbar displays the correct begin and end time.
- assertEquals('Yesterday', toolbar.queryStartTime);
- assertEquals('Now', toolbar.queryEndTime);
});
});
+ test('toolbar dates appear in grouped mode', function() {
+ var getInfo = function() {
+ var info = createHistoryInfo();
+ info.queryStartMonth = 'Dec 2016';
+ info.queryInterval = 'Yesterday - Now';
+ return info;
+ };
+ app.set('queryState_.range', HistoryRange.MONTH);
+ app.historyResult(getInfo(), SIMPLE_RESULTS);
+ assertEquals(
+ 'Dec 2016', toolbar.$$('#grouped-date').textContent.trim());
+
+ app.set('queryState_.range', HistoryRange.WEEK);
+ app.historyResult(getInfo(), SIMPLE_RESULTS);
+ assertEquals(
+ 'Yesterday - Now', toolbar.$$('#grouped-date').textContent.trim());
+ });
+
test('items grouped by day in week view', function() {
app.set('queryState_.range', HistoryRange.WEEK);
app.historyResult(createHistoryInfo(), PER_DAY_RESULTS);
« no previous file with comments | « chrome/test/data/webui/history_browsertest.js ('k') | chrome/test/data/webui/md_history/test_util.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698