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

Unified Diff: chrome/test/data/webui/md_user_manager/create_profile_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
Index: chrome/test/data/webui/md_user_manager/create_profile_tests.js
diff --git a/chrome/test/data/webui/md_user_manager/create_profile_tests.js b/chrome/test/data/webui/md_user_manager/create_profile_tests.js
index 1bbf1d523f195e571f7631fd70f59f503229b3c6..648ea9ad139c14e0af323778954fcb0b7f4df9c3 100644
--- a/chrome/test/data/webui/md_user_manager/create_profile_tests.js
+++ b/chrome/test/data/webui/md_user_manager/create_profile_tests.js
@@ -5,7 +5,6 @@
cr.define('user_manager.create_profile_tests', function() {
/** @return {!CreateProfileElement} */
function createElement() {
- PolymerTest.clearBody();
var createProfileElement = document.createElement('create-profile');
document.body.appendChild(createProfileElement);
return createProfileElement;
@@ -40,7 +39,11 @@ cr.define('user_manager.create_profile_tests', function() {
Polymer.dom.flush();
});
- teardown(function() { createProfileElement.remove(); });
+ teardown(function(done) {
+ createProfileElement.remove();
+ // Allow asynchronous tasks to finish.
+ setTimeout(done);
+ });
test('Handles available profile icons', function() {
return browserProxy.whenCalled('getAvailableIcons').then(function() {
@@ -375,7 +378,11 @@ cr.define('user_manager.create_profile_tests', function() {
Polymer.dom.flush();
});
- teardown(function() { createProfileElement.remove(); });
+ teardown(function(done) {
+ createProfileElement.remove();
+ // Allow asynchronous tasks to finish.
+ setTimeout(done);
+ });
test('Handles no signed in users', function() {
return browserProxy.whenCalled('getSignedInUsers').then(function() {

Powered by Google App Engine
This is Rietveld 408576698