diff options
author | Jan-Michael Brummer <jan.brummer@tabos.org> | 2020-08-25 17:01:56 +0200 |
---|---|---|
committer | Jan-Michael Brummer <jan.brummer@tabos.org> | 2020-08-25 17:04:16 +0200 |
commit | 73914f7ffde3dbf644792a2f6511de5556e2154a (patch) | |
tree | 165c67314cd5b46a292e244231662727520357eb | |
parent | 5e56f6940d42dc94f6315472e95411a8cd85b5bf (diff) | |
download | epiphany-73914f7ffde3dbf644792a2f6511de5556e2154a.tar.gz |
filter-manager: Disable filter manager functionality in test mode
As filter manager is automatically started during ephy embed shell bringup it causes
network access (filter download). This breaks during offline tests for every
UI test.
Disable filter manager functionally in this case.
Fixes: https://gitlab.gnome.org/GNOME/epiphany/-/issues/1314
-rw-r--r-- | embed/ephy-filters-manager.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/embed/ephy-filters-manager.c b/embed/ephy-filters-manager.c index 32c00ed0b..0ca319e6f 100644 --- a/embed/ephy-filters-manager.c +++ b/embed/ephy-filters-manager.c @@ -950,6 +950,10 @@ ephy_filters_manager_constructed (GObject *object) G_OBJECT_CLASS (ephy_filters_manager_parent_class)->constructed (object); + /* Disable filter manager during tests */ + if (ephy_embed_shell_get_mode (ephy_embed_shell_get_default ()) == EPHY_EMBED_SHELL_MODE_TEST) + return; + if (!manager->filters_dir) { g_autofree char *cache_dir = ephy_default_cache_dir (); manager->filters_dir = g_build_filename (cache_dir, "adblock", NULL); |