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

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: rebase Created 4 years 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_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', '');
});
});
}
« no previous file with comments | « chrome/browser/resources/md_history/list_container.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