1
/*
2
 * AT-SPI - Assistive Technology Service Provider Interface
3
 * (Gnome Accessibility Project; https://wiki.gnome.org/Accessibility)
4
 *
5
 * Copyright (c) 2015 Samsung Electronics Co., Ltd.
6
 *
7
 * This library is free software; you can redistribute it and/or
8
 * modify it under the terms of the GNU Lesser General Public
9
 * License as published by the Free Software Foundation; either
10
 * version 2.1 of the License, or (at your option) any later version.
11
 *
12
 * This library is distributed in the hope that it will be useful,
13
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15
 * Lesser General Public License for more details.
16
 *
17
 * You should have received a copy of the GNU Lesser General Public
18
 * License along with this library; if not, write to the
19
 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20
 * Boston, MA 02110-1301, USA.
21
 */
22

            
23
#include "atk_suite.h"
24
#include "atk_test_util.h"
25

            
26
#define DATA_FILE TESTS_DATA_DIR "/test-text.xml"
27

            
28
static gboolean
29
12
GHRunc_find (gpointer key, gpointer value, gpointer user_data)
30
{
31
12
  if (!g_strcmp0 (key, user_data))
32
    {
33
7
      return TRUE;
34
    }
35
5
  return FALSE;
36
}
37

            
38
static void
39
1
atk_test_text_get_character_count (TestAppFixture *fixture, gconstpointer user_data)
40
{
41
1
  AtspiAccessible *_obj = fixture->root_obj;
42
1
  g_assert_nonnull (_obj);
43
1
  AtspiAccessible *child = atspi_accessible_get_child_at_index (_obj, 0, NULL);
44
1
  g_assert_nonnull (child);
45
1
  AtspiText *obj = atspi_accessible_get_text_iface (child);
46

            
47
1
  gint count = atspi_text_get_character_count (obj, NULL);
48
1
  g_assert_cmpint (count, ==, 16);
49
1
  g_object_unref (obj);
50
1
  g_object_unref (child);
51
1
}
52

            
53
static void
54
1
atk_test_text_get_text (TestAppFixture *fixture, gconstpointer user_data)
55
{
56
1
  AtspiAccessible *_obj = fixture->root_obj;
57
1
  g_assert_nonnull (_obj);
58
1
  AtspiAccessible *child = atspi_accessible_get_child_at_index (_obj, 0, NULL);
59
1
  g_assert_nonnull (child);
60
1
  AtspiText *obj = atspi_accessible_get_text_iface (child);
61

            
62
1
  gchar *text = atspi_text_get_text (obj, 9, 14, NULL);
63
1
  g_assert_cmpstr (text, ==, "works");
64
1
  g_free (text);
65
1
  g_object_unref (obj);
66
1
  g_object_unref (child);
67
1
}
68

            
69
static void
70
1
atk_test_text_get_caret_offset (TestAppFixture *fixture, gconstpointer user_data)
71
{
72
1
  AtspiAccessible *_obj = fixture->root_obj;
73
1
  g_assert_nonnull (_obj);
74
1
  AtspiAccessible *child = atspi_accessible_get_child_at_index (_obj, 0, NULL);
75
1
  g_assert_nonnull (child);
76
1
  AtspiText *obj = atspi_accessible_get_text_iface (child);
77

            
78
1
  gint pos = atspi_text_get_caret_offset (obj, NULL);
79
1
  g_assert_cmpint (pos, ==, -1);
80
1
  g_object_unref (obj);
81
1
  g_object_unref (child);
82
1
}
83

            
84
static void
85
1
atk_test_text_set_caret_offset (TestAppFixture *fixture, gconstpointer user_data)
86
{
87
1
  AtspiAccessible *_obj = fixture->root_obj;
88
1
  g_assert_nonnull (_obj);
89
1
  AtspiAccessible *child = atspi_accessible_get_child_at_index (_obj, 0, NULL);
90
1
  g_assert_nonnull (child);
91
1
  AtspiText *obj = atspi_accessible_get_text_iface (child);
92

            
93
1
  g_assert_true (atspi_text_set_caret_offset (obj, 5, NULL));
94
1
  g_assert_false (atspi_text_set_caret_offset (obj, -1, NULL));
95
1
  gint pos = atspi_text_get_caret_offset (obj, NULL);
96
1
  g_assert_cmpint (pos, ==, 5);
97
1
  g_object_unref (obj);
98
1
  g_object_unref (child);
99
1
}
100
static void
101
1
atk_test_text_get_character_at_offset (TestAppFixture *fixture, gconstpointer user_data)
102
{
103
1
  AtspiAccessible *_obj = fixture->root_obj;
104
1
  g_assert_nonnull (_obj);
105
1
  AtspiAccessible *child = atspi_accessible_get_child_at_index (_obj, 0, NULL);
106
1
  g_assert_nonnull (child);
107
1
  AtspiText *obj = atspi_accessible_get_text_iface (child);
108

            
109
1
  guint chr = atspi_text_get_character_at_offset (obj, 5, NULL);
110
1
  g_assert_cmpint (chr, ==, 32);
111
1
  g_object_unref (obj);
112
1
  g_object_unref (child);
113
1
}
114

            
115
static void
116
1
atk_test_text_get_character_extents (TestAppFixture *fixture, gconstpointer user_data)
117
{
118
1
  AtspiAccessible *_obj = fixture->root_obj;
119
1
  g_assert_nonnull (_obj);
120
1
  AtspiAccessible *child = atspi_accessible_get_child_at_index (_obj, 0, NULL);
121
1
  g_assert_nonnull (child);
122
1
  AtspiText *obj = atspi_accessible_get_text_iface (child);
123

            
124
1
  AtspiRect *rec = atspi_text_get_character_extents (obj, 6, ATSPI_COORD_TYPE_SCREEN, NULL);
125
1
  g_assert_cmpint (rec->x, ==, 100);
126
1
  g_assert_cmpint (rec->y, ==, 33);
127
1
  g_assert_cmpint (rec->width, ==, 110);
128
1
  g_assert_cmpint (rec->height, ==, 30);
129

            
130
1
  g_free (rec);
131
1
  g_object_unref (obj);
132
1
  g_object_unref (child);
133
1
}
134

            
135
static void
136
1
atk_test_text_get_range_extents (TestAppFixture *fixture, gconstpointer user_data)
137
{
138
1
  AtspiAccessible *_obj = fixture->root_obj;
139
1
  g_assert_nonnull (_obj);
140
1
  AtspiAccessible *child = atspi_accessible_get_child_at_index (_obj, 0, NULL);
141
1
  g_assert_nonnull (child);
142
1
  AtspiText *obj = atspi_accessible_get_text_iface (child);
143

            
144
1
  AtspiRect *rec = atspi_text_get_range_extents (obj, 0, 1, ATSPI_COORD_TYPE_SCREEN, NULL);
145

            
146
1
  g_assert_cmpint (rec->x, ==, 100);
147
1
  g_assert_cmpint (rec->y, ==, 33);
148
1
  g_assert_cmpint (rec->width, ==, 110);
149
1
  g_assert_cmpint (rec->height, ==, 30);
150

            
151
1
  g_free (rec);
152
1
  g_object_unref (obj);
153
1
  g_object_unref (child);
154
1
}
155

            
156
static void
157
1
atk_test_text_add_selection (TestAppFixture *fixture, gconstpointer user_data)
158
{
159
1
  AtspiAccessible *_obj = fixture->root_obj;
160
1
  g_assert_nonnull (_obj);
161
1
  AtspiAccessible *child = atspi_accessible_get_child_at_index (_obj, 0, NULL);
162
1
  g_assert_nonnull (child);
163
1
  AtspiText *obj = atspi_accessible_get_text_iface (child);
164

            
165
1
  g_assert_true (atspi_text_add_selection (obj, 9, 14, NULL));
166
1
  g_object_unref (obj);
167
1
  g_object_unref (child);
168
1
}
169

            
170
static void
171
1
atk_test_text_get_n_selections (TestAppFixture *fixture, gconstpointer user_data)
172
{
173
1
  AtspiAccessible *_obj = fixture->root_obj;
174
1
  g_assert_nonnull (_obj);
175
1
  AtspiAccessible *child = atspi_accessible_get_child_at_index (_obj, 0, NULL);
176
1
  g_assert_nonnull (child);
177
1
  AtspiText *obj = atspi_accessible_get_text_iface (child);
178

            
179
1
  gint n = atspi_text_get_n_selections (obj, NULL);
180
1
  g_assert_cmpint (n, ==, 0);
181
1
  g_assert_true (atspi_text_add_selection (obj, 9, 14, NULL));
182
1
  g_assert_true (atspi_text_add_selection (obj, 9, 14, NULL));
183
1
  g_assert_true (atspi_text_add_selection (obj, 9, 14, NULL));
184
1
  n = atspi_text_get_n_selections (obj, NULL);
185
1
  g_assert_cmpint (n, ==, 3);
186
1
  g_object_unref (obj);
187
1
  g_object_unref (child);
188
1
}
189

            
190
static void
191
1
atk_test_text_get_selection (TestAppFixture *fixture, gconstpointer user_data)
192
{
193
1
  AtspiAccessible *_obj = fixture->root_obj;
194
1
  g_assert_nonnull (_obj);
195
1
  AtspiAccessible *child = atspi_accessible_get_child_at_index (_obj, 0, NULL);
196
1
  g_assert_nonnull (child);
197
1
  AtspiText *obj = atspi_accessible_get_text_iface (child);
198

            
199
1
  g_assert_true (atspi_text_add_selection (obj, 9, 14, NULL));
200
1
  g_assert_true (atspi_text_add_selection (obj, 14, 15, NULL));
201

            
202
1
  AtspiRange *range = atspi_text_get_selection (obj, 0, NULL);
203
1
  g_assert_nonnull (range);
204
1
  g_assert_cmpint (range->start_offset, ==, 9);
205
1
  g_assert_cmpint (range->end_offset, ==, 14);
206
1
  g_free (range);
207

            
208
1
  range = atspi_text_get_selection (obj, 1, NULL);
209
1
  g_assert_nonnull (range);
210
1
  g_assert_cmpint (range->start_offset, ==, 14);
211
1
  g_assert_cmpint (range->end_offset, ==, 15);
212
1
  g_free (range);
213
1
  g_object_unref (obj);
214
1
  g_object_unref (child);
215
1
}
216

            
217
static void
218
1
atk_test_text_set_selection (TestAppFixture *fixture, gconstpointer user_data)
219
{
220
1
  AtspiAccessible *_obj = fixture->root_obj;
221
1
  g_assert_nonnull (_obj);
222
1
  AtspiAccessible *child = atspi_accessible_get_child_at_index (_obj, 0, NULL);
223
1
  g_assert_nonnull (child);
224
1
  AtspiText *obj = atspi_accessible_get_text_iface (child);
225

            
226
1
  g_assert_true (atspi_text_add_selection (obj, 9, 14, NULL));
227
1
  g_assert_true (atspi_text_add_selection (obj, 14, 15, NULL));
228
1
  g_assert_true (atspi_text_set_selection (obj, 0, 1, 2, NULL));
229
1
  g_assert_true (atspi_text_set_selection (obj, 1, 3, 4, NULL));
230

            
231
1
  AtspiRange *range = atspi_text_get_selection (obj, 0, NULL);
232
1
  g_assert_nonnull (range);
233
1
  g_assert_cmpint (range->start_offset, ==, 1);
234
1
  g_assert_cmpint (range->end_offset, ==, 2);
235
1
  g_free (range);
236

            
237
1
  range = atspi_text_get_selection (obj, 1, NULL);
238
1
  g_assert_nonnull (range);
239
1
  g_assert_cmpint (range->start_offset, ==, 3);
240
1
  g_assert_cmpint (range->end_offset, ==, 4);
241
1
  g_free (range);
242
1
  g_object_unref (obj);
243
1
  g_object_unref (child);
244
1
}
245

            
246
static void
247
1
atk_test_text_remove_selection (TestAppFixture *fixture, gconstpointer user_data)
248
{
249
1
  AtspiAccessible *_obj = fixture->root_obj;
250
1
  g_assert_nonnull (_obj);
251
1
  AtspiAccessible *child = atspi_accessible_get_child_at_index (_obj, 0, NULL);
252
1
  g_assert_nonnull (child);
253
1
  AtspiText *obj = atspi_accessible_get_text_iface (child);
254

            
255
1
  gint n = atspi_text_get_n_selections (obj, NULL);
256
1
  g_assert_cmpint (n, ==, 0);
257

            
258
1
  g_assert_true (atspi_text_add_selection (obj, 9, 14, NULL));
259
1
  g_assert_true (atspi_text_add_selection (obj, 14, 15, NULL));
260
1
  n = atspi_text_get_n_selections (obj, NULL);
261
1
  g_assert_cmpint (n, ==, 2);
262

            
263
1
  g_assert_true (atspi_text_remove_selection (obj, 1, NULL));
264
1
  n = atspi_text_get_n_selections (obj, NULL);
265
1
  g_assert_cmpint (n, ==, 1);
266

            
267
1
  g_assert_true (atspi_text_remove_selection (obj, 0, NULL));
268
1
  n = atspi_text_get_n_selections (obj, NULL);
269
1
  g_assert_cmpint (n, ==, 0);
270
1
  g_object_unref (obj);
271
1
  g_object_unref (child);
272
1
}
273

            
274
static void
275
1
atk_test_text_get_offset_at_point (TestAppFixture *fixture, gconstpointer user_data)
276
{
277
1
  AtspiAccessible *_obj = fixture->root_obj;
278
1
  g_assert_nonnull (_obj);
279
1
  AtspiAccessible *child = atspi_accessible_get_child_at_index (_obj, 0, NULL);
280
1
  g_assert_nonnull (child);
281
1
  AtspiText *obj = atspi_accessible_get_text_iface (child);
282

            
283
1
  gint n = atspi_text_get_offset_at_point (obj, 0, 0, ATSPI_COORD_TYPE_SCREEN, NULL);
284
1
  g_assert_cmpint (n, ==, 5);
285
1
  g_object_unref (obj);
286
1
  g_object_unref (child);
287
1
}
288

            
289
static void
290
1
atk_test_text_get_text_attribute_value (TestAppFixture *fixture, gconstpointer user_data)
291
{
292
1
  AtspiAccessible *_obj = fixture->root_obj;
293
1
  g_assert_nonnull (_obj);
294
1
  AtspiAccessible *child = atspi_accessible_get_child_at_index (_obj, 0, NULL);
295
1
  g_assert_nonnull (child);
296
1
  AtspiText *obj = atspi_accessible_get_text_iface (child);
297

            
298
1
  GError *err = NULL;
299
1
  gchar *str = atspi_text_get_text_attribute_value (obj, 0, "text_test_attr1", &err);
300
1
  if (err)
301
    g_print ("error msg:%s\n", err->message);
302
1
  g_assert_nonnull (str);
303
1
  g_assert_cmpstr (str, ==, "on");
304
1
  g_free (str);
305

            
306
1
  str = atspi_text_get_text_attribute_value (obj, 0, "text_test_attr2", NULL);
307
1
  g_assert_nonnull (str);
308
1
  g_assert_cmpstr (str, ==, "off");
309
1
  g_free (str);
310
1
  g_object_unref (obj);
311
1
  g_object_unref (child);
312
1
}
313

            
314
static void
315
1
atk_test_text_get_attribute_run (TestAppFixture *fixture, gconstpointer user_data)
316
{
317
1
  AtspiAccessible *_obj = fixture->root_obj;
318
1
  g_assert_nonnull (_obj);
319
1
  AtspiAccessible *child = atspi_accessible_get_child_at_index (_obj, 0, NULL);
320
1
  g_assert_nonnull (child);
321
1
  AtspiText *obj = atspi_accessible_get_text_iface (child);
322

            
323
1
  gint start_offset = 0;
324
1
  gint end_offset = 0;
325
1
  GHashTable *tab = atspi_text_get_attribute_run (obj, 0, FALSE, &start_offset, &end_offset, NULL);
326

            
327
1
  g_assert_nonnull (tab);
328

            
329
1
  g_assert_cmpstr ((const char *) g_hash_table_find (tab, GHRunc_find, "text_test_attr1"), ==, "on");
330
1
  g_assert_cmpstr ((const char *) g_hash_table_find (tab, GHRunc_find, "text_test_attr2"), ==, "off");
331
1
  g_assert_cmpint (start_offset, ==, 5);
332
1
  g_assert_cmpint (end_offset, ==, 10);
333
1
  g_hash_table_destroy (tab);
334
1
  g_object_unref (obj);
335
1
  g_object_unref (child);
336
1
}
337

            
338
static void
339
1
atk_test_text_get_default_attributes (TestAppFixture *fixture, gconstpointer user_data)
340
{
341
1
  AtspiAccessible *_obj = fixture->root_obj;
342
1
  g_assert_nonnull (_obj);
343
1
  AtspiAccessible *child = atspi_accessible_get_child_at_index (_obj, 0, NULL);
344
1
  g_assert_nonnull (child);
345
1
  AtspiText *obj = atspi_accessible_get_text_iface (child);
346

            
347
1
  GHashTable *tab = atspi_text_get_default_attributes (obj, NULL);
348
1
  g_assert_nonnull (tab);
349

            
350
1
  g_assert_cmpstr ((const char *) g_hash_table_find (tab, GHRunc_find, "bold_text"), ==, "on");
351
1
  g_assert_cmpstr ((const char *) g_hash_table_find (tab, GHRunc_find, "underline_text"), ==, "off");
352
1
  g_assert_cmpstr ((const char *) g_hash_table_find (tab, GHRunc_find, "dummy_text"), ==, "");
353
1
  g_hash_table_destroy (tab);
354
1
  g_object_unref (obj);
355
1
  g_object_unref (child);
356
1
}
357

            
358
static void
359
1
atk_test_text_get_text_attributes (TestAppFixture *fixture, gconstpointer user_data)
360
{
361
1
  AtspiAccessible *_obj = fixture->root_obj;
362
1
  g_assert_nonnull (_obj);
363
1
  AtspiAccessible *child = atspi_accessible_get_child_at_index (_obj, 0, NULL);
364
1
  g_assert_nonnull (child);
365
1
  AtspiText *obj = atspi_accessible_get_text_iface (child);
366

            
367
1
  gint start_offset = 0;
368
1
  gint end_offset = 0;
369
1
  GHashTable *tab = atspi_text_get_text_attributes (obj, 0, &start_offset, &end_offset, NULL);
370

            
371
1
  g_assert_nonnull (tab);
372

            
373
1
  g_assert_cmpstr ((const char *) g_hash_table_find (tab, GHRunc_find, "text_test_attr1"), ==, "on");
374
1
  g_assert_cmpstr ((const char *) g_hash_table_find (tab, GHRunc_find, "text_test_attr2"), ==, "off");
375
1
  g_assert_cmpint (start_offset, ==, 5);
376
1
  g_assert_cmpint (end_offset, ==, 10);
377
1
  g_hash_table_destroy (tab);
378
1
  g_object_unref (obj);
379
1
  g_object_unref (child);
380
1
}
381

            
382
static void
383
1
atk_test_text_get_string_at_offset_s1 (TestAppFixture *fixture, gconstpointer user_data)
384
{
385
1
  AtspiAccessible *_obj = fixture->root_obj;
386
1
  g_assert_nonnull (_obj);
387
1
  AtspiAccessible *child = atspi_accessible_get_child_at_index (_obj, 0, NULL);
388
1
  g_assert_nonnull (child);
389
1
  AtspiText *obj = atspi_accessible_get_text_iface (child);
390

            
391
1
  AtspiTextRange *range = atspi_text_get_string_at_offset (obj, 0, ATSPI_TEXT_GRANULARITY_CHAR, NULL);
392

            
393
1
  g_assert_cmpint (range->start_offset, ==, 0);
394
1
  g_assert_cmpint (range->end_offset, ==, 1);
395
1
  g_assert_cmpstr (range->content, ==, "t");
396

            
397
1
  g_boxed_free (ATSPI_TYPE_TEXT_RANGE, range);
398

            
399
1
  range = atspi_text_get_string_at_offset (obj, 5, ATSPI_TEXT_GRANULARITY_WORD, NULL);
400

            
401
1
  g_assert_cmpint (range->start_offset, ==, 6);
402
1
  g_assert_cmpint (range->end_offset, ==, 7);
403
1
  g_assert_cmpstr (range->content, ==, "it");
404

            
405
1
  g_boxed_free (ATSPI_TYPE_TEXT_RANGE, range);
406
1
  g_object_unref (obj);
407
1
  g_object_unref (child);
408
1
}
409

            
410
static void
411
1
atk_test_text_get_string_at_offset_s2 (TestAppFixture *fixture, gconstpointer user_data)
412
{
413
1
  AtspiAccessible *_obj = fixture->root_obj;
414
1
  g_assert_nonnull (_obj);
415
1
  AtspiAccessible *child = atspi_accessible_get_child_at_index (_obj, 1, NULL);
416
1
  g_assert_nonnull (child);
417
1
  AtspiText *obj = atspi_accessible_get_text_iface (child);
418

            
419
1
  AtspiTextRange *range = atspi_text_get_string_at_offset (obj, 20, ATSPI_TEXT_GRANULARITY_SENTENCE, NULL);
420

            
421
1
  g_assert_cmpint (range->start_offset, ==, 18);
422
1
  g_assert_cmpint (range->end_offset, ==, 34);
423
1
  g_assert_cmpstr (range->content, ==, "Second sentence.");
424

            
425
1
  g_boxed_free (ATSPI_TYPE_TEXT_RANGE, range);
426

            
427
1
  range = atspi_text_get_string_at_offset (obj, 21, ATSPI_TEXT_GRANULARITY_LINE, NULL);
428

            
429
1
  g_assert_cmpint (range->start_offset, ==, 18);
430
1
  g_assert_cmpint (range->end_offset, ==, 34);
431
1
  g_assert_cmpstr (range->content, ==, "Second sentence.");
432

            
433
1
  g_boxed_free (ATSPI_TYPE_TEXT_RANGE, range);
434

            
435
1
  range = atspi_text_get_string_at_offset (obj, 0, ATSPI_TEXT_GRANULARITY_PARAGRAPH, NULL);
436

            
437
1
  g_assert_cmpint (range->start_offset, ==, 0);
438
1
  g_assert_cmpint (range->end_offset, ==, 0);
439
1
  g_assert_cmpstr (range->content, ==, "");
440

            
441
1
  g_boxed_free (ATSPI_TYPE_TEXT_RANGE, range);
442
1
  g_object_unref (obj);
443
1
  g_object_unref (child);
444
1
}
445

            
446
static void
447
1
atk_test_text_get_bounded_ranges (TestAppFixture *fixture, gconstpointer user_data)
448
{
449
1
  AtspiAccessible *_obj = fixture->root_obj;
450
1
  g_assert_nonnull (_obj);
451
1
  AtspiAccessible *child = atspi_accessible_get_child_at_index (_obj, 0, NULL);
452
1
  g_assert_nonnull (child);
453
1
  AtspiText *obj = atspi_accessible_get_text_iface (child);
454

            
455
1
  GArray *array = atspi_text_get_bounded_ranges (obj, 15, 21, 100, 50, ATSPI_COORD_TYPE_SCREEN, ATSPI_TEXT_CLIP_MAX, ATSPI_TEXT_CLIP_MIN, NULL);
456
1
  g_assert_nonnull (array);
457

            
458
1
  AtspiTextRange *range = &g_array_index (array, AtspiTextRange, 0);
459
1
  g_assert_cmpint (g_array_get_element_size (array), ==, sizeof (AtspiTextRange));
460
1
  g_assert_cmpint (range->start_offset, ==, 0);
461
1
  g_assert_cmpint (range->end_offset, ==, 5);
462
1
  g_assert_cmpstr (range->content, ==, "text0");
463
1
  g_free (range->content);
464

            
465
1
  range = &g_array_index (array, AtspiTextRange, 1);
466
1
  g_assert_cmpint (g_array_get_element_size (array), ==, sizeof (AtspiTextRange));
467
1
  g_assert_cmpint (range->start_offset, ==, 6);
468
1
  g_assert_cmpint (range->end_offset, ==, 10);
469
1
  g_assert_cmpstr (range->content, ==, "it w");
470
1
  g_free (range->content);
471

            
472
1
  g_array_free (array, TRUE);
473
1
  g_object_unref (obj);
474
1
  g_object_unref (child);
475
1
}
476

            
477
void
478
1
atk_test_text (void)
479
{
480
1
  g_test_add ("/text/atk_test_text_get_character_count",
481
              TestAppFixture, DATA_FILE, fixture_setup, atk_test_text_get_character_count, fixture_teardown);
482
1
  g_test_add ("/text/atk_test_text_get_text",
483
              TestAppFixture, DATA_FILE, fixture_setup, atk_test_text_get_text, fixture_teardown);
484
1
  g_test_add ("/text/atk_test_text_get_caret_offset",
485
              TestAppFixture, DATA_FILE, fixture_setup, atk_test_text_get_caret_offset, fixture_teardown);
486
1
  g_test_add ("/text/atk_test_text_get_text_attributes",
487
              TestAppFixture, DATA_FILE, fixture_setup, atk_test_text_get_text_attributes, fixture_teardown);
488
1
  g_test_add ("/text/atk_test_text_get_attribute_run",
489
              TestAppFixture, DATA_FILE, fixture_setup, atk_test_text_get_attribute_run, fixture_teardown);
490
1
  g_test_add ("/text/atk_test_text_get_text_attribute_value",
491
              TestAppFixture, DATA_FILE, fixture_setup, atk_test_text_get_text_attribute_value, fixture_teardown);
492
1
  g_test_add ("/text/atk_test_text_get_default_attributes",
493
              TestAppFixture, DATA_FILE, fixture_setup, atk_test_text_get_default_attributes, fixture_teardown);
494
1
  g_test_add ("/text/atk_test_text_set_caret_offset",
495
              TestAppFixture, DATA_FILE, fixture_setup, atk_test_text_set_caret_offset, fixture_teardown);
496
1
  g_test_add ("/text/atk_test_text_get_string_at_offset_s1",
497
              TestAppFixture, DATA_FILE, fixture_setup, atk_test_text_get_string_at_offset_s1, fixture_teardown);
498
1
  g_test_add ("/text/atk_test_text_get_string_at_offset_s2",
499
              TestAppFixture, DATA_FILE, fixture_setup, atk_test_text_get_string_at_offset_s2, fixture_teardown);
500
1
  g_test_add ("/text/atk_test_text_get_character_at_offset",
501
              TestAppFixture, DATA_FILE, fixture_setup, atk_test_text_get_character_at_offset, fixture_teardown);
502
1
  g_test_add ("/text/atk_test_text_get_character_extents",
503
              TestAppFixture, DATA_FILE, fixture_setup, atk_test_text_get_character_extents, fixture_teardown);
504
1
  g_test_add ("/text/atk_test_text_get_offset_at_point",
505
              TestAppFixture, DATA_FILE, fixture_setup, atk_test_text_get_offset_at_point, fixture_teardown);
506
1
  g_test_add ("/text/atk_test_text_get_range_extents",
507
              TestAppFixture, DATA_FILE, fixture_setup, atk_test_text_get_range_extents, fixture_teardown);
508
1
  g_test_add ("/text/atk_test_text_get_bounded_ranges",
509
              TestAppFixture, DATA_FILE, fixture_setup, atk_test_text_get_bounded_ranges, fixture_teardown);
510
1
  g_test_add ("/text/atk_test_text_get_n_selections",
511
              TestAppFixture, DATA_FILE, fixture_setup, atk_test_text_get_n_selections, fixture_teardown);
512
1
  g_test_add ("/text/atk_test_text_get_selection",
513
              TestAppFixture, DATA_FILE, fixture_setup, atk_test_text_get_selection, fixture_teardown);
514
1
  g_test_add ("/text/atk_test_text_add_selection",
515
              TestAppFixture, DATA_FILE, fixture_setup, atk_test_text_add_selection, fixture_teardown);
516
1
  g_test_add ("/text/atk_test_text_remove_selection",
517
              TestAppFixture, DATA_FILE, fixture_setup, atk_test_text_remove_selection, fixture_teardown);
518
1
  g_test_add ("/text/atk_test_text_set_selection",
519
              TestAppFixture, DATA_FILE, fixture_setup, atk_test_text_set_selection, fixture_teardown);
520
1
}