summaryrefslogtreecommitdiff
path: root/src/tests/edje
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2018-07-12 16:29:51 +0900
committerHermet Park <hermetpark@gmail.com>2018-07-12 16:29:51 +0900
commit5794f6f7afe1c8d2b5a5ea7919b8496d7a69f309 (patch)
treec87686bb802f6419138de2b38b4ee4b3ae720b79 /src/tests/edje
parentbdb9a41750339bd0072cb8b8aae1842a2eee2d9d (diff)
tests/edje: add test to verify that swallow objects exist during DEL callback
Summary: this mimics expected behavior by enlightenment for 2.0, this behavior should likely be changed since the INVALIDATE event should be the last expected point at which a parent<->child relationship continues to exist in any form ref D6540 Depends on D6554 Reviewers: devilhorns, Hermet Reviewed By: Hermet Subscribers: cedric, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D6555
Diffstat (limited to 'src/tests/edje')
-rw-r--r--src/tests/edje/edje_test_swallow.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/tests/edje/edje_test_swallow.c b/src/tests/edje/edje_test_swallow.c
index d255937..dc04c1b 100644
--- a/src/tests/edje/edje_test_swallow.c
+++ b/src/tests/edje/edje_test_swallow.c
@@ -64,6 +64,34 @@ EFL_START_TEST(edje_test_swallows_lifetime)
64} 64}
65EFL_END_TEST 65EFL_END_TEST
66 66
67static void
68edje_test_swallows_invalidate_del(void *data, Evas *e EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED)
69{
70 ck_assert(data == edje_object_part_swallow_get(obj, "swallow"));
71}
72
73EFL_START_TEST(edje_test_swallows_invalidate)
74{
75 Evas *evas = _setup_evas();
76 Evas_Object *ly, *o1;
77
78 ly = edje_object_add(evas);
79 fail_unless(edje_object_file_set(ly, test_layout_get("test_swallows.edj"), "test_group"));
80
81 fail_unless(edje_object_part_exists(ly, "swallow"));
82
83 o1 = edje_object_add(ly);
84 fail_if(!edje_object_part_swallow(ly, "swallow", o1));
85
86 evas_object_event_callback_add(ly, EVAS_CALLBACK_DEL, edje_test_swallows_invalidate_del, o1);
87
88 evas_object_del(ly);
89 fail_if(!efl_parent_get(o1));
90
91 evas_free(evas);
92}
93EFL_END_TEST
94
67EFL_START_TEST(edje_test_swallows_eoapi) 95EFL_START_TEST(edje_test_swallows_eoapi)
68{ 96{
69 Evas *evas = _setup_evas(); 97 Evas *evas = _setup_evas();
@@ -100,5 +128,6 @@ void edje_test_swallow(TCase *tc)
100{ 128{
101 tcase_add_test(tc, edje_test_swallows); 129 tcase_add_test(tc, edje_test_swallows);
102 tcase_add_test(tc, edje_test_swallows_lifetime); 130 tcase_add_test(tc, edje_test_swallows_lifetime);
131 tcase_add_test(tc, edje_test_swallows_invalidate);
103 tcase_add_test(tc, edje_test_swallows_eoapi); 132 tcase_add_test(tc, edje_test_swallows_eoapi);
104} 133}