[gtk+] a11y tests: Fix settings that affect a11y output



commit b29e3d8ce020004d2ea966d6eb9ee00aa4700ce6
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat Jan 18 10:53:22 2014 -0500

    a11y tests: Fix settings that affect a11y output
    
    It would be nicer if we could have the tests specify what environment
    their expected output was created in, then we could test multiple
    scenarios. For now, just fix the setting to avoid test failures.

 testsuite/a11y/accessibility-dump.c |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/testsuite/a11y/accessibility-dump.c b/testsuite/a11y/accessibility-dump.c
index 4cfd518..2b58ca8 100644
--- a/testsuite/a11y/accessibility-dump.c
+++ b/testsuite/a11y/accessibility-dump.c
@@ -884,12 +884,26 @@ parse_command_line (int *argc, char ***argv)
   return TRUE;
 }
 
+static void
+fix_settings (void)
+{
+  /* Some settings can affect the output of the accessibility tests,
+   * so we take some steps to isolate us from the ambient environment.
+   */
+
+  g_object_set (gtk_settings_get_default (),
+                "gtk-dialogs-use-header", TRUE,
+                NULL);
+}
+
 int
 main (int argc, char **argv)
 {
   if (!parse_command_line (&argc, &argv))
     return 1;
 
+  fix_settings ();
+
   if (argc < 2)
     {
       const char *basedir;


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