Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5599)

Unified Diff: chrome/browser/resources/chromeos/login/login_shared.js

Issue 2944703004: Run clang-format on .js files in c/b/r/chromeos (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/chromeos/login/login_shared.js
diff --git a/chrome/browser/resources/chromeos/login/login_shared.js b/chrome/browser/resources/chromeos/login/login_shared.js
index e073b61eca415412285ff7298d38c37ff720f842..b6035a490d934e3ca0089c8ed230f89beac7d273 100644
--- a/chrome/browser/resources/chromeos/login/login_shared.js
+++ b/chrome/browser/resources/chromeos/login/login_shared.js
@@ -21,7 +21,8 @@
// <include src="../../../../../ui/login/display_manager.js">
// <include src="header_bar.js">
-// <include src="../../../../../ui/login/account_picker/screen_account_picker.js">
+// <include
+// src="../../../../../ui/login/account_picker/screen_account_picker.js">
// <include src="../../../../../ui/login/login_ui_tools.js">
// <include src="../../../../../ui/login/account_picker/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');
};
/**
@@ -437,9 +437,7 @@ cr.define('cr.ui', function() {
};
// Export
- return {
- Oobe: Oobe
- };
+ return {Oobe: Oobe};
});
var Oobe = cr.ui.Oobe;
@@ -449,30 +447,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);
+};
})();

Powered by Google App Engine
This is Rietveld 408576698