summaryrefslogtreecommitdiffstats
path: root/testing/mochitest
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:35:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:35:29 +0000
commit59203c63bb777a3bacec32fb8830fba33540e809 (patch)
tree58298e711c0ff0575818c30485b44a2f21bf28a0 /testing/mochitest
parentAdding upstream version 126.0.1. (diff)
downloadfirefox-59203c63bb777a3bacec32fb8830fba33540e809.tar.xz
firefox-59203c63bb777a3bacec32fb8830fba33540e809.zip
Adding upstream version 127.0.upstream/127.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/mochitest')
-rw-r--r--testing/mochitest/ignorePrefs.json2
-rw-r--r--testing/mochitest/mochitest_options.py8
-rw-r--r--testing/mochitest/runtests.py12
-rw-r--r--testing/mochitest/tests/browser/browser_waitForFocus.js8
4 files changed, 19 insertions, 11 deletions
diff --git a/testing/mochitest/ignorePrefs.json b/testing/mochitest/ignorePrefs.json
index 7689f7f5f3..1af646fe95 100644
--- a/testing/mochitest/ignorePrefs.json
+++ b/testing/mochitest/ignorePrefs.json
@@ -15,9 +15,7 @@
"browser.uiCustomization.state",
"doh-rollout.doneFirstRun",
"extensions.databaseSchema",
- "extensions.dnr.lastStoreUpdateTag.*",
"extensions.webextensions.ExtensionStorageIDB.migrated.*",
- "extensions.webextensions.uuids",
"media.gmp.storage.version.observed",
"media.gmp-manager.buildID",
"media.gmp-manager.lastCheck",
diff --git a/testing/mochitest/mochitest_options.py b/testing/mochitest/mochitest_options.py
index 0b4a03f5b2..552c8c88cd 100644
--- a/testing/mochitest/mochitest_options.py
+++ b/testing/mochitest/mochitest_options.py
@@ -945,6 +945,14 @@ class MochitestArguments(ArgumentContainer):
"help": "Terminate the session on first failure and restart where you left off.",
},
],
+ [
+ ["--variant"],
+ {
+ "dest": "variant",
+ "default": "",
+ "help": "use specified variant for any harness level changes.",
+ },
+ ],
]
defaults = {
diff --git a/testing/mochitest/runtests.py b/testing/mochitest/runtests.py
index 912ed01af6..4776ae2276 100644
--- a/testing/mochitest/runtests.py
+++ b/testing/mochitest/runtests.py
@@ -60,9 +60,11 @@ try:
from marionette_driver.addons import Addons
from marionette_driver.marionette import Marionette
except ImportError as e: # noqa
+ error = e
+
# Defer ImportError until attempt to use Marionette
def reraise(*args, **kwargs):
- raise (e) # noqa
+ raise error # noqa
Marionette = reraise
@@ -2407,14 +2409,14 @@ toolbar#nav-bar {
# Whitelist the _tests directory (../..) so that TESTING_JS_MODULES work
tests_dir = os.path.dirname(os.path.dirname(SCRIPT_DIR))
- sandbox_whitelist_paths = [tests_dir] + options.sandboxReadWhitelist
+ sandbox_allowlist_paths = [tests_dir] + options.sandboxReadWhitelist
if platform.system() == "Linux" or platform.system() in (
"Windows",
"Microsoft",
):
# Trailing slashes are needed to indicate directories on Linux and Windows
- sandbox_whitelist_paths = [
- os.path.join(p, "") for p in sandbox_whitelist_paths
+ sandbox_allowlist_paths = [
+ os.path.join(p, "") for p in sandbox_allowlist_paths
]
if options.conditionedProfile:
@@ -2437,7 +2439,7 @@ toolbar#nav-bar {
addons=extensions,
locations=self.locations,
proxy=self.proxy(options),
- whitelistpaths=sandbox_whitelist_paths,
+ allowlistpaths=sandbox_allowlist_paths,
)
# Fix options.profilePath for legacy consumers.
diff --git a/testing/mochitest/tests/browser/browser_waitForFocus.js b/testing/mochitest/tests/browser/browser_waitForFocus.js
index b41b07f423..93d682525a 100644
--- a/testing/mochitest/tests/browser/browser_waitForFocus.js
+++ b/testing/mochitest/tests/browser/browser_waitForFocus.js
@@ -103,12 +103,12 @@ add_task(async function () {
// Tests focusing the sidebar, which is in a parent process subframe
// and then switching the focus to another window.
add_task(async function () {
- await SidebarUI.show("viewBookmarksSidebar");
+ await SidebarController.show("viewBookmarksSidebar");
gURLBar.focus();
// Focus the sidebar.
- await SimpleTest.promiseFocus(SidebarUI.browser);
+ await SimpleTest.promiseFocus(SidebarController.browser);
is(
document.activeElement,
document.getElementById("sidebar"),
@@ -120,7 +120,7 @@ add_task(async function () {
);
// Focus the sidebar again, which should cause no change.
- await SimpleTest.promiseFocus(SidebarUI.browser);
+ await SimpleTest.promiseFocus(SidebarController.browser);
is(
document.activeElement,
document.getElementById("sidebar"),
@@ -156,5 +156,5 @@ add_task(async function () {
);
await BrowserTestUtils.closeWindow(window2);
- await SidebarUI.hide();
+ await SidebarController.hide();
});