summaryrefslogtreecommitdiff
path: root/src/tests/edje/edje_test_edje.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests/edje/edje_test_edje.c')
-rw-r--r--src/tests/edje/edje_test_edje.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/tests/edje/edje_test_edje.c b/src/tests/edje/edje_test_edje.c
index 9862ad96af..88cc3fc20e 100644
--- a/src/tests/edje/edje_test_edje.c
+++ b/src/tests/edje/edje_test_edje.c
@@ -168,6 +168,41 @@ START_TEST(edje_test_calculate_parens)
168} 168}
169END_TEST 169END_TEST
170 170
171START_TEST(edje_test_masking)
172{
173 int x, y, w, h;
174 Evas *evas = EDJE_TEST_INIT_EVAS();
175 const Evas_Object *sub, *clip2, *clip;
176 Evas_Object *obj;
177 Eina_Bool b;
178
179 obj = edje_object_add(evas);
180 fail_unless(edje_object_file_set(obj, test_layout_get("test_masking.edj"), "test_group"));
181
182 evas_object_resize(obj, 100, 100);
183 edje_object_part_geometry_get(obj, "background", &x, &y, &w, &h);
184 fail_if(x != 0 || y != 0 || w != 100 || h != 100);
185
186 clip = edje_object_part_object_get(obj, "clip2");
187 fail_if(!clip);
188
189 /* check value of no_render flag as seen from evas land */
190 sub = edje_object_part_object_get(obj, "mask");
191 fail_if(!eo_do_ret(sub, b, evas_obj_no_render_get()));
192
193 /* check that text has a clip (based on description.clip_to) */
194 sub = edje_object_part_object_get(obj, "text");
195 fail_if(!eo_do_ret(sub, clip2, evas_obj_clip_get()));
196
197 /* test description.clip_to override */
198 sub = edje_object_part_object_get(obj, "noclip");
199 clip2 = eo_do_ret(sub, clip2, evas_obj_clip_get());
200 fail_if(clip != clip2);
201
202 EDJE_TEST_FREE_EVAS();
203}
204END_TEST
205
171void edje_test_edje(TCase *tc) 206void edje_test_edje(TCase *tc)
172{ 207{
173 tcase_add_test(tc, edje_test_edje_init); 208 tcase_add_test(tc, edje_test_edje_init);
@@ -176,4 +211,5 @@ void edje_test_edje(TCase *tc)
176 tcase_add_test(tc, edje_test_simple_layout_geometry); 211 tcase_add_test(tc, edje_test_simple_layout_geometry);
177 tcase_add_test(tc, edje_test_complex_layout); 212 tcase_add_test(tc, edje_test_complex_layout);
178 tcase_add_test(tc, edje_test_calculate_parens); 213 tcase_add_test(tc, edje_test_calculate_parens);
214 tcase_add_test(tc, edje_test_masking);
179} 215}