diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 17:32:43 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 17:32:43 +0000 |
commit | 6bf0a5cb5034a7e684dcc3500e841785237ce2dd (patch) | |
tree | a68f146d7fa01f0134297619fbe7e33db084e0aa /security/sandbox/test/browser_content_sandbox_fs_xdg.js | |
parent | Initial commit. (diff) | |
download | thunderbird-upstream.tar.xz thunderbird-upstream.zip |
Adding upstream version 1:115.7.0.upstream/1%115.7.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'security/sandbox/test/browser_content_sandbox_fs_xdg.js')
-rw-r--r-- | security/sandbox/test/browser_content_sandbox_fs_xdg.js | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/security/sandbox/test/browser_content_sandbox_fs_xdg.js b/security/sandbox/test/browser_content_sandbox_fs_xdg.js new file mode 100644 index 0000000000..f5150fc329 --- /dev/null +++ b/security/sandbox/test/browser_content_sandbox_fs_xdg.js @@ -0,0 +1,31 @@ +/* Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/publicdomain/zero/1.0/ */ +/* import-globals-from browser_content_sandbox_utils.js */ +"use strict"; + +Services.scriptloader.loadSubScript( + "chrome://mochitests/content/browser/" + + "security/sandbox/test/browser_content_sandbox_utils.js", + this +); + +Services.scriptloader.loadSubScript( + "chrome://mochitests/content/browser/" + + "security/sandbox/test/browser_content_sandbox_fs_tests.js", + this +); + +add_task(async function () { + // Ensure that XDG_CONFIG_HOME is there + const xdgConfigHome = Services.env.get("XDG_CONFIG_HOME"); + ok(xdgConfigHome.length > 1, "XDG_CONFIG_HOME is defined"); + + // If it is there, do actual testing + sanityChecks(); + + // The linux only tests are the ones that can behave differently based on + // existence of XDG_CONFIG_HOME + add_task(testFileAccessLinuxOnly); // eslint-disable-line no-undef + + add_task(cleanupBrowserTabs); // eslint-disable-line no-undef +}); |