summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2014-05-13 15:23:53 +0200
committerBenjamin Otte <otte@redhat.com>2014-05-14 04:28:36 +0200
commit26c2975007939c5d94d7606567166f090a3a6eaf (patch)
tree8248467ae24d12a321bf75795212167659e2a7dc /testsuite
parent77a9539e07f300ccfe7155df9034d3ef78786cf7 (diff)
downloadgtk+-26c2975007939c5d94d7606567166f090a3a6eaf.tar.gz
testsuite: Add icontheme tests for generic fallback
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/gtk/icontheme.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/testsuite/gtk/icontheme.c b/testsuite/gtk/icontheme.c
index b32d622731..03927086f9 100644
--- a/testsuite/gtk/icontheme.c
+++ b/testsuite/gtk/icontheme.c
@@ -107,6 +107,29 @@ test_basics (void)
}
static void
+test_generic_fallback (void)
+{
+ /* simple test for generic fallback */
+ assert_icon_lookup ("simple-foo-bar",
+ 16,
+ GTK_ICON_LOOKUP_GENERIC_FALLBACK,
+ "/icons/16x16/simple.png");
+
+ /* Check generic fallback also works for symbolics falling back to regular items */
+ assert_icon_lookup ("simple-foo-bar-symbolic",
+ 16,
+ GTK_ICON_LOOKUP_GENERIC_FALLBACK,
+ "/icons/16x16/simple.png");
+
+ /* Check we fall back to more generic symbolic icons before falling back to
+ * non-symbolics */
+ assert_icon_lookup ("everything-justregular-symbolic",
+ SCALABLE_IMAGE_SIZE,
+ GTK_ICON_LOOKUP_GENERIC_FALLBACK,
+ "/icons/scalable/everything-symbolic.svg");
+}
+
+static void
test_force_symbolic (void)
{
/* check forcing symbolic works */
@@ -212,6 +235,7 @@ main (int argc, char *argv[])
gtk_test_init (&argc, &argv);
g_test_add_func ("/icontheme/basics", test_basics);
+ g_test_add_func ("/icontheme/generic_fallback", test_generic_fallback);
g_test_add_func ("/icontheme/force-symbolic", test_force_symbolic);
g_test_add_func ("/icontheme/force-regular", test_force_regular);