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

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

Issue 2805033002: Fix flaky NPE in oobe.js. (Closed)
Patch Set: Created 3 years, 8 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..5e2561f647d76f1c1de2f0d51a687ef38cb0308d 100644
--- a/chrome/browser/resources/chromeos/login/login_shared.js
+++ b/chrome/browser/resources/chromeos/login/login_shared.js
@@ -440,6 +440,12 @@ disableTextSelectAndDrag(function(e) {
document.addEventListener('DOMContentLoaded', function() {
Oobe.initialize();
+
+ // Some ForTesting APIs directly access to DOM. Because this script
+ // is loaded in header, DOM tree may not be available at beginning.
+ // initialize() is called on DOMContentLoaded, so here mark ready,
+ // and let the external script wait for this condition.
+ Oobe.readyForTesting = true;
});
// Install a global error handler so stack traces are included in logs.
@@ -447,4 +453,3 @@ disableTextSelectAndDrag(function(e) {
console.error(error.stack);
}
})();
-
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698