summaryrefslogtreecommitdiff
path: root/test/dump_computed.h
diff options
context:
space:
mode:
authorMichael Drake <michael.drake@codethink.co.uk>2017-04-27 13:51:34 +0100
committerMichael Drake <michael.drake@codethink.co.uk>2017-04-27 13:51:34 +0100
commit49a4a4c5f92389c5180eca43c6cdc607d370408a (patch)
tree5fdd2a45097adb9427efca75e5fcfaafe9c4b700 /test/dump_computed.h
parent21a424653c148ca966012826064f8b5db5afc93f (diff)
downloadlibcss-49a4a4c5f92389c5180eca43c6cdc607d370408a.tar.gz
libcss-49a4a4c5f92389c5180eca43c6cdc607d370408a.tar.bz2
Tests: Dump box-sizing property in selection tests.
Diffstat (limited to 'test/dump_computed.h')
-rw-r--r--test/dump_computed.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/dump_computed.h b/test/dump_computed.h
index 8efd2ca..eb9d522 100644
--- a/test/dump_computed.h
+++ b/test/dump_computed.h
@@ -715,6 +715,27 @@ static void dump_computed_style(const css_computed_style *style, char *buf,
ptr += wrote;
*len -= wrote;
+ /* box-sizing */
+ val = css_computed_box_sizing(style);
+ switch (val) {
+ case CSS_BOX_SIZING_INHERIT:
+ wrote = snprintf(ptr, *len, "box-sizing: inherit\n");
+ break;
+ case CSS_BOX_SIZING_CONTENT_BOX:
+ wrote = snprintf(ptr, *len, "box-sizing: content-box\n");
+ break;
+ case CSS_BOX_SIZING_BORDER_BOX:
+ wrote = snprintf(ptr, *len, "box-sizing: border-box\n");
+ break;
+ default:
+ wrote = 0;
+ printf("DISASTER!\n");
+ assert(0);
+ break;
+ }
+ ptr += wrote;
+ *len -= wrote;
+
/* break-after */
val = css_computed_break_after(style);
switch (val) {