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

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: Created 4 years, 6 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
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..4578f7a086117a86b37e0d718572a8bd714e283b 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.$$('#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('history-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('history-grouped-list', content.selected);
+ assertEquals('history', sidebar.$.menu.selected);
app.set('queryState_.range', HistoryRange.ALL_TIME);
- assertEquals('history-list', app.$['content'].selected);
+ assertEquals('history-list', content.selected);
+ assertEquals('history', sidebar.$.menu.selected);
app.set('queryState_.range', HistoryRange.MONTH);
- assertEquals('history-grouped-list', app.$['content'].selected);
+ assertEquals('history-grouped-list', content.selected);
+ assertEquals('history', sidebar.$.menu.selected);
});
test('items grouped by domain', function() {

Powered by Google App Engine
This is Rietveld 408576698