Skip to content

Commit

Permalink
Bug 1875085 - [marionette] Fallback to type hint "tab" in "WebDriver:…
Browse files Browse the repository at this point in the history
…NewWindow` on Android when "window" is specified. r=webdriver-reviewers,jdescottes

Differential Revision: https://phabricator.services.mozilla.com/D199130
  • Loading branch information
whimboo committed Jan 29, 2024
1 parent a5249be commit d60ce00
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
8 changes: 7 additions & 1 deletion remote/marionette/driver.sys.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2244,7 +2244,13 @@ GeckoDriver.prototype.newWindow = async function (cmd) {
}

// If an invalid or no type has been specified default to a tab.
if (typeof type == "undefined" || !["tab", "window"].includes(type)) {
// On Android always use a new tab instead because the application has a
// single window only.
if (
typeof type == "undefined" ||
!["tab", "window"].includes(type) ||
lazy.AppInfo.isAndroid
) {
type = "tab";
}

Expand Down

This file was deleted.

0 comments on commit d60ce00

Please sign in to comment.