[Xfce4-commits] <midori:master> Add initial unit test case for block-uris
Christian Dywan
noreply at xfce.org
Sun Nov 25 16:44:03 CET 2012
Updating branch refs/heads/master
to 2156fbbaee183591bcb41ee810e73c67f3ba3c98 (commit)
from df5a4cf946876646095856d9d7618ce9353098b3 (commit)
commit 2156fbbaee183591bcb41ee810e73c67f3ba3c98
Author: Christian Dywan <christian at twotoasts.de>
Date: Sun Nov 25 16:41:58 2012 +0100
Add initial unit test case for block-uris
tests/browser.c | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/tests/browser.c b/tests/browser.c
index 266d807..b505fcc 100644
--- a/tests/browser.c
+++ b/tests/browser.c
@@ -161,6 +161,16 @@ browser_site_data (void)
g_object_unref (settings);
}
+static void
+browser_block_uris (void)
+{
+ MidoriWebSettings* settings = g_object_new (MIDORI_TYPE_WEB_SETTINGS, NULL);
+ g_object_set (settings, "block-uris", NULL, NULL);
+ g_object_set (settings, "block-uris", "", NULL);
+ g_object_set (settings, "block-uris", "^(?!.*?(gmail|mail\\.google|accounts\\.google)).*", NULL);
+ g_object_unref (settings);
+}
+
int
main (int argc,
char** argv)
@@ -175,6 +185,7 @@ main (int argc,
g_test_add_func ("/browser/create", browser_create);
g_test_add_func ("/browser/tooltips", browser_tooltips);
g_test_add_func ("/browser/site_data", browser_site_data);
+ g_test_add_func ("/browser/block_uris", browser_block_uris);
return g_test_run ();
}
More information about the Xfce4-commits
mailing list