a11y tests: Add a test for multi-link labels

This commit is contained in:
Matthias Clasen 2014-01-03 22:02:16 -05:00
parent 5845356d66
commit 3bc5ab4fcd
3 changed files with 89 additions and 0 deletions

View File

@ -60,6 +60,7 @@ testdata = \
expander.ui expander.txt \
assistant.ui assistant.txt \
pickers.ui pickers.txt \
label.ui label.txt \
lockbutton.ui lockbutton.txt \
spinner.ui spinner.txt \
progress.ui progress.txt \

74
testsuite/a11y/label.txt Normal file
View File

@ -0,0 +1,74 @@
window1
"window"
index: 0
state: enabled resizable sensitive showing visible
toolkit: gtk
<AtkComponent>
layer: window
alpha: 1
label1
"label"
parent: window1
index: 0
name: Go to the GTK+ website or >google it
state: enabled focusable multi-line sensitive
toolkit: gtk
<AtkComponent>
layer: widget
alpha: 1
<AtkText>
text: Go to the GTK+ website or >google it
character count: 36
caret offset: 0
default attributes: bg-color: <omitted>
bg-full-height: 0
direction: <omitted>
editable: false
family-name: <omitted>
fg-color: <omitted>
indent: 0
invisible: false
justification: left
language: <omitted>
left-margin: 0
pixels-above-lines: 0
pixels-below-lines: 0
pixels-inside-wrap: 0
right-margin: 0
rise: 0
scale: 1
size: <omitted>
stretch: <omitted>
strikethrough: false
style: <omitted>
underline: none
variant: <omitted>
weight: <omitted>
wrap-mode: word
<AtkHypertext>
<AtkHyperlink>
start index: 10
end index: 22
anchors: http://www.gtk.org
<AtkHyperlink>
start index: 27
end index: 36
anchors: http://www.google.com
unnamed-GtkLabelAccessibleLinkImpl-0
"link"
parent: label1
state: enabled focusable multi-line sensitive
<AtkHyperlinkImpl>
<AtkHyperlink>
start index: 10
end index: 22
anchors: http://www.gtk.org
unnamed-GtkLabelAccessibleLinkImpl-1
"link"
parent: label1
state: enabled focusable multi-line sensitive
<AtkHyperlinkImpl>
<AtkHyperlink>
start index: 27
end index: 36
anchors: http://www.google.com

14
testsuite/a11y/label.ui Normal file
View File

@ -0,0 +1,14 @@
<interface>
<!-- interface-requires gtk+ 3.0 -->
<object class="GtkWindow" id="window1">
<property name="can_focus">False</property>
<property name="type">popup</property>
<child>
<object class="GtkLabel" id="label1">
<property name="label">Go to the &lt;a href="http://www.gtk.org" title="&lt;i&gt;Our&lt;/i&gt; website"&gt;GTK+ website&lt;/a&gt; or &lt;small&gt;&gt;&lt;a href="http://www.google.com"&gt;google it&lt;/a&gt;&lt;/small&gt;</property>
<property name="use-markup">True</property>
</object>
</child>
</object>
</interface>