[gtk+] reftests: Add reftest for statusbar fix



commit 9d2c3f5e68208576eea82fa313a38689bf16ba56
Author: Benjamin Otte <otte redhat com>
Date:   Thu Aug 14 19:52:33 2014 +0200

    reftests: Add reftest for statusbar fix
    
    https://bugzilla.gnome.org/show_bug.cgi?id=724281

 testsuite/reftests/Makefile.am                 |    5 +++-
 testsuite/reftests/statusbar-remove-all.c      |   27 ++++++++++++++++++++++++
 testsuite/reftests/statusbar-remove-all.ref.ui |   22 +++++++++++++++++++
 testsuite/reftests/statusbar-remove-all.ui     |   23 ++++++++++++++++++++
 4 files changed, 76 insertions(+), 1 deletions(-)
---
diff --git a/testsuite/reftests/Makefile.am b/testsuite/reftests/Makefile.am
index 9e04237..336a507 100644
--- a/testsuite/reftests/Makefile.am
+++ b/testsuite/reftests/Makefile.am
@@ -346,6 +346,8 @@ testdata = \
        sizegroups-evolution-identity-page.ref.ui \
        sizegroups-get-preferred-null.ui \
        sizegroups-get-preferred-null.ref.ui \
+       statusbar-remove-all.ref.ui \
+       statusbar-remove-all.ui \
        style-properties-nth-child.css \
        style-properties-nth-child.ref.ui \
        style-properties-nth-child.ui \
@@ -402,8 +404,9 @@ libreftest_la_LDFLAGS = -rpath $(reftestdir) -avoid-version -module $(no_undefin
 libreftest_la_CFLAGS = $(gtk_reftest_CFLAGS)
 libreftest_la_LIBADD = $(gtk_reftest_LDADD)
 libreftest_la_SOURCES =                        \
-       set-default-direction.c         \
        expand-expander.c               \
+       set-default-direction.c         \
+       statusbar-remove-all.c          \
        textview-border-windows.c       \
        $(NULL)
 
diff --git a/testsuite/reftests/statusbar-remove-all.c b/testsuite/reftests/statusbar-remove-all.c
new file mode 100644
index 0000000..6960fd1
--- /dev/null
+++ b/testsuite/reftests/statusbar-remove-all.c
@@ -0,0 +1,27 @@
+/*
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "config.h"
+
+#include <gtk/gtk.h>
+
+
+G_MODULE_EXPORT void
+statusbar_remove_all (GtkStatusbar *s)
+{
+  gtk_statusbar_push (s, 0, "One");
+  gtk_statusbar_push (s, 0, "Two");
+  gtk_statusbar_remove_all (s, 0);
+}
diff --git a/testsuite/reftests/statusbar-remove-all.ref.ui b/testsuite/reftests/statusbar-remove-all.ref.ui
new file mode 100644
index 0000000..c42d2ff
--- /dev/null
+++ b/testsuite/reftests/statusbar-remove-all.ref.ui
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.18.1 -->
+<interface>
+  <requires lib="gtk+" version="3.12"/>
+  <object class="GtkWindow" id="window1">
+    <property name="can_focus">False</property>
+    <property name="type">popup</property>
+    <child>
+      <object class="GtkStatusbar" id="statusbar1">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="margin_left">10</property>
+        <property name="margin_right">10</property>
+        <property name="margin_start">10</property>
+        <property name="margin_end">10</property>
+        <property name="margin_top">6</property>
+        <property name="margin_bottom">6</property>
+        <property name="spacing">2</property>
+      </object>
+    </child>
+  </object>
+</interface>
diff --git a/testsuite/reftests/statusbar-remove-all.ui b/testsuite/reftests/statusbar-remove-all.ui
new file mode 100644
index 0000000..21a33d2
--- /dev/null
+++ b/testsuite/reftests/statusbar-remove-all.ui
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.18.1 -->
+<interface>
+  <requires lib="gtk+" version="3.12"/>
+  <object class="GtkWindow" id="window1">
+    <property name="can_focus">False</property>
+    <property name="type">popup</property>
+    <child>
+      <object class="GtkStatusbar" id="statusbar1">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="margin_left">10</property>
+        <property name="margin_right">10</property>
+        <property name="margin_start">10</property>
+        <property name="margin_end">10</property>
+        <property name="margin_top">6</property>
+        <property name="margin_bottom">6</property>
+        <property name="spacing">2</property>
+        <signal name="realize" handler="reftest:statusbar_remove_all" swapped="no"/>
+      </object>
+    </child>
+  </object>
+</interface>


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