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

Unified Diff: chrome/test/data/webui/polymer_browser_test_base.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
« no previous file with comments | « chrome/test/data/webui/md_history/test_util.js ('k') | chrome/test/data/webui/settings/reset_page_test.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/webui/polymer_browser_test_base.js
diff --git a/chrome/test/data/webui/polymer_browser_test_base.js b/chrome/test/data/webui/polymer_browser_test_base.js
index ea1b659bd20acea58e321574394c39084e4cd107..b63110cd36f562c154c2028349724d90f5e5038f 100644
--- a/chrome/test/data/webui/polymer_browser_test_base.js
+++ b/chrome/test/data/webui/polymer_browser_test_base.js
@@ -206,3 +206,16 @@ PolymerTest.getLibraries = function(basePath) {
return basePath + library;
});
};
+
+/*
+ * Waits for queued up tasks to finish before proceeding. Inspired by:
+ * https://github.com/Polymer/web-component-tester/blob/master/browser/environment/helpers.js#L97
+ */
+PolymerTest.flushTasks = function() {
+ Polymer.dom.flush();
+ // Promises have microtask timing, so we use setTimeout to explicity force a
+ // new task.
+ return new Promise(function(resolve, reject) {
+ window.setTimeout(resolve, 0);
+ });
+};
« no previous file with comments | « chrome/test/data/webui/md_history/test_util.js ('k') | chrome/test/data/webui/settings/reset_page_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698