зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1612831 - [marionette] Switch to top-level frame before checking current URL. r=marionette-reviewers,maja_zf
The navigation command is always executed on the top-level browsing context. As such the check for a possible load event should not be done for the currently selected frame. At the same time the switch to frame call can be moved to the parent process. Differential Revision: https://phabricator.services.mozilla.com/D80619
This commit is contained in:
Родитель
8763d1f577
Коммит
e64bbc774d
|
@ -1153,6 +1153,9 @@ GeckoDriver.prototype.navigateTo = async function(cmd) {
|
|||
throw new InvalidArgumentError(`Malformed URL: ${e.message}`);
|
||||
}
|
||||
|
||||
// We need to move to the top frame before navigating
|
||||
await this.listener.switchToFrame();
|
||||
|
||||
const navigated = this.listener.navigateTo({
|
||||
url: validURL.spec,
|
||||
pageTimeout: this.timeouts.pageLoad,
|
||||
|
|
|
@ -1133,10 +1133,6 @@ function navigateTo(msg) {
|
|||
url
|
||||
);
|
||||
|
||||
// We need to move to the top frame before navigating
|
||||
sendSyncMessage("Marionette:switchedToFrame", { frameValue: null });
|
||||
curContainer.frame = content;
|
||||
|
||||
loadListener.navigate(
|
||||
() => {
|
||||
curContainer.frame.location = url;
|
||||
|
|
Загрузка…
Ссылка в новой задаче