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

Unified Diff: chrome/renderer/resources/extensions/automation/automation_node.js

Issue 940763002: Reland #4: Ensure WebView notifies desktop automation on creation, (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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/renderer/resources/extensions/automation/automation_node.js
diff --git a/chrome/renderer/resources/extensions/automation/automation_node.js b/chrome/renderer/resources/extensions/automation/automation_node.js
index 9dcf62619a5586e0e62426f8486d4cbbe1a8bd1b..115419862ae5ca8c5c05f154711b479cda5cf256 100644
--- a/chrome/renderer/resources/extensions/automation/automation_node.js
+++ b/chrome/renderer/resources/extensions/automation/automation_node.js
@@ -728,18 +728,20 @@ AutomationRootNodeImpl.prototype = {
// TODO(dtseng): Make into set listing all hosting node roles.
if (nodeData.role == schema.RoleType.webView) {
- if (nodeImpl.pendingChildFrame === undefined)
+ if (nodeImpl.childTreeID !== nodeData.intAttributes.childTreeId)
nodeImpl.pendingChildFrame = true;
if (nodeImpl.pendingChildFrame) {
nodeImpl.childTreeID = nodeData.intAttributes.childTreeId;
- automationInternal.enableFrame(nodeImpl.childTreeID);
automationUtil.storeTreeCallback(nodeImpl.childTreeID, function(root) {
nodeImpl.pendingChildFrame = false;
nodeImpl.childTree = root;
privates(root).impl.hostTree = node;
+ if (root.attributes.docLoadingProgress == 1)
+ privates(root).impl.dispatchEvent(schema.EventType.loadComplete);
nodeImpl.dispatchEvent(schema.EventType.childrenChanged);
});
+ automationInternal.enableFrame(nodeImpl.childTreeID);
}
}
for (var key in AutomationAttributeDefaults) {
« no previous file with comments | « chrome/browser/resources/chromeos/chromevox/testing/mock_tts.js ('k') | chrome/test/base/extension_js_browser_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698