Chromium Code Reviews| 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.
|
| }); |
| }); |
| } |