[gtk+] css: Add reftest for background-position



commit 65e371c16e278b67b8afa22d9f3e888d1c3ec9e9
Author: Alexander Larsson <alexl redhat com>
Date:   Fri Mar 16 22:14:14 2012 +0100

    css: Add reftest for background-position

 tests/reftests/Makefile.am                |    3 +
 tests/reftests/background-position.css    |   52 +++++++++
 tests/reftests/background-position.ref.ui |  161 ++++++++++++++++++++++++++
 tests/reftests/background-position.ui     |  178 +++++++++++++++++++++++++++++
 4 files changed, 394 insertions(+), 0 deletions(-)
---
diff --git a/tests/reftests/Makefile.am b/tests/reftests/Makefile.am
index 5d9f4a7..6b13388 100644
--- a/tests/reftests/Makefile.am
+++ b/tests/reftests/Makefile.am
@@ -37,6 +37,9 @@ EXTRA_DIST += \
 	background-origin.ui \
 	background-positioning-area-empty.ref.ui \
 	background-positioning-area-empty.ui \
+	background-position.css \
+	background-position.ref.ui \
+	background-position.ui \
 	background-size.css \
 	background-size.ref.ui \
 	background-size.ui \
diff --git a/tests/reftests/background-position.css b/tests/reftests/background-position.css
new file mode 100644
index 0000000..ee11380
--- /dev/null
+++ b/tests/reftests/background-position.css
@@ -0,0 +1,52 @@
+ import "reset-to-defaults.css";
+
+.button {
+  background-image: url("green-20x20.png");
+  background-repeat: no-repeat;
+  background-color: red;
+}
+
+.button#ref {
+  background-image: none;
+  background-color: green;
+}
+
+GtkWindow#ref {
+  background-color: red;
+}
+
+#a {
+  background-position: 50% 50%;
+}
+
+#b {
+  background-position: 0% 50%;
+}
+
+#c {
+  background-position: 0% 100%;
+}
+
+#d {
+  background-position: bottom right;
+}
+
+#e {
+  background-position: right top;
+}
+
+#f {
+  background-position: right;
+}
+
+#g {
+  background-position: 10px 10px;
+}
+
+#h {
+  background-position: -10px 10px;
+}
+
+#i {
+  background-position: 20px 20px;
+}
diff --git a/tests/reftests/background-position.ref.ui b/tests/reftests/background-position.ref.ui
new file mode 100644
index 0000000..020d1e8
--- /dev/null
+++ b/tests/reftests/background-position.ref.ui
@@ -0,0 +1,161 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <!-- interface-requires gtk+ 3.0 -->
+  <object class="GtkWindow" id="window1">
+    <property name="can_focus">False</property>
+    <property name="type">popup</property>
+    <property name="name">ref</property>
+    <child>
+      <object class="GtkFixed" id="fixed1">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+            <property name="width_request">120</property>
+            <property name="height_request">120</property>
+        <child>
+          <object class="GtkButton" id="button1">
+            <property name="use_action_appearance">False</property>
+            <property name="width_request">20</property>
+            <property name="height_request">20</property>
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="receives_default">True</property>
+            <property name="use_action_appearance">False</property>
+            <property name="name">ref</property>
+          </object>
+          <packing>
+            <property name="x">10</property>
+            <property name="y">10</property>
+         </packing>
+        </child>
+        <child>
+          <object class="GtkButton" id="button2">
+            <property name="use_action_appearance">False</property>
+            <property name="width_request">20</property>
+            <property name="height_request">20</property>
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="receives_default">True</property>
+            <property name="use_action_appearance">False</property>
+            <property name="name">ref</property>
+          </object>
+          <packing>
+            <property name="x">40</property>
+            <property name="y">10</property>
+         </packing>
+        </child>
+        <child>
+          <object class="GtkButton" id="button3">
+            <property name="use_action_appearance">False</property>
+            <property name="width_request">20</property>
+            <property name="height_request">20</property>
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="receives_default">True</property>
+            <property name="use_action_appearance">False</property>
+            <property name="name">ref</property>
+          </object>
+          <packing>
+            <property name="x">80</property>
+            <property name="y">20</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkButton" id="button4">
+            <property name="use_action_appearance">False</property>
+            <property name="width_request">20</property>
+            <property name="height_request">20</property>
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="receives_default">True</property>
+            <property name="use_action_appearance">False</property>
+            <property name="name">ref</property>
+          </object>
+          <packing>
+            <property name="x">20</property>
+            <property name="y">60</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkButton" id="button5">
+            <property name="use_action_appearance">False</property>
+            <property name="width_request">20</property>
+            <property name="height_request">20</property>
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="receives_default">True</property>
+            <property name="use_action_appearance">False</property>
+            <property name="name">ref</property>
+          </object>
+          <packing>
+            <property name="x">60</property>
+            <property name="y">40</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkButton" id="button6">
+            <property name="use_action_appearance">False</property>
+            <property name="width_request">20</property>
+            <property name="height_request">20</property>
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="receives_default">True</property>
+            <property name="use_action_appearance">False</property>
+            <property name="name">ref</property>
+          </object>
+          <packing>
+            <property name="x">100</property>
+            <property name="y">50</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkButton" id="button7">
+            <property name="use_action_appearance">False</property>
+            <property name="width_request">20</property>
+            <property name="height_request">20</property>
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="receives_default">True</property>
+            <property name="use_action_appearance">False</property>
+            <property name="name">ref</property>
+          </object>
+          <packing>
+            <property name="x">10</property>
+            <property name="y">90</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkButton" id="button8">
+            <property name="use_action_appearance">False</property>
+            <property name="width_request">10</property>
+            <property name="height_request">20</property>
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="receives_default">True</property>
+            <property name="use_action_appearance">False</property>
+            <property name="name">ref</property>
+          </object>
+          <packing>
+            <property name="x">40</property>
+            <property name="y">90</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkButton" id="button9">
+            <property name="use_action_appearance">False</property>
+            <property name="width_request">20</property>
+            <property name="height_request">20</property>
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="receives_default">True</property>
+            <property name="use_action_appearance">False</property>
+            <property name="name">ref</property>
+          </object>
+          <packing>
+            <property name="x">100</property>
+            <property name="y">100</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>
diff --git a/tests/reftests/background-position.ui b/tests/reftests/background-position.ui
new file mode 100644
index 0000000..8fcebbb
--- /dev/null
+++ b/tests/reftests/background-position.ui
@@ -0,0 +1,178 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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="GtkGrid" id="grid1">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="row_spacing">0</property>
+        <property name="column_spacing">0</property>
+        <child>
+          <object class="GtkButton" id="button1">
+            <property name="use_action_appearance">False</property>
+            <property name="width_request">40</property>
+            <property name="height_request">40</property>
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="receives_default">True</property>
+            <property name="use_action_appearance">False</property>
+            <property name="name">a</property>
+          </object>
+          <packing>
+            <property name="left_attach">0</property>
+            <property name="top_attach">0</property>
+            <property name="width">1</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkButton" id="button2">
+            <property name="use_action_appearance">False</property>
+            <property name="width_request">40</property>
+            <property name="height_request">40</property>
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="receives_default">True</property>
+            <property name="use_action_appearance">False</property>
+            <property name="name">b</property>
+          </object>
+          <packing>
+            <property name="left_attach">1</property>
+            <property name="top_attach">0</property>
+            <property name="width">1</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkButton" id="button3">
+            <property name="use_action_appearance">False</property>
+            <property name="width_request">40</property>
+            <property name="height_request">40</property>
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="receives_default">True</property>
+            <property name="use_action_appearance">False</property>
+            <property name="name">c</property>
+          </object>
+          <packing>
+            <property name="left_attach">2</property>
+            <property name="top_attach">0</property>
+            <property name="width">1</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkButton" id="button4">
+            <property name="use_action_appearance">False</property>
+            <property name="width_request">40</property>
+            <property name="height_request">40</property>
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="receives_default">True</property>
+            <property name="use_action_appearance">False</property>
+            <property name="name">d</property>
+          </object>
+          <packing>
+            <property name="left_attach">0</property>
+            <property name="top_attach">1</property>
+            <property name="width">1</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkButton" id="button5">
+            <property name="use_action_appearance">False</property>
+            <property name="width_request">40</property>
+            <property name="height_request">40</property>
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="receives_default">True</property>
+            <property name="use_action_appearance">False</property>
+            <property name="name">e</property>
+          </object>
+          <packing>
+            <property name="left_attach">1</property>
+            <property name="top_attach">1</property>
+            <property name="width">1</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkButton" id="button6">
+            <property name="use_action_appearance">False</property>
+            <property name="width_request">40</property>
+            <property name="height_request">40</property>
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="receives_default">True</property>
+            <property name="use_action_appearance">False</property>
+            <property name="name">f</property>
+          </object>
+          <packing>
+            <property name="left_attach">2</property>
+            <property name="top_attach">1</property>
+            <property name="width">1</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkButton" id="button7">
+            <property name="use_action_appearance">False</property>
+            <property name="width_request">40</property>
+            <property name="height_request">40</property>
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="receives_default">True</property>
+            <property name="use_action_appearance">False</property>
+            <property name="name">g</property>
+          </object>
+          <packing>
+            <property name="left_attach">0</property>
+            <property name="top_attach">2</property>
+            <property name="width">1</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkButton" id="button8">
+            <property name="use_action_appearance">False</property>
+            <property name="width_request">40</property>
+            <property name="height_request">40</property>
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="receives_default">True</property>
+            <property name="use_action_appearance">False</property>
+            <property name="name">h</property>
+          </object>
+          <packing>
+            <property name="left_attach">1</property>
+            <property name="top_attach">2</property>
+            <property name="width">1</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkButton" id="button9">
+            <property name="use_action_appearance">False</property>
+            <property name="width_request">40</property>
+            <property name="height_request">40</property>
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="receives_default">True</property>
+            <property name="use_action_appearance">False</property>
+            <property name="name">i</property>
+          </object>
+          <packing>
+            <property name="left_attach">2</property>
+            <property name="top_attach">2</property>
+            <property name="width">1</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>



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