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

Unified Diff: chrome/test/data/webui/md_user_manager/control_bar_tests.js

Issue 2036763003: MD User Manager: Fixes flaky tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Initial 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
« no previous file with comments | « no previous file | chrome/test/data/webui/md_user_manager/create_profile_tests.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/webui/md_user_manager/control_bar_tests.js
diff --git a/chrome/test/data/webui/md_user_manager/control_bar_tests.js b/chrome/test/data/webui/md_user_manager/control_bar_tests.js
index f6901059557fb13a613864c03735b94ef1d27061..30ac5a43b73bc1054519f0db70a0c4f2eddcd2ff 100644
--- a/chrome/test/data/webui/md_user_manager/control_bar_tests.js
+++ b/chrome/test/data/webui/md_user_manager/control_bar_tests.js
@@ -5,7 +5,6 @@
cr.define('user_manager.control_bar_tests', function() {
/** @return {!ControlBarElement} */
function createElement() {
- PolymerTest.clearBody();
var controlBarElement = document.createElement('control-bar');
document.body.appendChild(controlBarElement);
return controlBarElement;
@@ -27,7 +26,11 @@ cr.define('user_manager.control_bar_tests', function() {
controlBarElement = createElement();
});
- teardown(function() { controlBarElement.remove(); });
+ teardown(function(done) {
+ controlBarElement.remove();
+ // Allow asynchronous tasks to finish.
+ setTimeout(done);
+ });
test('Actions are hidden by default', function() {
assertTrue(controlBarElement.$.launchGuest.hidden);
@@ -74,13 +77,13 @@ cr.define('user_manager.control_bar_tests', function() {
controlBarElement = createElement();
- errorDialogElement = document.createElement('error-dialog');
- document.body.appendChild(errorDialogElement);
+ errorDialogElement = document.querySelector('error-dialog');
});
- teardown(function() {
+ teardown(function(done) {
controlBarElement.remove();
- errorDialogElement.remove();
+ // Allow asynchronous tasks to finish.
+ setTimeout(done);
});
test('Cannot create profile', function() {
« no previous file with comments | « no previous file | chrome/test/data/webui/md_user_manager/create_profile_tests.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698