mirror of
https://github.com/brl/mutter.git
synced 2024-12-25 04:22:05 +00:00
conform/actor-invariants: Add tests for show-on-set-parent
The show-on-set-parent flag is mental, but it needs to be tested better than just checking for it always been set to TRUE.
This commit is contained in:
parent
a882b20b26
commit
add274c447
@ -230,7 +230,7 @@ actor_show_on_set_parent (TestConformSimpleFixture *fixture,
|
|||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
g_assert (!(CLUTTER_ACTOR_IS_VISIBLE (actor)));
|
g_assert (!(CLUTTER_ACTOR_IS_VISIBLE (actor)));
|
||||||
g_assert (show_on_set_parent == TRUE);
|
g_assert (show_on_set_parent);
|
||||||
|
|
||||||
clutter_actor_add_child (group, actor);
|
clutter_actor_add_child (group, actor);
|
||||||
g_object_get (actor,
|
g_object_get (actor,
|
||||||
@ -238,7 +238,7 @@ actor_show_on_set_parent (TestConformSimpleFixture *fixture,
|
|||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
g_assert (CLUTTER_ACTOR_IS_VISIBLE (actor));
|
g_assert (CLUTTER_ACTOR_IS_VISIBLE (actor));
|
||||||
g_assert (show_on_set_parent == TRUE);
|
g_assert (show_on_set_parent);
|
||||||
|
|
||||||
g_object_ref (actor);
|
g_object_ref (actor);
|
||||||
clutter_actor_remove_child (group, actor);
|
clutter_actor_remove_child (group, actor);
|
||||||
@ -249,10 +249,35 @@ actor_show_on_set_parent (TestConformSimpleFixture *fixture,
|
|||||||
g_assert (!CLUTTER_ACTOR_IS_REALIZED (actor));
|
g_assert (!CLUTTER_ACTOR_IS_REALIZED (actor));
|
||||||
g_assert (!CLUTTER_ACTOR_IS_MAPPED (actor));
|
g_assert (!CLUTTER_ACTOR_IS_MAPPED (actor));
|
||||||
g_assert (CLUTTER_ACTOR_IS_VISIBLE (actor));
|
g_assert (CLUTTER_ACTOR_IS_VISIBLE (actor));
|
||||||
g_assert (show_on_set_parent == TRUE);
|
g_assert (show_on_set_parent);
|
||||||
|
|
||||||
clutter_actor_destroy (actor);
|
clutter_actor_destroy (actor);
|
||||||
clutter_actor_destroy (group);
|
clutter_actor_destroy (group);
|
||||||
|
|
||||||
|
actor = clutter_actor_new ();
|
||||||
|
clutter_actor_add_child (stage, actor);
|
||||||
|
clutter_actor_hide (actor);
|
||||||
|
g_object_get (actor,
|
||||||
|
"show-on-set-parent", &show_on_set_parent,
|
||||||
|
NULL);
|
||||||
|
g_assert (!CLUTTER_ACTOR_IS_VISIBLE (actor));
|
||||||
|
g_assert (!CLUTTER_ACTOR_IS_MAPPED (actor));
|
||||||
|
g_assert (show_on_set_parent);
|
||||||
|
|
||||||
|
clutter_actor_destroy (actor);
|
||||||
|
|
||||||
|
actor = clutter_actor_new ();
|
||||||
|
clutter_actor_hide (actor);
|
||||||
|
clutter_actor_add_child (stage, actor);
|
||||||
|
g_object_get (actor,
|
||||||
|
"show-on-set-parent", &show_on_set_parent,
|
||||||
|
NULL);
|
||||||
|
g_assert (!CLUTTER_ACTOR_IS_VISIBLE (actor));
|
||||||
|
g_assert (!CLUTTER_ACTOR_IS_MAPPED (actor));
|
||||||
|
g_assert (!show_on_set_parent);
|
||||||
|
|
||||||
|
clutter_actor_destroy (actor);
|
||||||
|
|
||||||
clutter_actor_destroy (stage);
|
clutter_actor_destroy (stage);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user