diff options
author | Benjamin Otte <otte@redhat.com> | 2014-06-13 21:19:35 +0200 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2014-06-16 18:43:50 +0200 |
commit | 0e64019df3e8c129d6319a6526a3203c1abe92fa (patch) | |
tree | e7823c7289fb10b0d2f365b00b195488b6757064 | |
parent | fba90d4c65a03a17b3c833992fc2672bd98f6f16 (diff) | |
download | gtk+-0e64019df3e8c129d6319a6526a3203c1abe92fa.tar.gz |
testsuite: Remove a test
That test is not working anymore by design since commit 57c4f01e.
It was introduced pre-3.0.0 in commit 12d6b588 and the feature was never
utilized. So it seems safe to just remove the test.
-rw-r--r-- | testsuite/gtk/stylecontext.c | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/testsuite/gtk/stylecontext.c b/testsuite/gtk/stylecontext.c index ca52a75ed0..7348df952c 100644 --- a/testsuite/gtk/stylecontext.c +++ b/testsuite/gtk/stylecontext.c @@ -247,62 +247,6 @@ test_match (void) } static void -test_style_property (void) -{ - GtkStyleContext *context; - GtkWidgetPath *path; - GtkCssProvider *provider; - GError *error; - const gchar *data; - gint x; - GdkRGBA color; - GdkRGBA expected; - - error = NULL; - provider = gtk_css_provider_new (); - - context = gtk_style_context_new (); - - path = gtk_widget_path_new (); - gtk_widget_path_append_type (path, GTK_TYPE_WINDOW); - gtk_widget_path_append_type (path, GTK_TYPE_BOX); - gtk_widget_path_append_type (path, GTK_TYPE_BUTTON); - gtk_style_context_set_path (context, path); - gtk_widget_path_free (path); - gtk_style_context_set_state (context, GTK_STATE_FLAG_PRELIGHT); - - /* Since we set the prelight state on the context, we expect - * only the third selector to match, even though the second one - * has higher specificity, and the fourth one comes later. - * - * In particular, we want to verify that widget style properties and - * CSS properties follow the same matching rules, ie we expect - * color to be #003 and child-displacement-x to be 3. - */ - data = "GtkButton:insensitive { color: #001; -GtkButton-child-displacement-x: 1 }\n" - "GtkBox GtkButton:selected { color: #002; -GtkButton-child-displacement-x: 2 }\n" - "GtkButton:prelight { color: #003; -GtkButton-child-displacement-x: 3 }\n" - "GtkButton:focused { color: #004; -GtkButton-child-displacement-x: 4 }\n"; - gtk_css_provider_load_from_data (provider, data, -1, &error); - g_assert_no_error (error); - gtk_style_context_add_provider (context, - GTK_STYLE_PROVIDER (provider), - GTK_STYLE_PROVIDER_PRIORITY_USER); - - - gtk_style_context_get_color (context, GTK_STATE_FLAG_PRELIGHT, &color); - gdk_rgba_parse (&expected, "#003"); - g_assert (gdk_rgba_equal (&color, &expected)); - - gtk_style_context_get_style (context, "child-displacement-x", &x, NULL); - - g_assert_cmpint (x, ==, 3); - - g_object_unref (provider); - g_object_unref (context); -} - -static void test_basic_properties (void) { GtkStyleContext *context; @@ -341,7 +285,6 @@ main (int argc, char *argv[]) g_test_add_func ("/style/parse/selectors", test_parse_selectors); g_test_add_func ("/style/path", test_path); g_test_add_func ("/style/match", test_match); - g_test_add_func ("/style/style-property", test_style_property); g_test_add_func ("/style/basic", test_basic_properties); return g_test_run (); |