From ffe113b218b8b406c116744b7c154c09818fd608 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Fri, 16 Jan 2009 13:09:23 +0000 Subject: Tests for properties 01 to 05. svn path=/trunk/libcss/; revision=6077 --- test/data/parse/INDEX | 1 + test/data/parse/properties.dat | 204 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 205 insertions(+) create mode 100644 test/data/parse/properties.dat (limited to 'test/data/parse') diff --git a/test/data/parse/INDEX b/test/data/parse/INDEX index 18fb6a2..da0b41c 100644 --- a/test/data/parse/INDEX +++ b/test/data/parse/INDEX @@ -6,3 +6,4 @@ tests1.dat Basic tests selectors.dat Selectors atrules.dat @-rules colours.dat Colour values +properties.dat Properties diff --git a/test/data/parse/properties.dat b/test/data/parse/properties.dat new file mode 100644 index 0000000..0a38cfb --- /dev/null +++ b/test/data/parse/properties.dat @@ -0,0 +1,204 @@ +## +## 01 - background-attachment +## + +#data +* { background-attachment: fixed; } +#errors +#expected +| 1 * +| 0x00000001 +#reset + +#data +* { background-attachment: scroll; } +#errors +#expected +| 1 * +| 0x00040001 +#reset + +## +## 02 - background-color +## + +#data +* { background-color: #f08; } +#errors +#expected +| 1 * +| 0x02000002 0xff008800 +#reset + +#data +* { background-color: transparent; } +#errors +#expected +| 1 * +| 0x00000002 +#reset + +## +## 03 - background-image +## + +#data +* { background-image: url(netsurf.png); } +#errors +#expected +| 1 * +| 0x02000003 PTR(netsurf.png) +#reset + +#data +* { background-image: url("netsurf.png"); } +#errors +#expected +| 1 * +| 0x02000003 PTR(netsurf.png) +#reset + +#data +* { background-image: none; } +#errors +#expected +| 1 * +| 0x00000003 +#reset + +## +## 04 - background-position +## + +#data +* { background-position: left; } +#errors +#expected +| 1 * +| 0x00840004 +#reset + +#data +* { background-position: center; } +#errors +#expected +| 1 * +| 0x00440004 +#reset + +#data +* { background-position: right; } +#errors +#expected +| 1 * +| 0x00040004 +#reset + +#data +* { background-position: top; } +#errors +#expected +| 1 * +| 0x00480004 +#reset + +#data +* { background-position: bottom; } +#errors +#expected +| 1 * +| 0x00400004 +#reset + +#data +* { background-position: right bottom; } +#errors +#expected +| 1 * +| 0x00000004 +#reset + +#data +* { background-position: 10%; } +#errors +#expected +| 1 * +| 0x02040004 0x00000100 0x00002800 +#reset + +#data +* { background-position: 2px; } +#errors +#expected +| 1 * +| 0x02040004 0x00000000 0x00000800 +#reset + +#data +* { background-position: 10% 20%; } +#errors +#expected +| 1 * +| 0x02200004 0x00000100 0x00002800 0x00000100 0x00005000 +#reset + +#data +* { background-position: 10% 2px; } +#errors +#expected +| 1 * +| 0x02200004 0x00000100 0x00002800 0x00000000 0x00000800 +#reset + +#data +* { background-position: bottom 2px; } +#errors +#expected +| 1 * +| 0x02000004 0x00000000 0x00000800 +#reset + +#data +* { background-position: left 10%; } +#errors +#expected +| 1 * +| 0x00a00004 0x00000100 0x00002800 +#reset + +## +## 05 - background-repeat +## + +#data +* { background-repeat: no-repeat; } +#errors +#expected +| 1 * +| 0x00000005 +#reset + +#data +* { background-repeat: repeat-x; } +#errors +#expected +| 1 * +| 0x00040005 +#reset + +#data +* { background-repeat: repeat-y; } +#errors +#expected +| 1 * +| 0x00080005 +#reset + +#data +* { background-repeat: repeat; } +#errors +#expected +| 1 * +| 0x000a0005 +#reset + -- cgit v1.2.3