summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/tests/elementary/elm_test_layout.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/tests/elementary/elm_test_layout.c b/src/tests/elementary/elm_test_layout.c
index cdd372e875..a5949f9f10 100644
--- a/src/tests/elementary/elm_test_layout.c
+++ b/src/tests/elementary/elm_test_layout.c
@@ -70,12 +70,25 @@ EFL_START_TEST(elm_layout_swallows)
70} 70}
71EFL_END_TEST 71EFL_END_TEST
72 72
73static Eina_Value
74_propagated_cb(void *data EINA_UNUSED,
75 const Eina_Value v,
76 const Eina_Future *dead_future EINA_UNUSED)
77{
78 ecore_main_loop_quit();
79
80 fprintf(stderr, "delivered '%s'\n", eina_value_to_string(&v));
81
82 return v;
83}
84
73EFL_START_TEST(elm_layout_model_connect) 85EFL_START_TEST(elm_layout_model_connect)
74{ 86{
75 char buf[PATH_MAX]; 87 char buf[PATH_MAX];
76 Evas_Object *win, *ly; 88 Evas_Object *win, *ly;
77 Efl_Model_Item *model; 89 Efl_Model_Item *model;
78 Eina_Value v; 90 Eina_Value v;
91 Eina_Future *f;
79 const char *part_text; 92 const char *part_text;
80 const char text_value[] = "A random string for elm_layout_model_connect test"; 93 const char text_value[] = "A random string for elm_layout_model_connect test";
81 94
@@ -89,12 +102,13 @@ EFL_START_TEST(elm_layout_model_connect)
89 model = efl_add(EFL_MODEL_ITEM_CLASS, win); 102 model = efl_add(EFL_MODEL_ITEM_CLASS, win);
90 ck_assert(!!eina_value_setup(&v, EINA_VALUE_TYPE_STRING)); 103 ck_assert(!!eina_value_setup(&v, EINA_VALUE_TYPE_STRING));
91 ck_assert(!!eina_value_set(&v, text_value)); 104 ck_assert(!!eina_value_set(&v, text_value));
92 efl_model_property_set(model, "text_property", &v); 105 f = efl_model_property_set(model, "text_property", &v);
106 eina_future_then(f, _propagated_cb, NULL);
93 107
94 efl_ui_model_connect(ly, "text", "text_property"); 108 efl_ui_model_connect(ly, "text", "text_property");
95 efl_ui_view_model_set(ly, model); 109 efl_ui_view_model_set(ly, model);
96 110
97 ecore_main_loop_iterate_may_block(EINA_TRUE); 111 ecore_main_loop_begin();
98 112
99 part_text = elm_layout_text_get(ly, "text"); 113 part_text = elm_layout_text_get(ly, "text");
100 114