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

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

Issue 2375223002: md-settings: Fix back navigation from /resetProfileSettings. (Closed)
Patch Set: Fix failing test. Created 4 years, 2 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_metrics_test.js
diff --git a/chrome/test/data/webui/md_history/history_metrics_test.js b/chrome/test/data/webui/md_history/history_metrics_test.js
index 8666d47d0c99f93ebb371ee5a539ca80b971c2c6..9e272761035661b369c806f93cc7b390916f3d21 100644
--- a/chrome/test/data/webui/md_history/history_metrics_test.js
+++ b/chrome/test/data/webui/md_history/history_metrics_test.js
@@ -48,7 +48,7 @@ cr.define('md_history.history_metrics_test', function() {
/** @override */
deleteItems: function() {
- return flush();
+ return PolymerTest.flushTasks();
}
};
});
@@ -62,7 +62,7 @@ cr.define('md_history.history_metrics_test', function() {
app = replaceApp();
updateSignInState(false);
- return flush();
+ return PolymerTest.flushTasks();
});
test('History.HistoryPageView', function() {
@@ -74,7 +74,7 @@ cr.define('md_history.history_metrics_test', function() {
app.selectedPage_ = 'syncedTabs';
assertEquals(1, histogram[HistoryPageViewHistogram.SIGNIN_PROMO]);
updateSignInState(true);
- return flush().then(() => {
+ return PolymerTest.flushTasks().then(() => {
assertEquals(1, histogram[HistoryPageViewHistogram.SYNCED_TABS]);
app.selectedPage_ = 'history';
assertEquals(2, histogram[HistoryPageViewHistogram.HISTORY]);
@@ -94,7 +94,7 @@ cr.define('md_history.history_metrics_test', function() {
historyEntry
]);
- return flush().then(() => {
+ return PolymerTest.flushTasks().then(() => {
var items = polymerSelectAll(
app.$.history.$['infinite-list'], 'history-item');
MockInteractions.tap(items[1].$$('#bookmark-star'));
@@ -114,7 +114,7 @@ cr.define('md_history.history_metrics_test', function() {
createHistoryEntry('2015-01-01', 'http://www.google.com'),
createHistoryEntry('2015-01-01', 'http://www.google.com')
]);
- return flush();
+ return PolymerTest.flushTasks();
}).then(() => {
items = polymerSelectAll(
app.$.history.$['infinite-list'], 'history-item');
@@ -124,28 +124,28 @@ cr.define('md_history.history_metrics_test', function() {
assertEquals(1, histogramMap['HistoryPage.ClickPositionSubset'][0]);
MockInteractions.tap(items[0].$.checkbox);
MockInteractions.tap(items[4].$.checkbox);
- return flush();
+ return PolymerTest.flushTasks();
}).then(() => {
MockInteractions.tap(app.$.toolbar.$$('#delete-button'));
assertEquals(1, actionMap['RemoveSelected']);
- return flush();
+ return PolymerTest.flushTasks();
}).then(() => {
MockInteractions.tap(app.$.history.$$('.cancel-button'));
assertEquals(1, actionMap['CancelRemoveSelected']);
MockInteractions.tap(app.$.toolbar.$$('#delete-button'));
- return flush();
+ return PolymerTest.flushTasks();
}).then(() => {
MockInteractions.tap(app.$.history.$$('.action-button'));
assertEquals(1, actionMap['ConfirmRemoveSelected']);
- return flush();
+ return PolymerTest.flushTasks();
}).then(() => {
items = polymerSelectAll(
app.$.history.$['infinite-list'], 'history-item');
MockInteractions.tap(items[0].$['menu-button']);
- return flush();
+ return PolymerTest.flushTasks();
}).then(() => {
MockInteractions.tap(app.$.history.$$('#menuRemoveButton'));
- return flush();
+ return PolymerTest.flushTasks();
}).then(() => {
assertEquals(
1, histogramMap['HistoryPage.RemoveEntryPosition'][0]);
@@ -157,7 +157,7 @@ cr.define('md_history.history_metrics_test', function() {
test('synced-device-manager', function() {
app.selectedPage_ = 'syncedTabs';
var histogram;
- return flush().then(() => {
+ return PolymerTest.flushTasks().then(() => {
histogram =
histogramMap[SYNCED_TABS_HISTOGRAM_NAME];
assertEquals(1, histogram[SyncedTabsHistogram.INITIALIZED]);
@@ -176,10 +176,10 @@ cr.define('md_history.history_metrics_test', function() {
),
];
setForeignSessions(sessionList, true);
- return flush();
+ return PolymerTest.flushTasks();
}).then(() => {
assertEquals(1, histogram[SyncedTabsHistogram.HAS_FOREIGN_DATA]);
- return flush();
+ return PolymerTest.flushTasks();
}).then(() => {
cards = polymerSelectAll(
app.$$('#synced-devices'), 'history-synced-device-card');
@@ -191,7 +191,7 @@ cr.define('md_history.history_metrics_test', function() {
assertEquals(1, histogram[SyncedTabsHistogram.LINK_CLICKED]);
MockInteractions.tap(cards[0].$['menu-button']);
- return flush();
+ return PolymerTest.flushTasks();
}).then(() => {
MockInteractions.tap(app.$$('#synced-devices').$$('#menuOpenButton'));
assertEquals(1, histogram[SyncedTabsHistogram.OPEN_ALL]);
« no previous file with comments | « chrome/test/data/webui/md_history/history_list_test.js ('k') | chrome/test/data/webui/md_history/history_routing_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698