summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukasz Stanislawski <l.stanislaws@samsung.com>2014-07-21 17:16:54 +0200
committerLukasz Stanislawski <l.stanislaws@samsung.com>2014-07-21 17:33:56 +0200
commit284391d6cfbc77a21f6229fb686be0fe83c43ab6 (patch)
tree015c55c8ffa89a3dc1f7be7112d1005c9d483d88
parentad89be779dd750484ccae597785e0d39bafcefe0 (diff)
tests: refactor of atspi test suite
Summary: elm_test_atspi adjusted to recent internal api changes. Tests regarding elm_win moved from elm_test_atspi to elm_test_win. Entry tests fixed. Test to Atspi_Selection interface temporary skipped. Reviewers: z.kosinski Reviewed By: z.kosinski Differential Revision: https://phab.enlightenment.org/D1199
-rw-r--r--src/tests/elm_test_atspi.c263
-rw-r--r--src/tests/elm_test_entry.c43
-rw-r--r--src/tests/elm_test_glview.c8
-rw-r--r--src/tests/elm_test_list.c10
-rw-r--r--src/tests/elm_test_win.c49
5 files changed, 123 insertions, 250 deletions
diff --git a/src/tests/elm_test_atspi.c b/src/tests/elm_test_atspi.c
index d7ec2a8f7..1e6bb6944 100644
--- a/src/tests/elm_test_atspi.c
+++ b/src/tests/elm_test_atspi.c
@@ -8,16 +8,15 @@
8#include "elm_priv.h" 8#include "elm_priv.h"
9#include "elm_suite.h" 9#include "elm_suite.h"
10 10
11#include "elm_atspi_app_object.eo.h"
12
11#define ELM_INTERFACE_ATSPI_ACCESSIBLE_PROTECTED 13#define ELM_INTERFACE_ATSPI_ACCESSIBLE_PROTECTED
12#include "elm_interface_atspi_accessible.h" 14#include "elm_interface_atspi_accessible.h"
13#include "elm_interface_atspi_accessible.eo.h" 15#include "elm_interface_atspi_accessible.eo.h"
14 16
15#define ELM_INTERFACE_ATSPI_COMPONENT_PROTECTED
16#include "elm_interface_atspi_component.eo.h"
17
18static Evas_Object *g_win, *g_btn, *g_bg; 17static Evas_Object *g_win, *g_btn, *g_bg;
19 18
20Eo* generate_app(void) 19void generate_app(void)
21{ 20{
22 g_win = elm_win_add(NULL, "Title", ELM_WIN_BASIC); 21 g_win = elm_win_add(NULL, "Title", ELM_WIN_BASIC);
23 evas_object_geometry_set(g_win, 100, 100, 100, 100); 22 evas_object_geometry_set(g_win, 100, 100, 100, 100);
@@ -29,24 +28,25 @@ Eo* generate_app(void)
29 evas_object_show(g_btn); 28 evas_object_show(g_btn);
30 evas_object_show(g_bg); 29 evas_object_show(g_bg);
31 evas_object_show(g_win); 30 evas_object_show(g_win);
32
33 return _elm_atspi_bridge_root_get();
34} 31}
35 32
36START_TEST (elm_atspi_name_get) 33START_TEST (elm_atspi_name_get)
37{ 34{
38 elm_init(0, NULL); 35 elm_init(0, NULL);
39 36
40 Eo* obj = generate_app(); 37 Eo* root = eo_add(ELM_ATSPI_APP_OBJECT_CLASS, NULL);
38
39 ck_assert(root != NULL);
41 40
42 const char *ret = NULL; 41 const char *ret = NULL;
43 42
44 elm_app_name_set("Test name"); 43 elm_app_name_set("Test name");
45 44
46 eo_do(obj, ret = elm_interface_atspi_accessible_name_get()); 45 eo_do(root, ret = elm_interface_atspi_accessible_name_get());
47 46
48 ck_assert_str_eq(ret, "Test name"); 47 ck_assert_str_eq(ret, "Test name");
49 48
49 eo_unref(root);
50 elm_shutdown(); 50 elm_shutdown();
51} 51}
52END_TEST 52END_TEST
@@ -55,14 +55,15 @@ START_TEST (elm_atspi_role_get)
55{ 55{
56 elm_init(0, NULL); 56 elm_init(0, NULL);
57 57
58 Eo *obj = generate_app(); 58 Eo* root = eo_add(ELM_ATSPI_APP_OBJECT_CLASS, NULL);
59 59
60 Elm_Atspi_Role role; 60 Elm_Atspi_Role role;
61 61
62 eo_do(obj, role = elm_interface_atspi_accessible_role_get()); 62 eo_do(root, role = elm_interface_atspi_accessible_role_get());
63 63
64 ck_assert(role == ELM_ATSPI_ROLE_APPLICATION); 64 ck_assert(role == ELM_ATSPI_ROLE_APPLICATION);
65 65
66 eo_unref(root);
66 elm_shutdown(); 67 elm_shutdown();
67} 68}
68END_TEST 69END_TEST
@@ -72,14 +73,15 @@ START_TEST (elm_atspi_role_name_get)
72{ 73{
73 elm_init(0, NULL); 74 elm_init(0, NULL);
74 75
75 Eo *obj = generate_app(); 76 Eo* root = eo_add(ELM_ATSPI_APP_OBJECT_CLASS, NULL);
76 77
77 const char *ret = NULL; 78 const char *ret = NULL;
78 79
79 eo_do(obj, ret = elm_interface_atspi_accessible_role_name_get()); 80 eo_do(root, ret = elm_interface_atspi_accessible_role_name_get());
80 81
81 ck_assert(ret != NULL); 82 ck_assert(ret != NULL);
82 83
84 eo_unref(root);
83 elm_shutdown(); 85 elm_shutdown();
84} 86}
85END_TEST 87END_TEST
@@ -88,14 +90,15 @@ START_TEST (elm_atspi_localized_role_name_get)
88{ 90{
89 elm_init(0, NULL); 91 elm_init(0, NULL);
90 92
91 Eo *obj = generate_app(); 93 Eo* root = eo_add(ELM_ATSPI_APP_OBJECT_CLASS, NULL);
92 94
93 const char *ret = NULL; 95 const char *ret = NULL;
94 96
95 eo_do(obj, ret = elm_interface_atspi_accessible_localized_role_name_get()); 97 eo_do(root, ret = elm_interface_atspi_accessible_localized_role_name_get());
96 98
97 ck_assert(ret != NULL); 99 ck_assert(ret != NULL);
98 100
101 eo_unref(root);
99 elm_shutdown(); 102 elm_shutdown();
100} 103}
101END_TEST 104END_TEST
@@ -104,23 +107,24 @@ START_TEST (elm_atspi_description_set)
104{ 107{
105 elm_init(0, NULL); 108 elm_init(0, NULL);
106 109
107 Eo *obj = generate_app(); 110 Eo* root = eo_add(ELM_ATSPI_APP_OBJECT_CLASS, NULL);
108 111
109 const char *ret = NULL; 112 const char *ret = NULL;
110 113
111 const char *desc = "Test description"; 114 const char *desc = "Test description";
112 115
113 eo_do(obj, ret = elm_interface_atspi_accessible_description_get()); 116 eo_do(root, ret = elm_interface_atspi_accessible_description_get());
114 117
115 ck_assert(ret == NULL); 118 ck_assert(ret == NULL);
116 119
117 eo_do(obj, elm_interface_atspi_accessible_description_set(desc)); 120 eo_do(root, elm_interface_atspi_accessible_description_set(desc));
118 121
119 eo_do(obj, ret = elm_interface_atspi_accessible_description_get()); 122 eo_do(root, ret = elm_interface_atspi_accessible_description_get());
120 123
121 ck_assert(ret != NULL); 124 ck_assert(ret != NULL);
122 ck_assert_str_eq(ret, "Test description"); 125 ck_assert_str_eq(ret, "Test description");
123 126
127 eo_unref(root);
124 elm_shutdown(); 128 elm_shutdown();
125} 129}
126END_TEST 130END_TEST
@@ -129,7 +133,8 @@ START_TEST (elm_atspi_children_and_parent)
129{ 133{
130 elm_init(0, NULL); 134 elm_init(0, NULL);
131 135
132 Eo *root = generate_app(); 136 generate_app();
137 Eo* root = eo_add(ELM_ATSPI_APP_OBJECT_CLASS, NULL);
133 138
134 Eina_List *child_list = NULL; 139 Eina_List *child_list = NULL;
135 140
@@ -146,200 +151,7 @@ START_TEST (elm_atspi_children_and_parent)
146 ck_assert(win != NULL); 151 ck_assert(win != NULL);
147 ck_assert(win == g_win); 152 ck_assert(win == g_win);
148 153
149 Eo *win_parent = NULL; 154 eo_unref(root);
150
151 eo_do(win, win_parent = elm_interface_atspi_accessible_parent_get());
152
153 ck_assert(root == win_parent);
154
155 elm_shutdown();
156}
157END_TEST
158
159START_TEST (elm_atspi_component_position)
160{
161 Eina_List *child_list = NULL;
162 elm_init(0, NULL);
163
164 Eo *root = generate_app();
165
166 Eo *win = NULL;
167
168 eo_do(root, child_list = elm_interface_atspi_accessible_children_get());
169
170 win = eina_list_nth(child_list, 0);
171
172 Eina_Bool ret = EINA_FALSE;
173
174 eo_do(win, ret = elm_interface_atspi_component_position_set(EINA_TRUE, 100, 100));
175
176 ck_assert(ret == EINA_TRUE);
177
178 int x, y;
179
180 eo_do(win, elm_interface_atspi_component_position_get(EINA_TRUE, &x, &y));
181
182 ck_assert((x == 100) && (y == 100));
183
184 elm_shutdown();
185}
186END_TEST
187
188START_TEST (elm_atspi_component_size)
189{
190 Eina_List *child_list = NULL;
191 elm_init(0, NULL);
192
193 Eo *root = generate_app();
194
195 Eo *win = NULL;
196
197 eo_do(root, child_list = elm_interface_atspi_accessible_children_get());
198
199 win = eina_list_nth(child_list, 0);
200
201 Eina_Bool ret = EINA_FALSE;
202
203 eo_do(win, ret = elm_interface_atspi_component_size_set(100, 100));
204
205 ck_assert(ret == EINA_TRUE);
206
207 int w, h;
208
209 eo_do(win, elm_interface_atspi_component_size_get(&w, &h));
210
211 ck_assert((w == 100) && (h == 100));
212
213 elm_shutdown();
214}
215END_TEST
216
217START_TEST (elm_atspi_component_focus)
218{
219 Eina_List *child_list = NULL;
220 elm_init(0, NULL);
221
222 Eo *root = generate_app();
223
224 Eo *win = NULL;
225
226 eo_do(root, child_list = elm_interface_atspi_accessible_children_get());
227
228 win = eina_list_nth(child_list, 0);
229
230 Eina_Bool ret = EINA_FALSE;
231
232 eo_do(win, ret = elm_interface_atspi_component_focus_grab());
233
234 ck_assert(ret == EINA_TRUE);
235
236 elm_shutdown();
237}
238END_TEST
239
240START_TEST (elm_test_atspi_object_children_get)
241{
242 elm_init(0, NULL);
243
244 Eo *root = _elm_atspi_bridge_root_get();
245
246 Eina_List *children = NULL;
247 eo_do(root, children = elm_interface_atspi_accessible_children_get());
248
249 ck_assert(children == NULL);
250
251 eina_list_free(children);
252
253 elm_shutdown();
254}
255END_TEST
256
257START_TEST (elm_test_atspi_obj_index_in_parent_get)
258{
259 elm_init(0, NULL);
260
261 Eo *root = generate_app();
262
263 int ret = 0;
264
265 Eina_List *children = NULL;
266 eo_do(root, children = elm_interface_atspi_accessible_children_get());
267
268 Evas_Object *win = eina_list_nth(children, 0);
269 ck_assert(win != NULL);
270
271 eo_do(win, ret = elm_interface_atspi_accessible_index_in_parent_get());
272
273 ck_assert(ret == 0);
274
275 elm_shutdown();
276}
277END_TEST
278
279START_TEST (elm_atspi_component_z_order)
280{
281 elm_init(0, NULL);
282
283 Eo *root = generate_app();
284
285 Eo *win = NULL;
286
287 Eina_List *children;
288 eo_do(root, children = elm_interface_atspi_accessible_children_get());
289
290 win = eina_list_nth(children, 0);
291 int z_order = -1;
292
293 eo_do(win, z_order = elm_interface_atspi_component_z_order_get());
294
295 ck_assert(z_order != -1);
296
297 elm_shutdown();
298}
299END_TEST
300
301START_TEST (elm_atspi_component_layer)
302{
303 elm_init(0, NULL);
304
305 Eo *root = generate_app();
306
307 Eo *win = NULL;
308
309 Eina_List *children;
310 eo_do(root, children = elm_interface_atspi_accessible_children_get());
311
312 win = eina_list_nth(children, 0);
313
314 int layer = -1;
315
316 eo_do(win, layer = elm_interface_atspi_component_layer_get());
317
318 ck_assert(layer != -1);
319
320 elm_shutdown();
321}
322END_TEST
323
324START_TEST (elm_atspi_component_alpha)
325{
326 elm_init(0, NULL);
327
328 Eo *root = generate_app();
329
330 Eo *win = NULL;
331
332 Eina_List *children;
333 eo_do(root, children = elm_interface_atspi_accessible_children_get());
334 win = eina_list_nth(children, 0);
335
336 double alpha = -1.0;
337
338 eo_do(win, alpha = elm_interface_atspi_component_alpha_get());
339
340 ck_assert(alpha >= 0.0);
341 ck_assert(alpha <= 1.0);
342
343 elm_shutdown(); 155 elm_shutdown();
344} 156}
345END_TEST 157END_TEST
@@ -348,7 +160,8 @@ START_TEST (elm_atspi_children_and_parent2)
348{ 160{
349 elm_init(0, NULL); 161 elm_init(0, NULL);
350 162
351 Eo *root = generate_app(); 163 generate_app();
164 Eo* root = eo_add(ELM_ATSPI_APP_OBJECT_CLASS, NULL);
352 165
353 Eo *win = NULL; 166 Eo *win = NULL;
354 167
@@ -363,10 +176,15 @@ START_TEST (elm_atspi_children_and_parent2)
363 176
364 Eo *btn = NULL; 177 Eo *btn = NULL;
365 178
179 btn = eina_list_nth(win_children, 0);
180 ck_assert(btn != NULL);
181 ck_assert(btn == g_bg);
182
366 btn = eina_list_nth(win_children, 1); 183 btn = eina_list_nth(win_children, 1);
367 ck_assert(btn != NULL); 184 ck_assert(btn != NULL);
368 ck_assert(btn == g_btn); 185 ck_assert(btn == g_btn);
369 186
187 eo_unref(root);
370 elm_shutdown(); 188 elm_shutdown();
371} 189}
372END_TEST 190END_TEST
@@ -379,22 +197,5 @@ void elm_test_atspi(TCase *tc)
379 tcase_add_test(tc, elm_atspi_localized_role_name_get); 197 tcase_add_test(tc, elm_atspi_localized_role_name_get);
380 tcase_add_test(tc, elm_atspi_description_set); 198 tcase_add_test(tc, elm_atspi_description_set);
381 tcase_add_test(tc, elm_atspi_children_and_parent); 199 tcase_add_test(tc, elm_atspi_children_and_parent);
382 tcase_add_test(tc, elm_atspi_component_position);
383 tcase_add_test(tc, elm_atspi_component_size);
384 tcase_add_test(tc, elm_atspi_component_focus);
385 tcase_add_test(tc, elm_test_atspi_object_children_get);
386 tcase_add_test(tc, elm_test_atspi_obj_index_in_parent_get);
387 tcase_add_test(tc, elm_atspi_component_z_order);
388 tcase_add_test(tc, elm_atspi_component_layer);
389 tcase_add_test(tc, elm_atspi_component_alpha);
390 tcase_add_test(tc, elm_atspi_children_and_parent2); 200 tcase_add_test(tc, elm_atspi_children_and_parent2);
391} 201}
392
393/*
394 * TO DO
395 * elm_interface_atspi_accessible_relation_set_get
396 * elm_interface_atspi_accessible_relation_set_set
397 * elm_interface_atspi_accessible_state_get
398 * elm_interface_atspi_accessible_attributes_get
399 * elm_interface_atspi_component_contains
400*/
diff --git a/src/tests/elm_test_entry.c b/src/tests/elm_test_entry.c
index 2fb98291e..8c70c5872 100644
--- a/src/tests/elm_test_entry.c
+++ b/src/tests/elm_test_entry.c
@@ -183,7 +183,7 @@ START_TEST (elm_entry_atspi_text_string_get_paragraph)
183 char *val; 183 char *val;
184 int start, end; 184 int start, end;
185 185
186 const char *txt = "Lorem ipśum<br> dolor sit\n amęt"; 186 const char *txt = "Lorem ipśum<br> dolor sit<br> amęt";
187 187
188 elm_init(1, NULL); 188 elm_init(1, NULL);
189 win = elm_win_add(NULL, "entry", ELM_WIN_BASIC); 189 win = elm_win_add(NULL, "entry", ELM_WIN_BASIC);
@@ -198,18 +198,18 @@ START_TEST (elm_entry_atspi_text_string_get_paragraph)
198 ck_assert(end == 11); 198 ck_assert(end == 11);
199 if (val) free(val); 199 if (val) free(val);
200 200
201 start = 22; 201 start = 20;
202 eo_do(entry, val = elm_interface_atspi_text_string_get(ELM_ATSPI_TEXT_GRANULARITY_PARAGRAPH, &start, &end)); 202 eo_do(entry, val = elm_interface_atspi_text_string_get(ELM_ATSPI_TEXT_GRANULARITY_PARAGRAPH, &start, &end));
203 ck_assert_str_eq(val, " dolor sit"); 203 ck_assert_str_eq(val, " dolor sit");
204 ck_assert(start == 11); 204 ck_assert(start == 12);
205 ck_assert(end == 22); 205 ck_assert(end == 24);
206 if (val) free(val); 206 if (val) free(val);
207 207
208 start = 27; 208 start = 25;
209 eo_do(entry, val = elm_interface_atspi_text_string_get(ELM_ATSPI_TEXT_GRANULARITY_PARAGRAPH, &start, &end)); 209 eo_do(entry, val = elm_interface_atspi_text_string_get(ELM_ATSPI_TEXT_GRANULARITY_PARAGRAPH, &start, &end));
210 ck_assert_str_eq(val, " amęt"); 210 ck_assert_str_eq(val, " amęt");
211 ck_assert(start == 23); 211 ck_assert(start == 25);
212 ck_assert(end == 27); 212 ck_assert(end == 30);
213 if (val) free(val); 213 if (val) free(val);
214 214
215 start = 111; 215 start = 111;
@@ -229,16 +229,19 @@ START_TEST (elm_entry_atspi_text_string_get_line)
229 char *val; 229 char *val;
230 int start, end; 230 int start, end;
231 231
232 const char *txt = "Lorem ipśum<br> dolor sit\n amęt"; 232 const char *txt = "Lorem ipśum<br> dolor sit amęt";
233 233
234 elm_init(1, NULL); 234 elm_init(1, NULL);
235 win = elm_win_add(NULL, "entry", ELM_WIN_BASIC); 235 win = elm_win_add(NULL, "entry", ELM_WIN_BASIC);
236 236
237 entry = elm_entry_add(win); 237 entry = elm_entry_add(win);
238 evas_object_resize(entry, 500, 500);
239
238 elm_object_text_set(entry, txt); 240 elm_object_text_set(entry, txt);
239 241
240 start = 1; 242 start = 1;
241 eo_do(entry, val = elm_interface_atspi_text_string_get(ELM_ATSPI_TEXT_GRANULARITY_LINE, &start, &end)); 243 eo_do(entry, val = elm_interface_atspi_text_string_get(ELM_ATSPI_TEXT_GRANULARITY_LINE, &start, &end));
244
242 ck_assert_str_eq(val, "Lorem ipśum"); 245 ck_assert_str_eq(val, "Lorem ipśum");
243 ck_assert(start == 0); 246 ck_assert(start == 0);
244 ck_assert(end == 11); 247 ck_assert(end == 11);
@@ -246,9 +249,9 @@ START_TEST (elm_entry_atspi_text_string_get_line)
246 249
247 start = 13; 250 start = 13;
248 eo_do(entry, val = elm_interface_atspi_text_string_get(ELM_ATSPI_TEXT_GRANULARITY_LINE, &start, &end)); 251 eo_do(entry, val = elm_interface_atspi_text_string_get(ELM_ATSPI_TEXT_GRANULARITY_LINE, &start, &end));
249 ck_assert_str_eq(val, " dolor sit"); 252 ck_assert_str_eq(val, " dolor sit amęt");
250 ck_assert(start == 11); 253 ck_assert(start == 12);
251 ck_assert(end == 23); 254 ck_assert(end == 29);
252 if (val) free(val); 255 if (val) free(val);
253 256
254 elm_shutdown(); 257 elm_shutdown();
@@ -259,8 +262,7 @@ START_TEST (elm_entry_atspi_text_text_get)
259{ 262{
260 Evas_Object *win, *entry; 263 Evas_Object *win, *entry;
261 char *val; 264 char *val;
262 const char *txt = "Lorem ipśum<br> dolor sit\n amęt"; 265 const char *txt = "Lorem Xpśum dolor sit amęt";
263 const char *txtnom = "Lorem ipśum dolor sit\n amęt";
264 266
265 elm_init(1, NULL); 267 elm_init(1, NULL);
266 win = elm_win_add(NULL, "entry", ELM_WIN_BASIC); 268 win = elm_win_add(NULL, "entry", ELM_WIN_BASIC);
@@ -268,8 +270,19 @@ START_TEST (elm_entry_atspi_text_text_get)
268 entry = elm_entry_add(win); 270 entry = elm_entry_add(win);
269 elm_object_text_set(entry, txt); 271 elm_object_text_set(entry, txt);
270 272
271 eo_do(entry, val = elm_interface_atspi_text_get(0, sizeof(txtnom)/sizeof(txtnom[0]))); 273 // invalid ranges
272 ck_assert_str_eq(val, txtnom); 274 eo_do(entry, val = elm_interface_atspi_text_get(6, 100));
275 ck_assert(val == NULL);
276 eo_do(entry, val = elm_interface_atspi_text_get(-6, 10));
277 ck_assert(val == NULL);
278 eo_do(entry, val = elm_interface_atspi_text_get(-6, -10));
279 ck_assert(val == NULL);
280 eo_do(entry, val = elm_interface_atspi_text_get(60, 100));
281 ck_assert(val == NULL);
282
283 // proper range
284 eo_do(entry, val = elm_interface_atspi_text_get(6, 17));
285 ck_assert_str_eq(val, "Xpśum dolor");
273 286
274 if (val) free(val); 287 if (val) free(val);
275 elm_shutdown(); 288 elm_shutdown();
diff --git a/src/tests/elm_test_glview.c b/src/tests/elm_test_glview.c
index af380056a..1129c9dcc 100644
--- a/src/tests/elm_test_glview.c
+++ b/src/tests/elm_test_glview.c
@@ -19,9 +19,13 @@ START_TEST (elm_atspi_role_get)
19 win = elm_win_add(NULL, "glview", ELM_WIN_BASIC); 19 win = elm_win_add(NULL, "glview", ELM_WIN_BASIC);
20 20
21 glview = elm_glview_add(win); 21 glview = elm_glview_add(win);
22 eo_do(glview, role = elm_interface_atspi_accessible_role_get());
23 22
24 ck_assert(role == ELM_ATSPI_ROLE_ANIMATION); 23 // if no gl backend skip test
24 if (glview)
25 {
26 eo_do(glview, role = elm_interface_atspi_accessible_role_get());
27 ck_assert(role == ELM_ATSPI_ROLE_ANIMATION);
28 }
25 29
26 elm_shutdown(); 30 elm_shutdown();
27} 31}
diff --git a/src/tests/elm_test_list.c b/src/tests/elm_test_list.c
index 1bd5d1f01..0b86990d7 100644
--- a/src/tests/elm_test_list.c
+++ b/src/tests/elm_test_list.c
@@ -12,6 +12,10 @@
12#include "elm_interface_atspi_accessible.h" 12#include "elm_interface_atspi_accessible.h"
13#include "elm_interface_atspi_accessible.eo.h" 13#include "elm_interface_atspi_accessible.eo.h"
14 14
15#if 0
16// Skip following tests until Elm_Widget_Item will migrate to Eo infrastructure
17// and following features can be implemented
18
15START_TEST (elm_list_atspi_selection_selected_children_count_get) 19START_TEST (elm_list_atspi_selection_selected_children_count_get)
16{ 20{
17 Evas_Object *win, *list; 21 Evas_Object *win, *list;
@@ -182,6 +186,8 @@ START_TEST (elm_list_atspi_selection_child_deselect)
182} 186}
183END_TEST 187END_TEST
184 188
189#endif
190
185START_TEST (elm_atspi_role_get) 191START_TEST (elm_atspi_role_get)
186{ 192{
187 Evas_Object *win, *list; 193 Evas_Object *win, *list;
@@ -201,6 +207,8 @@ END_TEST
201 207
202void elm_test_list(TCase *tc) 208void elm_test_list(TCase *tc)
203{ 209{
210 tcase_add_test(tc, elm_atspi_role_get);
211#if 0
204 tcase_add_test(tc, elm_list_atspi_selection_selected_children_count_get); 212 tcase_add_test(tc, elm_list_atspi_selection_selected_children_count_get);
205 tcase_add_test(tc, elm_list_atspi_selection_child_select); 213 tcase_add_test(tc, elm_list_atspi_selection_child_select);
206 tcase_add_test(tc, elm_list_atspi_selection_selected_child_deselect); 214 tcase_add_test(tc, elm_list_atspi_selection_selected_child_deselect);
@@ -208,5 +216,5 @@ void elm_test_list(TCase *tc)
208 tcase_add_test(tc, elm_list_atspi_selection_all_children_select); 216 tcase_add_test(tc, elm_list_atspi_selection_all_children_select);
209 tcase_add_test(tc, elm_list_atspi_selection_clear); 217 tcase_add_test(tc, elm_list_atspi_selection_clear);
210 tcase_add_test(tc, elm_list_atspi_selection_child_deselect); 218 tcase_add_test(tc, elm_list_atspi_selection_child_deselect);
211 tcase_add_test(tc, elm_atspi_role_get); 219#endif
212} 220}
diff --git a/src/tests/elm_test_win.c b/src/tests/elm_test_win.c
index eb99412a6..63558f823 100644
--- a/src/tests/elm_test_win.c
+++ b/src/tests/elm_test_win.c
@@ -9,6 +9,9 @@
9#include "elm_interface_atspi_accessible.h" 9#include "elm_interface_atspi_accessible.h"
10#include "elm_interface_atspi_accessible.eo.h" 10#include "elm_interface_atspi_accessible.eo.h"
11 11
12#define ELM_INTERFACE_ATSPI_COMPONENT_PROTECTED
13#include "elm_interface_atspi_component.eo.h"
14
12 15
13START_TEST (elm_atspi_role_get) 16START_TEST (elm_atspi_role_get)
14{ 17{
@@ -26,7 +29,51 @@ START_TEST (elm_atspi_role_get)
26} 29}
27END_TEST 30END_TEST
28 31
32START_TEST (elm_atspi_component_position)
33{
34 Eina_Bool ret;
35 int x, y;
36
37 elm_init(0, NULL);
38
39 Eo *win = elm_win_add(NULL, "win", ELM_WIN_BASIC);
40
41 eo_do(win, ret = elm_interface_atspi_component_position_set(EINA_TRUE, 45, 45));
42 ck_assert(ret == EINA_TRUE);
43
44 Ecore_Evas *ee = ecore_evas_ecore_evas_get(evas_object_evas_get(win));
45 ck_assert(ee != NULL);
46 ecore_evas_geometry_get(ee, &x, &y, NULL, NULL);
47
48 ck_assert((x == 45) && (y == 45));
49
50 elm_shutdown();
51}
52END_TEST
53
54START_TEST (elm_atspi_component_size)
55{
56 Eina_Bool ret;
57 int w, h;
58
59 elm_init(0, NULL);
60
61 Eo *win = elm_win_add(NULL, "win", ELM_WIN_BASIC);
62 evas_object_resize(win, 50, 50);
63
64 eo_do(win, ret = elm_interface_atspi_component_size_set(100, 100));
65 ck_assert(ret == EINA_TRUE);
66
67 evas_object_geometry_get(win, NULL, NULL, &w, &h);
68 ck_assert((w == 100) && (h == 100));
69
70 elm_shutdown();
71}
72END_TEST
73
29void elm_test_win(TCase *tc) 74void elm_test_win(TCase *tc)
30{ 75{
31 tcase_add_test(tc, elm_atspi_role_get); 76 tcase_add_test(tc, elm_atspi_role_get);
77 tcase_add_test(tc, elm_atspi_component_position);
78 tcase_add_test(tc, elm_atspi_component_size);
32} 79}