[gtk+/quartz-integration: 428/563] Skip line-related tests for GtkEntry
- From: John Ralls <jralls src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/quartz-integration: 428/563] Skip line-related tests for GtkEntry
- Date: Sat, 9 Jul 2011 06:42:00 +0000 (UTC)
commit 64611d149e9c7072390245261dfc0b87c85515aa
Author: Matthias Clasen <mclasen redhat com>
Date: Sat Jun 25 22:03:12 2011 -0400
Skip line-related tests for GtkEntry
GtkEntry sets single-paragraph mode on its pango layout,
so the results for line-related navigation don't match.
tests/a11y/text.c | 14 ++++++++++++--
1 files changed, 12 insertions(+), 2 deletions(-)
---
diff --git a/tests/a11y/text.c b/tests/a11y/text.c
index b2c3ab8..73041bc 100644
--- a/tests/a11y/text.c
+++ b/tests/a11y/text.c
@@ -493,6 +493,8 @@ test_words (GtkWidget *widget)
#if 0
if (GTK_IS_LABEL (widget))
show_text_attributes (gtk_label_get_layout (GTK_LABEL (widget)));
+ else if (GTK_IS_ENTRY (widget))
+ show_text_attributes (gtk_entry_get_layout (GTK_ENTRY (widget)));
#endif
#if 0
@@ -516,12 +518,20 @@ test_words (GtkWidget *widget)
break;
}
printf (" { %2d, %2d, %s %2d, %2d, \"%s\" },\n", i, k, boundary(j), start, end, escape (word));
- g_free (word);
+ g_free (word);
}
#endif
for (i = 0; expected[i].offset != -1; i++)
{
+ if (GTK_IS_ENTRY (widget))
+ {
+ /* GtkEntry sets single-paragraph mode on its pango layout */
+ if (expected[i].boundary == ATK_TEXT_BOUNDARY_LINE_START ||
+ expected[i].boundary == ATK_TEXT_BOUNDARY_LINE_END)
+ continue;
+ }
+
switch (expected[i].gravity)
{
case -1:
@@ -670,8 +680,8 @@ main (int argc, char *argv[])
g_test_add_func ("/text/bold/GtkLabel", test_bold_label);
add_text_tests (gtk_label_new (""));
- add_text_tests (gtk_text_view_new ());
add_text_tests (gtk_entry_new ());
+ add_text_tests (gtk_text_view_new ());
return g_test_run ();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]