[gtk+/css-fixes: 6/8] Reftest background-origin with various background-clip values



commit 966a064a74929acbe4830be1ab5a04b065f163a9
Author: Alexander Larsson <alexl redhat com>
Date:   Thu Nov 24 22:00:49 2011 +0100

    Reftest background-origin with various background-clip values

 tests/reftests/Makefile.am                     |    4 +
 tests/reftests/background-origin.css           |   65 +++++++++++++
 tests/reftests/background-origin.ref.ui        |   19 ++++
 tests/reftests/background-origin.ui            |  116 ++++++++++++++++++++++++
 tests/reftests/reference-background-origin.png |  Bin 0 -> 1960 bytes
 5 files changed, 204 insertions(+), 0 deletions(-)
---
diff --git a/tests/reftests/Makefile.am b/tests/reftests/Makefile.am
index b3ffb1e..2e0624f 100644
--- a/tests/reftests/Makefile.am
+++ b/tests/reftests/Makefile.am
@@ -32,6 +32,10 @@ EXTRA_DIST += \
 	background-color-transparent.css \
 	background-color-transparent.ref.ui \
 	background-color-transparent.ui \
+	background-origin.css \
+	background-origin.ref.ui \
+	background-origin.ui \
+	reference-background-origin.png	\
 	border-color-default.css \
 	border-color-default.ref.ui \
 	border-color-default.ui \
diff --git a/tests/reftests/background-origin.css b/tests/reftests/background-origin.css
new file mode 100644
index 0000000..22b22ee
--- /dev/null
+++ b/tests/reftests/background-origin.css
@@ -0,0 +1,65 @@
+* {
+  engine: none;
+  border-style: none;
+  border-image: none;
+  background-image: none;
+  background-clip: border-box;
+  background-repeat: no-repeat;
+  border-radius: 0;
+}
+
+GtkWindow {
+  background-color: rgb(255,255,255);
+}
+
+GtkButton {
+  border-width: 5;
+  border-style: solid;
+  border-color: rgba(255,0,0,0.5);
+  padding: 10;
+  background-color: rgb(0,0,255);
+
+  background-image: url("green-20x20.png");
+}
+
+#button1 {
+  background-origin: border-box;
+  background-clip: border-box;
+}
+#button2 {
+  background-origin: padding-box;
+  background-clip: border-box;
+}
+#button3 {
+  background-origin: content-box;
+  background-clip: border-box;
+}
+#button4 {
+  background-origin: border-box;
+  background-clip: padding-box;
+}
+#button5 {
+  background-origin: padding-box;
+  background-clip: padding-box;
+}
+#button6 {
+  background-origin: content-box;
+  background-clip: padding-box;
+}
+#button7 {
+  background-origin: border-box;
+  background-clip: content-box;
+}
+#button8 {
+  background-origin: padding-box;
+  background-clip: content-box;
+}
+#button9 {
+  background-origin: content-box;
+  background-clip: content-box;
+}
+
+GtkButton#reference {
+  border-width: 0;
+  background-image: url("reference-background-origin.png");
+}
diff --git a/tests/reftests/background-origin.ref.ui b/tests/reftests/background-origin.ref.ui
new file mode 100644
index 0000000..d1e1cc7
--- /dev/null
+++ b/tests/reftests/background-origin.ref.ui
@@ -0,0 +1,19 @@
+<?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="width_request">154</property>
+    <property name="height_request">680</property>
+    <child>
+      <object class="GtkButton" id="button">
+	<property name="name">reference</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>
+      </object>
+    </child>
+  </object>
+</interface>
diff --git a/tests/reftests/background-origin.ui b/tests/reftests/background-origin.ui
new file mode 100644
index 0000000..6cc188b
--- /dev/null
+++ b/tests/reftests/background-origin.ui
@@ -0,0 +1,116 @@
+<?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="GtkBox" id="box1">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="orientation">vertical</property>
+        <property name="spacing">5</property>
+        <property name="border-width">5</property>
+        <child>
+	  <object class="GtkButton" id="button1">
+	    <property name="name">button1</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="width_request">144</property>
+	    <property name="height_request">70</property>
+	  </object>
+	</child>
+        <child>
+	  <object class="GtkButton" id="button2">
+	    <property name="name">button2</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="width_request">144</property>
+	    <property name="height_request">70</property>
+	  </object>
+	</child>
+        <child>
+	  <object class="GtkButton" id="button3">
+	    <property name="name">button3</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="width_request">144</property>
+	    <property name="height_request">70</property>
+	  </object>
+	</child>
+        <child>
+	  <object class="GtkButton" id="button4">
+	    <property name="name">button4</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="width_request">144</property>
+	    <property name="height_request">70</property>
+	  </object>
+	</child>
+        <child>
+	  <object class="GtkButton" id="button5">
+	    <property name="name">button5</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="width_request">144</property>
+	    <property name="height_request">70</property>
+	  </object>
+	</child>
+        <child>
+	  <object class="GtkButton" id="button6">
+	    <property name="name">button6</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="width_request">144</property>
+	    <property name="height_request">70</property>
+	  </object>
+	</child>
+        <child>
+	  <object class="GtkButton" id="button7">
+	    <property name="name">button7</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="width_request">144</property>
+	    <property name="height_request">70</property>
+	  </object>
+	</child>
+        <child>
+	  <object class="GtkButton" id="button8">
+	    <property name="name">button8</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="width_request">144</property>
+	    <property name="height_request">70</property>
+	  </object>
+	</child>
+        <child>
+	  <object class="GtkButton" id="button9">
+	    <property name="name">button9</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="width_request">144</property>
+	    <property name="height_request">70</property>
+	  </object>
+	</child>
+      </object>
+    </child>
+  </object>
+</interface>
diff --git a/tests/reftests/reference-background-origin.png b/tests/reftests/reference-background-origin.png
new file mode 100644
index 0000000..fb4ee23
Binary files /dev/null and b/tests/reftests/reference-background-origin.png differ



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