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

Unified Diff: chrome/browser/resources/chromeos/chromevox/testing/chromevox_next_e2e_test_base.js

Issue 880063002: Ensure WebView notifies desktop automation on creation, destruction, and change (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix leaks? Created 5 years, 11 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/chromevox/testing/chromevox_next_e2e_test_base.js
diff --git a/chrome/browser/resources/chromeos/chromevox/testing/chromevox_next_e2e_test_base.js b/chrome/browser/resources/chromeos/chromevox/testing/chromevox_next_e2e_test_base.js
index e432a998de5f9d711f04ff24f136c4ef8509eeee..038155fe3dff1d8360f4b18982d0b3adaa94ee40 100644
--- a/chrome/browser/resources/chromeos/chromevox/testing/chromevox_next_e2e_test_base.js
+++ b/chrome/browser/resources/chromeos/chromevox/testing/chromevox_next_e2e_test_base.js
@@ -32,7 +32,14 @@ ChromeVoxNextE2ETest.prototype = {
runWithAutomation: function(doc, callback) {
this.runWithDocument(doc, function() {
chrome.automation.getTree(function(root) {
- callback(root);
+ if (root.children.length == 0) {
+ root.addEventListener('loadComplete',
+ function() {
+ callback(root);
+ }.bind(this), true);
+ } else {
+ callback(root);
+ }
}.bind(this));
}.bind(this));
}

Powered by Google App Engine
This is Rietveld 408576698