[epiphany] Disable adblock filters on automation mode.
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] Disable adblock filters on automation mode.
- Date: Fri, 27 Sep 2019 03:26:10 +0000 (UTC)
commit 54b56b0dcecb6eb81f1bee91e529db015199fed7
Author: Carlos Alberto Lopez Perez <clopez igalia com>
Date: Thu Sep 26 16:16:16 2019 +0200
Disable adblock filters on automation mode.
* The compilation of filters happens each time a new epiphany
instance is launched. That slows down the process startup and contributes
to causing timeouts on WebDriver tests.
* It also seems there is a race condition somewhere, that causes the
/tmp folder to be filed with lots of content filters when runnning
several WebDriver tests (for example with a test suite like WPT).
* Since enabling adblock filters when using automation mode doesn't
make much sense, lets disable it.
https://gitlab.gnome.org/GNOME/epiphany/merge_requests/438
embed/ephy-filters-manager.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/embed/ephy-filters-manager.c b/embed/ephy-filters-manager.c
index 7d7362056..f9c5b4f6e 100644
--- a/embed/ephy-filters-manager.c
+++ b/embed/ephy-filters-manager.c
@@ -26,6 +26,7 @@
#include "ephy-file-helpers.h"
#include "ephy-prefs.h"
#include "ephy-settings.h"
+#include "ephy-embed-shell.h"
#include <gio/gio.h>
@@ -837,7 +838,8 @@ update_adblock_filter_files_cb (GSettings *settings,
g_assert (manager);
- if (!g_settings_get_boolean (EPHY_SETTINGS_WEB, EPHY_PREFS_WEB_ENABLE_ADBLOCK)) {
+ if ((!g_settings_get_boolean (EPHY_SETTINGS_WEB, EPHY_PREFS_WEB_ENABLE_ADBLOCK)) ||
+ (ephy_embed_shell_get_mode (ephy_embed_shell_get_default ()) == EPHY_EMBED_SHELL_MODE_AUTOMATION)) {
LOG ("Filters are disabled, skipping update.");
g_signal_emit (manager, s_signals[FILTERS_DISABLED], 0);
/* If the ad blocker is disabled, initialization is done. */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]