diff options
author | Phaedrus Leeds <mwleeds@protonmail.com> | 2021-12-03 13:47:07 -0800 |
---|---|---|
committer | Marge Bot <marge-bot@gnome.org> | 2021-12-09 01:43:32 +0000 |
commit | af86b96ba187f67417d389ba8c6ce722d2dc0742 (patch) | |
tree | c96d6f902e12bfd6dcfbc261af1a38f5d2cef915 /tests | |
parent | 990a7b79f664c1658078811b34029fbbed8adedd (diff) | |
download | epiphany-af86b96ba187f67417d389ba8c6ce722d2dc0742.tar.gz |
Detect Snap sandbox in addition to Flatpak
Snaps use the same portals as Flatpak, so we should detect whether we're
running as a Snap when deciding whether to use portals or disable
features that are impossible in these different but similar sandboxing
technologies.
This is mostly academic because the Snap of Epiphany appears to be
outdated, but it is more correct so let's do it.
Part-of: <https://gitlab.gnome.org/GNOME/epiphany/-/merge_requests/1041>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/ephy-file-helpers-test.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/ephy-file-helpers-test.c b/tests/ephy-file-helpers-test.c index b3139b67e..a591e2b58 100644 --- a/tests/ephy-file-helpers-test.c +++ b/tests/ephy-file-helpers-test.c @@ -102,7 +102,7 @@ typedef struct { const char *key_value; const char *expected; GUserDirectory user_dir; - gboolean in_flatpak; + gboolean in_sandbox; } DownloadsDirTest; static const DownloadsDirTest downloads_tests[] = { @@ -118,7 +118,7 @@ static void test_ephy_file_get_downloads_dir (void) { guint i; - gboolean in_flatpak = ephy_is_running_inside_flatpak (); + gboolean in_sandbox = ephy_is_running_inside_sandbox (); ephy_file_helpers_init (NULL, EPHY_FILE_HELPERS_PRIVATE_PROFILE, NULL); @@ -129,7 +129,7 @@ test_ephy_file_get_downloads_dir (void) test = downloads_tests[i]; - if (in_flatpak && !test.in_flatpak) + if (in_sandbox && !test.in_sandbox) continue; if (test.expected != NULL) @@ -348,7 +348,7 @@ main (int argc, g_test_add_func ("/lib/ephy-file-helpers/get_downloads_dir", test_ephy_file_get_downloads_dir); - if (!ephy_is_running_inside_flatpak ()) + if (!ephy_is_running_inside_sandbox ()) g_test_add_func ("/lib/ephy-file-helpers/create_delete_dir", test_ephy_file_create_delete_dir); |