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() {
* }
* @private
*/
SupervisedUserListData.prototype.receiveExistingSupervisedUsers_ = function(
supervisedUsers) {
SupervisedUserListData.prototype.receiveExistingSupervisedUsers_ =
function(supervisedUsers) {
if (!this.promise_) {
this.onDataChanged_(supervisedUsers);
return;
......@@ -46,7 +46,9 @@ cr.define('options', function() {
* @private
*/
SupervisedUserListData.prototype.onSigninError_ = function() {
assert(this.promise_);
if (!this.promise_) {
return;
}
this.reject_();
this.resetPromise_();
};
......
......@@ -341,14 +341,7 @@ TEST_F('ManageProfileUITest', 'NoCreateConfirmationOnError', function() {
});
// The name and email should be inserted into the confirmation dialog.
// Disbaled because of flakiness on Mac: crbug.com/405709
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() {
TEST_F('ManageProfileUITest', 'CreateConfirmationText', function() {
var self = this;
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