mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-27 19:09:47 +00:00
Backed out changeset bbf22ebcac51 (bug 1065933) for Gip orange
This commit is contained in:
parent
17d41ed59f
commit
0fca9e18eb
@ -373,19 +373,6 @@ MarionetteServerConnection.prototype = {
|
||||
return Services.wm.getEnumerator(type);
|
||||
},
|
||||
|
||||
/**
|
||||
*/
|
||||
addFrameCloseListener: function MDA_addFrameCloseListener(action) {
|
||||
let curWindow = this.getCurrentWindow();
|
||||
let self = this;
|
||||
this.mozBrowserClose = function() {
|
||||
curWindow.removeEventListener('mozbrowserclose', self.mozBrowserClose, true);
|
||||
self.switchToGlobalMessageManager();
|
||||
self.sendError("The frame closed during the " + action + ", recovering to allow further communications", 500, null, self.command_id);
|
||||
};
|
||||
curWindow.addEventListener('mozbrowserclose', this.mozBrowserClose, true);
|
||||
},
|
||||
|
||||
/**
|
||||
* Create a new BrowserObj for window and add to known browsers
|
||||
*
|
||||
@ -1539,7 +1526,6 @@ MarionetteServerConnection.prototype = {
|
||||
this.sendError("Command 'singleTap' is not available in chrome context", 500, null, this.command_id);
|
||||
}
|
||||
else {
|
||||
this.addFrameCloseListener("tap");
|
||||
this.sendAsync("singleTap",
|
||||
{
|
||||
id: serId,
|
||||
@ -1562,7 +1548,6 @@ MarionetteServerConnection.prototype = {
|
||||
this.sendError("Command 'actionChain' is not available in chrome context", 500, null, this.command_id);
|
||||
}
|
||||
else {
|
||||
this.addFrameCloseListener("action chain");
|
||||
this.sendAsync("actionChain",
|
||||
{
|
||||
chain: aRequest.parameters.chain,
|
||||
@ -1587,7 +1572,6 @@ MarionetteServerConnection.prototype = {
|
||||
this.sendError("Command 'multiAction' is not available in chrome context", 500, null, this.command_id);
|
||||
}
|
||||
else {
|
||||
this.addFrameCloseListener("multi action chain");
|
||||
this.sendAsync("multiAction",
|
||||
{
|
||||
value: aRequest.parameters.value,
|
||||
@ -1750,7 +1734,14 @@ MarionetteServerConnection.prototype = {
|
||||
// This fires the mozbrowserclose event when it closes so we need to
|
||||
// listen for it and then just send an error back. The person making the
|
||||
// call should be aware something isnt right and handle accordingly
|
||||
this.addFrameCloseListener("click");
|
||||
let curWindow = this.getCurrentWindow();
|
||||
let self = this;
|
||||
this.mozBrowserClose = function() {
|
||||
curWindow.removeEventListener('mozbrowserclose', self.mozBrowserClose, true);
|
||||
self.switchToGlobalMessageManager();
|
||||
self.sendError("The frame closed during the click, recovering to allow further communications", 500, null, command_id);
|
||||
};
|
||||
curWindow.addEventListener('mozbrowserclose', this.mozBrowserClose, true);
|
||||
this.sendAsync("clickElement",
|
||||
{ id: aRequest.parameters.id },
|
||||
command_id);
|
||||
|
Loading…
Reference in New Issue
Block a user