| Index: chrome/browser/resources/chromeos/login/md_login_shared.js
|
| diff --git a/chrome/browser/resources/chromeos/login/md_login_shared.js b/chrome/browser/resources/chromeos/login/md_login_shared.js
|
| index 195102d869997e2a1e45f6959bf2d330da7c3aa4..24f2bec0f82b2c62787d552085837b187143003d 100644
|
| --- a/chrome/browser/resources/chromeos/login/md_login_shared.js
|
| +++ b/chrome/browser/resources/chromeos/login/md_login_shared.js
|
| @@ -21,7 +21,8 @@
|
| // <include src="../../../../../ui/login/display_manager.js">
|
| // <include src="md_header_bar.js">
|
|
|
| -// <include src="../../../../../ui/login/account_picker/md_screen_account_picker.js">
|
| +// <include
|
| +// src="../../../../../ui/login/account_picker/md_screen_account_picker.js">
|
|
|
| // <include src="../../../../../ui/login/login_ui_tools.js">
|
| // <include src="../../../../../ui/login/account_picker/md_user_pod_row.js">
|
| @@ -31,13 +32,12 @@ cr.define('cr.ui', function() {
|
| var DisplayManager = cr.ui.login.DisplayManager;
|
|
|
| /**
|
| - * Constructs an Out of box controller. It manages initialization of screens,
|
| - * transitions, error messages display.
|
| - * @extends {DisplayManager}
|
| - * @constructor
|
| - */
|
| - function Oobe() {
|
| - }
|
| + * Constructs an Out of box controller. It manages initialization of screens,
|
| + * transitions, error messages display.
|
| + * @extends {DisplayManager}
|
| + * @constructor
|
| + */
|
| + function Oobe() {}
|
|
|
| /**
|
| * Delay in milliseconds between start of OOBE animation and start of
|
| @@ -311,8 +311,8 @@ cr.define('cr.ui', function() {
|
| * @param {string} password Login password.
|
| * @param {boolean} enterpriseEnroll Login as an enterprise enrollment?
|
| */
|
| - Oobe.loginForTesting = function(username, password, gaia_id,
|
| - enterpriseEnroll = false) {
|
| + Oobe.loginForTesting = function(
|
| + username, password, gaia_id, enterpriseEnroll = false) {
|
| // Helper method that runs |fn| after |screenName| is visible.
|
| function waitForOobeScreen(screenName, fn) {
|
| if (Oobe.getInstance().currentScreen &&
|
| @@ -408,8 +408,8 @@ cr.define('cr.ui', function() {
|
| if (document.querySelector('.oauth-enroll-state-attribute-prompt'))
|
| chrome.send('oauthEnrollAttributes', ['', '']);
|
|
|
| - return $('oauth-enrollment').classList.contains(
|
| - 'oauth-enroll-state-success');
|
| + return $('oauth-enrollment')
|
| + .classList.contains('oauth-enroll-state-success');
|
| };
|
|
|
| /**
|
| @@ -443,9 +443,7 @@ cr.define('cr.ui', function() {
|
| };
|
|
|
| // Export
|
| - return {
|
| - Oobe: Oobe
|
| - };
|
| + return {Oobe: Oobe};
|
| });
|
|
|
| var Oobe = cr.ui.Oobe;
|
| @@ -455,30 +453,29 @@ var Oobe = cr.ui.Oobe;
|
| disableTextSelectAndDrag(function(e) {
|
| var src = e.target;
|
| return src instanceof HTMLTextAreaElement ||
|
| - src instanceof HTMLInputElement &&
|
| - /text|password|search/.test(src.type);
|
| + src instanceof HTMLInputElement && /text|password|search/.test(src.type);
|
| });
|
|
|
|
|
| (function() {
|
| - 'use strict';
|
| -
|
| - document.addEventListener('DOMContentLoaded', function() {
|
| - try {
|
| - Oobe.initialize();
|
| - } finally {
|
| - // TODO(crbug.com/712078): Do not set readyForTesting in case of that
|
| - // initialize() is failed. Currently, in some situation, initialize()
|
| - // raises an exception unexpectedly. It means testing APIs should not
|
| - // be called then. However, checking it here now causes bots failures
|
| - // unfortunately. So, as a short term workaround, here set
|
| - // readyForTesting even on failures, just to make test bots happy.
|
| - Oobe.readyForTesting = true;
|
| - }
|
| - });
|
| +'use strict';
|
| +
|
| +document.addEventListener('DOMContentLoaded', function() {
|
| + try {
|
| + Oobe.initialize();
|
| + } finally {
|
| + // TODO(crbug.com/712078): Do not set readyForTesting in case of that
|
| + // initialize() is failed. Currently, in some situation, initialize()
|
| + // raises an exception unexpectedly. It means testing APIs should not
|
| + // be called then. However, checking it here now causes bots failures
|
| + // unfortunately. So, as a short term workaround, here set
|
| + // readyForTesting even on failures, just to make test bots happy.
|
| + Oobe.readyForTesting = true;
|
| + }
|
| +});
|
|
|
| - // Install a global error handler so stack traces are included in logs.
|
| - window.onerror = function(message, file, line, column, error) {
|
| - console.error(error.stack);
|
| - };
|
| +// Install a global error handler so stack traces are included in logs.
|
| +window.onerror = function(message, file, line, column, error) {
|
| + console.error(error.stack);
|
| +};
|
| })();
|
|
|