summaryrefslogtreecommitdiff
path: root/src/tests/edje/edje_test_edje.c
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2015-06-23 12:38:32 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2015-06-25 14:36:09 +0900
commit6ca1ce305bc9043561f040d52c85dd2781aaec4d (patch)
treed96ff3f45dbbc328cf05b1e6d5ab3f8422be2597 /src/tests/edje/edje_test_edje.c
parent15afea293ffeeba7a7157b6663e0fdeb28c15e61 (diff)
Edje tests: Add test case for embedded text filters
Diffstat (limited to 'src/tests/edje/edje_test_edje.c')
-rw-r--r--src/tests/edje/edje_test_edje.c35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/tests/edje/edje_test_edje.c b/src/tests/edje/edje_test_edje.c
index 88cc3fc20e..4c80b36186 100644
--- a/src/tests/edje/edje_test_edje.c
+++ b/src/tests/edje/edje_test_edje.c
@@ -203,6 +203,40 @@ START_TEST(edje_test_masking)
203} 203}
204END_TEST 204END_TEST
205 205
206START_TEST(edje_test_filters)
207{
208 Evas *evas = EDJE_TEST_INIT_EVAS();
209 const Evas_Object *text, *sub;
210 Evas_Object *obj, *src = NULL;
211 const char *prg, *name;
212 Eina_Bool b;
213
214 obj = edje_object_add(evas);
215 fail_unless(edje_object_file_set(obj, test_layout_get("test_filters.edj"), "test_group"));
216
217 evas_object_resize(obj, 200, 200);
218
219 /* check value of no_render flag as seen from evas land */
220 sub = edje_object_part_object_get(obj, "mask");
221 fail_if(!eo_do_ret(sub, b, evas_obj_no_render_get()));
222
223 /* text part: check filter status */
224 text = edje_object_part_object_get(obj, "text");
225 fail_if(!text);
226
227 eo_do(text, efl_gfx_filter_program_get(&prg, &name));
228 fail_if(!prg);
229 fail_if(!name || strcmp(name, "filterfile"));
230
231 eo_do(text, efl_gfx_filter_source_get("mask", &src));
232 fail_if(!src);
233
234 // TODO: Verify properly that the filter runs well
235
236 EDJE_TEST_FREE_EVAS();
237}
238END_TEST
239
206void edje_test_edje(TCase *tc) 240void edje_test_edje(TCase *tc)
207{ 241{
208 tcase_add_test(tc, edje_test_edje_init); 242 tcase_add_test(tc, edje_test_edje_init);
@@ -212,4 +246,5 @@ void edje_test_edje(TCase *tc)
212 tcase_add_test(tc, edje_test_complex_layout); 246 tcase_add_test(tc, edje_test_complex_layout);
213 tcase_add_test(tc, edje_test_calculate_parens); 247 tcase_add_test(tc, edje_test_calculate_parens);
214 tcase_add_test(tc, edje_test_masking); 248 tcase_add_test(tc, edje_test_masking);
249 tcase_add_test(tc, edje_test_filters);
215} 250}