| 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 314c671eb3a639b26024e92e530807b18cae6116..def1ebd67a78fa19a92c2ac3153946415edfd7da 100644
|
| --- a/chrome/browser/resources/chromeos/login/login_shared.js
|
| +++ b/chrome/browser/resources/chromeos/login/login_shared.js
|
| @@ -52,6 +52,16 @@ cr.define('cr.ui', function() {
|
| };
|
|
|
| /**
|
| + * Some ForTesting APIs directly access to DOM. Because this script is loaded
|
| + * in header, DOM tree may not be available at beginning.
|
| + * In DOMContentLoaded, this is marked to true, indicating ForTesting methods
|
| + * can be called.
|
| + * External script using ForTesting APIs should wait for this condition.
|
| + * @type {boolean}
|
| + */
|
| + Oobe.readyForTesting = false;
|
| +
|
| + /**
|
| * Handle accelerators. These are passed from native code instead of a JS
|
| * event handler in order to make sure that embedded iframes cannot swallow
|
| * them.
|
| @@ -440,6 +450,7 @@ disableTextSelectAndDrag(function(e) {
|
|
|
| document.addEventListener('DOMContentLoaded', function() {
|
| Oobe.initialize();
|
| + Oobe.readyForTesting = true;
|
| });
|
|
|
| // Install a global error handler so stack traces are included in logs.
|
| @@ -447,4 +458,3 @@ disableTextSelectAndDrag(function(e) {
|
| console.error(error.stack);
|
| }
|
| })();
|
| -
|
|
|