[gtk/better-test-isolation-2: 4/6] a11y tests: Ignore "active" flag on toplevel



commit a1856c30d9794f3f371554fac02b8b9a45472134
Author: Alexander Larsson <alexl redhat com>
Date:   Tue Feb 4 15:01:48 2020 +0100

    a11y tests: Ignore "active" flag on toplevel
    
    All the a11y tests were failing for me with a window state diff
    like this:
    
    -  state: active enabled resizable sensitive showing visible
    +  state: enabled resizable sensitive showing visible
    
    I guess the windows in the CI always gets the focus, but not when
    I run it here. Generally focus seems asynchronous and hard to rely
    on so I just made the test ignore the active state on toplevels.

 testsuite/a11y/about.txt            | 2 +-
 testsuite/a11y/accessibility-dump.c | 9 +++++++--
 testsuite/a11y/accessible-name.txt  | 2 +-
 testsuite/a11y/actionbar.txt        | 2 +-
 testsuite/a11y/buttons.txt          | 2 +-
 testsuite/a11y/calendar.txt         | 2 +-
 testsuite/a11y/colorchooser.txt     | 2 +-
 testsuite/a11y/combos.txt           | 2 +-
 testsuite/a11y/entries.txt          | 2 +-
 testsuite/a11y/expander.txt         | 2 +-
 testsuite/a11y/headerbar.txt        | 2 +-
 testsuite/a11y/hello-world.txt      | 2 +-
 testsuite/a11y/iconview.txt         | 2 +-
 testsuite/a11y/label-static.txt     | 2 +-
 testsuite/a11y/label.txt            | 2 +-
 testsuite/a11y/link.txt             | 2 +-
 testsuite/a11y/listbox.txt          | 2 +-
 testsuite/a11y/lockbutton.txt       | 2 +-
 testsuite/a11y/menubutton.txt       | 2 +-
 testsuite/a11y/menubutton2.txt      | 2 +-
 testsuite/a11y/menubutton3.txt      | 2 +-
 testsuite/a11y/mnemonic.txt         | 2 +-
 testsuite/a11y/notebook.txt         | 2 +-
 testsuite/a11y/pickers.txt          | 2 +-
 testsuite/a11y/placeholder-text.txt | 2 +-
 testsuite/a11y/range.txt            | 2 +-
 testsuite/a11y/scale-drawvalue.txt  | 2 +-
 testsuite/a11y/stack.txt            | 2 +-
 testsuite/a11y/text.txt             | 2 +-
 testsuite/a11y/tooltips.txt         | 2 +-
 testsuite/a11y/tree.txt             | 2 +-
 31 files changed, 37 insertions(+), 32 deletions(-)
---
diff --git a/testsuite/a11y/about.txt b/testsuite/a11y/about.txt
index bc6376c11b..6fccc8c8aa 100644
--- a/testsuite/a11y/about.txt
+++ b/testsuite/a11y/about.txt
@@ -2,7 +2,7 @@ window1
   "dialog"
   index: 0
   name: About FancyPants
-  state: active enabled sensitive showing visible
+  state: enabled sensitive showing visible
   toolkit: gtk
   window-type: dialog
   <AtkComponent>
diff --git a/testsuite/a11y/accessibility-dump.c b/testsuite/a11y/accessibility-dump.c
index 96da1af98b..70d31d5f04 100644
--- a/testsuite/a11y/accessibility-dump.c
+++ b/testsuite/a11y/accessibility-dump.c
@@ -188,7 +188,8 @@ dump_relation_set (GString        *string,
 }
 
 static void
-dump_state_set (GString     *string,
+dump_state_set (AtkObject   *accessible,
+                GString     *string,
                 guint        depth,
                 AtkStateSet *set)
 {
@@ -202,6 +203,10 @@ dump_state_set (GString     *string,
       g_string_append_printf (string, "%*sstate:", depth, "");
       for (i = 0; i < ATK_STATE_LAST_DEFINED; i++)
         {
+          /* The toplevel active state depends on focus interaction with the WM, so lets ignore it */
+          if (ATK_IS_WINDOW (accessible) && i == ATK_STATE_ACTIVE)
+            continue;
+
           if (atk_state_set_contains_state (set, i))
             g_string_append_printf (string, " %s", atk_state_type_get_name (i));
         }
@@ -694,7 +699,7 @@ dump_accessible (AtkObject     *accessible,
   if (atk_object_get_description (accessible))
     g_string_append_printf (string, "%*sdescription: %s\n", depth, "", atk_object_get_description 
(accessible));
   dump_relation_set (string, depth, atk_object_ref_relation_set (accessible));
-  dump_state_set (string, depth, atk_object_ref_state_set (accessible));
+  dump_state_set (accessible, string, depth, atk_object_ref_state_set (accessible));
   dump_attribute_set (string, depth, atk_object_get_attributes (accessible));
 
   if (ATK_IS_COMPONENT (accessible))
diff --git a/testsuite/a11y/accessible-name.txt b/testsuite/a11y/accessible-name.txt
index f2274db1e5..fbbeabafee 100644
--- a/testsuite/a11y/accessible-name.txt
+++ b/testsuite/a11y/accessible-name.txt
@@ -1,7 +1,7 @@
 window1
   "window"
   index: 0
-  state: active enabled resizable sensitive showing visible
+  state: enabled resizable sensitive showing visible
   toolkit: gtk
   window-type: normal
   <AtkComponent>
diff --git a/testsuite/a11y/actionbar.txt b/testsuite/a11y/actionbar.txt
index abd273cb1c..5fec7b6a2f 100644
--- a/testsuite/a11y/actionbar.txt
+++ b/testsuite/a11y/actionbar.txt
@@ -1,7 +1,7 @@
 window1
   "window"
   index: 0
-  state: active enabled resizable sensitive showing visible
+  state: enabled resizable sensitive showing visible
   toolkit: gtk
   window-type: normal
   <AtkComponent>
diff --git a/testsuite/a11y/buttons.txt b/testsuite/a11y/buttons.txt
index 80a1da91b4..3f9811a23f 100644
--- a/testsuite/a11y/buttons.txt
+++ b/testsuite/a11y/buttons.txt
@@ -1,7 +1,7 @@
 window1
   "window"
   index: 0
-  state: active enabled resizable sensitive showing visible
+  state: enabled resizable sensitive showing visible
   toolkit: gtk
   window-type: normal
   <AtkComponent>
diff --git a/testsuite/a11y/calendar.txt b/testsuite/a11y/calendar.txt
index f9e6a18c3b..5f80dc7c78 100644
--- a/testsuite/a11y/calendar.txt
+++ b/testsuite/a11y/calendar.txt
@@ -1,7 +1,7 @@
 window1
   "window"
   index: 0
-  state: active enabled resizable sensitive showing visible
+  state: enabled resizable sensitive showing visible
   toolkit: gtk
   window-type: normal
   <AtkComponent>
diff --git a/testsuite/a11y/colorchooser.txt b/testsuite/a11y/colorchooser.txt
index e8ed90ea87..e18dae502a 100644
--- a/testsuite/a11y/colorchooser.txt
+++ b/testsuite/a11y/colorchooser.txt
@@ -2,7 +2,7 @@ window1
   "dialog"
   index: 0
   name: Select a Color
-  state: active enabled sensitive showing visible
+  state: enabled sensitive showing visible
   toolkit: gtk
   window-type: dialog
   <AtkComponent>
diff --git a/testsuite/a11y/combos.txt b/testsuite/a11y/combos.txt
index 875b4beb07..be2e8e04dd 100644
--- a/testsuite/a11y/combos.txt
+++ b/testsuite/a11y/combos.txt
@@ -1,7 +1,7 @@
 window1
   "window"
   index: 0
-  state: active enabled resizable sensitive showing visible
+  state: enabled resizable sensitive showing visible
   toolkit: gtk
   window-type: normal
   <AtkComponent>
diff --git a/testsuite/a11y/entries.txt b/testsuite/a11y/entries.txt
index 1e332697a4..d94dc9a956 100644
--- a/testsuite/a11y/entries.txt
+++ b/testsuite/a11y/entries.txt
@@ -1,7 +1,7 @@
 window1
   "window"
   index: 0
-  state: active enabled resizable sensitive showing visible
+  state: enabled resizable sensitive showing visible
   toolkit: gtk
   window-type: normal
   <AtkComponent>
diff --git a/testsuite/a11y/expander.txt b/testsuite/a11y/expander.txt
index 863c4ea4f4..07ca46e6fb 100644
--- a/testsuite/a11y/expander.txt
+++ b/testsuite/a11y/expander.txt
@@ -1,7 +1,7 @@
 window1
   "window"
   index: 0
-  state: active enabled resizable sensitive showing visible
+  state: enabled resizable sensitive showing visible
   toolkit: gtk
   window-type: normal
   <AtkComponent>
diff --git a/testsuite/a11y/headerbar.txt b/testsuite/a11y/headerbar.txt
index 6a933d0110..a0dffd43f1 100644
--- a/testsuite/a11y/headerbar.txt
+++ b/testsuite/a11y/headerbar.txt
@@ -1,7 +1,7 @@
 window1
   "window"
   index: 0
-  state: active enabled resizable sensitive showing visible
+  state: enabled resizable sensitive showing visible
   toolkit: gtk
   window-type: normal
   <AtkComponent>
diff --git a/testsuite/a11y/hello-world.txt b/testsuite/a11y/hello-world.txt
index a3816eda2e..b9d478e88a 100644
--- a/testsuite/a11y/hello-world.txt
+++ b/testsuite/a11y/hello-world.txt
@@ -1,7 +1,7 @@
 window1
   "window"
   index: 0
-  state: active enabled resizable sensitive showing visible
+  state: enabled resizable sensitive showing visible
   toolkit: gtk
   window-type: normal
   <AtkComponent>
diff --git a/testsuite/a11y/iconview.txt b/testsuite/a11y/iconview.txt
index 760937982f..98a6acad82 100644
--- a/testsuite/a11y/iconview.txt
+++ b/testsuite/a11y/iconview.txt
@@ -1,7 +1,7 @@
 window1
   "window"
   index: 0
-  state: active enabled resizable sensitive showing visible
+  state: enabled resizable sensitive showing visible
   toolkit: gtk
   window-type: normal
   <AtkComponent>
diff --git a/testsuite/a11y/label-static.txt b/testsuite/a11y/label-static.txt
index 885522437c..3b9eb4ba04 100644
--- a/testsuite/a11y/label-static.txt
+++ b/testsuite/a11y/label-static.txt
@@ -1,7 +1,7 @@
 window1
   "window"
   index: 0
-  state: active enabled resizable sensitive showing visible
+  state: enabled resizable sensitive showing visible
   toolkit: gtk
   window-type: normal
   <AtkComponent>
diff --git a/testsuite/a11y/label.txt b/testsuite/a11y/label.txt
index 8f3e2e74b5..a8669ada27 100644
--- a/testsuite/a11y/label.txt
+++ b/testsuite/a11y/label.txt
@@ -1,7 +1,7 @@
 window1
   "window"
   index: 0
-  state: active enabled resizable sensitive showing visible
+  state: enabled resizable sensitive showing visible
   toolkit: gtk
   window-type: normal
   <AtkComponent>
diff --git a/testsuite/a11y/link.txt b/testsuite/a11y/link.txt
index 4d8ff1ad7e..37ddff5a05 100644
--- a/testsuite/a11y/link.txt
+++ b/testsuite/a11y/link.txt
@@ -1,7 +1,7 @@
 window1
   "window"
   index: 0
-  state: active enabled resizable sensitive showing visible
+  state: enabled resizable sensitive showing visible
   toolkit: gtk
   window-type: normal
   <AtkComponent>
diff --git a/testsuite/a11y/listbox.txt b/testsuite/a11y/listbox.txt
index ceeff350aa..f69b812c80 100644
--- a/testsuite/a11y/listbox.txt
+++ b/testsuite/a11y/listbox.txt
@@ -1,7 +1,7 @@
 window1
   "window"
   index: 0
-  state: active enabled resizable sensitive showing visible
+  state: enabled resizable sensitive showing visible
   toolkit: gtk
   window-type: normal
   <AtkComponent>
diff --git a/testsuite/a11y/lockbutton.txt b/testsuite/a11y/lockbutton.txt
index b8968cd386..d3bc163622 100644
--- a/testsuite/a11y/lockbutton.txt
+++ b/testsuite/a11y/lockbutton.txt
@@ -1,7 +1,7 @@
 window1
   "window"
   index: 0
-  state: active enabled resizable sensitive showing visible
+  state: enabled resizable sensitive showing visible
   toolkit: gtk
   window-type: normal
   <AtkComponent>
diff --git a/testsuite/a11y/menubutton.txt b/testsuite/a11y/menubutton.txt
index 6d4cf5445d..59c99901ad 100644
--- a/testsuite/a11y/menubutton.txt
+++ b/testsuite/a11y/menubutton.txt
@@ -1,7 +1,7 @@
 window1
   "frame"
   index: 0
-  state: active enabled resizable sensitive showing visible
+  state: enabled resizable sensitive showing visible
   toolkit: gtk
   window-type: normal
   <AtkComponent>
diff --git a/testsuite/a11y/menubutton2.txt b/testsuite/a11y/menubutton2.txt
index e6e16e5b8c..ec6956665b 100644
--- a/testsuite/a11y/menubutton2.txt
+++ b/testsuite/a11y/menubutton2.txt
@@ -1,7 +1,7 @@
 window1
   "frame"
   index: 0
-  state: active enabled resizable sensitive showing visible
+  state: enabled resizable sensitive showing visible
   toolkit: gtk
   window-type: normal
   <AtkComponent>
diff --git a/testsuite/a11y/menubutton3.txt b/testsuite/a11y/menubutton3.txt
index e6e16e5b8c..ec6956665b 100644
--- a/testsuite/a11y/menubutton3.txt
+++ b/testsuite/a11y/menubutton3.txt
@@ -1,7 +1,7 @@
 window1
   "frame"
   index: 0
-  state: active enabled resizable sensitive showing visible
+  state: enabled resizable sensitive showing visible
   toolkit: gtk
   window-type: normal
   <AtkComponent>
diff --git a/testsuite/a11y/mnemonic.txt b/testsuite/a11y/mnemonic.txt
index 45906ef0eb..ca96c5d50b 100644
--- a/testsuite/a11y/mnemonic.txt
+++ b/testsuite/a11y/mnemonic.txt
@@ -1,7 +1,7 @@
 window1
   "window"
   index: 0
-  state: active enabled resizable sensitive showing visible
+  state: enabled resizable sensitive showing visible
   toolkit: gtk
   window-type: normal
   <AtkComponent>
diff --git a/testsuite/a11y/notebook.txt b/testsuite/a11y/notebook.txt
index d2e50bf062..5151cea46c 100644
--- a/testsuite/a11y/notebook.txt
+++ b/testsuite/a11y/notebook.txt
@@ -1,7 +1,7 @@
 window1
   "window"
   index: 0
-  state: active enabled resizable sensitive showing visible
+  state: enabled resizable sensitive showing visible
   toolkit: gtk
   window-type: normal
   <AtkComponent>
diff --git a/testsuite/a11y/pickers.txt b/testsuite/a11y/pickers.txt
index f6971e5bf2..7f457e374a 100644
--- a/testsuite/a11y/pickers.txt
+++ b/testsuite/a11y/pickers.txt
@@ -1,7 +1,7 @@
 window1
   "window"
   index: 0
-  state: active enabled resizable sensitive showing visible
+  state: enabled resizable sensitive showing visible
   toolkit: gtk
   window-type: normal
   <AtkComponent>
diff --git a/testsuite/a11y/placeholder-text.txt b/testsuite/a11y/placeholder-text.txt
index e24f5fb8d0..c264ae31d0 100644
--- a/testsuite/a11y/placeholder-text.txt
+++ b/testsuite/a11y/placeholder-text.txt
@@ -1,7 +1,7 @@
 window1
   "window"
   index: 0
-  state: active enabled resizable sensitive showing visible
+  state: enabled resizable sensitive showing visible
   toolkit: gtk
   window-type: normal
   <AtkComponent>
diff --git a/testsuite/a11y/range.txt b/testsuite/a11y/range.txt
index e044e08dc8..68acf81aed 100644
--- a/testsuite/a11y/range.txt
+++ b/testsuite/a11y/range.txt
@@ -1,7 +1,7 @@
 window1
   "window"
   index: 0
-  state: active enabled resizable sensitive showing visible
+  state: enabled resizable sensitive showing visible
   toolkit: gtk
   window-type: normal
   <AtkComponent>
diff --git a/testsuite/a11y/scale-drawvalue.txt b/testsuite/a11y/scale-drawvalue.txt
index c0f9915470..21877a4601 100644
--- a/testsuite/a11y/scale-drawvalue.txt
+++ b/testsuite/a11y/scale-drawvalue.txt
@@ -1,7 +1,7 @@
 window1
   "frame"
   index: 0
-  state: active enabled resizable sensitive showing visible
+  state: enabled resizable sensitive showing visible
   toolkit: gtk
   window-type: normal
   <AtkComponent>
diff --git a/testsuite/a11y/stack.txt b/testsuite/a11y/stack.txt
index 5d41385ccd..dfb48d43e7 100644
--- a/testsuite/a11y/stack.txt
+++ b/testsuite/a11y/stack.txt
@@ -1,7 +1,7 @@
 window1
   "window"
   index: 0
-  state: active enabled resizable sensitive showing visible
+  state: enabled resizable sensitive showing visible
   toolkit: gtk
   window-type: normal
   <AtkComponent>
diff --git a/testsuite/a11y/text.txt b/testsuite/a11y/text.txt
index f873df4a99..771787e00d 100644
--- a/testsuite/a11y/text.txt
+++ b/testsuite/a11y/text.txt
@@ -1,7 +1,7 @@
 window1
   "window"
   index: 0
-  state: active enabled resizable sensitive showing visible
+  state: enabled resizable sensitive showing visible
   toolkit: gtk
   window-type: normal
   <AtkComponent>
diff --git a/testsuite/a11y/tooltips.txt b/testsuite/a11y/tooltips.txt
index d351486336..cee7fd7cdd 100644
--- a/testsuite/a11y/tooltips.txt
+++ b/testsuite/a11y/tooltips.txt
@@ -1,7 +1,7 @@
 window1
   "frame"
   index: 0
-  state: active enabled resizable sensitive showing visible
+  state: enabled resizable sensitive showing visible
   toolkit: gtk
   window-type: normal
   <AtkComponent>
diff --git a/testsuite/a11y/tree.txt b/testsuite/a11y/tree.txt
index 99dec067c4..2a02b53083 100644
--- a/testsuite/a11y/tree.txt
+++ b/testsuite/a11y/tree.txt
@@ -1,7 +1,7 @@
 window1
   "window"
   index: 0
-  state: active enabled resizable sensitive showing visible
+  state: enabled resizable sensitive showing visible
   toolkit: gtk
   window-type: normal
   <AtkComponent>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]