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

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

Issue 2481693002: [MD History] Make forward/backward work in grouped mode. (Closed)
Patch Set: address comments Created 4 years, 1 month 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_toolbar_test.js
diff --git a/chrome/test/data/webui/md_history/history_toolbar_test.js b/chrome/test/data/webui/md_history/history_toolbar_test.js
index 6910024eb12f97f2d3aa1bdf5c0304b42d455408..e7d7d16a0ae136f490f9633c77f382ac325f3510 100644
--- a/chrome/test/data/webui/md_history/history_toolbar_test.js
+++ b/chrome/test/data/webui/md_history/history_toolbar_test.js
@@ -93,9 +93,39 @@ cr.define('md_history.history_toolbar_test', function() {
toolbar.$$('cr-toolbar').fire('search-changed', 'Test2');
});
+ test('grouped history navigation buttons', function() {
+ var info = createHistoryInfo();
+ info.finished = false;
+ app.historyResult(info, []);
+ app.grouped_ = true;
+ return PolymerTest.flushTasks().then(function() {
+ app.set('queryState_.range', HistoryRange.MONTH);
+ groupedList = app.$.history.$$('#grouped-list');
+ assertTrue(!!groupedList);
+ var today = toolbar.$$('#today-button');
+ var next = toolbar.$$('#next-button');
+ var prev = toolbar.$$('#prev-button');
+
+ assertEquals(0, toolbar.groupedOffset);
+ assertTrue(today.disabled);
+ assertTrue(next.disabled);
+ assertFalse(prev.disabled);
+
+ MockInteractions.tap(prev);
+ assertEquals(1, toolbar.groupedOffset);
+ assertFalse(today.disabled);
+ assertFalse(next.disabled);
+ assertFalse(prev.disabled);
+
+ app.historyResult(createHistoryInfo(), []);
+ assertFalse(today.disabled);
+ assertFalse(next.disabled);
+ assertTrue(prev.disabled);
+ });
+ });
+
teardown(function() {
registerMessageCallback('queryHistory', this, function() {});
- app.set('queryState_.searchTerm', '');
tsergeant 2016/11/23 05:46:48 This line is necessary to remove the ?q= from the
calamity 2016/11/24 06:45:18 Good catch. Done.
});
});
}
« 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