diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/data/parse/properties.dat | 37 | ||||
-rw-r--r-- | test/data/parse2/illegal-values.dat | 70 | ||||
-rw-r--r-- | test/data/select/tests1.dat | 3 | ||||
-rw-r--r-- | test/dump.h | 7 | ||||
-rw-r--r-- | test/dump_computed.h | 26 |
5 files changed, 143 insertions, 0 deletions
diff --git a/test/data/parse/properties.dat b/test/data/parse/properties.dat index 8dabbc1..3e872d9 100644 --- a/test/data/parse/properties.dat +++ b/test/data/parse/properties.dat @@ -3743,3 +3743,40 @@ p:before { content: open-quote url('http://picodrive.acornarcade.com/') " : " at | 1 * | 0x02000062 0xfffffc00 #reset + +## +## 63 - -libcss-align +## + +#data +* { -libcss-align: left; } +#errors +#expected +| 1 * +| 0x00000063 +#reset + +#data +* { -libcss-align: right; } +#errors +#expected +| 1 * +| 0x00040063 +#reset + +#data +* { -libcss-align: center; } +#errors +#expected +| 1 * +| 0x00080063 +#reset + +#data +* { -libcss-align: justify; } +#errors +#expected +| 1 * +| 0x000c0063 +#reset + diff --git a/test/data/parse2/illegal-values.dat b/test/data/parse2/illegal-values.dat index 8576166..5518ca6 100644 --- a/test/data/parse2/illegal-values.dat +++ b/test/data/parse2/illegal-values.dat @@ -4524,3 +4524,73 @@ max-height: 30%; min-height: 2em; } | * #reset +#data +* { -libcss-align: none 0; } +#errors +#expected +| * +#reset + +#data +* { -libcss-align: 0pt; } +#errors +#expected +| * +#reset + +#data +* { -libcss-align: -0pt; } +#errors +#expected +| * +#reset + +#data +* { -libcss-align: fixed inherit; } +#errors +#expected +| * +#reset + +#data +* { -libcss-align: left right; } +#errors +#expected +| * +#reset + +#data +* { -libcss-align: left, right; } +#errors +#expected +| * +#reset + +#data +* { -libcss-align: left | right; } +#errors +#expected +| * +#reset + +#data +* { -libcss-align: justified; } +#errors +#expected +| * +#reset + +#data +* { -libcss-align: center 50%; } +#errors +#expected +| * +#reset + +#data +* { -libcss-align: 50%; } +#errors +#expected +| * +#reset + diff --git a/test/data/select/tests1.dat b/test/data/select/tests1.dat index 163e611..35b5e61 100644 --- a/test/data/select/tests1.dat +++ b/test/data/select/tests1.dat @@ -303,6 +303,7 @@ white-space: normal width: auto word-spacing: normal z-index: auto +-libcss-align: default #reset #tree all @@ -388,6 +389,7 @@ white-space: normal width: auto word-spacing: normal z-index: auto +-libcss-align: default #reset #tree @@ -537,5 +539,6 @@ white-space: normal width: auto word-spacing: normal z-index: auto +-libcss-align: default #reset diff --git a/test/dump.h b/test/dump.h index da9e8fb..5352ce3 100644 --- a/test/dump.h +++ b/test/dump.h @@ -1952,6 +1952,13 @@ void dump_bytecode(css_style *style, char **ptr, uint32_t depth) } break; case CSS_PROP_TEXT_ALIGN: + case CSS_PROP_LIBCSS_ALIGN: + assert(LIBCSS_ALIGN_LEFT == TEXT_ALIGN_LEFT); + assert(LIBCSS_ALIGN_RIGHT == TEXT_ALIGN_RIGHT); + assert(LIBCSS_ALIGN_CENTER == + TEXT_ALIGN_CENTER); + assert(LIBCSS_ALIGN_JUSTIFY == + TEXT_ALIGN_JUSTIFY); switch (value) { case TEXT_ALIGN_LEFT: *ptr += sprintf(*ptr, "left"); diff --git a/test/dump_computed.h b/test/dump_computed.h index b3423d7..551830a 100644 --- a/test/dump_computed.h +++ b/test/dump_computed.h @@ -2247,5 +2247,31 @@ static void dump_computed_style(const css_computed_style *style, char *buf, } ptr += wrote; *len -= wrote; + + /* -libcss-align */ + val = css_computed_libcss_align(style); + switch (val) { + case CSS_LIBCSS_ALIGN_LEFT: + wrote = snprintf(ptr, *len, "-libcss-align: left\n"); + break; + case CSS_LIBCSS_ALIGN_RIGHT: + wrote = snprintf(ptr, *len, "-libcss-align: right\n"); + break; + case CSS_LIBCSS_ALIGN_CENTER: + wrote = snprintf(ptr, *len, "-libcss-align: center\n"); + break; + case CSS_LIBCSS_ALIGN_JUSTIFY: + wrote = snprintf(ptr, *len, "-libcss-align: justify\n"); + break; + case CSS_LIBCSS_ALIGN_DEFAULT: + wrote = snprintf(ptr, *len, "-libcss-align: default\n"); + break; + default: + wrote = 0; + break; + } + ptr += wrote; + *len -= wrote; + } |