forked from AuroraMiddleware/gtk
Dump AtkImage properties too
Update expected output to match.
This commit is contained in:
parent
58b4b410fa
commit
22fc55f716
18
tests/a11y/accessibile-name.txt
Normal file
18
tests/a11y/accessibile-name.txt
Normal file
@ -0,0 +1,18 @@
|
||||
window1
|
||||
"window"
|
||||
index: 0
|
||||
state: enabled resizable sensitive showing visible
|
||||
toolkit: gail
|
||||
button1
|
||||
"push button"
|
||||
parent: window1
|
||||
index: 0
|
||||
name: Accessible name
|
||||
state: enabled focusable sensitive showing visible
|
||||
toolkit: gail
|
||||
text: Hello World!
|
||||
character count: 12
|
||||
caret offset: 0
|
||||
default attributes: left-margin:0 right-margin:0 indent:0 invisible:false editable:false pixels-above-lines:0 pixels-below-lines:0 pixels-inside-wrap:0 bg-full-height:0 scale:1 rise:0 underline:none strikethrough:false bg-stipple:false fg-stipple:false fg-color:0,0,0 bg-color:56540,56026,54741 wrap-mode:word justification:left size:<omitted> weight:<omitted> family-name:<omitted> stretch:<omitted> variant:<omitted> style:<omitted> language:<omitted> direction:<omitted>
|
||||
image size: -1 x -1
|
||||
image description: (null)
|
@ -284,6 +284,19 @@ dump_atk_text (AtkText *atk_text,
|
||||
dump_text_attributes (string, depth, "default attributes", atk_text_get_default_attributes (atk_text));
|
||||
}
|
||||
|
||||
static void
|
||||
dump_atk_image (AtkImage *atk_image,
|
||||
guint depth,
|
||||
GString *string)
|
||||
{
|
||||
gint width, height;
|
||||
|
||||
atk_image_get_image_size (atk_image, &width, &height);
|
||||
g_string_append_printf (string, "%*simage size: %d x %d\n", depth, "", width, height);
|
||||
|
||||
g_string_append_printf (string, "%*simage description: %s\n", depth, "", atk_image_get_image_description (atk_image));
|
||||
}
|
||||
|
||||
static void
|
||||
dump_accessible (AtkObject *accessible,
|
||||
guint depth,
|
||||
@ -308,6 +321,8 @@ dump_accessible (AtkObject *accessible,
|
||||
dump_attribute_set (string, depth, atk_object_get_attributes (accessible));
|
||||
if (ATK_IS_TEXT (accessible))
|
||||
dump_atk_text (ATK_TEXT (accessible), depth, string);
|
||||
if (ATK_IS_IMAGE (accessible))
|
||||
dump_atk_image (ATK_IMAGE (accessible), depth, string);
|
||||
|
||||
for (i = 0; i < atk_object_get_n_accessible_children (accessible); i++)
|
||||
{
|
||||
|
@ -14,3 +14,5 @@ window1
|
||||
character count: 12
|
||||
caret offset: 0
|
||||
default attributes: left-margin:0 right-margin:0 indent:0 invisible:false editable:false pixels-above-lines:0 pixels-below-lines:0 pixels-inside-wrap:0 bg-full-height:0 scale:1 rise:0 underline:none strikethrough:false bg-stipple:false fg-stipple:false fg-color:0,0,0 bg-color:56540,56026,54741 wrap-mode:word justification:left size:<omitted> weight:<omitted> family-name:<omitted> stretch:<omitted> variant:<omitted> style:<omitted> language:<omitted> direction:<omitted>
|
||||
image size: -1 x -1
|
||||
image description: (null)
|
||||
|
@ -14,3 +14,5 @@ window1
|
||||
character count: 12
|
||||
caret offset: 0
|
||||
default attributes: left-margin:0 right-margin:0 indent:0 invisible:false editable:false pixels-above-lines:0 pixels-below-lines:0 pixels-inside-wrap:0 bg-full-height:0 scale:1 rise:0 underline:none strikethrough:false bg-stipple:false fg-stipple:false fg-color:0,0,0 bg-color:56540,56026,54741 wrap-mode:word justification:left size:<omitted> weight:<omitted> family-name:<omitted> stretch:<omitted> variant:<omitted> style:<omitted> language:<omitted> direction:<omitted>
|
||||
image size: -1 x -1
|
||||
image description: (null)
|
||||
|
Loading…
Reference in New Issue
Block a user