| Index: chrome/browser/resources/chromeos/chromevox/cvox2/background/tabs_automation_handler.js
|
| diff --git a/chrome/browser/resources/chromeos/chromevox/cvox2/background/tabs_automation_handler.js b/chrome/browser/resources/chromeos/chromevox/cvox2/background/tabs_automation_handler.js
|
| index 836c23c51f43ff1f7145c023806a45bca479501f..429a5f6ad77afdb71ead45748cb66baba042cc0c 100644
|
| --- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/tabs_automation_handler.js
|
| +++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/tabs_automation_handler.js
|
| @@ -27,9 +27,11 @@ TabsAutomationHandler = function(tabRoot) {
|
|
|
| // When the root is focused, simulate what happens on a load complete.
|
| if (tabRoot.state.focused) {
|
| - this.onLoadComplete(
|
| - new chrome.automation.AutomationEvent(EventType.loadComplete, tabRoot,
|
| - 'page'));
|
| + var event = new chrome.automation.AutomationEvent();
|
| + event.type = EventType.loadComplete;
|
| + event.target = tabRoot;
|
| + event.eventFrom = 'page';
|
| + this.onLoadComplete(event);
|
| }
|
| };
|
|
|
| @@ -44,8 +46,11 @@ TabsAutomationHandler.prototype = {
|
| /** @override */
|
| onLoadComplete: function(evt) {
|
| var focused = evt.target.find({state: {focused: true}}) || evt.target;
|
| - this.onFocus(new chrome.automation.AutomationEvent(
|
| - EventType.focus, focused, evt.eventFrom));
|
| + var event = new chrome.automation.AutomationEvent();
|
| + event.type = EventType.focus;
|
| + event.target = focused;
|
| + event.eventFrom = evt.eventFrom;
|
| + this.onFocus(event);
|
| }
|
| };
|
|
|
|
|