Commit 0f36deb4 authored by rsorokin's avatar rsorokin Committed by Commit bot

ChromeOS Offline gaia: Don't do reload when using local (offline) gaia

Reason for this when build with Memory Sanitizer it causes delay between CallJS('...') and actual JS execution. In this particular case Chrome tries to CallJS('doReload') due to frame loading error. After that it loads offline Gaia and then function |doReload| starts to execute which causes hiding offline Gaia;

BUG=475516

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

Cr-Commit-Position: refs/heads/master@{#330920}
parent 95c0ae11
...@@ -185,7 +185,6 @@ class LoginTest : public chromeos::LoginManagerTest { ...@@ -185,7 +185,6 @@ class LoginTest : public chromeos::LoginManagerTest {
std::string message; std::string message;
do { do {
ASSERT_TRUE(message_queue.WaitForMessage(&message)); ASSERT_TRUE(message_queue.WaitForMessage(&message));
LOG(ERROR) << message;
} while (message != "\"switchToPassword\""); } while (message != "\"switchToPassword\"");
std::string set_password = password_input + ".value = '$Password'"; std::string set_password = password_input + ".value = '$Password'";
...@@ -334,12 +333,7 @@ IN_PROC_BROWSER_TEST_F(LoginTest, PRE_GaiaAuthOffline) { ...@@ -334,12 +333,7 @@ IN_PROC_BROWSER_TEST_F(LoginTest, PRE_GaiaAuthOffline) {
chromeos::kAccountsPrefShowUserNamesOnSignIn, false); chromeos::kAccountsPrefShowUserNamesOnSignIn, false);
} }
#if defined(MEMORY_SANITIZER) IN_PROC_BROWSER_TEST_F(LoginTest, GaiaAuthOffline) {
#define MAYBE_GaiaAuthOffline DISABLED_GaiaAuthOffline
#else
#define MAYBE_GaiaAuthOffline GaiaAuthOffline
#endif
IN_PROC_BROWSER_TEST_F(LoginTest, MAYBE_GaiaAuthOffline) {
PrepareOfflineLogin(); PrepareOfflineLogin();
content::WindowedNotificationObserver session_start_waiter( content::WindowedNotificationObserver session_start_waiter(
chrome::NOTIFICATION_SESSION_STARTED, chrome::NOTIFICATION_SESSION_STARTED,
......
...@@ -796,6 +796,8 @@ login.createScreen('GaiaSigninScreen', 'gaia-signin', function() { ...@@ -796,6 +796,8 @@ login.createScreen('GaiaSigninScreen', 'gaia-signin', function() {
* Reloads extension frame. * Reloads extension frame.
*/ */
doReload: function() { doReload: function() {
if (this.isLocal)
return;
this.error_ = 0; this.error_ = 0;
this.gaiaAuthHost_.reload(); this.gaiaAuthHost_.reload();
this.loading = true; this.loading = true;
......
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