summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrsorokin <rsorokin@chromium.org>2015-07-28 10:53:30 -0700
committerCommit bot <commit-bot@chromium.org>2015-07-28 17:54:28 +0000
commitc1fd2f174c87b0b85f91a9abb381bb22d8df0483 (patch)
tree242f7be9e4ba9eabde411a30a5410fdd8b2a4269
parent789074e5943e5d45247ee85c557864a0a0079330 (diff)
downloadchromium_src-c1fd2f174c87b0b85f91a9abb381bb22d8df0483.zip
chromium_src-c1fd2f174c87b0b85f91a9abb381bb22d8df0483.tar.gz
chromium_src-c1fd2f174c87b0b85f91a9abb381bb22d8df0483.tar.bz2
ChromeOS login: Send 'ready' event on contentload instead of loadstop
In MSAN configuration with high CPU load sometimes we get contentload after loadstop event and it breaks the tests. BUG=452523 Review URL: https://codereview.chromium.org/1232573003 Cr-Commit-Position: refs/heads/master@{#340720}
-rw-r--r--chrome/browser/chromeos/policy/blocking_login_browsertest.cc8
-rw-r--r--chrome/browser/resources/gaia_auth_host/authenticator.js14
2 files changed, 5 insertions, 17 deletions
diff --git a/chrome/browser/chromeos/policy/blocking_login_browsertest.cc b/chrome/browser/chromeos/policy/blocking_login_browsertest.cc
index 2fe4f91..40a7369 100644
--- a/chrome/browser/chromeos/policy/blocking_login_browsertest.cc
+++ b/chrome/browser/chromeos/policy/blocking_login_browsertest.cc
@@ -230,13 +230,7 @@ class BlockingLoginTest
DISALLOW_COPY_AND_ASSIGN(BlockingLoginTest);
};
-// http://crbug.com/452523
-#if defined(MEMORY_SANITIZER)
-#define MAYBE_LoginBlocksForUser DISABLED_LoginBlocksForUser
-#else
-#define MAYBE_LoginBlocksForUser LoginBlocksForUser
-#endif
-IN_PROC_BROWSER_TEST_P(BlockingLoginTest, MAYBE_LoginBlocksForUser) {
+IN_PROC_BROWSER_TEST_P(BlockingLoginTest, LoginBlocksForUser) {
// Verify that there isn't a logged in user when the test starts.
user_manager::UserManager* user_manager = user_manager::UserManager::Get();
EXPECT_FALSE(user_manager->IsUserLoggedIn());
diff --git a/chrome/browser/resources/gaia_auth_host/authenticator.js b/chrome/browser/resources/gaia_auth_host/authenticator.js
index ed83ce3..99a0728 100644
--- a/chrome/browser/resources/gaia_auth_host/authenticator.js
+++ b/chrome/browser/resources/gaia_auth_host/authenticator.js
@@ -110,7 +110,6 @@ cr.define('cr.login', function() {
this.skipForNow_ = false;
this.authFlow = AuthFlow.DEFAULT;
this.authDomain = '';
- this.loaded_ = false;
this.idpOrigin_ = null;
this.continueUrl_ = null;
this.continueUrlWithoutParams_ = null;
@@ -196,7 +195,6 @@ cr.define('cr.login', function() {
Authenticator.prototype.load = function(authMode, data) {
this.authMode = authMode;
this.clearCredentials_();
- this.loaded_ = false;
// gaiaUrl parameter is used for testing. Once defined, it is never changed.
this.idpOrigin_ = data.gaiaUrl || IDP_ORIGIN;
this.continueUrl_ = data.continueUrl || CONTINUE_URL;
@@ -243,7 +241,6 @@ cr.define('cr.login', function() {
*/
Authenticator.prototype.reload = function() {
this.clearCredentials_();
- this.loaded_ = false;
this.webview_.src = this.reloadUrl_;
};
@@ -703,6 +700,10 @@ cr.define('cr.login', function() {
};
this.webview_.contentWindow.postMessage(msg, currentUrl);
+
+ this.dispatchEvent(new Event('ready'));
+ // Focus webview after dispatching event when webview is already visible.
+ this.webview_.focus();
}
};
@@ -721,13 +722,6 @@ cr.define('cr.login', function() {
* @private
*/
Authenticator.prototype.onLoadStop_ = function(e) {
- if (!this.loaded_) {
- this.loaded_ = true;
- this.dispatchEvent(new Event('ready'));
- // Focus webview after dispatching event when webview is already visible.
- this.webview_.focus();
- }
-
// Sends client id to EAFE on every loadstop after a small timeout. This is
// needed because EAFE sits behind SSO and initialize asynchrounouly
// and we don't know for sure when it is loaded and ready to listen