From 65e371c16e278b67b8afa22d9f3e888d1c3ec9e9 Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Fri, 16 Mar 2012 22:14:14 +0100 Subject: [PATCH 1/1] 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(+) create mode 100644 tests/reftests/background-position.css create mode 100644 tests/reftests/background-position.ref.ui create mode 100644 tests/reftests/background-position.ui diff --git a/tests/reftests/Makefile.am b/tests/reftests/Makefile.am index 5d9f4a76a..6b1338806 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 000000000..ee1138008 --- /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 000000000..020d1e8bf --- /dev/null +++ b/tests/reftests/background-position.ref.ui @@ -0,0 +1,161 @@ + + + + + False + popup + ref + + + True + False + 120 + 120 + + + False + 20 + 20 + True + True + True + False + ref + + + 10 + 10 + + + + + False + 20 + 20 + True + True + True + False + ref + + + 40 + 10 + + + + + False + 20 + 20 + True + True + True + False + ref + + + 80 + 20 + + + + + False + 20 + 20 + True + True + True + False + ref + + + 20 + 60 + + + + + False + 20 + 20 + True + True + True + False + ref + + + 60 + 40 + + + + + False + 20 + 20 + True + True + True + False + ref + + + 100 + 50 + + + + + False + 20 + 20 + True + True + True + False + ref + + + 10 + 90 + + + + + False + 10 + 20 + True + True + True + False + ref + + + 40 + 90 + + + + + False + 20 + 20 + True + True + True + False + ref + + + 100 + 100 + + + + + + diff --git a/tests/reftests/background-position.ui b/tests/reftests/background-position.ui new file mode 100644 index 000000000..8fcebbb33 --- /dev/null +++ b/tests/reftests/background-position.ui @@ -0,0 +1,178 @@ + + + + + False + popup + + + True + False + 0 + 0 + + + False + 40 + 40 + True + True + True + False + a + + + 0 + 0 + 1 + 1 + + + + + False + 40 + 40 + True + True + True + False + b + + + 1 + 0 + 1 + 1 + + + + + False + 40 + 40 + True + True + True + False + c + + + 2 + 0 + 1 + 1 + + + + + False + 40 + 40 + True + True + True + False + d + + + 0 + 1 + 1 + 1 + + + + + False + 40 + 40 + True + True + True + False + e + + + 1 + 1 + 1 + 1 + + + + + False + 40 + 40 + True + True + True + False + f + + + 2 + 1 + 1 + 1 + + + + + False + 40 + 40 + True + True + True + False + g + + + 0 + 2 + 1 + 1 + + + + + False + 40 + 40 + True + True + True + False + h + + + 1 + 2 + 1 + 1 + + + + + False + 40 + 40 + True + True + True + False + i + + + 2 + 2 + 1 + 1 + + + + + + -- 2.43.2