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

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

Issue 2341923005: MD WebUI: Make cr-lazy-render get() synchronous (Closed)
Patch Set: Simplify test more Created 4 years, 3 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_list_test.js
diff --git a/chrome/test/data/webui/md_history/history_list_test.js b/chrome/test/data/webui/md_history/history_list_test.js
index af62f29e12db3f5f95a5cb2afdc4d5b8f6764c96..9ff3f3281f473d6e6b545c8ac503079142b8a3b2 100644
--- a/chrome/test/data/webui/md_history/history_list_test.js
+++ b/chrome/test/data/webui/md_history/history_list_test.js
@@ -50,8 +50,7 @@ cr.define('md_history.history_list_test', function() {
return flush();
}).then(function() {
MockInteractions.tap(app.$.toolbar.$$('#delete-button'));
- return listContainer.$.dialog.get();
- }).then(function(dialog) {
+ var dialog = listContainer.$.dialog.get();
registerMessageCallback('removeVisits', this, function() {
flush().then(function() {
deleteComplete();
@@ -277,8 +276,7 @@ cr.define('md_history.history_list_test', function() {
items = polymerSelectAll(element, 'history-item');
MockInteractions.tap(items[0].$['menu-button']);
- return app.$.history.$.sharedMenu.get();
- }).then(function() {
+ app.$.history.$.sharedMenu.get();
MockInteractions.tap(app.$.history.$$('#menuMoreButton'));
});
});
@@ -361,8 +359,7 @@ cr.define('md_history.history_list_test', function() {
}).then(function() {
MockInteractions.tap(app.$.toolbar.$$('#delete-button'));
- return listContainer.$.dialog.get();
- }).then(function(dialog) {
+ var dialog = listContainer.$.dialog.get();
registerMessageCallback('removeVisits', this, function() {
flush().then(function() {
deleteComplete();
@@ -416,20 +413,16 @@ cr.define('md_history.history_list_test', function() {
});
});
MockInteractions.tap(items[1].$['menu-button']);
- return app.$.history.$.sharedMenu.get();
- }).then(function(menu) {
+ app.$.history.$.sharedMenu.get();
MockInteractions.tap(app.$.history.$$('#menuRemoveButton'));
});
});
test('deleting items using shortcuts', function(done) {
var listContainer = app.$.history;
- var dialog;
app.historyResult(createHistoryInfo(), TEST_HISTORY_RESULTS);
- listContainer.$.dialog.get().then(function(stampedDialog) {
- dialog = stampedDialog;
- return flush();
- }).then(function() {
+ var dialog = listContainer.$.dialog.get();
+ return flush().then(function() {
items = polymerSelectAll(element, 'history-item');
// Dialog should not appear when there is no item selected.

Powered by Google App Engine
This is Rietveld 408576698