diff --git a/tests/a11y/accessibility-dump.c b/tests/a11y/accessibility-dump.c index 6a8fcee3d6..9bdc70621f 100644 --- a/tests/a11y/accessibility-dump.c +++ b/tests/a11y/accessibility-dump.c @@ -221,6 +221,42 @@ dump_attribute_set (GString *string, } } +static void +dump_text_attributes (GString *string, + gint depth, + const gchar *name, + AtkAttributeSet *attributes) +{ + GSList *l; + AtkAttribute *attr; + const gchar *value; + + if (attributes == NULL) + return; + + g_string_append_printf (string, "%*s%s:", depth, "", name); + for (l = attributes; l; l = l->next) + { + attr = l->data; + /* don't dump values that depend on the environment */ + if (strcmp (attr->name, "family-name") == 0 || + strcmp (attr->name, "size") == 0 || + strcmp (attr->name, "weight") == 0 || + strcmp (attr->name, "stretch") == 0 || + strcmp (attr->name, "variant") == 0 || + strcmp (attr->name, "style") == 0 || + strcmp (attr->name, "language") == 0 || + strcmp (attr->name, "direction") == 0) + value = ""; + else + value = attr->value; + g_string_append_printf (string, " %s:%s", attr->name, value); + } + g_string_append_c (string, '\n'); + + atk_attribute_set_free (attributes); +} + static void dump_atk_text (AtkText *atk_text, guint depth, @@ -233,6 +269,8 @@ dump_atk_text (AtkText *atk_text, g_string_append_printf (string, "%*stext: %s\n", depth, "", text); g_free (text); + g_string_append_printf (string, "%*scharacter count: %d\n", depth, "", atk_text_get_character_count (atk_text)); + g_string_append_printf (string, "%*scaret offset: %d\n", depth, "", atk_text_get_caret_offset (atk_text)); for (i = 0; i < atk_text_get_n_selections (atk_text); i++) @@ -242,6 +280,8 @@ dump_atk_text (AtkText *atk_text, g_string_append_printf (string, "%*sselection %d: (%d, %d) %s\n", depth, "", i, start, end, text); g_free (text); } + + dump_text_attributes (string, depth, "default attributes", atk_text_get_default_attributes (atk_text)); } static void diff --git a/tests/a11y/accessible-name.txt b/tests/a11y/accessible-name.txt index 7105697db6..438054b837 100644 --- a/tests/a11y/accessible-name.txt +++ b/tests/a11y/accessible-name.txt @@ -11,4 +11,6 @@ window1 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: weight: family-name: stretch: variant: style: language: direction: diff --git a/tests/a11y/hello-world.txt b/tests/a11y/hello-world.txt index b3b8e8fbe1..6a76eee09f 100644 --- a/tests/a11y/hello-world.txt +++ b/tests/a11y/hello-world.txt @@ -11,4 +11,6 @@ window1 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: weight: family-name: stretch: variant: style: language: direction: diff --git a/tests/a11y/mnemonic.txt b/tests/a11y/mnemonic.txt index 354b274ae0..8925d4193b 100644 --- a/tests/a11y/mnemonic.txt +++ b/tests/a11y/mnemonic.txt @@ -18,7 +18,9 @@ window1 state: enabled multi-line sensitive visible toolkit: gail text: Entry: + character count: 6 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: weight: family-name: stretch: variant: style: language: direction: entry1 "text" parent: box1 @@ -27,4 +29,6 @@ window1 state: editable enabled focusable sensitive single-line visible toolkit: gail text: text + character count: 4 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:65535,65535,65535 wrap-mode:word justification:left size: weight: family-name: stretch: variant: style: language: direction: