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

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

Issue 2084843002: [MD History] Add history-list-container between app and history lists. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@tim_toolbar
Patch Set: rebase Created 4 years, 5 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/browser/ui/webui/md_history_ui.cc ('k') | chrome/test/data/webui/md_history/history_item_test.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 bf0da93b2794ba17762288f7f28a10f91e4ce0e3..20e725dcd3ad990fd0f7c5e818fa3418807b7cf6 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
@@ -8,6 +8,8 @@ cr.define('md_history.history_grouped_list_test', function() {
var app;
var toolbar;
var groupedList;
+ var sidebar;
+
var SIMPLE_RESULTS;
var PER_DAY_RESULTS;
var PER_MONTH_RESULTS;
@@ -16,6 +18,7 @@ cr.define('md_history.history_grouped_list_test', function() {
app.grouped_ = true;
toolbar = app.$['toolbar'];
+ sidebar = app.$['side-bar'];
SIMPLE_RESULTS = [
createHistoryEntry('2016-03-16', 'https://www.google.com/'),
@@ -40,26 +43,34 @@ cr.define('md_history.history_grouped_list_test', function() {
createHistoryEntry('2016-03-1', 'https://en.wikipedia.org'),
createHistoryEntry('2016-03-1', 'https://en.wikipedia.org')
];
+
return flush().then(function() {
- groupedList = app.$$('#history-grouped-list');
+ groupedList = app.$.history.$$('#grouped-list');
+ assertTrue(!!groupedList);
});
});
test('grouped ui is shown', function() {
+ assertEquals('history', sidebar.$.menu.selected);
assertTrue(!!toolbar.$$('#grouped-buttons-container'));
+ var content = app.$['history'].$['content'];
+
// History list is shown at first.
- assertEquals('history-list', app.$['content'].selected);
+ assertEquals('infinite-list', content.selected);
// Switching to week or month causes grouped history list to be shown.
app.set('queryState_.range', HistoryRange.WEEK);
- assertEquals('history-grouped-list', app.$['content'].selected);
+ assertEquals('grouped-list', content.selected);
+ assertEquals('history', sidebar.$.menu.selected);
app.set('queryState_.range', HistoryRange.ALL_TIME);
- assertEquals('history-list', app.$['content'].selected);
+ assertEquals('infinite-list', content.selected);
+ assertEquals('history', sidebar.$.menu.selected);
app.set('queryState_.range', HistoryRange.MONTH);
- assertEquals('history-grouped-list', app.$['content'].selected);
+ assertEquals('grouped-list', content.selected);
+ assertEquals('history', sidebar.$.menu.selected);
});
test('items grouped by domain', function() {
« no previous file with comments | « chrome/browser/ui/webui/md_history_ui.cc ('k') | chrome/test/data/webui/md_history/history_item_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698