summaryrefslogtreecommitdiff
path: root/test/dump.h
diff options
context:
space:
mode:
authorJohn-Mark Bell <jmb@netsurf-browser.org>2022-05-23 23:02:26 +0100
committerJohn-Mark Bell <jmb@netsurf-browser.org>2022-05-24 10:46:19 +0100
commit747cf5e859cd0f26c140c7687dca227f1e316781 (patch)
treed630aeacc27c4e12cfd48566acaf6cd174334865 /test/dump.h
parentf420dd16136de1dc07f18824c6d0f5540d5df6d1 (diff)
downloadlibcss-747cf5e859cd0f26c140c7687dca227f1e316781.tar.gz
libcss-747cf5e859cd0f26c140c7687dca227f1e316781.tar.bz2
Parse/MQ: reject forbidden media-type identifiers
"and" / "not" / "only" / "or" are forbidden, so must be rejected Add tests for these scenarios
Diffstat (limited to 'test/dump.h')
-rw-r--r--test/dump.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/dump.h b/test/dump.h
index 79819e0..acfd8b0 100644
--- a/test/dump.h
+++ b/test/dump.h
@@ -131,7 +131,9 @@ void dump_rule_media(css_rule_media *s, char **buf, size_t *buflen)
char *ptr = *buf;
css_rule *rule;
- ptr += sprintf(ptr, "| @media ");
+ ptr += sprintf(ptr, "| @media %s%03lx",
+ s->media->negate_type ? "not " : "",
+ s->media->type);
/* \todo media list */