Commit dd1ae25d authored by alemate@chromium.org's avatar alemate@chromium.org

Add error messsage bubble flag for tests.

Tests checking for eroro message buble can be flaky, because on-screen message
can disappear before test checks for it. This CL adds special flag for tests.

BUG=339348

Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=268924

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@269773 0039d316-1c4b-4281-b951-d872f2087c98
parent e8d6c587
......@@ -178,6 +178,11 @@ cr.define('cr.ui.login', function() {
*/
displayType_: DISPLAY_TYPE.UNKNOWN,
/**
* Error message (bubble) was shown. This is checked in tests.
*/
errorMessageWasShownForTesting_: false,
get displayType() {
return this.displayType_;
},
......@@ -876,8 +881,10 @@ cr.define('cr.ui.login', function() {
}
var currentScreen = Oobe.getInstance().currentScreen;
if (currentScreen && typeof currentScreen.showErrorBubble === 'function')
if (currentScreen && typeof currentScreen.showErrorBubble === 'function') {
currentScreen.showErrorBubble(loginAttempts, error);
this.errorMessageWasShownForTesting_ = true;
}
};
/**
......@@ -907,6 +914,7 @@ cr.define('cr.ui.login', function() {
*/
DisplayManager.clearErrors = function() {
$('bubble').hide();
this.errorMessageWasShownForTesting_ = false;
};
/**
......
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