[gtk+] tests: Add parsing tests for linear gradients
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] tests: Add parsing tests for linear gradients
- Date: Thu, 2 Feb 2012 02:20:01 +0000 (UTC)
commit 2e901752b178b135b1324d1137d90ec559fa2179
Author: Benjamin Otte <otte redhat com>
Date: Tue Jan 17 11:53:38 2012 +0100
tests: Add parsing tests for linear gradients
tests/css/parser/Makefile.am | 2 +
tests/css/parser/linear-gradient.css | 104 ++++++++++++++++++++++++++++++
tests/css/parser/linear-gradient.ref.css | 104 ++++++++++++++++++++++++++++++
3 files changed, 210 insertions(+), 0 deletions(-)
---
diff --git a/tests/css/parser/Makefile.am b/tests/css/parser/Makefile.am
index a61e81e..8b6b320 100644
--- a/tests/css/parser/Makefile.am
+++ b/tests/css/parser/Makefile.am
@@ -286,6 +286,8 @@ EXTRA_DIST += \
integer.css \
integer.errors \
integer.ref.css \
+ linear-gradient.css \
+ linear-gradient.ref.css \
no-semicolon.css \
no-semicolon.ref.css \
pseudo-classes-unknown.css \
diff --git a/tests/css/parser/linear-gradient.css b/tests/css/parser/linear-gradient.css
new file mode 100644
index 0000000..ea69573
--- /dev/null
+++ b/tests/css/parser/linear-gradient.css
@@ -0,0 +1,104 @@
+a {
+ background-image: linear-gradient(red);
+ border-image-source: repeating-linear-gradient(red);
+}
+
+b {
+ background-image: linear-gradient(to top, red);
+ border-image-source: repeating-linear-gradient(to top, red);
+}
+
+c {
+ background-image: linear-gradient(to bottom, red);
+ border-image-source: repeating-linear-gradient(to bottom, red);
+}
+
+d {
+ background-image: linear-gradient(to left, red);
+ border-image-source: repeating-linear-gradient(to left, red);
+}
+
+e {
+ background-image: linear-gradient(to right, red);
+ border-image-source: repeating-linear-gradient(to right, red);
+}
+
+f {
+ background-image: linear-gradient(to bottom left, red);
+ border-image-source: repeating-linear-gradient(to bottom left, red);
+}
+
+g {
+ background-image: linear-gradient(to right bottom, red);
+ border-image-source: repeating-linear-gradient(to right bottom, red);
+}
+
+h {
+ background-image: linear-gradient(to top right, red);
+ border-image-source: repeating-linear-gradient(to top right, red);
+}
+
+i {
+ background-image: linear-gradient(to left bottom, red);
+ border-image-source: repeating-linear-gradient(to left bottom, red);
+}
+
+j {
+ background-image: linear-gradient(1turn, red);
+ border-image-source: repeating-linear-gradient(1turn, red);
+}
+
+k {
+ background-image: linear-gradient(-0.25turn, red);
+ border-image-source: repeating-linear-gradient(-0.25turn, red);
+}
+
+l {
+ background-image: linear-gradient(3.125deg, red);
+ border-image-source: repeating-linear-gradient(3.125deg, red);
+}
+
+m {
+ background-image: linear-gradient(90.0rad, red);
+ border-image-source: repeating-linear-gradient(90.0rad, red);
+}
+
+n {
+ background-image: linear-gradient(-100grad, red);
+ border-image-source: repeating-linear-gradient(-100grad, red);
+}
+
+o {
+ background-image: linear-gradient(red, green, blue);
+ border-image-source: repeating-linear-gradient(red, green, blue);
+}
+
+p {
+ background-image: linear-gradient(red -50%, green, blue 150%);
+ border-image-source: repeating-linear-gradient(red -50%, green, blue 150%);
+}
+
+q {
+ background-image: linear-gradient(red -50%, green, blue 150%);
+ border-image-source: repeating-linear-gradient(red -50%, green, blue 150%);
+}
+
+r {
+ background-image: linear-gradient(red 1px, green 2em);
+ border-image-source: repeating-linear-gradient(red 1px, green 2em);
+}
+
+s {
+ background-image: linear-gradient(red, green 2px, blue);
+ border-image-source: repeating-linear-gradient(red, green 2px, blue);
+}
+
+t {
+ background-image: linear-gradient(red, green, blue, purple, pink, yellow, black, orange);
+ border-image-source: repeating-linear-gradient(red, green, blue, purple, pink, yellow, black, orange);
+}
+
+u {
+ background-image: linear-gradient(red -5px, green 20em, blue, purple -42%, pink 3pt);
+ border-image-source: repeating-linear-gradient(red -5px, green 20em, blue, purple -42%, pink 3pt);
+}
diff --git a/tests/css/parser/linear-gradient.ref.css b/tests/css/parser/linear-gradient.ref.css
new file mode 100644
index 0000000..810e531
--- /dev/null
+++ b/tests/css/parser/linear-gradient.ref.css
@@ -0,0 +1,104 @@
+a {
+ background-image: linear-gradient(rgb(255,0,0));
+ border-image-source: repeating-linear-gradient(rgb(255,0,0));
+}
+
+b {
+ background-image: linear-gradient(to top, rgb(255,0,0));
+ border-image-source: repeating-linear-gradient(to top, rgb(255,0,0));
+}
+
+c {
+ background-image: linear-gradient(rgb(255,0,0));
+ border-image-source: repeating-linear-gradient(rgb(255,0,0));
+}
+
+d {
+ background-image: linear-gradient(to left, rgb(255,0,0));
+ border-image-source: repeating-linear-gradient(to left, rgb(255,0,0));
+}
+
+e {
+ background-image: linear-gradient(to right, rgb(255,0,0));
+ border-image-source: repeating-linear-gradient(to right, rgb(255,0,0));
+}
+
+f {
+ background-image: linear-gradient(to bottom left, rgb(255,0,0));
+ border-image-source: repeating-linear-gradient(to bottom left, rgb(255,0,0));
+}
+
+g {
+ background-image: linear-gradient(to bottom right, rgb(255,0,0));
+ border-image-source: repeating-linear-gradient(to bottom right, rgb(255,0,0));
+}
+
+h {
+ background-image: linear-gradient(to top right, rgb(255,0,0));
+ border-image-source: repeating-linear-gradient(to top right, rgb(255,0,0));
+}
+
+i {
+ background-image: linear-gradient(to bottom left, rgb(255,0,0));
+ border-image-source: repeating-linear-gradient(to bottom left, rgb(255,0,0));
+}
+
+j {
+ background-image: linear-gradient(1turn, rgb(255,0,0));
+ border-image-source: repeating-linear-gradient(1turn, rgb(255,0,0));
+}
+
+k {
+ background-image: linear-gradient(-0.25turn, rgb(255,0,0));
+ border-image-source: repeating-linear-gradient(-0.25turn, rgb(255,0,0));
+}
+
+l {
+ background-image: linear-gradient(3.125deg, rgb(255,0,0));
+ border-image-source: repeating-linear-gradient(3.125deg, rgb(255,0,0));
+}
+
+m {
+ background-image: linear-gradient(90rad, rgb(255,0,0));
+ border-image-source: repeating-linear-gradient(90rad, rgb(255,0,0));
+}
+
+n {
+ background-image: linear-gradient(-100grad, rgb(255,0,0));
+ border-image-source: repeating-linear-gradient(-100grad, rgb(255,0,0));
+}
+
+o {
+ background-image: linear-gradient(rgb(255,0,0), rgb(0,255,0), rgb(0,0,255));
+ border-image-source: repeating-linear-gradient(rgb(255,0,0), rgb(0,255,0), rgb(0,0,255));
+}
+
+p {
+ background-image: linear-gradient(rgb(255,0,0) -50%, rgb(0,255,0), rgb(0,0,255) 150%);
+ border-image-source: repeating-linear-gradient(rgb(255,0,0) -50%, rgb(0,255,0), rgb(0,0,255) 150%);
+}
+
+q {
+ background-image: linear-gradient(rgb(255,0,0) -50%, rgb(0,255,0), rgb(0,0,255) 150%);
+ border-image-source: repeating-linear-gradient(rgb(255,0,0) -50%, rgb(0,255,0), rgb(0,0,255) 150%);
+}
+
+r {
+ background-image: linear-gradient(rgb(255,0,0) 1px, rgb(0,255,0) 2em);
+ border-image-source: repeating-linear-gradient(rgb(255,0,0) 1px, rgb(0,255,0) 2em);
+}
+
+s {
+ background-image: linear-gradient(rgb(255,0,0), rgb(0,255,0) 2px, rgb(0,0,255));
+ border-image-source: repeating-linear-gradient(rgb(255,0,0), rgb(0,255,0) 2px, rgb(0,0,255));
+}
+
+t {
+ background-image: linear-gradient(rgb(255,0,0), rgb(0,255,0), rgb(0,0,255), rgb(160,32,240), rgb(255,192,203), rgb(255,255,0), rgb(0,0,0), rgb(255,165,0));
+ border-image-source: repeating-linear-gradient(rgb(255,0,0), rgb(0,255,0), rgb(0,0,255), rgb(160,32,240), rgb(255,192,203), rgb(255,255,0), rgb(0,0,0), rgb(255,165,0));
+}
+
+u {
+ background-image: linear-gradient(rgb(255,0,0) -5px, rgb(0,255,0) 20em, rgb(0,0,255), rgb(160,32,240) -42%, rgb(255,192,203) 3pt);
+ border-image-source: repeating-linear-gradient(rgb(255,0,0) -5px, rgb(0,255,0) 20em, rgb(0,0,255), rgb(160,32,240) -42%, rgb(255,192,203) 3pt);
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]