From d60ce00d861d7a214f0d6e25c8ab8dca6ef2a6d3 Mon Sep 17 00:00:00 2001 From: Henrik Skupin Date: Mon, 29 Jan 2024 09:59:08 +0000 Subject: [PATCH] Bug 1875085 - [marionette] Fallback to type hint "tab" in "WebDriver:NewWindow` on Android when "window" is specified. r=webdriver-reviewers,jdescottes Differential Revision: https://phabricator.services.mozilla.com/D199130 --- remote/marionette/driver.sys.mjs | 8 +++++++- .../webdriver/tests/classic/new_window/new_window.py.ini | 3 --- 2 files changed, 7 insertions(+), 4 deletions(-) delete mode 100644 testing/web-platform/meta/webdriver/tests/classic/new_window/new_window.py.ini diff --git a/remote/marionette/driver.sys.mjs b/remote/marionette/driver.sys.mjs index 939ecda56600e..241afe8395cb0 100644 --- a/remote/marionette/driver.sys.mjs +++ b/remote/marionette/driver.sys.mjs @@ -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"; } diff --git a/testing/web-platform/meta/webdriver/tests/classic/new_window/new_window.py.ini b/testing/web-platform/meta/webdriver/tests/classic/new_window/new_window.py.ini deleted file mode 100644 index 44e59e0a6f19c..0000000000000 --- a/testing/web-platform/meta/webdriver/tests/classic/new_window/new_window.py.ini +++ /dev/null @@ -1,3 +0,0 @@ -[new_window.py] - disabled: - if os == "android": Not supported