diff options
author | Mike Blumenkrantz <zmike@samsung.com> | 2018-07-12 16:29:51 +0900 |
---|---|---|
committer | Hermet Park <hermetpark@gmail.com> | 2018-07-12 16:29:51 +0900 |
commit | 5794f6f7afe1c8d2b5a5ea7919b8496d7a69f309 (patch) | |
tree | c87686bb802f6419138de2b38b4ee4b3ae720b79 /src/tests/edje | |
parent | bdb9a41750339bd0072cb8b8aae1842a2eee2d9d (diff) | |
download | efl-5794f6f7afe1c8d2b5a5ea7919b8496d7a69f309.tar.gz |
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.c | 29 |
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 d255937f8f..dc04c1b0b2 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) } EFL_END_TEST +static void +edje_test_swallows_invalidate_del(void *data, Evas *e EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED) +{ + ck_assert(data == edje_object_part_swallow_get(obj, "swallow")); +} + +EFL_START_TEST(edje_test_swallows_invalidate) +{ + Evas *evas = _setup_evas(); + Evas_Object *ly, *o1; + + ly = edje_object_add(evas); + fail_unless(edje_object_file_set(ly, test_layout_get("test_swallows.edj"), "test_group")); + + fail_unless(edje_object_part_exists(ly, "swallow")); + + o1 = edje_object_add(ly); + fail_if(!edje_object_part_swallow(ly, "swallow", o1)); + + evas_object_event_callback_add(ly, EVAS_CALLBACK_DEL, edje_test_swallows_invalidate_del, o1); + + evas_object_del(ly); + fail_if(!efl_parent_get(o1)); + + evas_free(evas); +} +EFL_END_TEST + EFL_START_TEST(edje_test_swallows_eoapi) { Evas *evas = _setup_evas(); @@ -100,5 +128,6 @@ void edje_test_swallow(TCase *tc) { tcase_add_test(tc, edje_test_swallows); tcase_add_test(tc, edje_test_swallows_lifetime); + tcase_add_test(tc, edje_test_swallows_invalidate); tcase_add_test(tc, edje_test_swallows_eoapi); } |