summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2022-11-03 08:57:49 +0000
committerMichael Drake <tlsa@netsurf-browser.org>2022-11-03 08:57:49 +0000
commit4d9a3d3e1dcdaa912dd00341a668ced672847a26 (patch)
tree7cab02417579d8bd54f87a784d7f425dc8c44d05
parent3c0c6b6def402f0c0b654974e193c8c4bf55047f (diff)
downloadlibcss-4d9a3d3e1dcdaa912dd00341a668ced672847a26.tar.gz
libcss-4d9a3d3e1dcdaa912dd00341a668ced672847a26.tar.bz2
tests: Add tests for position:sticky
-rw-r--r--test/data/parse/properties.dat8
-rw-r--r--test/data/select/tests1.dat109
-rw-r--r--test/dump_computed.h3
3 files changed, 120 insertions, 0 deletions
diff --git a/test/data/parse/properties.dat b/test/data/parse/properties.dat
index 302b2dc..b6a0715 100644
--- a/test/data/parse/properties.dat
+++ b/test/data/parse/properties.dat
@@ -3289,6 +3289,14 @@ p:before { content: open-quote url('http://picodrive.acornarcade.com/') " : " at
| 0x000c0049
#reset
+#data
+* { position: sticky; }
+#errors
+#expected
+| 1 *
+| 0x00100049
+#reset
+
##
## 4a - quotes
##
diff --git a/test/data/select/tests1.dat b/test/data/select/tests1.dat
index 67a8364..997e88e 100644
--- a/test/data/select/tests1.dat
+++ b/test/data/select/tests1.dat
@@ -14289,3 +14289,112 @@ word-spacing: normal
writing-mode: horizontal-tb
z-index: auto
#reset
+
+#tree screen
+| div*
+#ua
+div { position: sticky; }
+#errors
+#expected
+align-content: stretch
+align-items: stretch
+align-self: auto
+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
+box-sizing: content-box
+break-after: auto
+break-before: auto
+break-inside: auto
+caption-side: top
+clear: none
+clip: auto
+color: #ff000000
+column-count: auto
+column-fill: balance
+column-gap: normal
+column-rule-color: #ff000000
+column-rule-style: none
+column-rule-width: 2px
+column-span: none
+column-width: auto
+content: normal
+counter-increment: none
+counter-reset: none
+cursor: auto
+direction: ltr
+display: inline
+empty-cells: show
+flex-basis: auto
+flex-direction: row
+flex-grow: 0.000
+flex-shrink: 1.000
+flex-wrap: nowrap
+float: none
+font-family: sans-serif
+font-size: 16px
+font-style: normal
+font-variant: normal
+font-weight: normal
+height: auto
+justify-content: flex-start
+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
+opacity: 1.000
+order: 0
+outline-color: invert
+outline-style: none
+outline-width: 2px
+overflow-x: visible
+overflow-y: visible
+padding-top: 0px
+padding-right: 0px
+padding-bottom: 0px
+padding-left: 0px
+position: sticky
+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
+writing-mode: horizontal-tb
+z-index: auto
+#reset
diff --git a/test/dump_computed.h b/test/dump_computed.h
index a5c4f13..2ce7849 100644
--- a/test/dump_computed.h
+++ b/test/dump_computed.h
@@ -2725,6 +2725,9 @@ static void dump_computed_style(const css_computed_style *style, char *buf,
case CSS_POSITION_FIXED:
wrote = snprintf(ptr, *len, "position: fixed\n");
break;
+ case CSS_POSITION_STICKY:
+ wrote = snprintf(ptr, *len, "position: sticky\n");
+ break;
default:
wrote = 0;
break;