summaryrefslogtreecommitdiff
path: root/test/data
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2011-01-29 17:53:22 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2011-01-29 17:53:22 +0000
commit1b13f81b8259f4416df7b3063cb280cb977722d7 (patch)
tree5e34f4150c1fc3bcdcd436781f4799571a40cbd4 /test/data
parent9838246d69a3d48a8d0d286ecbfcd1faa199ae91 (diff)
downloadlibcss-1b13f81b8259f4416df7b3063cb280cb977722d7.tar.gz
libcss-1b13f81b8259f4416df7b3063cb280cb977722d7.tar.bz2
Centralise handling of transparent colours.
Add support for currentColor svn path=/trunk/libcss/; revision=11525
Diffstat (limited to 'test/data')
-rw-r--r--test/data/parse/colours.dat10
-rw-r--r--test/data/parse/properties.dat34
-rw-r--r--test/data/parse2/bg.dat24
-rw-r--r--test/data/parse2/border.dat38
-rw-r--r--test/data/parse2/outline.dat20
-rw-r--r--test/data/select/tests1.dat262
6 files changed, 297 insertions, 91 deletions
diff --git a/test/data/parse/colours.dat b/test/data/parse/colours.dat
index 67d5427..0ca7a31 100644
--- a/test/data/parse/colours.dat
+++ b/test/data/parse/colours.dat
@@ -45,7 +45,15 @@
#errors
#expected
| 1 *
-| 0x02000018 0x00000000
+| 0x00000018
+#reset
+
+#data
+* { color: currentColor }
+#errors
+#expected
+| 1 *
+| 0x00040018
#reset
## Out-of-range rgb() parameters
diff --git a/test/data/parse/properties.dat b/test/data/parse/properties.dat
index ac038e5..29b5eb6 100644
--- a/test/data/parse/properties.dat
+++ b/test/data/parse/properties.dat
@@ -233,6 +233,14 @@
| 0x00000002
#reset
+#data
+* { background-color: currentColor }
+#errors
+#expected
+| 1 *
+| 0x00040002
+#reset
+
##
## 03 - background-image
##
@@ -493,6 +501,14 @@
| 0x0000000b
#reset
+#data
+* { border-left-color: currentColor }
+#errors
+#expected
+| 1 *
+| 0x0004000b
+#reset
+
##
## 0c - border-top-style
## 0d - border-right-style
@@ -2283,7 +2299,7 @@ p:before { content: open-quote url('http://picodrive.acornarcade.com/') " : " at
#errors
#expected
| 1 *
-| 0x00000039
+| 0x00080039
#reset
#data
@@ -2294,6 +2310,22 @@ p:before { content: open-quote url('http://picodrive.acornarcade.com/') " : " at
| 0x02000039 0xffbbbbcc
#reset
+#data
+* { outline-color: currentColor }
+#errors
+#expected
+| 1 *
+| 0x00040039
+#reset
+
+#data
+* { outline-color: transparent }
+#errors
+#expected
+| 1 *
+| 0x00000039
+#reset
+
##
## 3a - outline-style
##
diff --git a/test/data/parse2/bg.dat b/test/data/parse2/bg.dat
index 50c7340..0ad6444 100644
--- a/test/data/parse2/bg.dat
+++ b/test/data/parse2/bg.dat
@@ -11,6 +11,30 @@
#reset
#data
+* { background: transparent }
+#errors
+#expected
+| *
+| background-attachment: scroll
+| background-color: transparent
+| background-image: none
+| background-position: left top
+| background-repeat: repeat
+#reset
+
+#data
+* { background: currentColor }
+#errors
+#expected
+| *
+| background-attachment: scroll
+| background-color: currentColor
+| background-image: none
+| background-position: left top
+| background-repeat: repeat
+#reset
+
+#data
* { background: url("chess.png") gray 40% repeat fixed; }
#errors
#expected
diff --git a/test/data/parse2/border.dat b/test/data/parse2/border.dat
index daecf3b..cd9ab13 100644
--- a/test/data/parse2/border.dat
+++ b/test/data/parse2/border.dat
@@ -37,6 +37,44 @@
#reset
#data
+* { border: transparent; }
+#errors
+#expected
+| *
+| border-top-color: transparent
+| border-top-style: none
+| border-top-width: medium
+| border-right-color: transparent
+| border-right-style: none
+| border-right-width: medium
+| border-bottom-color: transparent
+| border-bottom-style: none
+| border-bottom-width: medium
+| border-left-color: transparent
+| border-left-style: none
+| border-left-width: medium
+#reset
+
+#data
+* { border: currentColor; }
+#errors
+#expected
+| *
+| border-top-color: currentColor
+| border-top-style: none
+| border-top-width: medium
+| border-right-color: currentColor
+| border-right-style: none
+| border-right-width: medium
+| border-bottom-color: currentColor
+| border-bottom-style: none
+| border-bottom-width: medium
+| border-left-color: currentColor
+| border-left-style: none
+| border-left-width: medium
+#reset
+
+#data
* { border: solid; }
#errors
#expected
diff --git a/test/data/parse2/outline.dat b/test/data/parse2/outline.dat
index e39fa41..363b5d9 100644
--- a/test/data/parse2/outline.dat
+++ b/test/data/parse2/outline.dat
@@ -19,6 +19,26 @@
#reset
#data
+* { outline: transparent; }
+#errors
+#expected
+| *
+| outline-color: transparent
+| outline-style: none
+| outline-width: medium
+#reset
+
+#data
+* { outline: currentColor; }
+#errors
+#expected
+| *
+| outline-color: currentColor
+| outline-style: none
+| outline-width: medium
+#reset
+
+#data
* { outline: solid; }
#errors
#expected
diff --git a/test/data/select/tests1.dat b/test/data/select/tests1.dat
index e25ac82..0e44641 100644
--- a/test/data/select/tests1.dat
+++ b/test/data/select/tests1.dat
@@ -14,15 +14,15 @@ div#foo { float: right; }
#errors
#expected
background-attachment: scroll
-background-color: transparent
+background-color: #00000000
background-image: none
background-position: 0% 0%
background-repeat: repeat
border-spacing: 0px 0px
-border-top-color: initial
-border-right-color: initial
-border-bottom-color: initial
-border-left-color: initial
+border-top-color: currentColor
+border-right-color: currentColor
+border-bottom-color: currentColor
+border-left-color: currentColor
border-top-style: none
border-right-style: none
border-bottom-style: none
@@ -89,15 +89,15 @@ div p.green { float: left !important; }
#errors
#expected
background-attachment: scroll
-background-color: transparent
+background-color: #00000000
background-image: none
background-position: 0% 0%
background-repeat: repeat
border-spacing: 0px 0px
-border-top-color: initial
-border-right-color: initial
-border-bottom-color: initial
-border-left-color: initial
+border-top-color: currentColor
+border-right-color: currentColor
+border-bottom-color: currentColor
+border-left-color: currentColor
border-top-style: none
border-right-style: none
border-bottom-style: none
@@ -164,15 +164,15 @@ div.moose > div + div { border-top-style: solid; }
#errors
#expected
background-attachment: scroll
-background-color: transparent
+background-color: #00000000
background-image: none
background-position: 0% 0%
background-repeat: repeat
border-spacing: 0px 0px
-border-top-color: initial
-border-right-color: initial
-border-bottom-color: initial
-border-left-color: initial
+border-top-color: currentColor
+border-right-color: currentColor
+border-bottom-color: currentColor
+border-left-color: currentColor
border-top-style: none
border-right-style: none
border-bottom-style: none
@@ -238,15 +238,15 @@ div.moose > div + div { border-top-style: solid; }
#errors
#expected
background-attachment: scroll
-background-color: transparent
+background-color: #00000000
background-image: none
background-position: 0% 0%
background-repeat: repeat
border-spacing: 0px 0px
-border-top-color: initial
-border-right-color: initial
-border-bottom-color: initial
-border-left-color: initial
+border-top-color: currentColor
+border-right-color: currentColor
+border-bottom-color: currentColor
+border-left-color: currentColor
border-top-style: solid
border-right-style: none
border-bottom-style: none
@@ -304,7 +304,7 @@ div { display: inline; }
#errors
#expected
background-attachment: scroll
-background-color: transparent
+background-color: #00000000
background-image: none
background-position: 0% 0%
background-repeat: repeat
@@ -384,6 +384,90 @@ z-index: auto
#tree all
| div*
#author
+div { color: currentColor; }
+#errors
+#expected
+background-attachment: scroll
+background-color: #00000000
+background-image: none
+background-position: 0% 0%
+background-repeat: repeat
+border-collapse: separate
+border-spacing: 0px 0px
+border-top-color: #ff000000
+border-right-color: #ff000000
+border-bottom-color: #ff000000
+border-left-color: #ff000000
+border-top-style: none
+border-right-style: none
+border-bottom-style: none
+border-left-style: none
+border-top-width: 2px
+border-right-width: 2px
+border-bottom-width: 2px
+border-left-width: 2px
+bottom: auto
+caption_side: top
+clear: none
+clip: auto
+color: #ff000000
+content: normal
+counter-increment: none
+counter-reset: none
+cursor: auto
+direction: ltr
+display: inline
+empty-cells: show
+float: none
+font-family: sans-serif
+font-size: 12pt
+font-style: normal
+font-variant: normal
+font-weight: normal
+height: auto
+left: auto
+letter-spacing: normal
+line-height: normal
+list-style-image: none
+list-style-position: outside
+list-style-type: disc
+margin-top: 0px
+margin-right: 0px
+margin-bottom: 0px
+margin-left: 0px
+max-height: none
+max-width: none
+min-height: 0px
+min-width: 0px
+outline-color: invert
+outline-style: none
+outline-width: 2px
+overflow: visible
+padding-top: 0px
+padding-right: 0px
+padding-bottom: 0px
+padding-left: 0px
+position: static
+quotes: none
+right: auto
+table-layout: auto
+text-align: default
+text-decoration: none
+text-indent: 0px
+text-transform: none
+top: auto
+unicode-bidi: normal
+vertical-align: baseline
+visibility: visible
+white-space: normal
+width: auto
+word-spacing: normal
+z-index: auto
+#reset
+
+#tree all
+| div*
+#author
div { background-color: #000; }
div:active { background-color: #bbc; }
#errors
@@ -479,10 +563,10 @@ background-image: none
background-position: 0% 0%
background-repeat: repeat
border-spacing: 0px 0px
-border-top-color: initial
-border-right-color: initial
-border-bottom-color: initial
-border-left-color: initial
+border-top-color: currentColor
+border-right-color: currentColor
+border-bottom-color: currentColor
+border-left-color: currentColor
border-top-style: none
border-right-style: none
border-bottom-style: none
@@ -538,7 +622,7 @@ div { quotes: "a" "b" }
#errors
#expected
background-attachment: scroll
-background-color: transparent
+background-color: #00000000
background-image: none
background-position: 0% 0%
background-repeat: repeat
@@ -627,15 +711,15 @@ div p + p { background-attachment: fixed; }
#errors
#expected
background-attachment: fixed
-background-color: transparent
+background-color: #00000000
background-image: none
background-position: 0% 0%
background-repeat: repeat
border-spacing: 0px 0px
-border-top-color: initial
-border-right-color: initial
-border-bottom-color: initial
-border-left-color: initial
+border-top-color: currentColor
+border-right-color: currentColor
+border-bottom-color: currentColor
+border-left-color: currentColor
border-top-style: none
border-right-style: none
border-bottom-style: none
@@ -696,15 +780,15 @@ div p + p { background-attachment: fixed; }
#errors
#expected
background-attachment: scroll
-background-color: transparent
+background-color: #00000000
background-image: none
background-position: 0% 0%
background-repeat: repeat
border-spacing: 0px 0px
-border-top-color: initial
-border-right-color: initial
-border-bottom-color: initial
-border-left-color: initial
+border-top-color: currentColor
+border-right-color: currentColor
+border-bottom-color: currentColor
+border-left-color: currentColor
border-top-style: none
border-right-style: none
border-bottom-style: none
@@ -766,15 +850,15 @@ div p + p { background-attachment: fixed; }
#errors
#expected
background-attachment: scroll
-background-color: transparent
+background-color: #00000000
background-image: none
background-position: 0% 0%
background-repeat: repeat
border-spacing: 0px 0px
-border-top-color: initial
-border-right-color: initial
-border-bottom-color: initial
-border-left-color: initial
+border-top-color: currentColor
+border-right-color: currentColor
+border-bottom-color: currentColor
+border-left-color: currentColor
border-top-style: none
border-right-style: none
border-bottom-style: none
@@ -839,15 +923,15 @@ div p + p { background-image: url("Sonic_the_Hedgehog.png"); background-position
#errors
#expected
background-attachment: scroll
-background-color: transparent
+background-color: #00000000
background-image: url('Sonic_the_Hedgehog.png')
background-position: 100% 100%
background-repeat: repeat-y
border-spacing: 0px 0px
-border-top-color: initial
-border-right-color: initial
-border-bottom-color: initial
-border-left-color: initial
+border-top-color: currentColor
+border-right-color: currentColor
+border-bottom-color: currentColor
+border-left-color: currentColor
border-top-style: none
border-right-style: none
border-bottom-style: none
@@ -911,15 +995,15 @@ div p + p { background-image: url("Sonic_the_Hedgehog.png"); background-repeat:
#errors
#expected
background-attachment: scroll
-background-color: transparent
+background-color: #00000000
background-image: url('Sonic_the_Hedgehog.png')
background-position: 50% 20%
background-repeat: repeat
border-spacing: 0px 0px
-border-top-color: initial
-border-right-color: initial
-border-bottom-color: initial
-border-left-color: initial
+border-top-color: currentColor
+border-right-color: currentColor
+border-bottom-color: currentColor
+border-left-color: currentColor
border-top-style: none
border-right-style: none
border-bottom-style: none
@@ -989,15 +1073,15 @@ td,th {display:table-cell;}
#errors
#expected
background-attachment: scroll
-background-color: transparent
+background-color: #00000000
background-image: none
background-position: 0% 0%
background-repeat: repeat
border-spacing: 0px 0px
-border-top-color: initial
-border-right-color: initial
-border-bottom-color: initial
-border-left-color: initial
+border-top-color: currentColor
+border-right-color: currentColor
+border-bottom-color: currentColor
+border-left-color: currentColor
border-top-style: none
border-right-style: none
border-bottom-style: none
@@ -1067,15 +1151,15 @@ td,th {display:table-cell;}
#errors
#expected
background-attachment: scroll
-background-color: transparent
+background-color: #00000000
background-image: none
background-position: 0% 0%
background-repeat: repeat
border-spacing: 0px 0px
-border-top-color: initial
-border-right-color: initial
-border-bottom-color: initial
-border-left-color: initial
+border-top-color: currentColor
+border-right-color: currentColor
+border-bottom-color: currentColor
+border-left-color: currentColor
border-top-style: none
border-right-style: none
border-bottom-style: none
@@ -1145,15 +1229,15 @@ td,th {display:table-cell;}
#errors
#expected
background-attachment: scroll
-background-color: transparent
+background-color: #00000000
background-image: none
background-position: 0% 0%
background-repeat: repeat
border-spacing: 0px 0px
-border-top-color: initial
-border-right-color: initial
-border-bottom-color: initial
-border-left-color: initial
+border-top-color: currentColor
+border-right-color: currentColor
+border-bottom-color: currentColor
+border-left-color: currentColor
border-top-style: none
border-right-style: none
border-bottom-style: none
@@ -1220,14 +1304,14 @@ tr {display:table-row;}
td,th {display:table-cell;}
#user
#author
-.hedgehog tr > td {border-color:transparent;}
+.hedgehog tr > td {border-color:#00000000;}
#sonic tr > td {border-top-color:#fff;border-right-color:#8040ff;border-bottom-color:black;border-left-color:rgb(255,0,255);}
td,th {border-top-style: none;border-right-style: hidden;border-bottom-style: dotted;border-left-style: dashed}
tr > td {border-top-width: thin;border-right-width: medium;border-bottom-width: thick;border-left-width: 2px;}
#errors
#expected
background-attachment: scroll
-background-color: transparent
+background-color: #00000000
background-image: none
background-position: 0% 0%
background-repeat: repeat
@@ -1302,21 +1386,21 @@ tr {display:table-row;}
td,th {display:table-cell;}
#user
#author
-.hedgehog tr > td {border-color:transparent;}
+.hedgehog tr > td {border-color:#000000;}
td,th {border-top-style: solid;border-right-style: double;border-bottom-style: groove;border-left-style: ridge}
tr > td {border-top-width: 0;border-right-width: 2em;border-bottom-width: thick;border-left-width: -2px;}
#errors
#expected
background-attachment: scroll
-background-color: transparent
+background-color: #00000000
background-image: none
background-position: 0% 0%
background-repeat: repeat
border-spacing: 0px 0px
-border-top-color: transparent
-border-right-color: transparent
-border-bottom-color: transparent
-border-left-color: transparent
+border-top-color: #ff000000
+border-right-color: #ff000000
+border-bottom-color: #ff000000
+border-left-color: #ff000000
border-top-style: solid
border-right-style: double
border-bottom-style: groove
@@ -1387,15 +1471,15 @@ td,th {display:table-cell;}
#errors
#expected
background-attachment: scroll
-background-color: transparent
+background-color: #00000000
background-image: none
background-position: 0% 0%
background-repeat: repeat
border-spacing: 0px 0px
-border-top-color: initial
-border-right-color: initial
-border-bottom-color: initial
-border-left-color: initial
+border-top-color: currentColor
+border-right-color: currentColor
+border-bottom-color: currentColor
+border-left-color: currentColor
border-top-style: inset
border-right-style: outset
border-bottom-style: inset
@@ -1465,15 +1549,15 @@ td,th {display:table-cell;}
#errors
#expected
background-attachment: scroll
-background-color: transparent
+background-color: #00000000
background-image: none
background-position: 0% 0%
background-repeat: repeat
border-spacing: 2px 2px
-border-top-color: initial
-border-right-color: initial
-border-bottom-color: initial
-border-left-color: initial
+border-top-color: currentColor
+border-right-color: currentColor
+border-bottom-color: currentColor
+border-left-color: currentColor
border-top-style: none
border-right-style: none
border-bottom-style: none
@@ -1543,15 +1627,15 @@ td,th {display:table-cell;}
#errors
#expected
background-attachment: scroll
-background-color: transparent
+background-color: #00000000
background-image: none
background-position: 0% 0%
background-repeat: repeat
border-spacing: 2px 0px
-border-top-color: initial
-border-right-color: initial
-border-bottom-color: initial
-border-left-color: initial
+border-top-color: currentColor
+border-right-color: currentColor
+border-bottom-color: currentColor
+border-left-color: currentColor
border-top-style: none
border-right-style: none
border-bottom-style: none