From 7eaeb442b0bd727bb4e70b177152b90a94a1ce0f Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Fri, 26 Jun 2009 22:17:31 +0000 Subject: Tests for background property. svn path=/trunk/libcss/; revision=8028 --- test/data/parse2/INDEX | 3 +- test/data/parse2/bg.dat | 209 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 211 insertions(+), 1 deletion(-) create mode 100644 test/data/parse2/bg.dat diff --git a/test/data/parse2/INDEX b/test/data/parse2/INDEX index a90de89..a723528 100644 --- a/test/data/parse2/INDEX +++ b/test/data/parse2/INDEX @@ -10,4 +10,5 @@ illegal-values.dat Illegal value tests malformed-declarations.dat Malformed declaration tests unknown-properties.dat Unknown property tests bgpos.dat Illegal background-position values -margin.dat Margin shorthand tests +bg.dat Background property tests +margin.dat Margin property tests \ No newline at end of file diff --git a/test/data/parse2/bg.dat b/test/data/parse2/bg.dat new file mode 100644 index 0000000..145fe63 --- /dev/null +++ b/test/data/parse2/bg.dat @@ -0,0 +1,209 @@ +#data +* { background: red; } +#errors +#expected +| * +| background-attachment: scroll +| background-color: #ff000000 +| background-image: none +| background-position: left top +| background-repeat: repeat +#reset + +#data +* { background: url("chess.png") gray 40% repeat fixed; } +#errors +#expected +| * +| background-attachment: fixed +| background-color: #80808000 +| background-image: url('chess.png') +| background-position: 40% center +| background-repeat: repeat +#reset + +#data +* { background: inherit; } +#errors +#expected +| * +| background-attachment: inherit +| background-color: inherit +| background-image: inherit +| background-position: inherit +| background-repeat: inherit +#reset + +#data +* { background: #fff url(bg.gif) no-repeat fixed top left; } +#errors +#expected +| * +| background-attachment: fixed +| background-color: #ffffff00 +| background-image: url('bg.gif') +| background-position: left top +| background-repeat: no-repeat +#reset + +#data +* { background: #fff #000; } +#errors +#expected +| * +#reset + +#data +* { background: #fff url(foo) repeat fixed right bottom #000; } +#errors +#expected +| * +#reset + + +#data +* { background: red !important; } +#errors +#expected +| * +| background-attachment: scroll !important +| background-color: #ff000000 !important +| background-image: none !important +| background-position: left top !important +| background-repeat: repeat !important +#reset + +#data +* { background: url("chess.png") gray 50% repeat fixed ! important; } +#errors +#expected +| * +| background-attachment: fixed !important +| background-color: #80808000 !important +| background-image: url('chess.png') !important +| background-position: 50% center !important +| background-repeat: repeat !important +#reset + +#data +* { background: inherit !important; } +#errors +#expected +| * +| background-attachment: inherit !important +| background-color: inherit !important +| background-image: inherit !important +| background-position: inherit !important +| background-repeat: inherit !important +#reset + +#data +* { background: #fff url(bg.gif) no-repeat fixed top left !important; } +#errors +#expected +| * +| background-attachment: fixed !important +| background-color: #ffffff00 !important +| background-image: url('bg.gif') !important +| background-position: left top !important +| background-repeat: no-repeat !important +#reset + +#data +* { background: #fff #000 ! important; } +#errors +#expected +| * +#reset + +#data +* { background: #fff url(foo) repeat fixed right bottom #000 ! important; } +#errors +#expected +| * +#reset + +#data +* { background: invalid; } +#errors +#expected +| * +#reset + + +#data +* { background: url(foo) !important no-repeat; } +#errors +#expected +| * +#reset + + +#data +* { background-image: inherit; } +#errors +#expected +| * +| background-image: inherit +#reset + +#data +* { background-color: inherit; } +#errors +#expected +| * +| background-color: inherit +#reset + +#data +* { background-color: red inherit; } +#errors +#expected +| * +#reset + +#data +* { background-color: inherit red; } +#errors +#expected +| * +#reset + +#data +* { background-color: inherit red !important; } +#errors +#expected +| * +#reset + +#data +* { background-attachment: inherit; } +#errors +#expected +| * +| background-attachment: inherit +#reset + +#data +* { background-position: inherit; } +#errors +#expected +| * +| background-position: inherit +#reset + +#data +* { background-repeat: inherit; } +#errors +#expected +| * +| background-repeat: inherit +#reset + +#data +* { background-repeat: red; } +#errors +#expected +| * +#reset + -- cgit v1.2.3