From acf30bc5f4cd2dd1c3e01a38b1a766375d97fa01 Mon Sep 17 00:00:00 2001 From: FranklinDM Date: Thu, 7 Apr 2022 01:07:24 +0800 Subject: Issue #1370 - Part 6: Update tests --- .../flexbox-flex-basis-content-001-ref.html | 77 ++++++++++++ .../flexbox/flexbox-flex-basis-content-001a.html | 83 +++++++++++++ .../flexbox/flexbox-flex-basis-content-001b.html | 83 +++++++++++++ .../flexbox-flex-basis-content-002-ref.html | 78 +++++++++++++ .../flexbox/flexbox-flex-basis-content-002a.html | 84 +++++++++++++ .../flexbox/flexbox-flex-basis-content-002b.html | 84 +++++++++++++ .../flexbox-flex-basis-content-003-ref.html | 103 ++++++++++++++++ .../flexbox/flexbox-flex-basis-content-003a.html | 123 +++++++++++++++++++ .../flexbox/flexbox-flex-basis-content-003b.html | 124 ++++++++++++++++++++ .../flexbox-flex-basis-content-004-ref.html | 105 +++++++++++++++++ .../flexbox/flexbox-flex-basis-content-004a.html | 129 ++++++++++++++++++++ .../flexbox/flexbox-flex-basis-content-004b.html | 130 +++++++++++++++++++++ .../w3c-css/submitted/flexbox/reftest.list | 10 ++ layout/style/test/property_database.js | 20 +++- 14 files changed, 1227 insertions(+), 6 deletions(-) create mode 100644 layout/reftests/w3c-css/submitted/flexbox/flexbox-flex-basis-content-001-ref.html create mode 100644 layout/reftests/w3c-css/submitted/flexbox/flexbox-flex-basis-content-001a.html create mode 100644 layout/reftests/w3c-css/submitted/flexbox/flexbox-flex-basis-content-001b.html create mode 100644 layout/reftests/w3c-css/submitted/flexbox/flexbox-flex-basis-content-002-ref.html create mode 100644 layout/reftests/w3c-css/submitted/flexbox/flexbox-flex-basis-content-002a.html create mode 100644 layout/reftests/w3c-css/submitted/flexbox/flexbox-flex-basis-content-002b.html create mode 100644 layout/reftests/w3c-css/submitted/flexbox/flexbox-flex-basis-content-003-ref.html create mode 100644 layout/reftests/w3c-css/submitted/flexbox/flexbox-flex-basis-content-003a.html create mode 100644 layout/reftests/w3c-css/submitted/flexbox/flexbox-flex-basis-content-003b.html create mode 100644 layout/reftests/w3c-css/submitted/flexbox/flexbox-flex-basis-content-004-ref.html create mode 100644 layout/reftests/w3c-css/submitted/flexbox/flexbox-flex-basis-content-004a.html create mode 100644 layout/reftests/w3c-css/submitted/flexbox/flexbox-flex-basis-content-004b.html (limited to 'layout') diff --git a/layout/reftests/w3c-css/submitted/flexbox/flexbox-flex-basis-content-001-ref.html b/layout/reftests/w3c-css/submitted/flexbox/flexbox-flex-basis-content-001-ref.html new file mode 100644 index 0000000000..b537711020 --- /dev/null +++ b/layout/reftests/w3c-css/submitted/flexbox/flexbox-flex-basis-content-001-ref.html @@ -0,0 +1,77 @@ + + + + + CSS Reftest Reference + + + + + + + +
+
a b
+
c
+
+
+ +
+ + +
+
a b
+
c
+
+
+ +
+ + +
+
a b
+
c
+
+
+ +
+ + + diff --git a/layout/reftests/w3c-css/submitted/flexbox/flexbox-flex-basis-content-001a.html b/layout/reftests/w3c-css/submitted/flexbox/flexbox-flex-basis-content-001a.html new file mode 100644 index 0000000000..4227f68ff1 --- /dev/null +++ b/layout/reftests/w3c-css/submitted/flexbox/flexbox-flex-basis-content-001a.html @@ -0,0 +1,83 @@ + + + + + + CSS Test: Testing "flex-basis: content" in a row-oriented flex container + + + + + + + + + + +
+
a b
+
c
+
+
+ +
+ + +
+
a b
+
c
+
+
+ +
+ + +
+
a b
+
c
+
+
+ +
+ + + diff --git a/layout/reftests/w3c-css/submitted/flexbox/flexbox-flex-basis-content-001b.html b/layout/reftests/w3c-css/submitted/flexbox/flexbox-flex-basis-content-001b.html new file mode 100644 index 0000000000..489ce65d8f --- /dev/null +++ b/layout/reftests/w3c-css/submitted/flexbox/flexbox-flex-basis-content-001b.html @@ -0,0 +1,83 @@ + + + + + + CSS Test: Testing "flex-basis: content" (set via the "flex" shorthand) + in a row-oriented flex container. + + + + + + + + + + +
+
a b
+
c
+
+
+ +
+ + +
+
a b
+
c
+
+
+ +
+ + +
+
a b
+
c
+
+
+ +
+ + + diff --git a/layout/reftests/w3c-css/submitted/flexbox/flexbox-flex-basis-content-002-ref.html b/layout/reftests/w3c-css/submitted/flexbox/flexbox-flex-basis-content-002-ref.html new file mode 100644 index 0000000000..a7d1bcf77b --- /dev/null +++ b/layout/reftests/w3c-css/submitted/flexbox/flexbox-flex-basis-content-002-ref.html @@ -0,0 +1,78 @@ + + + + + CSS Reftest Reference + + + + + + + +
+
a b
+
c
+
+
+ +
+ + +
+
a b
+
c
+
+
+ +
+ + +
+
a b
+
c
+
+
+ +
+ + + diff --git a/layout/reftests/w3c-css/submitted/flexbox/flexbox-flex-basis-content-002a.html b/layout/reftests/w3c-css/submitted/flexbox/flexbox-flex-basis-content-002a.html new file mode 100644 index 0000000000..481a3f2290 --- /dev/null +++ b/layout/reftests/w3c-css/submitted/flexbox/flexbox-flex-basis-content-002a.html @@ -0,0 +1,84 @@ + + + + + + CSS Test: Testing "flex-basis: content" in a column-oriented flex container + + + + + + + + + + +
+
a b
+
c
+
+
+ +
+ + +
+
a b
+
c
+
+
+ +
+ + +
+
a b
+
c
+
+
+ +
+ + + diff --git a/layout/reftests/w3c-css/submitted/flexbox/flexbox-flex-basis-content-002b.html b/layout/reftests/w3c-css/submitted/flexbox/flexbox-flex-basis-content-002b.html new file mode 100644 index 0000000000..694e67242e --- /dev/null +++ b/layout/reftests/w3c-css/submitted/flexbox/flexbox-flex-basis-content-002b.html @@ -0,0 +1,84 @@ + + + + + + CSS Test: Testing "flex-basis: content" (set via the "flex" shorthand) + in a column-oriented flex container. + + + + + + + + + + +
+
a b
+
c
+
+
+ +
+ + +
+
a b
+
c
+
+
+ +
+ + +
+
a b
+
c
+
+
+ +
+ + + diff --git a/layout/reftests/w3c-css/submitted/flexbox/flexbox-flex-basis-content-003-ref.html b/layout/reftests/w3c-css/submitted/flexbox/flexbox-flex-basis-content-003-ref.html new file mode 100644 index 0000000000..63ce9d7429 --- /dev/null +++ b/layout/reftests/w3c-css/submitted/flexbox/flexbox-flex-basis-content-003-ref.html @@ -0,0 +1,103 @@ + + + + + CSS Reftest Reference + + + + + + +
+
+
+ + +
+
+ + + +
+
+ + +
+
+ +
+
+ + +
+ +
+ + +
+
+ + + +
+
+ + +
+
+ + + +
+
+ + + diff --git a/layout/reftests/w3c-css/submitted/flexbox/flexbox-flex-basis-content-003a.html b/layout/reftests/w3c-css/submitted/flexbox/flexbox-flex-basis-content-003a.html new file mode 100644 index 0000000000..83dbae0868 --- /dev/null +++ b/layout/reftests/w3c-css/submitted/flexbox/flexbox-flex-basis-content-003a.html @@ -0,0 +1,123 @@ + + + + + + CSS Test: Testing that explicit "flex-basis: content" is treated as + "max-content" when calculating flex base size + + + + + + + + + + + +
+
+
+ + +
+
+ + + +
+
+ + +
+
+ +
+
+ + +
+ +
+ + +
+
+ + + +
+
+ + +
+
+ + + +
+
+ + + diff --git a/layout/reftests/w3c-css/submitted/flexbox/flexbox-flex-basis-content-003b.html b/layout/reftests/w3c-css/submitted/flexbox/flexbox-flex-basis-content-003b.html new file mode 100644 index 0000000000..a81403c098 --- /dev/null +++ b/layout/reftests/w3c-css/submitted/flexbox/flexbox-flex-basis-content-003b.html @@ -0,0 +1,124 @@ + + + + + + CSS Test: Testing that used "flex-basis: content" is treated as + "max-content" when calculating flex base size + + + + + + + + + + + +
+
+
+ + +
+
+ + + +
+
+ + +
+
+ +
+
+ + +
+ +
+ + +
+
+ + + +
+
+ + +
+
+ + + +
+
+ + + diff --git a/layout/reftests/w3c-css/submitted/flexbox/flexbox-flex-basis-content-004-ref.html b/layout/reftests/w3c-css/submitted/flexbox/flexbox-flex-basis-content-004-ref.html new file mode 100644 index 0000000000..7da4de7a5a --- /dev/null +++ b/layout/reftests/w3c-css/submitted/flexbox/flexbox-flex-basis-content-004-ref.html @@ -0,0 +1,105 @@ + + + + + CSS Reftest Reference + + + + + + +
+
+
+ + +
+
+ + + +
+
+ + +
+
+ +
+
+ + +
+ +
+ + +
+
+ + + +
+
+ + +
+
+ + + +
+
+ + + diff --git a/layout/reftests/w3c-css/submitted/flexbox/flexbox-flex-basis-content-004a.html b/layout/reftests/w3c-css/submitted/flexbox/flexbox-flex-basis-content-004a.html new file mode 100644 index 0000000000..65a86b508f --- /dev/null +++ b/layout/reftests/w3c-css/submitted/flexbox/flexbox-flex-basis-content-004a.html @@ -0,0 +1,129 @@ + + + + + + CSS Test: Testing that explicit "flex-basis: content" is treated as + "max-content" when calculating flex base size + + + + + + + + + + + +
+
+
+ + +
+
+ + + +
+
+ + +
+
+ +
+
+ + +
+ +
+ + +
+
+ + + +
+
+ + +
+
+ + + +
+
+ + + diff --git a/layout/reftests/w3c-css/submitted/flexbox/flexbox-flex-basis-content-004b.html b/layout/reftests/w3c-css/submitted/flexbox/flexbox-flex-basis-content-004b.html new file mode 100644 index 0000000000..a686f1aa1e --- /dev/null +++ b/layout/reftests/w3c-css/submitted/flexbox/flexbox-flex-basis-content-004b.html @@ -0,0 +1,130 @@ + + + + + + CSS Test: Testing that used "flex-basis: content" is treated as + "max-content" when calculating flex base size + + + + + + + + + + + +
+
+
+ + +
+
+ + + +
+
+ + +
+
+ +
+
+ + +
+ +
+ + +
+
+ + + +
+
+ + +
+
+ + + +
+
+ + + diff --git a/layout/reftests/w3c-css/submitted/flexbox/reftest.list b/layout/reftests/w3c-css/submitted/flexbox/reftest.list index 075aa660e1..7cac455ae0 100644 --- a/layout/reftests/w3c-css/submitted/flexbox/reftest.list +++ b/layout/reftests/w3c-css/submitted/flexbox/reftest.list @@ -98,6 +98,16 @@ == flexbox-column-row-gap-004.html flexbox-column-row-gap-004-ref.html == flexbox-gap-position-absolute.html flexbox-gap-position-absolute-ref.html +# Tests for "flex-basis: content" +== flexbox-flex-basis-content-001a.html flexbox-flex-basis-content-001-ref.html +== flexbox-flex-basis-content-001b.html flexbox-flex-basis-content-001-ref.html +== flexbox-flex-basis-content-002a.html flexbox-flex-basis-content-002-ref.html +== flexbox-flex-basis-content-002b.html flexbox-flex-basis-content-002-ref.html +== flexbox-flex-basis-content-003a.html flexbox-flex-basis-content-003-ref.html +== flexbox-flex-basis-content-003b.html flexbox-flex-basis-content-003-ref.html +== flexbox-flex-basis-content-004a.html flexbox-flex-basis-content-004-ref.html +== flexbox-flex-basis-content-004b.html flexbox-flex-basis-content-004-ref.html + # Tests for flex-flow shorthand property == flexbox-flex-flow-001.html flexbox-flex-flow-001-ref.html == flexbox-flex-flow-002.html flexbox-flex-flow-002-ref.html diff --git a/layout/style/test/property_database.js b/layout/style/test/property_database.js index e3e719771b..5c6e2f6d86 100644 --- a/layout/style/test/property_database.js +++ b/layout/style/test/property_database.js @@ -4130,6 +4130,8 @@ var gCSSProperties = { "calc(50px/(2 - 1))", ], invalid_values: [ "none", "-2px", + /* invalid for width but not flex-basis */ + "content", /* invalid -moz-calc() values */ "-moz-calc(50%+ 2px)", "-moz-calc(50% +2px)", @@ -4645,12 +4647,18 @@ var gCSSProperties = { inherited: false, type: CSS_TYPE_LONGHAND, initial_values: [ " auto" ], - // NOTE: This is cribbed directly from the "width" chunk, since this - // property takes the exact same values as width (albeit with - // different semantics on 'auto'). - // XXXdholbert (Maybe these should get separated out into - // a reusable array defined at the top of this file?) - other_values: [ "15px", "3em", "15%", "-moz-max-content", "-moz-min-content", "-moz-fit-content", "-moz-available", + // NOTE: Besides "content", this is cribbed directly from the "width" + // chunk, since this property takes the exact same values as width + // (plus 'content' & with different semantics on 'auto'). + other_values: [ + "15px", + "3em", + "15%", + "-moz-max-content", + "-moz-min-content", + "-moz-fit-content", + "-moz-available", + "content", // valid calc() values "calc(-2px)", "calc(2px)", -- cgit v1.2.3