Commit e3fe689a authored by bauerb's avatar bauerb Committed by Commit bot

Handle a non-existing promise when receiving a signin error in the SupervisedUserListData.

BUG=405709

Review URL: https://codereview.chromium.org/495843003

Cr-Commit-Position: refs/heads/master@{#291883}
parent 9f2188e3
...@@ -31,8 +31,8 @@ cr.define('options', function() { ...@@ -31,8 +31,8 @@ cr.define('options', function() {
* } * }
* @private * @private
*/ */
SupervisedUserListData.prototype.receiveExistingSupervisedUsers_ = function( SupervisedUserListData.prototype.receiveExistingSupervisedUsers_ =
supervisedUsers) { function(supervisedUsers) {
if (!this.promise_) { if (!this.promise_) {
this.onDataChanged_(supervisedUsers); this.onDataChanged_(supervisedUsers);
return; return;
...@@ -46,7 +46,9 @@ cr.define('options', function() { ...@@ -46,7 +46,9 @@ cr.define('options', function() {
* @private * @private
*/ */
SupervisedUserListData.prototype.onSigninError_ = function() { SupervisedUserListData.prototype.onSigninError_ = function() {
assert(this.promise_); if (!this.promise_) {
return;
}
this.reject_(); this.reject_();
this.resetPromise_(); this.resetPromise_();
}; };
......
...@@ -341,14 +341,7 @@ TEST_F('ManageProfileUITest', 'NoCreateConfirmationOnError', function() { ...@@ -341,14 +341,7 @@ TEST_F('ManageProfileUITest', 'NoCreateConfirmationOnError', function() {
}); });
// The name and email should be inserted into the confirmation dialog. // The name and email should be inserted into the confirmation dialog.
// Disbaled because of flakiness on Mac: crbug.com/405709 TEST_F('ManageProfileUITest', 'CreateConfirmationText', function() {
GEN('#if defined(OS_MACOSX)');
GEN('#define MAYBE_CreateConfirmationText \\');
GEN(' DISABLED_CreateConfirmationText');
GEN('#else');
GEN('#define MAYBE_CreateConfirmationText CreateConfirmationText');
GEN('#endif');
TEST_F('ManageProfileUITest', 'MAYBE_CreateConfirmationText', function() {
var self = this; var self = this;
var custodianEmail = 'foo@example.com'; var custodianEmail = 'foo@example.com';
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment