Bug 1676665 - [marionette] Remove setBrowsingContextId from framescript. r=marionette-reviewers,jdescottes

With all the commands implemented by the MarionetteCommands
JSWindowActor pair there is no need anymore to update the
framescript when actors are enabled.

Differential Revision: https://phabricator.services.mozilla.com/D97178
This commit is contained in:
Henrik Skupin 2020-11-17 11:20:15 +00:00
parent ffa039f01f
commit 508ac310f1
2 changed files with 0 additions and 42 deletions

View File

@ -1615,15 +1615,6 @@ GeckoDriver.prototype.switchToWindow = async function(cmd) {
try {
await this.setWindowHandle(found, focus);
selected = true;
// Temporarily inform the framescript of the current browsing context to
// allow sending the correct page load events. This has to be done until
// the framescript is no longer in use (bug 1669172).
if (this.context == Context.Content) {
await this.listener.setBrowsingContextId(
this.contentBrowsingContext.id
);
}
} catch (e) {
logger.error(e);
}
@ -1759,14 +1750,6 @@ GeckoDriver.prototype.switchToParentFrame = async function() {
if (MarionettePrefs.useActors) {
this.contentBrowsingContext = browsingContext;
// Temporarily inform the framescript of the current browsing context to
// allow sending the correct page load events. This has to be done until
// the web progress listener is used (bug 1664165).
if (this.context == Context.Content) {
await this.listener.setBrowsingContextId(browsingContext.id);
}
return;
}
@ -1814,14 +1797,6 @@ GeckoDriver.prototype.switchToFrame = async function(cmd) {
);
this.contentBrowsingContext = browsingContext;
// Temporarily inform the framescript of the current browsing context to
// allow sending the correct page load events. This has to be done until
// the web progress listener is used (bug 1664165).
if (this.context == Context.Content) {
await this.listener.setBrowsingContextId(browsingContext.id);
}
return;
}

View File

@ -144,7 +144,6 @@ let actionChainFn = dispatch(actionChain);
let multiActionFn = dispatch(multiAction);
let executeScriptFn = dispatch(executeScript);
let sendKeysToElementFn = dispatch(sendKeysToElement);
let setBrowsingContextIdFn = dispatch(setBrowsingContextId);
function startListeners() {
if (!MarionettePrefs.useActors) {
@ -185,7 +184,6 @@ function startListeners() {
addMessageListener("Marionette:releaseActions", releaseActionsFn);
addMessageListener("Marionette:sendKeysToElement", sendKeysToElementFn);
addMessageListener("Marionette:Session:Delete", deleteSession);
addMessageListener("Marionette:setBrowsingContextId", setBrowsingContextIdFn);
addMessageListener("Marionette:singleTap", singleTapFn);
addMessageListener("Marionette:switchToFrame", switchToFrame);
addMessageListener("Marionette:switchToParentFrame", switchToParentFrame);
@ -234,10 +232,6 @@ function deregister() {
removeMessageListener("Marionette:releaseActions", releaseActionsFn);
removeMessageListener("Marionette:sendKeysToElement", sendKeysToElementFn);
removeMessageListener("Marionette:Session:Delete", deleteSession);
removeMessageListener(
"Marionette:setBrowsingContextId",
setBrowsingContextIdFn
);
removeMessageListener("Marionette:singleTap", singleTapFn);
removeMessageListener("Marionette:switchToFrame", switchToFrame);
removeMessageListener("Marionette:switchToParentFrame", switchToParentFrame);
@ -628,17 +622,6 @@ function getBrowsingContextId(topContext = false) {
return topContext ? bc.top.id : bc.id;
}
/**
* Set the current browsing context.
*
* @param {number} browsingContextId
* Id of the current BrowsingContext.
*/
function setBrowsingContextId(browsingContextId) {
const bc = BrowsingContext.get(browsingContextId);
curContainer.frame = bc.window;
}
/**
* Return the current visible URL.
*