summaryrefslogtreecommitdiffstats
path: root/security/sandbox/test/browser_content_sandbox_fs_snap.js
blob: a8b26a1e3134395bfbdb3b843562f54f600f6452 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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
});