Add tests for fit-content block-size on constrained out-of-flow elements (#38186)
See https://bugzilla.mozilla.org/show_bug.cgi?id=1772305
diff --git a/css/css-sizing/fit-content-block-size-abspos.html b/css/css-sizing/fit-content-block-size-abspos.html
new file mode 100644
index 0000000..d8ce91f
--- /dev/null
+++ b/css/css-sizing/fit-content-block-size-abspos.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<link rel="author" title="Tim Nguyen" href="https://github.com/nt1m">
+<link rel="help" href="https://w3c.github.io/csswg-drafts/css-sizing-4/#valdef-width-fit-content">
+<link rel="match" href="fit-content-block-size-fixedpos-ref.html">
+<style>
+body {
+ overflow: hidden;
+}
+#container {
+ height: fit-content;
+ position: absolute;
+ top: 50%;
+ background-color: gold;
+ margin: auto;
+ bottom: 0;
+}
+</style>
+<div id="container">
+ <div style="height:90vh;width:50px;outline: 2px dotted red;"></div>
+</div>
diff --git a/css/css-sizing/fit-content-block-size-fixedpos-ref.html b/css/css-sizing/fit-content-block-size-fixedpos-ref.html
new file mode 100644
index 0000000..0f9f8bd
--- /dev/null
+++ b/css/css-sizing/fit-content-block-size-fixedpos-ref.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<style>
+#container {
+ height: 90vh;
+ position: fixed;
+ top: 50%;
+ background-color: gold;
+ margin: auto;
+ bottom: 0;
+}
+</style>
+<div id="container">
+ <div style="height:90vh;width:50px;outline: 2px dotted red;"></div>
+</div>
diff --git a/css/css-sizing/fit-content-block-size-fixedpos.html b/css/css-sizing/fit-content-block-size-fixedpos.html
new file mode 100644
index 0000000..1f08c6a
--- /dev/null
+++ b/css/css-sizing/fit-content-block-size-fixedpos.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<link rel="author" title="Tim Nguyen" href="https://github.com/nt1m">
+<link rel="help" href="https://w3c.github.io/csswg-drafts/css-sizing-4/#valdef-width-fit-content">
+<link rel="match" href="fit-content-block-size-fixedpos-ref.html">
+<style>
+#container {
+ height: fit-content;
+ position: fixed;
+ top: 50%;
+ background-color: gold;
+ margin: auto;
+ bottom: 0;
+}
+</style>
+<div id="container">
+ <div style="height:90vh;width:50px;outline: 2px dotted red;"></div>
+</div>