summaryrefslogtreecommitdiffstats
path: root/security/sandbox/test/browser_content_sandbox_fs_snap.js
diff options
context:
space:
mode:
Diffstat (limited to 'security/sandbox/test/browser_content_sandbox_fs_snap.js')
-rw-r--r--security/sandbox/test/browser_content_sandbox_fs_snap.js31
1 files changed, 31 insertions, 0 deletions
diff --git a/security/sandbox/test/browser_content_sandbox_fs_snap.js b/security/sandbox/test/browser_content_sandbox_fs_snap.js
new file mode 100644
index 0000000000..a8b26a1e31
--- /dev/null
+++ b/security/sandbox/test/browser_content_sandbox_fs_snap.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 SNAP is there
+ const snap = Services.env.get("SNAP");
+ ok(snap.length > 1, "SNAP is defined");
+
+ // If it is there, do actual testing
+ sanityChecks();
+
+ add_task(testFileAccessLinuxOnly); // eslint-disable-line no-undef
+
+ add_task(testFileAccessLinuxSnap); // eslint-disable-line no-undef
+
+ add_task(cleanupBrowserTabs); // eslint-disable-line no-undef
+});