diff options
author | Michael Catanzaro <mcatanzaro@igalia.com> | 2019-02-14 22:18:28 +0000 |
---|---|---|
committer | Michael Catanzaro <mcatanzaro@posteo.net> | 2019-02-15 19:29:01 +0000 |
commit | 4d115e4e9b8a35abdac45b874ebee52f7136f3bd (patch) | |
tree | eefa1a0ccf5b2383c8836774b0983b9e202b637a | |
parent | 530bdf3b274d3619c9529f2c5f216ee98026da09 (diff) | |
download | epiphany-4d115e4e9b8a35abdac45b874ebee52f7136f3bd.tar.gz |
embed-shell-test: stop messing with environment
None of this is needed, and it breaks when system schemas are not
installed.
We no longer have custom MIME permissions either.
Fixes #675
(cherry picked from commit 2f568a1dad76eb9b08f9e43eb6fd75ce0c3d9cf8)
-rw-r--r-- | tests/ephy-embed-shell-test.c | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/tests/ephy-embed-shell-test.c b/tests/ephy-embed-shell-test.c index 258fc6f37..1f233dd94 100644 --- a/tests/ephy-embed-shell-test.c +++ b/tests/ephy-embed-shell-test.c @@ -57,32 +57,6 @@ int main (int argc, char *argv[]) { int ret; - const char *xdg_data_dirs; - char *new_xdg_data_dirs; - char **dirs = NULL; - char *schemas_dir; - - /* Save XDG_DATA_DIRS to set GSETTINGS_SCHEMA_DIR, otherwise we - * won't find the sytem schemas. */ - xdg_data_dirs = g_getenv ("XDG_DATA_DIRS"); - if (!xdg_data_dirs) - xdg_data_dirs = "/usr/local/share/:/usr/share/"; - - dirs = g_strsplit (xdg_data_dirs, ":", -1); - - /* We can only use one directory, so use the first one or the system default. */ - schemas_dir = g_build_filename (dirs[0], "glib-2.0", "schemas", NULL); - g_setenv ("GSETTINGS_SCHEMA_DIR", schemas_dir, TRUE); - g_strfreev (dirs); - g_free (schemas_dir); - - /* We need to make sure that XDG_DATA_DIRS includes a sensible - directory where to find the mimetype database, otherwise bad - stuff will happen. Prefix TEST_DIR for the test purposes. */ - new_xdg_data_dirs = g_strconcat (TEST_DIR, ":", xdg_data_dirs, NULL); - g_setenv ("XDG_DATA_DIRS", new_xdg_data_dirs, TRUE); - g_setenv ("XDG_DATA_HOME", TEST_DIR, TRUE); - g_free (new_xdg_data_dirs); gtk_test_init (&argc, &argv); |