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

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

Issue 2643533003: MD History: Use one-way binding for history query state. (Closed)
Patch Set: Rebase Created 3 years, 11 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 123aed9f2de839473b1abf479ea1e2134ed03dc5..94db8c2761037e783e8bd42f8bb3979dd7ca7a97 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
@@ -62,21 +62,21 @@ suite('history-grouped-list', function() {
assertEquals('infinite-list', content.selected);
// Switching to week or month causes grouped history list to be shown.
- app.set('queryState_.range', HistoryRange.WEEK);
+ app.fire('change-query', {range: HistoryRange.WEEK});
assertEquals('grouped-list', content.selected);
assertEquals('history', sidebar.$.menu.selected);
- app.set('queryState_.range', HistoryRange.ALL_TIME);
+ app.fire('change-query', {range: HistoryRange.ALL_TIME});
assertEquals('infinite-list', content.selected);
assertEquals('history', sidebar.$.menu.selected);
- app.set('queryState_.range', HistoryRange.MONTH);
+ app.fire('change-query', {range: HistoryRange.MONTH});
assertEquals('grouped-list', content.selected);
assertEquals('history', sidebar.$.menu.selected);
});
test('items grouped by domain', function() {
- app.set('queryState_.range', HistoryRange.WEEK);
+ app.fire('change-query', {range: HistoryRange.WEEK});
var info = createHistoryInfo();
app.historyResult(info, SIMPLE_RESULTS);
return PolymerTest.flushTasks().then(function() {
@@ -111,7 +111,7 @@ suite('history-grouped-list', function() {
});
test('items grouped by day in week view', function() {
- app.set('queryState_.range', HistoryRange.WEEK);
+ app.fire('change-query', {range: HistoryRange.WEEK});
app.historyResult(createHistoryInfo(), PER_DAY_RESULTS);
return PolymerTest.flushTasks().then(function() {
var data = groupedList.groupedHistoryData_;
@@ -132,7 +132,7 @@ suite('history-grouped-list', function() {
});
test('items grouped by month in month view', function() {
- app.set('queryState_.range', HistoryRange.MONTH);
+ app.fire('change-query', {range: HistoryRange.MONTH});
app.historyResult(createHistoryInfo(), PER_MONTH_RESULTS);
return PolymerTest.flushTasks().then(function() {
var data = groupedList.groupedHistoryData_;
@@ -147,7 +147,7 @@ suite('history-grouped-list', function() {
});
test('items rendered when expanded', function() {
- app.set('queryState_.range', HistoryRange.WEEK);
+ app.fire('change-query', {range: HistoryRange.WEEK});
app.historyResult(createHistoryInfo(), SIMPLE_RESULTS);
return PolymerTest.flushTasks().then(function() {
@@ -170,7 +170,7 @@ suite('history-grouped-list', function() {
createHistoryEntry('2016-03-11', 'https://en.wikipedia.org'),
createHistoryEntry('2016-03-10', 'https://www.youtube.com')
];
- app.set('queryState_.range', HistoryRange.WEEK);
+ app.fire('change-query', {range: HistoryRange.WEEK});
app.historyResult(createHistoryInfo(), results);
return waitForEvent(groupedList, 'dom-change', function() {
@@ -220,7 +220,7 @@ suite('history-grouped-list', function() {
createHistoryEntry('2016-03-11', 'https://en.wikipedia.org'),
createHistoryEntry('2016-03-10', 'https://www.youtube.com')
];
- app.set('queryState_.range', HistoryRange.WEEK);
+ app.fire('change-query', {range: HistoryRange.WEEK});
app.historyResult(createHistoryInfo(), results);
waitForEvent(groupedList, 'dom-change', function() {

Powered by Google App Engine
This is Rietveld 408576698