summaryrefslogtreecommitdiff
path: root/src/tests
diff options
context:
space:
mode:
authorMarcel Hollerbach <mail@marcel-hollerbach.de>2019-03-26 09:59:16 +0100
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2019-03-29 14:02:31 +0100
commitfce4d955962fa2c47bd08b6080aa54cc7dd143e4 (patch)
treeaeed663326e5658df06a35f11b7f1b0667f01428 /src/tests
parent291ab9a671bf66ab784972e0f85bef3e94546831 (diff)
efl_ui_widget: add implementation for finding the window
the problem with the previous implementation (just redirect the calls to the widget_parent then to the efl_parent is that after invalidate its impossible to find the window where the widget is in. However, there are cases where we want to have access to the window of the widget, for example, to invalidate focus highlight etc.. The window of a widget is always constant, and cannot be changed (as the evas object cannot hop accross different evas) Reviewed-by: Jaehyun Cho <jae_hyun.cho@samsung.com> Differential Revision: https://phab.enlightenment.org/D8475
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/elementary/efl_ui_test_widget.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/tests/elementary/efl_ui_test_widget.c b/src/tests/elementary/efl_ui_test_widget.c
index aa9929978d..a49eefe804 100644
--- a/src/tests/elementary/efl_ui_test_widget.c
+++ b/src/tests/elementary/efl_ui_test_widget.c
@@ -340,6 +340,18 @@ _setup(void)
340 eina_log_abort_on_critical_set(1); 340 eina_log_abort_on_critical_set(1);
341} 341}
342 342
343EFL_START_TEST(efl_ui_test_widget_win_provider_find)
344{
345 State s;
346
347 _small_ui(&s);
348 ck_assert_ptr_eq(efl_provider_find(s.btn1, EFL_UI_WIN_CLASS), s.win);
349 efl_ui_widget_sub_object_del(s.box, s.btn1);
350 ck_assert_ptr_eq(efl_ui_widget_parent_get(s.btn1), NULL);
351 ck_assert_ptr_eq(efl_provider_find(s.btn1, EFL_UI_WIN_CLASS), s.win);
352}
353EFL_END_TEST
354
343void efl_ui_test_widget(TCase *tc) 355void efl_ui_test_widget(TCase *tc)
344{ 356{
345 tcase_add_checked_fixture(tc, _setup, _shutdown); 357 tcase_add_checked_fixture(tc, _setup, _shutdown);
@@ -353,4 +365,5 @@ void efl_ui_test_widget(TCase *tc)
353 tcase_add_test(tc, efl_ui_test_widget_parent_relation); 365 tcase_add_test(tc, efl_ui_test_widget_parent_relation);
354 tcase_add_test(tc, efl_ui_test_widget_disabled_parent); 366 tcase_add_test(tc, efl_ui_test_widget_disabled_parent);
355 tcase_add_test(tc, efl_ui_test_widget_disabled_behaviour); 367 tcase_add_test(tc, efl_ui_test_widget_disabled_behaviour);
368 tcase_add_test(tc, efl_ui_test_widget_win_provider_find);
356} 369}