summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Drake <michael.drake@codethink.co.uk>2017-04-27 12:51:34 (GMT)
committer Michael Drake <michael.drake@codethink.co.uk>2017-04-27 12:51:34 (GMT)
commit49a4a4c5f92389c5180eca43c6cdc607d370408a (patch)
tree5fdd2a45097adb9427efca75e5fcfaafe9c4b700
parent21a424653c148ca966012826064f8b5db5afc93f (diff)
downloadlibcss-49a4a4c5f92389c5180eca43c6cdc607d370408a.tar.gz
libcss-49a4a4c5f92389c5180eca43c6cdc607d370408a.tar.bz2
Tests: Dump box-sizing property in selection tests.
-rw-r--r--test/data/select/tests1.dat48
-rw-r--r--test/dump_computed.h21
2 files changed, 69 insertions, 0 deletions
diff --git a/test/data/select/tests1.dat b/test/data/select/tests1.dat
index 5ab7d7a..e28ccb3 100644
--- a/test/data/select/tests1.dat
+++ b/test/data/select/tests1.dat
@@ -26,6 +26,7 @@ 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
@@ -129,6 +130,7 @@ 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
@@ -236,6 +238,7 @@ 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
@@ -344,6 +347,7 @@ 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
@@ -452,6 +456,7 @@ 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
@@ -560,6 +565,7 @@ 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
@@ -658,6 +664,7 @@ 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
@@ -757,6 +764,7 @@ 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
@@ -856,6 +864,7 @@ 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
@@ -954,6 +963,7 @@ 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
@@ -1057,6 +1067,7 @@ 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
@@ -1160,6 +1171,7 @@ 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
@@ -1264,6 +1276,7 @@ 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
@@ -1371,6 +1384,7 @@ 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
@@ -1477,6 +1491,7 @@ 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
@@ -1589,6 +1604,7 @@ 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
@@ -1701,6 +1717,7 @@ 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
@@ -1813,6 +1830,7 @@ 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
@@ -1929,6 +1947,7 @@ border-right-width: 2px
border-bottom-width: 4px
border-left-width: 2px
bottom: auto
+box-sizing: content-box
break-after: auto
break-before: auto
break-inside: auto
@@ -2044,6 +2063,7 @@ border-right-width: 2em
border-bottom-width: 4px
border-left-width: 2px
bottom: auto
+box-sizing: content-box
break-after: auto
break-before: auto
break-inside: auto
@@ -2157,6 +2177,7 @@ 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
@@ -2269,6 +2290,7 @@ 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
@@ -2381,6 +2403,7 @@ 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
@@ -2493,6 +2516,7 @@ 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
@@ -2605,6 +2629,7 @@ 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
@@ -2717,6 +2742,7 @@ 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
@@ -2829,6 +2855,7 @@ 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
@@ -2941,6 +2968,7 @@ 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
@@ -3053,6 +3081,7 @@ 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
@@ -3165,6 +3194,7 @@ 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
@@ -3277,6 +3307,7 @@ 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
@@ -3389,6 +3420,7 @@ 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
@@ -3501,6 +3533,7 @@ 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
@@ -3613,6 +3646,7 @@ 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
@@ -3725,6 +3759,7 @@ 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
@@ -3837,6 +3872,7 @@ 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
@@ -3949,6 +3985,7 @@ 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
@@ -4061,6 +4098,7 @@ 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
@@ -4173,6 +4211,7 @@ 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
@@ -4285,6 +4324,7 @@ 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
@@ -4397,6 +4437,7 @@ 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
@@ -4502,6 +4543,7 @@ 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
@@ -4607,6 +4649,7 @@ 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
@@ -4712,6 +4755,7 @@ 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
@@ -4814,6 +4858,7 @@ 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
@@ -4917,6 +4962,7 @@ border-right-width: 2px
border-bottom-width: 2px
border-left-width: 2px
bottom: auto
+box-sizing: content-box
break-after: avoid
break-before: column
break-inside: auto
@@ -5020,6 +5066,7 @@ border-right-width: 2px
border-bottom-width: 2px
border-left-width: 2px
bottom: auto
+box-sizing: content-box
break-after: avoid-page
break-before: always
break-inside: auto
@@ -5123,6 +5170,7 @@ border-right-width: 2px
border-bottom-width: 2px
border-left-width: 2px
bottom: auto
+box-sizing: content-box
break-after: avoid-page
break-before: always
break-inside: avoid
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) {